summaryrefslogtreecommitdiff
path: root/mysql-test/t/selectivity.test
diff options
context:
space:
mode:
authorSergey Petrunya <psergey@askmonty.org>2014-03-27 13:08:00 +0400
committerSergey Petrunya <psergey@askmonty.org>2014-03-27 13:08:00 +0400
commit79a8a6130b0c43e98a64a1fde8f277e0df06da5d (patch)
tree2f1f0f604942584382be90140695865f890d88c9 /mysql-test/t/selectivity.test
parent0d67aafaa2c383b4d2d76f8621109f8adbfb2532 (diff)
downloadmariadb-git-79a8a6130b0c43e98a64a1fde8f277e0df06da5d.tar.gz
Code cleanup:
- Move [some] engine-agnostic tests from t/selectivity.test to t/selectivity_no_engine.test - Move Histogram::point_selectivity to sql_statistics.cc
Diffstat (limited to 'mysql-test/t/selectivity.test')
-rw-r--r--mysql-test/t/selectivity.test62
1 files changed, 0 insertions, 62 deletions
diff --git a/mysql-test/t/selectivity.test b/mysql-test/t/selectivity.test
index 6403c770287..8cb2620550e 100644
--- a/mysql-test/t/selectivity.test
+++ b/mysql-test/t/selectivity.test
@@ -862,68 +862,6 @@ set optimizer_use_condition_selectivity=@save_optimizer_use_condition_selectivit
drop table t1,t2;
---echo #
---echo # MDEV-5917: EITS: different order of predicates in IN (...) causes different estimates
---echo #
-create table t1(a int);
-insert into t1 values (0),(1),(2),(3),(4),(5),(6),(7),(8),(9);
-
-create table t2 (col1 int);
---echo # one value in 1..100 range
-insert into t2 select A.a + B.a*10 from t1 A, t1 B;
---echo # ten values in 100...200 range
-insert into t2 select 100 + A.a + B.a*10 from t1 A, t1 B, t1 C;
-
-set histogram_type='SINGLE_PREC_HB';
-set histogram_size=100;
-set optimizer_use_condition_selectivity=4;
-analyze table t2 persistent for all;
-
---echo # The following two must have the same in 'Extra' column:
-explain extended select * from t2 where col1 IN (20, 180);
-explain extended select * from t2 where col1 IN (180, 20);
-
-drop table t1, t2;
-
---echo #
---echo # MDEV-5926: EITS: Histogram estimates for column=least_possible_value are wrong
---echo #
-create table t0(a int);
-insert into t0 values (0),(1),(2),(3),(4),(5),(6),(7),(8),(9);
-create table t1(a int);
-insert into t1 select A.a from t0 A, t0 B, t0 C;
-set histogram_size=20;
-set histogram_type='single_prec_hb';
-analyze table t1 persistent for all;
-set use_stat_tables='preferably';
-set optimizer_use_condition_selectivity=4;
---echo # Should select about 10%:
-explain extended select * from t1 where a=2;
---echo # Should select about 10%:
-explain extended select * from t1 where a=1;
---echo # Must not have filtered=100%:
-explain extended select * from t1 where a=0;
---echo # Again, must not have filtered=100%:
-explain extended select * from t1 where a=-1;
-
-drop table t0, t1;
-
---echo #
---echo # MDEV-4362: Selectivity estimates for IN (...) do not depend on whether the values are in range
---echo #
-create table t1 (col1 int);
-set @a=-1;
-create table t2 (a int) select (@a:=@a+1) as a from information_schema.session_variables A limit 100;
-insert into t1 select A.a from t2 A, t2 B where A.a < 100 and B.a < 100;
-select min(col1), max(col1), count(*) from t1;
-set histogram_size=100;
-analyze table t1 persistent for all;
-explain extended select * from t1 where col1 in (1,2,3);
---echo # Must not cause fp division by zero, or produce nonsense numbers:
-explain extended select * from t1 where col1 in (-1,-2,-3);
-explain extended select * from t1 where col1<=-1;
-drop table t1, t2;
-
set histogram_type=@save_histogram_type;
set histogram_size=@save_histogram_size;
set optimizer_use_condition_selectivity=@save_optimizer_use_condition_selectivity;