summaryrefslogtreecommitdiff
path: root/myisam/mi_unique.c
diff options
context:
space:
mode:
Diffstat (limited to 'myisam/mi_unique.c')
-rw-r--r--myisam/mi_unique.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/myisam/mi_unique.c b/myisam/mi_unique.c
index 77e967e52e2..ad685f4cbdc 100644
--- a/myisam/mi_unique.c
+++ b/myisam/mi_unique.c
@@ -70,7 +70,7 @@ ha_checksum mi_unique_hash(MI_UNIQUEDEF *def, const byte *record)
{
const byte *pos, *end;
ha_checksum crc= 0;
- ulong seed= 4;
+ ulong seed1=0, seed2= 4;
HA_KEYSEG *keyseg;
for (keyseg=def->seg ; keyseg < def->end ; keyseg++)
@@ -109,11 +109,10 @@ ha_checksum mi_unique_hash(MI_UNIQUEDEF *def, const byte *record)
end= pos+length;
if (type == HA_KEYTYPE_TEXT || type == HA_KEYTYPE_VARTEXT)
{
- ulong tmp= 0;
keyseg->charset->coll->hash_sort(keyseg->charset,
- (const uchar*) pos, length, &tmp,
- &seed);
- crc^= tmp;
+ (const uchar*) pos, length, &seed1,
+ &seed2);
+ crc^= seed1;
}
else
while (pos != end)