Skip to content

Commit be99d0d

Browse files
committed
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.
1 parent c4f65d8 commit be99d0d

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

mysql-test/suite/innodb/r/stats_persistent.result

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@ SET DEBUG_SYNC='dict_stats_update_persistent SIGNAL stop WAIT_FOR go';
66
ANALYZE TABLE t1;
77
connect con1, localhost, root;
88
SET DEBUG_SYNC='now WAIT_FOR stop';
9-
SELECT ENGINE,SUM(DATA_LENGTH+INDEX_LENGTH),COUNT(ENGINE),SUM(DATA_LENGTH),SUM(INDEX_LENGTH) FROM information_schema.TABLES WHERE ENGINE='InnoDB';
10-
ENGINE SUM(DATA_LENGTH+INDEX_LENGTH) COUNT(ENGINE) SUM(DATA_LENGTH) SUM(INDEX_LENGTH)
11-
InnoDB 114688 4 65536 49152
9+
SELECT SUM(DATA_LENGTH+INDEX_LENGTH) FROM information_schema.TABLES WHERE ENGINE='InnoDB';
10+
SUM(DATA_LENGTH+INDEX_LENGTH)
11+
SUM
1212
SET DEBUG_SYNC='now SIGNAL go';
1313
disconnect con1;
1414
connection default;

mysql-test/suite/innodb/t/stats_persistent.test

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,8 @@ SET DEBUG_SYNC='dict_stats_update_persistent SIGNAL stop WAIT_FOR go';
1414
--connect(con1, localhost, root)
1515
SET DEBUG_SYNC='now WAIT_FOR stop';
1616

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

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

0 commit comments

Comments
 (0)