summaryrefslogtreecommitdiff
path: root/isam
diff options
context:
space:
mode:
authorunknown <bar@bar.mysql.r18.ru>2003-04-01 12:45:16 +0500
committerunknown <bar@bar.mysql.r18.ru>2003-04-01 12:45:16 +0500
commit7f3ef183d341aec17d48a7c1d22a76ab0cda5969 (patch)
treeef837bf4fdaa936bc57607d203b03ebdf06a0a26 /isam
parent1eb589ba7753771a8ded64b371831bd68dc047be (diff)
downloadmariadb-git-7f3ef183d341aec17d48a7c1d22a76ab0cda5969.tar.gz
Some optimization in CHARSET_INFO:
We don't need separate hash_sort() and hash_caseup() We don't need tosort(). strnxfrm will do the same.
Diffstat (limited to 'isam')
-rw-r--r--isam/_key.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/isam/_key.c b/isam/_key.c
index 871ec82eba7..65d6885869e 100644
--- a/isam/_key.c
+++ b/isam/_key.c
@@ -56,7 +56,8 @@ uint _nisam_make_key(register N_INFO *info, uint keynr, uchar *key, const char *
if (!use_strnxfrm(default_charset_info))
{
if (type == HA_KEYTYPE_TEXT)
- my_tosort(default_charset_info,(byte*) key,length);
+ my_strnxfrm(default_charset_info,(uchar*) key, length,
+ (uchar*) key, length);
}
key+=length;
}
@@ -67,7 +68,10 @@ uint _nisam_make_key(register N_INFO *info, uint keynr, uchar *key, const char *
if (!use_strnxfrm(default_charset_info))
{
if (type == HA_KEYTYPE_TEXT)
- my_tosort(default_charset_info,(byte*) key,(uint) keyseg->base.length);
+ my_strnxfrm(default_charset_info,(uchar*) key,
+ (uint) keyseg->base.length,
+ (uchar*) key,
+ (uint) keyseg->base.length);
}
#ifdef NAN_TEST
else if (type == HA_KEYTYPE_FLOAT)
@@ -148,7 +152,8 @@ uint _nisam_pack_key(register N_INFO *info, uint keynr, uchar *key, uchar *old,
if (!use_strnxfrm(default_charset_info))
{
if (type == HA_KEYTYPE_TEXT)
- my_tosort(default_charset_info,(byte*) key,length);
+ my_strnxfrm(default_charset_info,(uchar*) key,length,
+ (uchar*) key,length);
}
key+= length;
}