summaryrefslogtreecommitdiff
path: root/mysql-test/t/subselect_sj.test
diff options
context:
space:
mode:
authorSergey Petrunya <psergey@askmonty.org>2013-03-29 19:27:06 +0400
committerSergey Petrunya <psergey@askmonty.org>2013-03-29 19:27:06 +0400
commit3345e7564d033313ac54ca34d1505d6a2e78cdad (patch)
treee1fabb2571e0459524c503ca55214966be0192a3 /mysql-test/t/subselect_sj.test
parentd4de82d93e58a74172960853b07c717377f57e6b (diff)
downloadmariadb-git-3345e7564d033313ac54ca34d1505d6a2e78cdad.tar.gz
MDEV-4335: Unexpected results when selecting on information_schema
- When converting a subquery to a semi-join, propagate OPTION_SCHEMA_TABLE.
Diffstat (limited to 'mysql-test/t/subselect_sj.test')
-rw-r--r--mysql-test/t/subselect_sj.test7
1 files changed, 7 insertions, 0 deletions
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;