diff options
Diffstat (limited to 'mysql-test')
-rw-r--r-- | mysql-test/r/subselect_sj.result | 10 | ||||
-rw-r--r-- | mysql-test/r/subselect_sj_jcl6.result | 10 | ||||
-rw-r--r-- | mysql-test/t/subselect_sj.test | 7 |
3 files changed, 27 insertions, 0 deletions
diff --git a/mysql-test/r/subselect_sj.result b/mysql-test/r/subselect_sj.result index 2f9f3da3cfd..d32cba1952b 100644 --- a/mysql-test/r/subselect_sj.result +++ b/mysql-test/r/subselect_sj.result @@ -2772,4 +2772,14 @@ execute stmt; a b deallocate prepare stmt; drop table t1,t2; +# +# MDEV-4335: Unexpected results when selecting on information_schema +# +CREATE TABLE t1 (db VARCHAR(64) DEFAULT NULL); +INSERT INTO t1 VALUES ('mysql'),('information_schema'); +SELECT * FROM t1 WHERE db IN (SELECT `SCHEMA_NAME` FROM information_schema.SCHEMATA); +db +mysql +information_schema +DROP TABLE t1; set optimizer_switch=@subselect_sj_tmp; diff --git a/mysql-test/r/subselect_sj_jcl6.result b/mysql-test/r/subselect_sj_jcl6.result index de95dd80529..55068ce257a 100644 --- a/mysql-test/r/subselect_sj_jcl6.result +++ b/mysql-test/r/subselect_sj_jcl6.result @@ -2786,6 +2786,16 @@ execute stmt; a b deallocate prepare stmt; drop table t1,t2; +# +# MDEV-4335: Unexpected results when selecting on information_schema +# +CREATE TABLE t1 (db VARCHAR(64) DEFAULT NULL); +INSERT INTO t1 VALUES ('mysql'),('information_schema'); +SELECT * FROM t1 WHERE db IN (SELECT `SCHEMA_NAME` FROM information_schema.SCHEMATA); +db +information_schema +mysql +DROP TABLE t1; set optimizer_switch=@subselect_sj_tmp; # # BUG#49129: Wrong result with IN-subquery with join_cache_level=6 and firstmatch=off diff --git a/mysql-test/t/subselect_sj.test b/mysql-test/t/subselect_sj.test index 650c9d73893..c05896fadda 100644 --- a/mysql-test/t/subselect_sj.test +++ b/mysql-test/t/subselect_sj.test @@ -2481,6 +2481,13 @@ execute stmt; deallocate prepare stmt; drop table t1,t2; +--echo # +--echo # MDEV-4335: Unexpected results when selecting on information_schema +--echo # +CREATE TABLE t1 (db VARCHAR(64) DEFAULT NULL); +INSERT INTO t1 VALUES ('mysql'),('information_schema'); +SELECT * FROM t1 WHERE db IN (SELECT `SCHEMA_NAME` FROM information_schema.SCHEMATA); +DROP TABLE t1; # The following command must be the last one the file set optimizer_switch=@subselect_sj_tmp; |