diff --git a/mysql-test/suite/innodb/r/innodb_buffer_pool_load_now.result b/mysql-test/suite/innodb/r/innodb_buffer_pool_load_now.result index 6ecf6035329..35d8bce1507 100644 --- a/mysql-test/suite/innodb/r/innodb_buffer_pool_load_now.result +++ b/mysql-test/suite/innodb/r/innodb_buffer_pool_load_now.result @@ -23,12 +23,21 @@ WHERE table_name = '`test`.`ib_bp_test`'; PAGE_NUMBER select count(*) from ib_bp_test LIMIT 0; count(*) +select variable_value into @innodb_async_reads_total_count_before +from information_schema.global_status +where variable_name='innodb_async_reads_total_count'; SET GLOBAL innodb_buffer_pool_load_now = ON; SELECT variable_value FROM information_schema.global_status WHERE LOWER(variable_name) = 'innodb_buffer_pool_load_status'; variable_value Buffer pool(s) load completed at TIMESTAMP_NOW +select (cast(variable_value as unsigned) > +cast(@innodb_async_reads_total_count_before as unsigned)) +as async_reads_grow +from information_schema.global_status where variable_name='innodb_async_reads_total_count'; +async_reads_grow +1 SELECT COUNT(*) FROM information_schema.innodb_buffer_page_lru WHERE table_name = '`test`.`ib_bp_test`'; COUNT(*) diff --git a/mysql-test/suite/innodb/r/page_cleaner.result b/mysql-test/suite/innodb/r/page_cleaner.result index 97dd012054b..a026435237d 100644 --- a/mysql-test/suite/innodb/r/page_cleaner.result +++ b/mysql-test/suite/innodb/r/page_cleaner.result @@ -3,12 +3,22 @@ SET @save_pct_lwm= @@GLOBAL.innodb_max_dirty_pages_pct_lwm; SET GLOBAL innodb_max_dirty_pages_pct_lwm=0.0; SET GLOBAL innodb_max_dirty_pages_pct=0.0; SET GLOBAL innodb_max_dirty_pages_pct=90.0; +select variable_value into @innodb_async_writes_total_count_before +from information_schema.global_status +where variable_name='innodb_async_writes_total_count'; CREATE TABLE t ENGINE=InnoDB SELECT * FROM seq_1_to_10000; SELECT variable_value>0 FROM information_schema.global_status WHERE variable_name = 'INNODB_BUFFER_POOL_PAGES_DIRTY'; variable_value>0 1 SET GLOBAL innodb_max_dirty_pages_pct=0.0; +select (cast(variable_value as unsigned) > +cast(@innodb_async_writes_total_count_before as unsigned)) +as innodb_async_writes_grow +from information_schema.global_status +where variable_name='innodb_async_writes_total_count'; +innodb_async_writes_grow +1 DROP TABLE t; SET GLOBAL innodb_max_dirty_pages_pct = @save_pct; SET GLOBAL innodb_max_dirty_pages_pct_lwm = @save_pct_lwm; diff --git a/mysql-test/suite/innodb/t/innodb_buffer_pool_load_now.test b/mysql-test/suite/innodb/t/innodb_buffer_pool_load_now.test index c9e4dc25e7f..e493b42a416 100644 --- a/mysql-test/suite/innodb/t/innodb_buffer_pool_load_now.test +++ b/mysql-test/suite/innodb/t/innodb_buffer_pool_load_now.test @@ -88,6 +88,11 @@ WHERE table_name = '`test`.`ib_bp_test`'; # Load the table so that entries in the I_S table do not appear as NULL select count(*) from ib_bp_test LIMIT 0; +# Check that async reads are executed during bufferpool load +select variable_value into @innodb_async_reads_total_count_before + from information_schema.global_status + where variable_name='innodb_async_reads_total_count'; + # Load SET GLOBAL innodb_buffer_pool_load_now = ON; @@ -108,6 +113,12 @@ FROM information_schema.global_status WHERE LOWER(variable_name) = 'innodb_buffer_pool_load_status'; --enable_warnings +select (cast(variable_value as unsigned) > + cast(@innodb_async_reads_total_count_before as unsigned)) + as async_reads_grow + from information_schema.global_status where variable_name='innodb_async_reads_total_count'; + + SELECT COUNT(*) FROM information_schema.innodb_buffer_page_lru WHERE table_name = '`test`.`ib_bp_test`'; diff --git a/mysql-test/suite/innodb/t/page_cleaner.test b/mysql-test/suite/innodb/t/page_cleaner.test index f597619aa08..1941b0ae40f 100644 --- a/mysql-test/suite/innodb/t/page_cleaner.test +++ b/mysql-test/suite/innodb/t/page_cleaner.test @@ -14,6 +14,9 @@ WHERE variable_name = 'INNODB_BUFFER_POOL_PAGES_DIRTY'; --source include/wait_condition.inc SET GLOBAL innodb_max_dirty_pages_pct=90.0; +select variable_value into @innodb_async_writes_total_count_before + from information_schema.global_status + where variable_name='innodb_async_writes_total_count'; CREATE TABLE t ENGINE=InnoDB SELECT * FROM seq_1_to_10000; @@ -24,6 +27,13 @@ SET GLOBAL innodb_max_dirty_pages_pct=0.0; # Without the MDEV-24917 fix, we would time out here. --source include/wait_condition.inc + +select (cast(variable_value as unsigned) > + cast(@innodb_async_writes_total_count_before as unsigned)) + as innodb_async_writes_grow + from information_schema.global_status + where variable_name='innodb_async_writes_total_count'; + DROP TABLE t; SET GLOBAL innodb_max_dirty_pages_pct = @save_pct;