Skip to content
Permalink
Browse files
Fix intermittent failures of innodb.stats_persistent
We do not really care about the exact result; we only care that the
statistics will be accessed. The result could change depending on
when some statistics were updated in the background or when some
committed delete-marked rows were purged from other tables on
which persistent statistics are enabled.
  • Loading branch information
dr-m committed Jun 17, 2022
1 parent c4f65d8 commit be99d0d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
@@ -6,9 +6,9 @@ SET DEBUG_SYNC='dict_stats_update_persistent SIGNAL stop WAIT_FOR go';
ANALYZE TABLE t1;
connect con1, localhost, root;
SET DEBUG_SYNC='now WAIT_FOR stop';
SELECT ENGINE,SUM(DATA_LENGTH+INDEX_LENGTH),COUNT(ENGINE),SUM(DATA_LENGTH),SUM(INDEX_LENGTH) FROM information_schema.TABLES WHERE ENGINE='InnoDB';
ENGINE SUM(DATA_LENGTH+INDEX_LENGTH) COUNT(ENGINE) SUM(DATA_LENGTH) SUM(INDEX_LENGTH)
InnoDB 114688 4 65536 49152
SELECT SUM(DATA_LENGTH+INDEX_LENGTH) FROM information_schema.TABLES WHERE ENGINE='InnoDB';
SUM(DATA_LENGTH+INDEX_LENGTH)
SUM
SET DEBUG_SYNC='now SIGNAL go';
disconnect con1;
connection default;
@@ -14,7 +14,8 @@ SET DEBUG_SYNC='dict_stats_update_persistent SIGNAL stop WAIT_FOR go';
--connect(con1, localhost, root)
SET DEBUG_SYNC='now WAIT_FOR stop';

SELECT ENGINE,SUM(DATA_LENGTH+INDEX_LENGTH),COUNT(ENGINE),SUM(DATA_LENGTH),SUM(INDEX_LENGTH) FROM information_schema.TABLES WHERE ENGINE='InnoDB';
--replace_column 1 SUM
SELECT SUM(DATA_LENGTH+INDEX_LENGTH) FROM information_schema.TABLES WHERE ENGINE='InnoDB';

SET DEBUG_SYNC='now SIGNAL go';
--disconnect con1

0 comments on commit be99d0d

Please sign in to comment.