mirror of
https://github.com/MariaDB/server.git
synced 2025-04-26 11:49:09 +03:00
Only add innodb_async_reads/writes_total_count here. For all other counters, writing reproducible tests is rather tricky.
62 lines
2.2 KiB
Plaintext
62 lines
2.2 KiB
Plaintext
SET GLOBAL innodb_buffer_pool_dump_pct=100;
|
|
CREATE TABLE ib_bp_test
|
|
(a INT AUTO_INCREMENT, b VARCHAR(64), c TEXT, PRIMARY KEY (a), KEY (b, c(128)))
|
|
ENGINE=INNODB;
|
|
SELECT PAGE_NUMBER FROM information_schema.innodb_buffer_page_lru
|
|
WHERE table_name = '`test`.`ib_bp_test`';
|
|
PAGE_NUMBER
|
|
3
|
|
4
|
|
SELECT SPACE INTO @space FROM information_schema.innodb_buffer_page_lru
|
|
WHERE table_name = '`test`.`ib_bp_test`' AND PAGE_NUMBER=3;
|
|
INSERT INTO ib_bp_test
|
|
SELECT NULL, REPEAT('b', 64), REPEAT('c', 256) FROM seq_1_to_16382;
|
|
SELECT COUNT(*) FROM information_schema.innodb_buffer_page_lru
|
|
WHERE table_name = '`test`.`ib_bp_test`';
|
|
COUNT(*)
|
|
596
|
|
SET GLOBAL innodb_buffer_pool_dump_now = ON;
|
|
SET GLOBAL innodb_fast_shutdown=0;
|
|
# restart
|
|
SELECT PAGE_NUMBER FROM information_schema.innodb_buffer_page_lru
|
|
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(*)
|
|
596
|
|
call mtr.add_suppression("InnoDB: Error parsing");
|
|
SET GLOBAL innodb_buffer_pool_load_now = ON;
|
|
# Re-write some valid pages to the dump file, make sure the space
|
|
# should be valid but all the page no should be out of bound of the file
|
|
# restart
|
|
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
|
|
DROP TABLE ib_bp_test;
|
|
SET GLOBAL innodb_buffer_pool_dump_pct=default;
|
|
#
|
|
# Bug#21371070 [ERROR] INNODB: CANNOT ALLOCATE 0 BYTES: SUCCESS
|
|
#
|
|
SET GLOBAL innodb_buffer_pool_load_now = ON;
|