Permalink
Browse files

index merge test adjusted

  • Loading branch information...
varunraiko committed Dec 6, 2018
1 parent 9fbcf30 commit f2357715aeaf57e7185fe747510154b79dfc27b0
Showing with 3 additions and 2 deletions.
  1. +2 −2 mysql-test/main/index_merge_innodb.result
  2. +1 −0 mysql-test/main/index_merge_innodb.test
@@ -701,8 +701,8 @@ SELECT COUNT(*) FROM
(SELECT * FROM t1 FORCE INDEX(primary,idx)
WHERE a BETWEEN 2 AND 7 OR pk=1000000) AS t;
id select_type table type possible_keys key key_len ref rows Extra
1 PRIMARY <derived2> ALL NULL NULL NULL NULL 6145
2 DERIVED t1 index_merge PRIMARY,idx idx,PRIMARY 5,4 NULL 6145 Using sort_union(idx,PRIMARY); Using where
1 PRIMARY <derived2> ALL NULL NULL NULL NULL #
2 DERIVED t1 index_merge PRIMARY,idx idx,PRIMARY 5,4 NULL # Using sort_union(idx,PRIMARY); Using where
SELECT COUNT(*) FROM
(SELECT * FROM t1 FORCE INDEX(primary,idx)
WHERE a BETWEEN 2 AND 7 OR pk=1000000) AS t;
@@ -72,6 +72,7 @@ set optimizer_switch='derived_merge=off,derived_with_keys=off';
# We have to use FORCE INDEX here as Innodb gives inconsistent estimates
# which causes different query plans.
--replace_column 9 #
EXPLAIN
SELECT COUNT(*) FROM
(SELECT * FROM t1 FORCE INDEX(primary,idx)

0 comments on commit f235771

Please sign in to comment.