summaryrefslogtreecommitdiff
path: root/heap
diff options
context:
space:
mode:
authorunknown <bar@bar.mysql.r18.ru>2002-10-10 16:52:22 +0500
committerunknown <bar@bar.mysql.r18.ru>2002-10-10 16:52:22 +0500
commit72174d5b8207363aaf22dbc7b0b85d9bfa9505ab (patch)
treee790007e93397bb7bde6736323e58af58b68ba77 /heap
parentb9bb3534f1ca2af09f636253650b68b0f2840f65 (diff)
downloadmariadb-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.c27
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
{