mirror of
https://github.com/MariaDB/server.git
synced 2025-01-16 12:02:42 +01:00
090cecd5e8
Fix for v. 10.5
40 lines
1.1 KiB
Text
40 lines
1.1 KiB
Text
#
|
|
# Tests for group-min-max optimization that require optimizer trace
|
|
# and so need not-embedded.
|
|
#
|
|
--source include/default_optimizer_switch.inc
|
|
--source include/have_innodb.inc
|
|
--source include/have_sequence.inc
|
|
--source include/not_embedded.inc
|
|
|
|
--echo #
|
|
--echo # MDEV-31380: Assertion `s->table->opt_range_condition_rows <= s->found_records' failed
|
|
--echo # (assertion in 10.6+, DBL_MAX costs in 10.5)
|
|
--echo #
|
|
|
|
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);
|
|
|
|
#Enable after fix MDEV-32034
|
|
--disable_view_protocol
|
|
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;
|
|
--enable_view_protocol
|
|
|
|
set optimizer_use_condition_selectivity = @tmp, optimizer_trace=@tmp2;
|
|
drop table t1;
|
|
|
|
--echo #
|
|
--echo # End of 10.5 tests
|
|
--echo #
|
|
|