1
0
mirror of https://github.com/MariaDB/server.git synced 2026-10-23 18:49:29 +03:00

MDEV-41557 Test encryption.innochecksum is flaky

The test checks that sys.innodb_buffer_stats_by_table reports old
pages (pages_old) after a server restart. InnoDB creates the old
sublist of the buffer pool LRU list only when the list holds at least
BUF_LRU_OLD_MIN_LEN (512) pages. After the restart, most of the pages
in the list come from the buffer pool load at startup. This load runs
asynchronously, and the server accepts connections before it
completes. If the test runs the check first, the list can be shorter
than 512 pages, no page is old, and the result shows 0 instead of 1.

The option --innodb-buffer-pool-load-at-startup=0 disables the load.
This is the extreme case of the race: the check always runs before
any page of the dump is loaded. With this option, the test fails every
time with innodb_page_size=4k and 16k.

Wait for the buffer pool load to complete before the check, as other
tests do.
This commit is contained in:
Alessandro Vetere
2026-10-15 12:10:06 +02:00
parent f5c731ffce
commit e71bdbf3d9

View File

@@ -300,6 +300,16 @@ if (0 && $have_debug) { # these messages sometimes fail to appear
--source include/start_mysqld.inc
# The check of pages_old needs old pages in the buffer pool LRU list.
# They exist only when the list holds at least BUF_LRU_OLD_MIN_LEN pages.
# Without the asynchronous load of the buffer pool dump, the list can be
# shorter than that.
let $wait_condition =
SELECT SUBSTR(variable_value, 1, 33) = 'Buffer pool(s) load completed at '
FROM information_schema.global_status
WHERE LOWER(variable_name) = 'innodb_buffer_pool_load_status';
--source include/wait_condition.inc
--echo # Trigger AHI and test pages_hashed, pages_old as non zero from sys view
SELECT STRAIGHT_JOIN COUNT(t6a.a)