mirror of
https://github.com/MariaDB/server.git
synced 2026-04-26 02:05:31 +02:00
ctype_ucs.result, ctype_ucs.test, ctype_utf8.result, ctype_utf8.test:
Fixing tests accordingly. ctype-ucs2.c: The same fix for UCS2. ctype-utf8.c: Bug #9557 MyISAM utf8 table crash The problem was that my_strnncollsp_xxx could return big value in the range 0..0xffff. for some constant pairs it could return 32738, which is defined as MI_FOUND_WRONG_KEY in myisamdef.h. As a result, table considered to be crashed. Fix to return -1,0 or 1. strings/ctype-utf8.c: Bug #9557 MyISAM utf8 table crash The problem was that my_strnncollsp_xxx could return big value in the range 0..0xffff. for some constant pairs it could return 32738, which is defined as MI_FOUND_WRONG_KEY in myisamdef.h. As a result, table considered to be crashed. Fix to return -1,0 or 1. strings/ctype-ucs2.c: The same fix for UCS2. mysql-test/t/ctype_utf8.test: Fixing tests accordingly. mysql-test/r/ctype_utf8.result: Fixing tests accordingly. mysql-test/t/ctype_ucs.test: Fixing tests accordingly. mysql-test/r/ctype_ucs.result: Fixing tests accordingly.
This commit is contained in:
parent
0037781f05
commit
2776aa35b7
6 changed files with 51 additions and 5 deletions
|
|
@ -2000,7 +2000,7 @@ static int my_strnncoll_utf8(CHARSET_INFO *cs,
|
|||
t_wc = uni_plane[plane] ? uni_plane[plane][t_wc & 0xFF].sort : t_wc;
|
||||
if ( s_wc != t_wc )
|
||||
{
|
||||
return ((int) s_wc) - ((int) t_wc);
|
||||
return s_wc > t_wc ? 1 : -1;
|
||||
}
|
||||
|
||||
s+=s_res;
|
||||
|
|
@ -2065,7 +2065,7 @@ static int my_strnncollsp_utf8(CHARSET_INFO *cs,
|
|||
t_wc = uni_plane[plane] ? uni_plane[plane][t_wc & 0xFF].sort : t_wc;
|
||||
if ( s_wc != t_wc )
|
||||
{
|
||||
return ((int) s_wc) - ((int) t_wc);
|
||||
return s_wc > t_wc ? 1 : -1;
|
||||
}
|
||||
|
||||
s+=s_res;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue