diff options
author | Sergei Petrunia <psergey@askmonty.org> | 2015-09-20 21:31:02 +0300 |
---|---|---|
committer | Sergei Petrunia <psergey@askmonty.org> | 2015-09-21 17:08:27 +0300 |
commit | 9b9e36ed4926edd896aa274e15286f64cfec4313 (patch) | |
tree | 7a8c58b652dad49c7fcb5907ddaa7a479fcce5dd /mysql-test/r/selectivity_no_engine.result | |
parent | 139ce6cb18301145ec1a5466c4d33825aec0020a (diff) | |
download | mariadb-git-9b9e36ed4926edd896aa274e15286f64cfec4313.tar.gz |
MDEV-8779: mysqld got signal 11 in sql/opt_range_mrr.cc:100(step_down_to)
The crash was caused by range optimizer using RANGE_OPT_PARAM::min_key
(and max_key) to store keys. Buffer size was a good upper bound for
range analysis and partition pruning, but not for EITS selectivity
calculations.
Fixed by making these buffers variable-size. The sizes are calculated
from [pseudo]indexes used for range analysis.
Diffstat (limited to 'mysql-test/r/selectivity_no_engine.result')
-rw-r--r-- | mysql-test/r/selectivity_no_engine.result | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/mysql-test/r/selectivity_no_engine.result b/mysql-test/r/selectivity_no_engine.result index a14832f9c0a..31037e90a84 100644 --- a/mysql-test/r/selectivity_no_engine.result +++ b/mysql-test/r/selectivity_no_engine.result @@ -276,6 +276,23 @@ id select_type table type possible_keys key key_len ref rows filtered Extra Warnings: Note 1003 select `test`.`ta`.`a` AS `a`,`test`.`tb`.`a` AS `a` from `test`.`t1` `ta` join `test`.`t2` `tb` where ((`test`.`tb`.`a` = `test`.`ta`.`a`) and (`test`.`ta`.`a` < 40) and (`test`.`ta`.`a` < 100)) drop table t0,t1,t2; +# +# MDEV-8779: mysqld got signal 11 in sql/opt_range_mrr.cc:100(step_down_to) +# +set @tmp_mdev8779=@@optimizer_use_condition_selectivity; +set optimizer_use_condition_selectivity=5; +CREATE TABLE t1 ( +i int(10) unsigned NOT NULL AUTO_INCREMENT, +n varchar(2048) NOT NULL, +d tinyint(1) unsigned NOT NULL, +p int(10) unsigned NOT NULL, +PRIMARY KEY (i) +) DEFAULT CHARSET=utf8; +insert into t1 values (1,'aaa',1,1), (2,'bbb',2,2); +SELECT * FROM t1 WHERE t1.d = 0 AND t1.p = '1' AND t1.i != '-1' AND t1.n = 'some text'; +i n d p +set optimizer_use_condition_selectivity= @tmp_mdev8779; +DROP TABLE t1; # # End of the test file # |