diff options
author | Georgi Kodinov <joro@sun.com> | 2009-06-04 12:52:40 +0300 |
---|---|---|
committer | Georgi Kodinov <joro@sun.com> | 2009-06-04 12:52:40 +0300 |
commit | 932c7a316c6ce72d48cac239c6256bdaa00da867 (patch) | |
tree | db585231e161fc99be624f81c4be84620ad6c790 /mysql-test | |
parent | 1a1ffe7312d54247c4aa05bdedfd8fd15adf36a5 (diff) | |
download | mariadb-git-932c7a316c6ce72d48cac239c6256bdaa00da867.tar.gz |
Bug #36995: valgrind error in remove_const during subquery executions
When copying the Item class one must copy its attributes as well.
Diffstat (limited to 'mysql-test')
-rw-r--r-- | mysql-test/r/innodb_mysql.result | 12 | ||||
-rw-r--r-- | mysql-test/t/innodb_mysql.test | 10 |
2 files changed, 22 insertions, 0 deletions
diff --git a/mysql-test/r/innodb_mysql.result b/mysql-test/r/innodb_mysql.result index b6fc58be4c2..a51dc978f3e 100644 --- a/mysql-test/r/innodb_mysql.result +++ b/mysql-test/r/innodb_mysql.result @@ -1303,4 +1303,16 @@ t1 CREATE TABLE `t1` ( CONSTRAINT `f2_ref` FOREIGN KEY (`f2`) REFERENCES `t1` (`f1`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1 DROP TABLE t1; +# +# Bug #36995: valgrind error in remove_const during subquery executions +# +create table t1 (a bit(1) not null,b int) engine=myisam; +create table t2 (c int) engine=innodb; +explain +select b from t1 where a not in (select b from t1,t2 group by a) group by a; +id select_type table type possible_keys key key_len ref rows Extra +1 PRIMARY NULL NULL NULL NULL NULL NULL NULL Impossible WHERE noticed after reading const tables +2 DEPENDENT SUBQUERY t1 system NULL NULL NULL NULL 0 const row not found +2 DEPENDENT SUBQUERY t2 ALL NULL NULL NULL NULL 1 +DROP TABLE t1,t2; End of 5.0 tests diff --git a/mysql-test/t/innodb_mysql.test b/mysql-test/t/innodb_mysql.test index 05be75fc368..3c81a27e9ac 100644 --- a/mysql-test/t/innodb_mysql.test +++ b/mysql-test/t/innodb_mysql.test @@ -1063,4 +1063,14 @@ CREATE TABLE t1 (f1 INTEGER PRIMARY KEY COMMENT 'My ID#', f2 INTEGER DEFAULT NUL SHOW CREATE TABLE t1; DROP TABLE t1; +--echo # +--echo # Bug #36995: valgrind error in remove_const during subquery executions +--echo # + +create table t1 (a bit(1) not null,b int) engine=myisam; +create table t2 (c int) engine=innodb; +explain +select b from t1 where a not in (select b from t1,t2 group by a) group by a; +DROP TABLE t1,t2; + --echo End of 5.0 tests |