diff options
author | unknown <monty@narttu.mysql.fi> | 2002-10-14 12:07:16 +0300 |
---|---|---|
committer | unknown <monty@narttu.mysql.fi> | 2002-10-14 12:07:16 +0300 |
commit | 6fc7e94616ef775731423db63af7fc506fdddcae (patch) | |
tree | 26137c7c29554f0b9d1336080b6cdc1044fb6839 /heap | |
parent | 40c2e7499b40a10ee2b8042e5d672b7c4d4c66fe (diff) | |
parent | a299a27021a7bdd65f93f99f9eb0003f082b305d (diff) | |
download | mariadb-git-6fc7e94616ef775731423db63af7fc506fdddcae.tar.gz |
merge
client/mysql.cc:
Auto merged
sql/ha_innodb.cc:
Auto merged
sql/sql_lex.h:
Auto merged
sql/sql_union.cc:
Auto merged
Diffstat (limited to 'heap')
-rw-r--r-- | heap/hp_hash.c | 43 |
1 files changed, 6 insertions, 37 deletions
diff --git a/heap/hp_hash.c b/heap/hp_hash.c index 0145e0d503c..e28f4725caf 100644 --- a/heap/hp_hash.c +++ b/heap/hp_hash.c @@ -214,18 +214,7 @@ ulong hp_hashnr(register HP_KEYDEF *keydef, register const byte *key) } if (seg->type == HA_KEYTYPE_TEXT) { - if (seg->charset->hash_sort) - seg->charset->hash_sort(seg->charset,pos,((uchar*)key)-pos,&nr,&nr2); - else - { - register uchar *sort_order=seg->charset->sort_order; - for (; pos < (uchar*) key ; pos++) - { - nr^=(ulong) ((((uint) nr & 63)+nr2) * - ((uint) sort_order[(uint) *pos])) + (nr << 8); - nr2+=3; - } - } + seg->charset->hash_sort(seg->charset,pos,((uchar*)key)-pos,&nr,&nr2); } else { @@ -260,19 +249,7 @@ ulong hp_rec_hashnr(register HP_KEYDEF *keydef, register const byte *rec) } if (seg->type == HA_KEYTYPE_TEXT) { - if (seg->charset->hash_sort) - seg->charset->hash_sort(seg->charset,pos,end-pos,&nr,&nr2); - else - { - register uchar *sort_order=seg->charset->sort_order; - - for (; pos < end ; pos++) - { - nr^=(ulong) ((((uint) nr & 63)+nr2)* - ((uint) sort_order[(uint) *pos]))+ (nr << 8); - nr2+=3; - } - } + seg->charset->hash_sort(seg->charset,pos,end-pos,&nr,&nr2); } else { @@ -324,11 +301,7 @@ ulong hp_hashnr(register HP_KEYDEF *keydef, register const byte *key) } if (seg->type == HA_KEYTYPE_TEXT) { - for (; pos < (uchar*) key ; pos++) - { - nr *=16777619; - nr ^=((uint) my_sort_order[(uint) *pos]); - } + seg->charset->hash_sort(seg->charset,pos,((uchar*)key)-pos,&nr,NULL); } else { @@ -362,11 +335,7 @@ ulong hp_rec_hashnr(register HP_KEYDEF *keydef, register const byte *rec) } if (seg->type == HA_KEYTYPE_TEXT) { - for ( ; pos < end ; pos++) - { - nr *=16777619; - nr ^=(uint) my_sort_order[(uint) *pos]; - } + seg->charset->hash_sort(seg->charset,pos,((uchar*)key)-pos,&nr,NULL); } else { @@ -401,7 +370,7 @@ int hp_rec_key_cmp(HP_KEYDEF *keydef, const byte *rec1, const byte *rec2) } if (seg->type == HA_KEYTYPE_TEXT) { - if (my_sortcmp(seg->charset,rec1+seg->start,rec2+seg->start,seg->length)) + if (my_strnncoll(seg->charset,rec1+seg->start,seg->length,rec2+seg->start,seg->length)) return 1; } else @@ -433,7 +402,7 @@ int hp_key_cmp(HP_KEYDEF *keydef, const byte *rec, const byte *key) } if (seg->type == HA_KEYTYPE_TEXT) { - if (my_sortcmp(seg->charset,rec+seg->start,key,seg->length)) + if (my_strnncoll(seg->charset,rec+seg->start,seg->length,key,seg->length)) return 1; } else |