Commit ca94028a authored by Michael Widenius's avatar Michael Widenius

Fixed test case to be repeatable (after discussion with Igor)

parent 42746a44
...@@ -686,7 +686,7 @@ INSERT INTO t1 VALUES (1000000, 0, 0); ...@@ -686,7 +686,7 @@ INSERT INTO t1 VALUES (1000000, 0, 0);
SET SESSION sort_buffer_size = 1024*36; SET SESSION sort_buffer_size = 1024*36;
EXPLAIN EXPLAIN
SELECT COUNT(*) FROM SELECT COUNT(*) FROM
(SELECT * FROM t1 (SELECT * FROM t1 FORCE INDEX(primary,idx)
WHERE a BETWEEN 2 AND 7 OR pk=1000000) AS t; WHERE a BETWEEN 2 AND 7 OR pk=1000000) AS t;
id select_type table type possible_keys key key_len ref rows Extra id select_type table type possible_keys key key_len ref rows Extra
1 PRIMARY NULL NULL NULL NULL NULL NULL NULL Select tables optimized away 1 PRIMARY NULL NULL NULL NULL NULL NULL NULL Select tables optimized away
......
...@@ -64,9 +64,11 @@ INSERT INTO t1 VALUES (1000000, 0, 0); ...@@ -64,9 +64,11 @@ INSERT INTO t1 VALUES (1000000, 0, 0);
SET SESSION sort_buffer_size = 1024*36; SET SESSION sort_buffer_size = 1024*36;
# We have to use FORCE INDEX here as Innodb gives inconsistent estimates
# which causes different query plans.
EXPLAIN EXPLAIN
SELECT COUNT(*) FROM SELECT COUNT(*) FROM
(SELECT * FROM t1 (SELECT * FROM t1 FORCE INDEX(primary,idx)
WHERE a BETWEEN 2 AND 7 OR pk=1000000) AS t; WHERE a BETWEEN 2 AND 7 OR pk=1000000) AS t;
SELECT COUNT(*) FROM SELECT COUNT(*) FROM
(SELECT * FROM t1 (SELECT * FROM t1
......
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