1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-30 16:24:05 +03:00

Work around MDEV-24813 in some tests

Not creating explicit record locks will speed up the test.

Also, disable the use of InnoDB persistent statistics in the test of
MDEV-27270 to avoid intermittent failures in 10.6 or later
(after commit 9608773f75)
due to the nondeterministic scheduling of STATS_AUTO_PERSISTENT.
This commit is contained in:
Marko Mäkelä
2022-11-08 09:00:58 +02:00
parent 456d4a508c
commit 314ed9f5ec
4 changed files with 38 additions and 64 deletions

View File

@ -2,16 +2,14 @@
# ORDER BY handling (e.g. filesort) tests that require innodb
#
-- source include/have_innodb.inc
--disable_warnings
drop table if exists t0,t1,t2,t3;
--enable_warnings
-- source include/have_sequence.inc
--echo #
--echo # MDEV-6434: Wrong result (extra rows) with ORDER BY, multiple-column index, InnoDB
--echo #
CREATE TABLE t1 (a INT, b INT, c INT, d TEXT, KEY idx(a,b,c)) ENGINE=InnoDB;
CREATE TABLE t1 (a INT, b INT, c INT, d TEXT, KEY idx(a,b,c)) ENGINE=InnoDB
STATS_PERSISTENT=0;
INSERT INTO t1 (a,c) VALUES
(8, 9),(8, 10),(13, 15),(16, 17),(16, 18),(16, 19),(20, 21),
@ -24,9 +22,6 @@ DROP TABLE t1;
--echo #
--echo # MDEV-9457: Poor query plan chosen for ORDER BY query by a recent 10.1
--echo #
create table t0 (a int);
insert into t0 values (0),(1),(2),(3),(4),(5),(6),(7),(8),(9);
create table t1 (
pk int primary key,
key1 int,
@ -34,16 +29,10 @@ create table t1 (
col1 char(255),
key(key1),
key(key2)
) engine=innodb;
) engine=innodb stats_persistent=0;
set @a=-1;
insert into t1
select
@a:=@a+1,
@a,
@a,
repeat('abcd', 63)
from t0 A, t0 B, t0 C, t0 D;
select seq,seq,seq,repeat('abcd', 63) from seq_0_to_9999;
--echo # The following must NOT use 'index' on PK.
--echo # It should use index_merge(key1,key2) + filesort
@ -60,7 +49,7 @@ select *
from t1
where key1<3 or key2<3;
drop table t0, t1;
drop table t1;
--echo #
--echo # MDEV-18094: Query with order by limit picking index scan over filesort
@ -93,9 +82,12 @@ drop table t1,t0;
--echo # (duplicate of MDEV-13994)
--echo #
CREATE TABLE t1 (i int, j int, z int,PRIMARY KEY (i,j), KEY (z)) ENGINE=InnoDB;
CREATE TABLE t2 (i int, j int, PRIMARY KEY (i,j)) ENGINE=InnoDB;
CREATE TABLE t3 (j int, n varchar(5), PRIMARY KEY (j)) ENGINE=InnoDB;
CREATE TABLE t1 (i int, j int, z int,PRIMARY KEY (i,j), KEY (z)) ENGINE=InnoDB
STATS_PERSISTENT=0;
CREATE TABLE t2 (i int, j int, PRIMARY KEY (i,j)) ENGINE=InnoDB
STATS_PERSISTENT=0;
CREATE TABLE t3 (j int, n varchar(5), PRIMARY KEY (j)) ENGINE=InnoDB
STATS_PERSISTENT=0;
INSERT INTO t1 VALUES
(127,0,1),(188,0,1),(206,0,1),(218,0,1),(292,0,1),(338,0,1),(375,0,1),
@ -139,7 +131,8 @@ DROP TABLE t1,t2,t3;
--echo # MDEV-25858: Query results are incorrect when indexes are added
--echo #
CREATE TABLE t1 (id int NOT NULL PRIMARY KEY) engine=innodb;
CREATE TABLE t1 (id int NOT NULL PRIMARY KEY) engine=innodb
STATS_PERSISTENT=0;
insert into t1 values (1),(2),(3);
CREATE TABLE t2 (