Commit e87a8efd authored by Marko Mäkelä's avatar Marko Mäkelä

MDEV-24455 Assertion `!m_freed_space' failed in mtr_t::start

In commit 0c23e32d (MDEV-24445)
we forgot to keep m_freed_space in sync with m_freed_pages in one case.
parent 0c23e32d
...@@ -55,6 +55,14 @@ innodb_redundant CREATE TABLE `innodb_redundant` ( ...@@ -55,6 +55,14 @@ innodb_redundant CREATE TABLE `innodb_redundant` (
`b` char(200) DEFAULT NULL `b` char(200) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1 ROW_FORMAT=COMPACT `page_compressed`=1 ) ENGINE=InnoDB DEFAULT CHARSET=latin1 ROW_FORMAT=COMPACT `page_compressed`=1
drop table innodb_redundant; drop table innodb_redundant;
#
# MDEV-24455 Assertion `!m_freed_space' failed in mtr_t::start
#
CREATE TABLE t1 (a TEXT, b TEXT) ENGINE=InnoDB PAGE_COMPRESSED='ON';
BEGIN;
INSERT INTO t1 VALUES(REPEAT('x',81),REPEAT('x',8034));
ROLLBACK;
DROP TABLE t1;
create procedure innodb_insert_proc (repeat_count int) create procedure innodb_insert_proc (repeat_count int)
begin begin
declare current_num int; declare current_num int;
......
...@@ -30,6 +30,13 @@ alter table innodb_redundant row_format=compact page_compressed=1; ...@@ -30,6 +30,13 @@ alter table innodb_redundant row_format=compact page_compressed=1;
show create table innodb_redundant; show create table innodb_redundant;
drop table innodb_redundant; drop table innodb_redundant;
--echo #
--echo # MDEV-24455 Assertion `!m_freed_space' failed in mtr_t::start
--echo #
CREATE TABLE t1 (a TEXT, b TEXT) ENGINE=InnoDB PAGE_COMPRESSED='ON';
BEGIN; INSERT INTO t1 VALUES(REPEAT('x',81),REPEAT('x',8034)); ROLLBACK;
DROP TABLE t1;
delimiter //; delimiter //;
create procedure innodb_insert_proc (repeat_count int) create procedure innodb_insert_proc (repeat_count int)
begin begin
......
...@@ -433,6 +433,7 @@ void mtr_t::commit() ...@@ -433,6 +433,7 @@ void mtr_t::commit()
m_freed_space->clear_freed_ranges(); m_freed_space->clear_freed_ranges();
delete m_freed_pages; delete m_freed_pages;
m_freed_pages= nullptr; m_freed_pages= nullptr;
m_freed_space= nullptr;
/* mtr_t::start() will reset m_trim_pages */ /* mtr_t::start() will reset m_trim_pages */
} }
else else
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment