You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
Copy file name to clipboardExpand all lines: mysql-test/r/selectivity_no_engine.result
+17Lines changed: 17 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -276,6 +276,23 @@ id select_type table type possible_keys key key_len ref rows filtered Extra
276
276
Warnings:
277
277
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))
278
278
drop table t0,t1,t2;
279
+
#
280
+
# MDEV-8779: mysqld got signal 11 in sql/opt_range_mrr.cc:100(step_down_to)
281
+
#
282
+
set @tmp_mdev8779=@@optimizer_use_condition_selectivity;
283
+
set optimizer_use_condition_selectivity=5;
284
+
CREATE TABLE t1 (
285
+
i int(10) unsigned NOT NULL AUTO_INCREMENT,
286
+
n varchar(2048) NOT NULL,
287
+
d tinyint(1) unsigned NOT NULL,
288
+
p int(10) unsigned NOT NULL,
289
+
PRIMARY KEY (i)
290
+
) DEFAULT CHARSET=utf8;
291
+
insert into t1 values (1,'aaa',1,1), (2,'bbb',2,2);
292
+
SELECT * FROM t1 WHERE t1.d = 0 AND t1.p = '1' AND t1.i != '-1' AND t1.n = 'some text';
293
+
i n d p
294
+
set optimizer_use_condition_selectivity= @tmp_mdev8779;
0 commit comments