~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to plugin/myisam/mi_unique.cc

  • Committer: Lee Bieber
  • Date: 2011-03-28 18:11:45 UTC
  • mfrom: (2254.1.2 build)
  • Revision ID: kalebral@gmail.com-20110328181145-tfsb6s5ozhuvhfoq
Merge Patrick - Tweaked dbqp so that the existing slave tests work.
Merge Stewart - remove over 1000 lines of mysys

Show diffs side-by-side

added added

removed removed

Lines of Context:
23
23
bool mi_check_unique(MI_INFO *info,
24
24
                     MI_UNIQUEDEF *def,
25
25
                     unsigned char *record,
26
 
                     internal::ha_checksum unique_hash,
 
26
                     ha_checksum unique_hash,
27
27
                     internal::my_off_t disk_pos)
28
28
{
29
29
  internal::my_off_t lastpos=info->lastpos;
76
76
    Add support for bit fields
77
77
*/
78
78
 
79
 
internal::ha_checksum mi_unique_hash(MI_UNIQUEDEF *def, const unsigned char *record)
 
79
ha_checksum mi_unique_hash(MI_UNIQUEDEF *def, const unsigned char *record)
80
80
{
81
81
  const unsigned char *pos, *end;
82
 
  internal::ha_checksum crc= 0;
 
82
  ha_checksum crc= 0;
83
83
  uint32_t seed1=0, seed2= 4;
84
84
  HA_KEYSEG *keyseg;
85
85
 
98
98
          done)
99
99
        */
100
100
        crc=((crc << 8) + 511+
101
 
             (crc >> (8*sizeof(internal::ha_checksum)-8)));
 
101
             (crc >> (8*sizeof(ha_checksum)-8)));
102
102
        continue;
103
103
      }
104
104
    }
131
131
      while (pos != end)
132
132
        crc=((crc << 8) +
133
133
             (((unsigned char)  *(unsigned char*) pos++))) +
134
 
          (crc >> (8*sizeof(internal::ha_checksum)-8));
 
134
          (crc >> (8*sizeof(ha_checksum)-8));
135
135
  }
136
136
  return crc;
137
137
}