I observed the following test failure locally once:
In my opinion, such SELECT expressions should be better replaced with something that reports a useful value on failure, like this:
Please perform this change locally (or just remove the <500 in case the number is stable) and then repeat the test for many times locally.
You should also make sure that there is no other workload from previous tests that could cause innodb_buffer_pool_read_requests to be incremented. Either you should somehow force a rebootstrap, or you must ensure that the following have been performed:
- complete change buffer merge
- complete purge (including changes made by the test)
For the change buffer merge, it probably is easiest to do
For ensuring the completion of purge, you should use wait_all_purged.inc, with the necessary preparation at the start of the test or immediately after server restart:
You should probably also ensure that no read-ahead is enabled.