mirror of
https://github.com/MariaDB/server.git
synced 2026-05-10 00:54:30 +02:00
Simple charsets now have strncoll() field too
This commit is contained in:
parent
ac97cce461
commit
edb8ae0f38
16 changed files with 118 additions and 91 deletions
12
isam/_key.c
12
isam/_key.c
|
|
@ -54,11 +54,11 @@ uint _nisam_make_key(register N_INFO *info, uint keynr, uchar *key, const char *
|
|||
*key++= (uchar) (length=(uint) (end-pos));
|
||||
memcpy((byte*) key,(byte*) pos,(size_t) length);
|
||||
#ifdef USE_STRCOLL
|
||||
if (!use_strcoll(default_charset_info))
|
||||
if (!use_strnxfrm(default_charset_info))
|
||||
#endif
|
||||
{
|
||||
if (type == HA_KEYTYPE_TEXT)
|
||||
case_sort(default_charset_info,(byte*) key,length);
|
||||
my_tosort(default_charset_info,(byte*) key,length);
|
||||
}
|
||||
key+=length;
|
||||
}
|
||||
|
|
@ -67,11 +67,11 @@ uint _nisam_make_key(register N_INFO *info, uint keynr, uchar *key, const char *
|
|||
memcpy((byte*) key,(byte*) record+keyseg->base.start,
|
||||
(size_t) keyseg->base.length);
|
||||
#ifdef USE_STRCOLL
|
||||
if (!use_strcoll(default_charset_info))
|
||||
if (!use_strnxfrm(default_charset_info))
|
||||
#endif
|
||||
{
|
||||
if (type == HA_KEYTYPE_TEXT)
|
||||
case_sort(default_charset_info,(byte*) key,(uint) keyseg->base.length);
|
||||
my_tosort(default_charset_info,(byte*) key,(uint) keyseg->base.length);
|
||||
}
|
||||
#ifdef NAN_TEST
|
||||
else if (type == HA_KEYTYPE_FLOAT)
|
||||
|
|
@ -150,11 +150,11 @@ uint _nisam_pack_key(register N_INFO *info, uint keynr, uchar *key, uchar *old,
|
|||
else
|
||||
memcpy((byte*) key,old,(size_t) length);
|
||||
#ifdef USE_STRCOLL
|
||||
if (!use_strcoll(default_charset_info))
|
||||
if (!use_strnxfrm(default_charset_info))
|
||||
#endif
|
||||
{
|
||||
if (type == HA_KEYTYPE_TEXT)
|
||||
case_sort(default_charset_info,(byte*) key,length);
|
||||
my_tosort(default_charset_info,(byte*) key,length);
|
||||
}
|
||||
key+= length;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -332,7 +332,7 @@ int _nisam_key_cmp(register N_KEYSEG *keyseg, register uchar *a, register uchar
|
|||
end= a+ min(key_length,(uint) length);
|
||||
|
||||
#ifdef USE_STRCOLL
|
||||
if (use_strcoll(default_charset_info)) {
|
||||
if (use_strnxfrm(default_charset_info)) {
|
||||
if (((enum ha_base_keytype) keyseg->base.type) == HA_KEYTYPE_BINARY)
|
||||
{
|
||||
while (a < end)
|
||||
|
|
@ -383,7 +383,7 @@ int _nisam_key_cmp(register N_KEYSEG *keyseg, register uchar *a, register uchar
|
|||
else
|
||||
{
|
||||
#ifdef USE_STRCOLL
|
||||
if (use_strcoll(default_charset_info)) {
|
||||
if (use_strnxfrm(default_charset_info)) {
|
||||
if (((enum ha_base_keytype) keyseg->base.type) == HA_KEYTYPE_BINARY)
|
||||
{
|
||||
while (a < end)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue