Loading mysql-test/r/ctype_uca.result +3 −0 Original line number Diff line number Diff line Loading @@ -19,6 +19,9 @@ select 'a ' = 'a\t', 'a ' < 'a\t', 'a ' > 'a\t'; select 'a a' > 'a', 'a \t' < 'a'; 'a a' > 'a' 'a \t' < 'a' 1 1 select 'c' like '\_' as want0; want0 0 CREATE TABLE t ( c char(20) NOT NULL ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; Loading mysql-test/r/ctype_utf8.result +3 −0 Original line number Diff line number Diff line Loading @@ -814,3 +814,6 @@ t2 CREATE TABLE `t2` ( ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t2; drop table t1; select 'c' like '\_' as want0; want0 0 mysql-test/t/ctype_uca.test +5 −0 Original line number Diff line number Diff line Loading @@ -24,6 +24,11 @@ select 'a ' = 'a\t', 'a ' < 'a\t', 'a ' > 'a\t'; select 'a a' > 'a', 'a \t' < 'a'; # # Bug #6787 LIKE not working properly with _ and utf8 data # select 'c' like '\_' as want0; # # Bug #5679 utf8_unicode_ci LIKE--trailing % doesn't equal zero characters # Loading mysql-test/t/ctype_utf8.test +6 −0 Original line number Diff line number Diff line Loading @@ -660,3 +660,9 @@ create table t2 select concat(a,_utf8'') as a, concat(b,_utf8'')as b from t1; show create table t2; drop table t2; drop table t1; # # Bug #6787 LIKE not working properly with _ and utf8 data # select 'c' like '\_' as want0; strings/ctype-uca.c +3 −1 Original line number Diff line number Diff line Loading @@ -7288,6 +7288,7 @@ int my_wildcmp_uca(CHARSET_INFO *cs, { while (1) { my_bool escaped= 0; if ((scan= mb_wc(cs, &w_wc, (const uchar*)wildstr, (const uchar*)wildend)) <= 0) return 1; Loading @@ -7305,6 +7306,7 @@ int my_wildcmp_uca(CHARSET_INFO *cs, (const uchar*)wildend)) <= 0) return 1; wildstr+= scan; escaped= 1; } if ((scan= mb_wc(cs, &s_wc, (const uchar*)str, Loading @@ -7312,7 +7314,7 @@ int my_wildcmp_uca(CHARSET_INFO *cs, return 1; str+= scan; if (w_wc == (my_wc_t)w_one) if (!escaped && w_wc == (my_wc_t)w_one) { result= 1; /* Found an anchor char */ } Loading Loading
mysql-test/r/ctype_uca.result +3 −0 Original line number Diff line number Diff line Loading @@ -19,6 +19,9 @@ select 'a ' = 'a\t', 'a ' < 'a\t', 'a ' > 'a\t'; select 'a a' > 'a', 'a \t' < 'a'; 'a a' > 'a' 'a \t' < 'a' 1 1 select 'c' like '\_' as want0; want0 0 CREATE TABLE t ( c char(20) NOT NULL ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; Loading
mysql-test/r/ctype_utf8.result +3 −0 Original line number Diff line number Diff line Loading @@ -814,3 +814,6 @@ t2 CREATE TABLE `t2` ( ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t2; drop table t1; select 'c' like '\_' as want0; want0 0
mysql-test/t/ctype_uca.test +5 −0 Original line number Diff line number Diff line Loading @@ -24,6 +24,11 @@ select 'a ' = 'a\t', 'a ' < 'a\t', 'a ' > 'a\t'; select 'a a' > 'a', 'a \t' < 'a'; # # Bug #6787 LIKE not working properly with _ and utf8 data # select 'c' like '\_' as want0; # # Bug #5679 utf8_unicode_ci LIKE--trailing % doesn't equal zero characters # Loading
mysql-test/t/ctype_utf8.test +6 −0 Original line number Diff line number Diff line Loading @@ -660,3 +660,9 @@ create table t2 select concat(a,_utf8'') as a, concat(b,_utf8'')as b from t1; show create table t2; drop table t2; drop table t1; # # Bug #6787 LIKE not working properly with _ and utf8 data # select 'c' like '\_' as want0;
strings/ctype-uca.c +3 −1 Original line number Diff line number Diff line Loading @@ -7288,6 +7288,7 @@ int my_wildcmp_uca(CHARSET_INFO *cs, { while (1) { my_bool escaped= 0; if ((scan= mb_wc(cs, &w_wc, (const uchar*)wildstr, (const uchar*)wildend)) <= 0) return 1; Loading @@ -7305,6 +7306,7 @@ int my_wildcmp_uca(CHARSET_INFO *cs, (const uchar*)wildend)) <= 0) return 1; wildstr+= scan; escaped= 1; } if ((scan= mb_wc(cs, &s_wc, (const uchar*)str, Loading @@ -7312,7 +7314,7 @@ int my_wildcmp_uca(CHARSET_INFO *cs, return 1; str+= scan; if (w_wc == (my_wc_t)w_one) if (!escaped && w_wc == (my_wc_t)w_one) { result= 1; /* Found an anchor char */ } Loading