summaryrefslogtreecommitdiff
path: root/myisam/mi_unique.c
diff options
context:
space:
mode:
authorunknown <bar@bar.mysql.r18.ru>2002-10-10 17:14:56 +0500
committerunknown <bar@bar.mysql.r18.ru>2002-10-10 17:14:56 +0500
commit23aa0b72de59087beb1588f63eed4add1f02806a (patch)
treef3903780ba0e86bebf8e27358f4e75626afdd495 /myisam/mi_unique.c
parentab9ea7cf9975e96657b4b38790c4dc4c6515d8af (diff)
downloadmariadb-git-23aa0b72de59087beb1588f63eed4add1f02806a.tar.gz
Don't use sort_order directly
Diffstat (limited to 'myisam/mi_unique.c')
-rw-r--r--myisam/mi_unique.c17
1 files changed, 3 insertions, 14 deletions
diff --git a/myisam/mi_unique.c b/myisam/mi_unique.c
index 2101c656324..682f946eba7 100644
--- a/myisam/mi_unique.c
+++ b/myisam/mi_unique.c
@@ -99,20 +99,9 @@ ha_checksum mi_unique_hash(MI_UNIQUEDEF *def, const byte *record)
end= pos+length;
if (type == HA_KEYTYPE_TEXT || type == HA_KEYTYPE_VARTEXT)
{
- if (keyseg->charset->hash_sort)
- {
- ulong nr=1, nr2=4;
- keyseg->charset->hash_sort(keyseg->charset,(const uchar*)pos,length,&nr, &nr2);
- crc=nr;
- }
- else
- {
- uchar *sort_order=keyseg->charset->sort_order;
- while (pos != end)
- crc=((crc << 8) +
- (((uchar) sort_order[*(uchar*) pos++]))) +
- (crc >> (8*sizeof(ha_checksum)-8));
- }
+ ulong nr=1, nr2=4;
+ keyseg->charset->hash_sort(keyseg->charset,(const uchar*)pos,length,&nr, &nr2);
+ crc=nr;
}
else
while (pos != end)