1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-30 16:24:05 +03:00

MDEV-13626: Clean up the buffer pool resizing tests from MySQL 5.7

buf_pool_resize(): Simplify the fault injection
for innodb.buf_pool_resize_oom.

innodb.buf_pool_resize_oom: Use a small buffer pool.

innodb.innodb_buffer_pool_load_now: Make use of the sequence engine,
to avoid creating explicit InnoDB record locks. Clean up the
accesses to information_schema.innodb_buffer_page_lru.
This commit is contained in:
Marko Mäkelä
2020-03-19 12:57:22 +02:00
parent bfb5e1c3f0
commit 9fd692aeca
5 changed files with 42 additions and 67 deletions

View File

@ -2,22 +2,26 @@ 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 LIKE '%ib_bp_test%';
WHERE table_name = '`test`.`ib_bp_test`';
COUNT(*)
2
SELECT COUNT(*) FROM information_schema.innodb_buffer_page_lru
WHERE table_name LIKE '%ib_bp_test%';
COUNT(*)
{checked_valid}
596
SET GLOBAL innodb_buffer_pool_dump_now = ON;
SELECT COUNT(*) FROM information_schema.innodb_buffer_page_lru
WHERE table_name LIKE '%ib_bp_test%';
COUNT(*)
0
select count(*) from ib_bp_test where a = 1;
SET GLOBAL innodb_fast_shutdown=0;
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(*)
1
SET GLOBAL innodb_buffer_pool_load_now = ON;
SELECT variable_value
FROM information_schema.global_status
@ -25,9 +29,9 @@ WHERE LOWER(variable_name) = 'innodb_buffer_pool_load_status';
variable_value
Buffer pool(s) load completed at TIMESTAMP_NOW
SELECT COUNT(*) FROM information_schema.innodb_buffer_page_lru
WHERE table_name LIKE '%ib_bp_test%';
WHERE table_name = '`test`.`ib_bp_test`';
COUNT(*)
{checked_valid}
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