summaryrefslogtreecommitdiff
path: root/mysql-test/include
diff options
context:
space:
mode:
authorSergei Petrunia <psergey@askmonty.org>2019-08-19 11:54:26 +0300
committerSergei Petrunia <psergey@askmonty.org>2019-08-19 11:54:26 +0300
commit850bf3313740598d3148139e9add7ea95a71cb03 (patch)
tree9cd261d275f7cb1d7c7b68e00b784814af3f1435 /mysql-test/include
parent4d5382504d61ec27ace2d0dd4dd6cc71442ce067 (diff)
downloadmariadb-git-850bf3313740598d3148139e9add7ea95a71cb03.tar.gz
MDEV-20374: innodb.innodb_mysql fails sporadically in BB
Stabilize the test: - replace Rows column in EXPLAIN output for one query - Use EITS statistics for another query (in that testcase, the query must use LooseScan)
Diffstat (limited to 'mysql-test/include')
-rw-r--r--mysql-test/include/mix1.inc13
1 files changed, 13 insertions, 0 deletions
diff --git a/mysql-test/include/mix1.inc b/mysql-test/include/mix1.inc
index 6a47b39e5bc..30b17c2e063 100644
--- a/mysql-test/include/mix1.inc
+++ b/mysql-test/include/mix1.inc
@@ -455,6 +455,16 @@ INSERT INTO t1(id, dept, age, name) VALUES
(4011, 'cs7', 10, 'rs4'), (4012, 'cs8', 20, 'rs4'), (4019, 'cs9', 10, 'rs5'),
(4020, 'cs10', 20, 'rs5'),(4027, 'cs11', 10, 'rs6'),(4028, 'cs12', 20, 'rs6');
+set
+ @tmp_uss=@@use_stat_tables,
+ @tmp_occ=@@optimizer_use_condition_selectivity;
+set
+ use_stat_tables='preferably',
+ optimizer_use_condition_selectivity=4;
+
+analyze table t1 persistent for all;
+flush tables;
+
EXPLAIN SELECT DISTINCT t1.name, t1.dept FROM t1 WHERE t1.name='rs5';
SELECT DISTINCT t1.name, t1.dept FROM t1 WHERE t1.name='rs5';
DELETE FROM t1;
@@ -464,6 +474,9 @@ EXPLAIN SELECT DISTINCT t1.name, t1.dept FROM t1 WHERE t1.name='rs5';
SELECT DISTINCT t1.name, t1.dept FROM t1 WHERE t1.name='rs5';
DROP TABLE t1;
+set
+ use_stat_tables=@tmp_uss,
+ optimizer_use_condition_selectivity=@tmp_occ;
--source include/innodb_rollback_on_timeout.inc