1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-27 18:02:13 +03:00

MDEV-4750 follow-up: Reduce disabling innodb_stats_persistent

This essentially reverts commit 4e89ec6692
and only disables InnoDB persistent statistics for tests where it is
desirable. By design, InnoDB persistent statistics will not be updated
except by ANALYZE TABLE or by STATS_AUTO_RECALC.

The internal transactions that update persistent InnoDB statistics
in background tasks (with innodb_stats_auto_recalc=ON) may cause
nondeterministic query plans or interfere with some tests that deal
with other InnoDB internals, such as the purge of transaction history.
This commit is contained in:
Marko Mäkelä
2021-08-31 13:55:02 +03:00
parent 45a05fda27
commit 9608773f75
131 changed files with 2202 additions and 1789 deletions

View File

@ -4,9 +4,6 @@
--source include/have_innodb.inc
--source include/have_metadata_lock_info.inc
--disable_warnings
drop table if exists t1,t2,t3;
--enable_warnings
#
# Create help table
@ -215,18 +212,21 @@ create table mysqltest2.t2 like test.t1;
lock table test.t1 write, mysqltest2.t2 write;
--replace_column 1 #
--sorted_result
select * from information_schema.metadata_lock_info;
select * from information_schema.metadata_lock_info
where table_name not like 'innodb_%_stats';
--error ER_TABLE_MUST_HAVE_COLUMNS
create or replace table test.t1;
show tables;
--replace_column 1 #
--sorted_result
select * from information_schema.metadata_lock_info;
select * from information_schema.metadata_lock_info
where table_name not like 'innodb_%_stats';
--error ER_TABLE_MUST_HAVE_COLUMNS
create or replace table mysqltest2.t2;
--replace_column 1 #
--sorted_result
select * from information_schema.metadata_lock_info;
select * from information_schema.metadata_lock_info
where table_name not like 'innodb_%_stats';
create table t1 (i int);
drop table t1;
@ -235,18 +235,21 @@ create table mysqltest2.t2 like test.t1;
lock table test.t1 write, mysqltest2.t2 write;
--replace_column 1 #
--sorted_result
select * from information_schema.metadata_lock_info;
select * from information_schema.metadata_lock_info
where table_name not like 'innodb_%_stats';
--error ER_DUP_FIELDNAME
create or replace table test.t1 (a int) select 1 as 'a', 2 as 'a';
show tables;
--replace_column 1 #
--sorted_result
select * from information_schema.metadata_lock_info;
select * from information_schema.metadata_lock_info
where table_name not like 'innodb_%_stats';
--error ER_DUP_FIELDNAME
create or replace table mysqltest2.t2 (a int) select 1 as 'a', 2 as 'a';
--replace_column 1 #
--sorted_result
select * from information_schema.metadata_lock_info;
select * from information_schema.metadata_lock_info
where table_name not like 'innodb_%_stats';
create table t1 (i int);
drop table t1;
@ -255,7 +258,8 @@ create table mysqltest2.t2 like test.t1;
lock table test.t1 write, mysqltest2.t2 write;
--replace_column 1 #
--sorted_result
select * from information_schema.metadata_lock_info;
select * from information_schema.metadata_lock_info
where table_name not like 'innodb_%_stats';
unlock tables;
drop table test.t1,mysqltest2.t2;
@ -264,7 +268,8 @@ create table mysqltest2.t2 like test.t1;
lock table test.t1 write, mysqltest2.t2 write;
--replace_column 1 #
--sorted_result
select * from information_schema.metadata_lock_info;
select * from information_schema.metadata_lock_info
where table_name not like 'innodb_%_stats';
unlock tables;
drop table t1;
@ -344,19 +349,24 @@ create table t1 (a int);
lock table t1 write, t2 read;
--replace_column 1 #
--sorted_result
select * from information_schema.metadata_lock_info;
select * from information_schema.metadata_lock_info
where table_name not like 'innodb_%_stats';
create or replace table t1 (i int);
--replace_column 1 #
--sorted_result
select * from information_schema.metadata_lock_info;
select * from information_schema.metadata_lock_info
where table_name not like 'innodb_%_stats';
create or replace table t1 like t2;
--replace_column 1 #
--sorted_result
select * from information_schema.metadata_lock_info;
select * from information_schema.metadata_lock_info
where table_name not like 'innodb_%_stats';
create or replace table t1 select 1 as f1;
--replace_column 1 #
--sorted_result
select * from information_schema.metadata_lock_info;
select * from information_schema.metadata_lock_info
where table_name not like 'innodb_%_stats';
drop table t1;
unlock tables;