Skip to content

Commit e87a8ef

Browse files
committed
MDEV-24455 Assertion `!m_freed_space' failed in mtr_t::start
In commit 0c23e32 (MDEV-24445) we forgot to keep m_freed_space in sync with m_freed_pages in one case.
1 parent 0c23e32 commit e87a8ef

File tree

3 files changed

+16
-0
lines changed

3 files changed

+16
-0
lines changed

mysql-test/suite/innodb/r/innodb-page_compression_tables.result

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,14 @@ innodb_redundant CREATE TABLE `innodb_redundant` (
5555
`b` char(200) DEFAULT NULL
5656
) ENGINE=InnoDB DEFAULT CHARSET=latin1 ROW_FORMAT=COMPACT `page_compressed`=1
5757
drop table innodb_redundant;
58+
#
59+
# MDEV-24455 Assertion `!m_freed_space' failed in mtr_t::start
60+
#
61+
CREATE TABLE t1 (a TEXT, b TEXT) ENGINE=InnoDB PAGE_COMPRESSED='ON';
62+
BEGIN;
63+
INSERT INTO t1 VALUES(REPEAT('x',81),REPEAT('x',8034));
64+
ROLLBACK;
65+
DROP TABLE t1;
5866
create procedure innodb_insert_proc (repeat_count int)
5967
begin
6068
declare current_num int;

mysql-test/suite/innodb/t/innodb-page_compression_tables.test

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,13 @@ alter table innodb_redundant row_format=compact page_compressed=1;
3030
show create table innodb_redundant;
3131
drop table innodb_redundant;
3232

33+
--echo #
34+
--echo # MDEV-24455 Assertion `!m_freed_space' failed in mtr_t::start
35+
--echo #
36+
CREATE TABLE t1 (a TEXT, b TEXT) ENGINE=InnoDB PAGE_COMPRESSED='ON';
37+
BEGIN; INSERT INTO t1 VALUES(REPEAT('x',81),REPEAT('x',8034)); ROLLBACK;
38+
DROP TABLE t1;
39+
3340
delimiter //;
3441
create procedure innodb_insert_proc (repeat_count int)
3542
begin

storage/innobase/mtr/mtr0mtr.cc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -433,6 +433,7 @@ void mtr_t::commit()
433433
m_freed_space->clear_freed_ranges();
434434
delete m_freed_pages;
435435
m_freed_pages= nullptr;
436+
m_freed_space= nullptr;
436437
/* mtr_t::start() will reset m_trim_pages */
437438
}
438439
else

0 commit comments

Comments
 (0)