From 3345e7564d033313ac54ca34d1505d6a2e78cdad Mon Sep 17 00:00:00 2001 From: Sergey Petrunya Date: Fri, 29 Mar 2013 19:27:06 +0400 Subject: MDEV-4335: Unexpected results when selecting on information_schema - When converting a subquery to a semi-join, propagate OPTION_SCHEMA_TABLE. --- mysql-test/t/subselect_sj.test | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'mysql-test/t/subselect_sj.test') 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; -- cgit v1.2.1