mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
Don't use sort_order directly
This commit is contained in:
@ -36,7 +36,7 @@ const HA_KEYSEG ft_keysegs[FT_SEGS]={
|
|||||||
HA_FT_WLEN, /* start */
|
HA_FT_WLEN, /* start */
|
||||||
#endif /* EVAL_RUN */
|
#endif /* EVAL_RUN */
|
||||||
0, /* null_pos */
|
0, /* null_pos */
|
||||||
NULL /* sort_order */
|
NULL /* charset */
|
||||||
},
|
},
|
||||||
#ifdef EVAL_RUN
|
#ifdef EVAL_RUN
|
||||||
{
|
{
|
||||||
|
@ -20,28 +20,9 @@
|
|||||||
int mi_compare_text(CHARSET_INFO *charset_info, uchar *a, uint a_length,
|
int mi_compare_text(CHARSET_INFO *charset_info, uchar *a, uint a_length,
|
||||||
uchar *b, uint b_length, my_bool part_key)
|
uchar *b, uint b_length, my_bool part_key)
|
||||||
{
|
{
|
||||||
int flag;
|
|
||||||
|
|
||||||
#ifdef USE_STRCOLL
|
|
||||||
if (use_strnxfrm(charset_info))
|
|
||||||
{
|
|
||||||
if (part_key && b_length < a_length)
|
|
||||||
a_length=b_length;
|
|
||||||
return my_strnncoll(charset_info, a, a_length, b, b_length);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
#endif
|
|
||||||
{
|
|
||||||
uint length= min(a_length,b_length);
|
|
||||||
uchar *end= a+ length;
|
|
||||||
uchar *sort_order=charset_info->sort_order;
|
|
||||||
while (a < end)
|
|
||||||
if ((flag= (int) sort_order[*a++] - (int) sort_order[*b++]))
|
|
||||||
return flag;
|
|
||||||
}
|
|
||||||
if (part_key && b_length < a_length)
|
if (part_key && b_length < a_length)
|
||||||
return 0;
|
a_length=b_length;
|
||||||
return (int) (a_length-b_length);
|
return my_strnncoll(charset_info, a, a_length, b, b_length);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int compare_bin(uchar *a, uint a_length, uchar *b, uint b_length,
|
static int compare_bin(uchar *a, uint a_length, uchar *b, uint b_length,
|
||||||
|
Reference in New Issue
Block a user