mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +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:
@ -1,3 +1,5 @@
|
||||
SET @save_stats_persistent=@@GLOBAL.innodb_stats_persistent;
|
||||
SET GLOBAL innodb_stats_persistent=0;
|
||||
CREATE TABLE t1 (id int(11) NOT NULL PRIMARY KEY, name varchar(20),
|
||||
INDEX (name)) ENGINE=InnoDB;
|
||||
CREATE TABLE t2 (id int(11) NOT NULL PRIMARY KEY, fkey int(11),
|
||||
@ -515,3 +517,4 @@ UPDATE t1 LEFT JOIN t2 ON t1.c1 = t2.c2 AND t2.c1 = 3 SET t1.c3 = RAND()*10;
|
||||
COMMIT;
|
||||
SET TRANSACTION ISOLATION LEVEL REPEATABLE READ;
|
||||
DROP TABLE t1,t2;
|
||||
SET GLOBAL innodb_stats_persistent=@save_stats_persistent;
|
||||
|
Reference in New Issue
Block a user