summaryrefslogtreecommitdiff
path: root/mysql-test/main/range_mrr_icp.result
diff options
context:
space:
mode:
authorIgor Babaev <igor@askmonty.org>2018-08-18 22:57:20 -0700
committerIgor Babaev <igor@askmonty.org>2018-08-21 12:27:29 -0700
commita1fd25c22bc27e58b802dd83ee48428913351180 (patch)
tree3b71e72fb1b2ecdb6f4360a99cf24cd2f6caefca /mysql-test/main/range_mrr_icp.result
parent0dadb96e169d3fa94b5cbcadd97b3cc8e3c0e138 (diff)
downloadmariadb-git-a1fd25c22bc27e58b802dd83ee48428913351180.tar.gz
MDEV-17017 Explain for query using derived table specified with a table
value constructor shows wrong number of rows If the specification of a derived table contained a table value constructor then the optimizer incorrectly estimated the number of rows in the derived table. This happened because the optimizer did not take into account the number of rows in the constructor. The wrong estimate could lead to choosing inefficient execution plans.
Diffstat (limited to 'mysql-test/main/range_mrr_icp.result')
-rw-r--r--mysql-test/main/range_mrr_icp.result6
1 files changed, 3 insertions, 3 deletions
diff --git a/mysql-test/main/range_mrr_icp.result b/mysql-test/main/range_mrr_icp.result
index 629d183bee7..483957ff39e 100644
--- a/mysql-test/main/range_mrr_icp.result
+++ b/mysql-test/main/range_mrr_icp.result
@@ -1054,6 +1054,7 @@ create table t1 (a int);
insert into t1 values (0),(1),(2),(3),(4),(5),(6),(7),(8),(9);
create table t2 (a int, key(a));
insert into t2 select 2*(A.a + 10*(B.a + 10*C.a)) from t1 A, t1 B, t1 C;
+set in_predicate_conversion_threshold= 2000;
set @a="select * from t2 force index (a) where a NOT IN(0";
select count(*) from (select @a:=concat(@a, ',', a) from t2 ) Z;
count(*)
@@ -1064,15 +1065,14 @@ set @b= concat("explain ", @a);
prepare stmt1 from @b;
execute stmt1;
id select_type table type possible_keys key key_len ref rows Extra
-1 PRIMARY t2 index NULL a 5 NULL 1003 Using where; Using index
-2 MATERIALIZED <derived3> ALL NULL NULL NULL NULL 2
-3 DERIVED NULL NULL NULL NULL NULL NULL NULL No tables used
+1 SIMPLE t2 index a a 5 NULL 1003 Using where; Using index
prepare stmt1 from @a;
execute stmt1;
a
11
13
15
+set in_predicate_conversion_threshold= default;
drop table t1, t2;
CREATE TABLE t1 (
id int NOT NULL DEFAULT '0',