1
0
mirror of https://github.com/MariaDB/server.git synced 2025-11-30 05:23:50 +03:00

MDEV-24659 Assertion !fsp_is_system_temporary(bpage->id().space()) failed in buf_flush_relocate_on_flush_list()

When commit 5eb539555b (MDEV-12227)
removed the pages of temporary tables from the buf_pool.flush_list,
an adjustment to the buffer pool resizing was forgotten.

buf_pool_t::realloc(): Do not invoke buf_flush_relocate_on_flush_list()
for pages that belong to the temporary tablespace. Also, deduplicate
some code at the end.

buf_page_t::set_corrupt_id(): Tolerate oldest_modification()==1
(the dummy value) for temporary tablespace pages. The revised
buf_pool_t::realloc() may invoke this on dirty temporary tablespace pages.
This commit is contained in:
Marko Mäkelä
2021-01-23 17:45:03 +02:00
parent bf1f9b59c7
commit 84b8f529c7
4 changed files with 66 additions and 13 deletions

View File

@@ -0,0 +1,16 @@
SET @save_limit=@@GLOBAL.innodb_limit_optimistic_insert_debug;
SET @save_disable=@@GLOBAL.innodb_disable_resize_buffer_pool_debug;
SET @save_size=@@GLOBAL.innodb_buffer_pool_size;
SET GLOBAL innodb_limit_optimistic_insert_debug=2;
SET GLOBAL innodb_disable_resize_buffer_pool_debug=OFF;
SET GLOBAL innodb_buffer_pool_size=16777216;
CREATE TEMPORARY TABLE t1 (a INT PRIMARY KEY) ENGINE=InnoDB;
INSERT INTO t1 SELECT seq FROM seq_1_to_200;
SET GLOBAL innodb_buffer_pool_size=8388608;
SELECT COUNT(*),MIN(a),MAX(a) FROM t1;
COUNT(*) MIN(a) MAX(a)
200 1 200
DROP TEMPORARY TABLE t1;
SET GLOBAL innodb_limit_optimistic_insert_debug=@save_limit;
SET GLOBAL innodb_buffer_pool_size=@save_size;
SET GLOBAL innodb_disable_resize_buffer_pool_debug=@save_disable;

View File

@@ -0,0 +1,30 @@
--source include/have_innodb.inc
--source include/have_sequence.inc
--source include/have_debug.inc
SET @save_limit=@@GLOBAL.innodb_limit_optimistic_insert_debug;
SET @save_disable=@@GLOBAL.innodb_disable_resize_buffer_pool_debug;
SET @save_size=@@GLOBAL.innodb_buffer_pool_size;
SET GLOBAL innodb_limit_optimistic_insert_debug=2;
SET GLOBAL innodb_disable_resize_buffer_pool_debug=OFF;
SET GLOBAL innodb_buffer_pool_size=16777216;
CREATE TEMPORARY TABLE t1 (a INT PRIMARY KEY) ENGINE=InnoDB;
INSERT INTO t1 SELECT seq FROM seq_1_to_200;
SET GLOBAL innodb_buffer_pool_size=8388608;
let $wait_timeout = 60;
let $wait_condition =
SELECT SUBSTR(variable_value, 1, 34) = 'Completed resizing buffer pool at '
FROM information_schema.global_status
WHERE variable_name = 'INNODB_BUFFER_POOL_RESIZE_STATUS';
--source include/wait_condition.inc
SELECT COUNT(*),MIN(a),MAX(a) FROM t1;
DROP TEMPORARY TABLE t1;
SET GLOBAL innodb_limit_optimistic_insert_debug=@save_limit;
SET GLOBAL innodb_buffer_pool_size=@save_size;
SET GLOBAL innodb_disable_resize_buffer_pool_debug=@save_disable;