summaryrefslogtreecommitdiff
path: root/mysql-test/main/range.test
diff options
context:
space:
mode:
authorVarun Gupta <varun.gupta@mariadb.com>2019-02-19 14:26:23 +0530
committerVarun Gupta <varun.gupta@mariadb.com>2019-02-19 14:27:24 +0530
commit2e6d8fcc174d41ba1da5a7a4cb3ef285b1df70ff (patch)
tree10ef1ca3b6fb1799d772dee2a8f7069a9684a505 /mysql-test/main/range.test
parentd6db6df9956da295787b863dbe4d849c50956d02 (diff)
downloadmariadb-git-2e6d8fcc174d41ba1da5a7a4cb3ef285b1df70ff.tar.gz
MDEV-18551: New defaults for eq_range_index_dive_limit
The value for eq_range_index_dive_limit is increased to 200.
Diffstat (limited to 'mysql-test/main/range.test')
-rw-r--r--mysql-test/main/range.test23
1 files changed, 23 insertions, 0 deletions
diff --git a/mysql-test/main/range.test b/mysql-test/main/range.test
index 9edb3f39ae3..76d893f56b7 100644
--- a/mysql-test/main/range.test
+++ b/mysql-test/main/range.test
@@ -2075,6 +2075,29 @@ set eq_range_index_dive_limit=default;
drop table t1;
--echo #
+--echo # MDEV-18551: New defaults for eq_range_index_dive_limit
+--echo #
+
+create table ten(a int);
+insert into ten values (0),(1),(2),(3),(4),(5),(6),(7),(8),(9);
+create table t1(a int, key(a));
+insert into t1 select A.a + B.a*10 + C.a*100 from ten A, ten B,ten C;
+insert into t1 select 1 from ten A, ten B,ten C;
+
+create table t2(a int, key(a));
+insert into t2 select A.a + B.a*10 + C.a*100 from ten A, ten B,ten C where A.a + B.a*10 + C.a*100 < 199;
+
+let $a= `select group_concat(a) from t2`;
+
+--echo # expected type=range, rows=1487 , reason=using index dives
+eval analyze SELECT * FROM t1 where a in ($a);
+insert into t2 values (200),(201);
+let $a= `select group_concat(a) from t2`;
+--echo # expected type=range, rows=201 , reason=using index statistics
+eval analyze SELECT * FROM t1 where a in ($a);
+drop table t1,ten,t2;
+
+--echo #
--echo # End of 10.2 tests
--echo #