Loading mysql-test/r/ctype_gbk.result +7 −0 Original line number Diff line number Diff line Loading @@ -247,4 +247,11 @@ t1 CREATE TABLE `t1` ( `c2` text NOT NULL ) ENGINE=MyISAM DEFAULT CHARSET=gbk drop table t1; CREATE TABLE t1(a MEDIUMTEXT CHARACTER SET gbk, b MEDIUMTEXT CHARACTER SET big5); INSERT INTO t1 VALUES (REPEAT(0x1125,200000), REPEAT(0x1125,200000)), ('', ''), ('', ''); SELECT a FROM t1 GROUP BY 1 LIMIT 1 INTO @nullll; SELECT b FROM t1 GROUP BY 1 LIMIT 1 INTO @nullll; DROP TABLES t1; End of 5.0 tests mysql-test/r/subselect3.result +9 −0 Original line number Diff line number Diff line Loading @@ -770,4 +770,13 @@ SELECT ROW(1, 2) IN (SELECT t1.a, 2 FROM t2) FROM t1 GROUP BY t1.a; ROW(1, 2) IN (SELECT t1.a, 2 FROM t2) 1 DROP TABLE t1, t2; CREATE TABLE t1 (a INT); INSERT INTO t1 VALUES (1),(2),(3); CREATE TABLE t2 SELECT * FROM t1; SELECT 1 FROM t1 WHERE t1.a NOT IN (SELECT 1 FROM t1, t2 WHERE 0); 1 1 1 1 DROP TABLE t1, t2; End of 5.0 tests mysql-test/t/ctype_gbk.test +14 −0 Original line number Diff line number Diff line Loading @@ -53,4 +53,18 @@ alter table t1 change c1 c1 mediumtext character set gbk not null; show create table t1; drop table t1; # # Bug#35993: severe memory corruption and crash with multibyte conversion # CREATE TABLE t1(a MEDIUMTEXT CHARACTER SET gbk, b MEDIUMTEXT CHARACTER SET big5); INSERT INTO t1 VALUES (REPEAT(0x1125,200000), REPEAT(0x1125,200000)), ('', ''), ('', ''); SELECT a FROM t1 GROUP BY 1 LIMIT 1 INTO @nullll; SELECT b FROM t1 GROUP BY 1 LIMIT 1 INTO @nullll; DROP TABLES t1; --echo End of 5.0 tests mysql-test/t/subselect3.test +13 −0 Original line number Diff line number Diff line Loading @@ -605,4 +605,17 @@ SELECT ROW(1, 2) IN (SELECT t1.a, 2 FROM t2) FROM t1 GROUP BY t1.a; DROP TABLE t1, t2; # # Bug #36005: crash in subselect with single row # (subselect_single_select_engine::exec) # CREATE TABLE t1 (a INT); INSERT INTO t1 VALUES (1),(2),(3); CREATE TABLE t2 SELECT * FROM t1; SELECT 1 FROM t1 WHERE t1.a NOT IN (SELECT 1 FROM t1, t2 WHERE 0); DROP TABLE t1, t2; --echo End of 5.0 tests sql/sql_select.cc +1 −0 Original line number Diff line number Diff line Loading @@ -846,6 +846,7 @@ JOIN::optimize() "Impossible HAVING" : "Impossible WHERE")); zero_result_cause= having_value == Item::COND_FALSE ? "Impossible HAVING" : "Impossible WHERE"; tables= 0; error= 0; DBUG_RETURN(0); } Loading Loading
mysql-test/r/ctype_gbk.result +7 −0 Original line number Diff line number Diff line Loading @@ -247,4 +247,11 @@ t1 CREATE TABLE `t1` ( `c2` text NOT NULL ) ENGINE=MyISAM DEFAULT CHARSET=gbk drop table t1; CREATE TABLE t1(a MEDIUMTEXT CHARACTER SET gbk, b MEDIUMTEXT CHARACTER SET big5); INSERT INTO t1 VALUES (REPEAT(0x1125,200000), REPEAT(0x1125,200000)), ('', ''), ('', ''); SELECT a FROM t1 GROUP BY 1 LIMIT 1 INTO @nullll; SELECT b FROM t1 GROUP BY 1 LIMIT 1 INTO @nullll; DROP TABLES t1; End of 5.0 tests
mysql-test/r/subselect3.result +9 −0 Original line number Diff line number Diff line Loading @@ -770,4 +770,13 @@ SELECT ROW(1, 2) IN (SELECT t1.a, 2 FROM t2) FROM t1 GROUP BY t1.a; ROW(1, 2) IN (SELECT t1.a, 2 FROM t2) 1 DROP TABLE t1, t2; CREATE TABLE t1 (a INT); INSERT INTO t1 VALUES (1),(2),(3); CREATE TABLE t2 SELECT * FROM t1; SELECT 1 FROM t1 WHERE t1.a NOT IN (SELECT 1 FROM t1, t2 WHERE 0); 1 1 1 1 DROP TABLE t1, t2; End of 5.0 tests
mysql-test/t/ctype_gbk.test +14 −0 Original line number Diff line number Diff line Loading @@ -53,4 +53,18 @@ alter table t1 change c1 c1 mediumtext character set gbk not null; show create table t1; drop table t1; # # Bug#35993: severe memory corruption and crash with multibyte conversion # CREATE TABLE t1(a MEDIUMTEXT CHARACTER SET gbk, b MEDIUMTEXT CHARACTER SET big5); INSERT INTO t1 VALUES (REPEAT(0x1125,200000), REPEAT(0x1125,200000)), ('', ''), ('', ''); SELECT a FROM t1 GROUP BY 1 LIMIT 1 INTO @nullll; SELECT b FROM t1 GROUP BY 1 LIMIT 1 INTO @nullll; DROP TABLES t1; --echo End of 5.0 tests
mysql-test/t/subselect3.test +13 −0 Original line number Diff line number Diff line Loading @@ -605,4 +605,17 @@ SELECT ROW(1, 2) IN (SELECT t1.a, 2 FROM t2) FROM t1 GROUP BY t1.a; DROP TABLE t1, t2; # # Bug #36005: crash in subselect with single row # (subselect_single_select_engine::exec) # CREATE TABLE t1 (a INT); INSERT INTO t1 VALUES (1),(2),(3); CREATE TABLE t2 SELECT * FROM t1; SELECT 1 FROM t1 WHERE t1.a NOT IN (SELECT 1 FROM t1, t2 WHERE 0); DROP TABLE t1, t2; --echo End of 5.0 tests
sql/sql_select.cc +1 −0 Original line number Diff line number Diff line Loading @@ -846,6 +846,7 @@ JOIN::optimize() "Impossible HAVING" : "Impossible WHERE")); zero_result_cause= having_value == Item::COND_FALSE ? "Impossible HAVING" : "Impossible WHERE"; tables= 0; error= 0; DBUG_RETURN(0); } Loading