Commit 3ec9f7e1 authored by unknown's avatar unknown

test of changing subselects tree

parent 4078d0de
......@@ -532,6 +532,15 @@ Note 1246 Select 2 was reduced during optimisation
SELECT * FROM t WHERE id IN (SELECT 1 UNION SELECT 3);
id
1
SELECT * FROM t WHERE id IN (SELECT 1+(select 1));
id
2
EXPLAIN SELECT * FROM t WHERE id IN (SELECT 1+(select 1));
id select_type table type possible_keys key key_len ref rows Extra
1 PRIMARY t ref id id 5 const 1 Using where; Using index
3 SUBSELECT No tables used
Warnings:
Note 1246 Select 2 was reduced during optimisation
EXPLAIN SELECT * FROM t WHERE id IN (SELECT 1 UNION SELECT 3);
id select_type table type possible_keys key key_len ref rows Extra
1 PRIMARY t index NULL id 5 NULL 2 Using where; Using index
......
......@@ -317,6 +317,8 @@ INSERT INTO t VALUES (1),(2);
SELECT * FROM t WHERE id IN (SELECT 1);
EXPLAIN SELECT * FROM t WHERE id IN (SELECT 1);
SELECT * FROM t WHERE id IN (SELECT 1 UNION SELECT 3);
SELECT * FROM t WHERE id IN (SELECT 1+(select 1));
EXPLAIN SELECT * FROM t WHERE id IN (SELECT 1+(select 1));
EXPLAIN SELECT * FROM t WHERE id IN (SELECT 1 UNION SELECT 3);
SELECT * FROM t WHERE id IN (SELECT 5 UNION SELECT 3);
SELECT * FROM t WHERE id IN (SELECT 5 UNION SELECT 2);
......
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