summaryrefslogtreecommitdiff
path: root/mysql-test/r/subselect_sj2.result
diff options
context:
space:
mode:
authorNirbhay Choubey <nirbhay@mariadb.com>2015-10-31 18:07:02 -0400
committerNirbhay Choubey <nirbhay@mariadb.com>2015-10-31 18:07:02 -0400
commit4d1511296288782df0e3d9373396724e250b24c1 (patch)
tree9fa47d141b71933859d6c2da585e5bb5e52db212 /mysql-test/r/subselect_sj2.result
parent17b0b45b1de41a1b188c5de6c3e9d8e6ecc48a72 (diff)
parentd775ecdd010daad4dc6147fba58acd006bf2c60c (diff)
downloadmariadb-git-4d1511296288782df0e3d9373396724e250b24c1.tar.gz
Merge tag 'mariadb-10.0.22' into 10.0-galera
Diffstat (limited to 'mysql-test/r/subselect_sj2.result')
-rw-r--r--mysql-test/r/subselect_sj2.result33
1 files changed, 33 insertions, 0 deletions
diff --git a/mysql-test/r/subselect_sj2.result b/mysql-test/r/subselect_sj2.result
index 9a5da710a4c..e6259a3979b 100644
--- a/mysql-test/r/subselect_sj2.result
+++ b/mysql-test/r/subselect_sj2.result
@@ -1262,5 +1262,38 @@ id select_type table type possible_keys key key_len ref rows Extra
1 PRIMARY T2_0_ ref FK_T2_T1Id FK_T2_T1Id 8 test.T2_1_.t1idref 1 Using index; End temporary
drop table t3,t2,t1;
set optimizer_search_depth=@tmp7474;
+#
+#
+#
+CREATE TABLE t1 (
+id int(16) NOT NULL AUTO_INCREMENT,
+PRIMARY KEY (id)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE t2 (
+id int(16) NOT NULL AUTO_INCREMENT,
+t3_id int(16) NOT NULL DEFAULT '0',
+t1_id int(16) NOT NULL DEFAULT '0',
+PRIMARY KEY (id),
+KEY t3_idx (t3_id),
+KEY t1_idx (t1_id)
+) ENGINE=MyISAM DEFAULT CHARSET=utf8;
+CREATE TABLE t3 (
+id int(16) NOT NULL AUTO_INCREMENT,
+PRIMARY KEY (id)
+) ENGINE=MyISAM DEFAULT CHARSET=utf8;
+INSERT INTO t3 VALUES (1);
+INSERT INTO t2 VALUES (1, 1, 1);
+INSERT INTO t2 VALUES (2, 1, 2);
+INSERT INTO t2 VALUES (3, 1, 2);
+INSERT INTO t2 VALUES (4, 1, 1);
+INSERT INTO t1 VALUES (1);
+INSERT INTO t1 VALUES (2);
+SELECT * FROM t1 WHERE t1.id IN (
+SELECT t2.t1_id FROM t3 JOIN t2 ON t3.id = t2.t3_id WHERE t3.id = 1
+);
+id
+1
+2
+drop table t1,t2,t3;
# This must be the last in the file:
set optimizer_switch=@subselect_sj2_tmp;