summaryrefslogtreecommitdiffstats
path: root/mysql-test/main/group_min_max_notembedded.result
blob: e19560b4923b3610f6907b65a5434de91edf1b29 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
# 
# MDEV-31380: Assertion `s->table->opt_range_condition_rows <= s->found_records' failed
#  (assertion in 10.6+, DBL_MAX costs in 10.5)
# 
CREATE TABLE t1 (a INT, b INT, PRIMARY KEY(a), KEY(b)) ENGINE=InnoDB;
INSERT INTO t1 SELECT seq, seq FROM seq_1_to_100;
SET
@tmp=@@optimizer_use_condition_selectivity,
optimizer_use_condition_selectivity = 1,
@tmp2=@@optimizer_trace,
optimizer_trace=1;
SELECT DISTINCT * FROM t1 WHERE a IN (1, 2);
a	b
1	1
2	2
select 
CAST(json_value(json_extract(trace, '$**.chosen_access_method.cost'), '$[0]')
as DOUBLE) < 1.0e100  as ACCESS_METHOD_COST_IS_FINITE
from information_schema.optimizer_trace;
ACCESS_METHOD_COST_IS_FINITE
1
set optimizer_use_condition_selectivity = @tmp, optimizer_trace=@tmp2;
drop table t1;
#
# End of 10.5 tests
#