summaryrefslogtreecommitdiff
path: root/heap/hp_hash.c
diff options
context:
space:
mode:
authorbar@gw.udmsearch.izhnet.ru <>2002-03-12 21:37:58 +0400
committerbar@gw.udmsearch.izhnet.ru <>2002-03-12 21:37:58 +0400
commitb37ce8e76944610b92087fe0e04e05f1b60903c8 (patch)
treeaa6dbf1781d8122e350474b0cac9e5ee443426bc /heap/hp_hash.c
parent4237e7ace74c21d007964940f26f5496027d6e3d (diff)
downloadmariadb-git-b37ce8e76944610b92087fe0e04e05f1b60903c8.tar.gz
New ctype functions/macros to support many charsets at a time
Diffstat (limited to 'heap/hp_hash.c')
-rw-r--r--heap/hp_hash.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/heap/hp_hash.c b/heap/hp_hash.c
index e29e51d2b75..519779d330d 100644
--- a/heap/hp_hash.c
+++ b/heap/hp_hash.c
@@ -173,7 +173,7 @@ ulong _hp_hashnr(register HP_KEYDEF *keydef, register const byte *key)
for (; pos < (uchar*) key ; pos++)
{
nr^=(ulong) ((((uint) nr & 63)+nr2) *
- ((uint) my_sort_order[(uint) *pos])) + (nr << 8);
+ ((uint) default_charset_info->sort_order[(uint) *pos])) + (nr << 8);
nr2+=3;
}
}
@@ -212,7 +212,7 @@ ulong _hp_rec_hashnr(register HP_KEYDEF *keydef, register const byte *rec)
for (; pos < end ; pos++)
{
nr^=(ulong) ((((uint) nr & 63)+nr2)*
- ((uint) my_sort_order[(uint) *pos]))+ (nr << 8);
+ ((uint) default_charset_info->sort_order[(uint) *pos]))+ (nr << 8);
nr2+=3;
}
}
@@ -343,7 +343,7 @@ int _hp_rec_key_cmp(HP_KEYDEF *keydef, const byte *rec1, const byte *rec2)
}
if (seg->type == HA_KEYTYPE_TEXT)
{
- if (my_sortcmp(rec1+seg->start,rec2+seg->start,seg->length))
+ if (my_sortcmp(default_charset_info,rec1+seg->start,rec2+seg->start,seg->length))
return 1;
}
else
@@ -375,7 +375,12 @@ int _hp_key_cmp(HP_KEYDEF *keydef, const byte *rec, const byte *key)
}
if (seg->type == HA_KEYTYPE_TEXT)
{
- if (my_sortcmp(rec+seg->start,key,seg->length))
+ /*
+ BAR TODO: this will not use default_charset_info
+ I need Ram to apply his HEAP patches with
+ CHARSET_INFO field in HP segments
+ */
+ if (my_sortcmp(default_charset_info,rec+seg->start,key,seg->length))
return 1;
}
else