1
0
mirror of https://github.com/MariaDB/server.git synced 2026-01-06 05:22:24 +03:00

BINARY charset is now used instead of binary_flag

This commit is contained in:
bar@bar.mysql.r18.ru
2002-10-25 13:58:32 +05:00
parent 0ca3212a8c
commit 95aef91521
25 changed files with 199 additions and 226 deletions

View File

@@ -521,12 +521,23 @@ int sortcmp(const String *x,const String *y)
#endif /* USE_STRCOLL */
x_len-=len; // For easy end space test
y_len-=len;
while (len--)
if (x->str_charset->sort_order)
{
if (x->str_charset->sort_order[(uchar) *s++] !=
while (len--)
{
if (x->str_charset->sort_order[(uchar) *s++] !=
x->str_charset->sort_order[(uchar) *t++])
return ((int) x->str_charset->sort_order[(uchar) s[-1]] -
(int) x->str_charset->sort_order[(uchar) t[-1]]);
return ((int) x->str_charset->sort_order[(uchar) s[-1]] -
(int) x->str_charset->sort_order[(uchar) t[-1]]);
}
}
else
{
while (len--)
{
if (*s++ != *t++)
return ((int) s[-1] - (int) t[-1]);
}
}
#ifndef CMP_ENDSPACE
/* Don't compare end space in strings */