Loading mysql-test/r/ctype_utf8.result +5 −0 Original line number Diff line number Diff line Loading @@ -639,3 +639,8 @@ select * from t1 where str='str'; str str drop table t1; CREATE TABLE t1 (a varchar(32) BINARY) CHARACTER SET utf8; INSERT INTO t1 VALUES ('test'); SELECT a FROM t1 WHERE a LIKE '%te'; a DROP TABLE t1; mysql-test/t/ctype_utf8.test +7 −0 Original line number Diff line number Diff line Loading @@ -492,3 +492,10 @@ INSERT INTO t1 VALUES ('str2'); select * from t1 where str='str'; drop table t1; # # Bug #5397: Crash with varchar binary and LIKE # CREATE TABLE t1 (a varchar(32) BINARY) CHARACTER SET utf8; INSERT INTO t1 VALUES ('test'); SELECT a FROM t1 WHERE a LIKE '%te'; DROP TABLE t1; strings/ctype-mb.c +1 −1 Original line number Diff line number Diff line Loading @@ -565,7 +565,7 @@ static int my_wildcmp_mb_bin(CHARSET_INFO *cs, if (str++ == str_end) return (-1); } { int tmp=my_wildcmp_mb(cs,str,str_end,wildstr,wildend,escape,w_one,w_many); int tmp=my_wildcmp_mb_bin(cs,str,str_end,wildstr,wildend,escape,w_one,w_many); if (tmp <= 0) return (tmp); } Loading Loading
mysql-test/r/ctype_utf8.result +5 −0 Original line number Diff line number Diff line Loading @@ -639,3 +639,8 @@ select * from t1 where str='str'; str str drop table t1; CREATE TABLE t1 (a varchar(32) BINARY) CHARACTER SET utf8; INSERT INTO t1 VALUES ('test'); SELECT a FROM t1 WHERE a LIKE '%te'; a DROP TABLE t1;
mysql-test/t/ctype_utf8.test +7 −0 Original line number Diff line number Diff line Loading @@ -492,3 +492,10 @@ INSERT INTO t1 VALUES ('str2'); select * from t1 where str='str'; drop table t1; # # Bug #5397: Crash with varchar binary and LIKE # CREATE TABLE t1 (a varchar(32) BINARY) CHARACTER SET utf8; INSERT INTO t1 VALUES ('test'); SELECT a FROM t1 WHERE a LIKE '%te'; DROP TABLE t1;
strings/ctype-mb.c +1 −1 Original line number Diff line number Diff line Loading @@ -565,7 +565,7 @@ static int my_wildcmp_mb_bin(CHARSET_INFO *cs, if (str++ == str_end) return (-1); } { int tmp=my_wildcmp_mb(cs,str,str_end,wildstr,wildend,escape,w_one,w_many); int tmp=my_wildcmp_mb_bin(cs,str,str_end,wildstr,wildend,escape,w_one,w_many); if (tmp <= 0) return (tmp); } Loading