summaryrefslogtreecommitdiff
path: root/mysql-test/r/innodb_ext_key.result
diff options
context:
space:
mode:
authorIgor Babaev <igor@askmonty.org>2012-01-17 03:26:49 -0800
committerIgor Babaev <igor@askmonty.org>2012-01-17 03:26:49 -0800
commit7902a73d4cf71eada787f1f1886685bfd44ebea4 (patch)
tree95f5c5e221f7b51f2544b74444271fa0898d0f57 /mysql-test/r/innodb_ext_key.result
parent01dc15f3a7b7d9bc3f8747142de31ba678661a13 (diff)
downloadmariadb-git-7902a73d4cf71eada787f1f1886685bfd44ebea4.tar.gz
Fixed LP bug #914560.
The patch for MWL #247 forgot to initialize the TABLE::ext_key_parts and TABLE::ext_key_flags of the temporary tables by a query. This could cause crashes for queries the execution of which needed creation of temporary tables.
Diffstat (limited to 'mysql-test/r/innodb_ext_key.result')
-rw-r--r--mysql-test/r/innodb_ext_key.result25
1 files changed, 24 insertions, 1 deletions
diff --git a/mysql-test/r/innodb_ext_key.result b/mysql-test/r/innodb_ext_key.result
index 7518d78dda4..57377271fc7 100644
--- a/mysql-test/r/innodb_ext_key.result
+++ b/mysql-test/r/innodb_ext_key.result
@@ -561,6 +561,29 @@ Handler_read_next 3
Handler_read_prev 0
Handler_read_rnd 0
Handler_read_rnd_next 0
-set optimizer_switch=@save_ext_key_optimizer_switch;
DROP DATABASE dbt3_s001;
+use test;
+#
+# LP Bug #914560: query containing IN subquery
+# + extended_keys = on
+#
+set @save_optimizer_switch=@@optimizer_switch;
+SET optimizer_switch='materialization=on,semijoin=on';
+SET optimizer_switch='extended_keys=on';
+CREATE TABLE t1 (a int, b int) ENGINE=MyISAM;
+INSERT INTO t1 VALUES (1,1), (2,2);
+SELECT * FROM t1 WHERE 2 IN (SELECT MAX(s1.a) FROM t1 AS s1, t1 AS s2);
+a b
+1 1
+2 2
+EXPLAIN
+SELECT * FROM t1 WHERE 2 IN (SELECT MAX(s1.a) FROM t1 AS s1, t1 AS s2);
+id select_type table type possible_keys key key_len ref rows Extra
+1 PRIMARY <subquery2> const distinct_key distinct_key 5 const 1
+1 PRIMARY t1 ALL NULL NULL NULL NULL 2 Using join buffer (flat, BNL join)
+2 MATERIALIZED s1 ALL NULL NULL NULL NULL 2
+2 MATERIALIZED s2 ALL NULL NULL NULL NULL 2 Using join buffer (flat, BNL join)
+DROP TABLE t1;
+set optimizer_switch=@save_optimizer_switch;
+set optimizer_switch=@save_ext_key_optimizer_switch;
SET SESSION STORAGE_ENGINE=DEFAULT;