1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-27 18:02:13 +03:00

BINARY charset is now used instead of binary_flag

This commit is contained in:
unknown
2002-10-25 13:58:32 +05:00
parent 372b26e778
commit e823751548
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 */