diff options
author | unknown <bar@bar.mysql.r18.ru> | 2002-10-10 16:52:22 +0500 |
---|---|---|
committer | unknown <bar@bar.mysql.r18.ru> | 2002-10-10 16:52:22 +0500 |
commit | 72174d5b8207363aaf22dbc7b0b85d9bfa9505ab (patch) | |
tree | e790007e93397bb7bde6736323e58af58b68ba77 /heap | |
parent | b9bb3534f1ca2af09f636253650b68b0f2840f65 (diff) | |
download | mariadb-git-72174d5b8207363aaf22dbc7b0b85d9bfa9505ab.tar.gz |
Move hash_sort and hash_caseup into CHARSET_INFO for all charsets
Diffstat (limited to 'heap')
-rw-r--r-- | heap/hp_hash.c | 27 |
1 files changed, 2 insertions, 25 deletions
diff --git a/heap/hp_hash.c b/heap/hp_hash.c index b0533e9c7a4..ea48bd0c947 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 { |