Commit 6400df6d authored by Sergey Petrunya's avatar Sergey Petrunya

Update test results.

parent 88718067
...@@ -1861,6 +1861,24 @@ WHERE 'condition'='impossible' ...@@ -1861,6 +1861,24 @@ WHERE 'condition'='impossible'
MIN(a) MIN(a)
NULL NULL
DROP TABLE t1; DROP TABLE t1;
#
# BUG#938131: Subquery materialization is not used in CREATE TABLE SELECT
#
CREATE TABLE t1(a int);
INSERT INTO t1 values(1),(2);
CREATE TABLE t2(a int);
INSERT INTO t2 values(1),(2);
# Should use Materialization:
EXPLAIN SELECT * FROM t1 WHERE a IN (SELECT * FROM t2 GROUP BY a HAVING a > 1);
id select_type table type possible_keys key key_len ref rows Extra
1 PRIMARY t1 ALL NULL NULL NULL NULL 2 Using where
2 MATERIALIZED t2 ALL NULL NULL NULL NULL 2 Using temporary
flush status;
CREATE TABLE t3 SELECT * FROM t1 WHERE a IN (SELECT * FROM t2 GROUP BY a HAVING a > 1);
SHOW STATUS LIKE 'Created_tmp_tables';
Variable_name Value
Created_tmp_tables 3
DROP TABLE t1,t2,t3;
# This must be at the end: # This must be at the end:
set optimizer_switch=@subselect_sj_mat_tmp; set optimizer_switch=@subselect_sj_mat_tmp;
set join_cache_level=@save_join_cache_level; set join_cache_level=@save_join_cache_level;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment