mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
MDEV-29977 Memory leak in row_log_table_apply_update
- InnoDB fails to free the persistent cursor for the clustered index when InnoDB replays the update operation on the table that is being rebuilt.
This commit is contained in:
@ -459,10 +459,26 @@ SET DEBUG_SYNC = 'now WAIT_FOR created';
|
|||||||
UPDATE t1 SET f = REPEAT('a', 20000);
|
UPDATE t1 SET f = REPEAT('a', 20000);
|
||||||
SET DEBUG_SYNC = 'now SIGNAL updated';
|
SET DEBUG_SYNC = 'now SIGNAL updated';
|
||||||
connection con1;
|
connection con1;
|
||||||
disconnect con1;
|
|
||||||
connection default;
|
connection default;
|
||||||
DROP TABLE t1;
|
DROP TABLE t1;
|
||||||
SET DEBUG_SYNC = 'RESET';
|
#
|
||||||
|
# MDEV-29977 Memory leak in row_log_table_apply_update
|
||||||
|
#
|
||||||
|
CREATE TABLE t1(f1 longtext, f2 int, KEY(f1(1024)), KEY(f2, f1(20))) ENGINE=InnoDB;
|
||||||
|
INSERT INTO t1 VALUES('a', 1);
|
||||||
|
connection con1;
|
||||||
|
set DEBUG_SYNC="innodb_inplace_alter_table_enter SIGNAL con_default WAIT_FOR con1_signal";
|
||||||
|
ALTER TABLE t1 FORCE;
|
||||||
|
connection default;
|
||||||
|
SET DEBUG_SYNC="now WAIT_FOR con_default";
|
||||||
|
UPDATE t1 SET f1 = NULL;
|
||||||
|
UPDATE t1 SET f1 = REPEAT('b', 9000);
|
||||||
|
SET DEBUG_SYNC="now SIGNAL con1_signal";
|
||||||
|
connection con1;
|
||||||
|
DROP TABLE t1;
|
||||||
|
connection default;
|
||||||
|
SET DEBUG_SYNC=RESET;
|
||||||
|
disconnect con1;
|
||||||
SET GLOBAL innodb_file_per_table = @global_innodb_file_per_table_orig;
|
SET GLOBAL innodb_file_per_table = @global_innodb_file_per_table_orig;
|
||||||
SET GLOBAL innodb_monitor_enable = default;
|
SET GLOBAL innodb_monitor_enable = default;
|
||||||
SET GLOBAL innodb_monitor_disable = default;
|
SET GLOBAL innodb_monitor_disable = default;
|
||||||
|
@ -413,11 +413,28 @@ SET DEBUG_SYNC = 'now SIGNAL updated';
|
|||||||
|
|
||||||
connection con1;
|
connection con1;
|
||||||
reap;
|
reap;
|
||||||
disconnect con1;
|
|
||||||
|
|
||||||
connection default;
|
connection default;
|
||||||
DROP TABLE t1;
|
DROP TABLE t1;
|
||||||
SET DEBUG_SYNC = 'RESET';
|
--echo #
|
||||||
|
--echo # MDEV-29977 Memory leak in row_log_table_apply_update
|
||||||
|
--echo #
|
||||||
|
CREATE TABLE t1(f1 longtext, f2 int, KEY(f1(1024)), KEY(f2, f1(20))) ENGINE=InnoDB;
|
||||||
|
INSERT INTO t1 VALUES('a', 1);
|
||||||
|
connection con1;
|
||||||
|
set DEBUG_SYNC="innodb_inplace_alter_table_enter SIGNAL con_default WAIT_FOR con1_signal";
|
||||||
|
send ALTER TABLE t1 FORCE;
|
||||||
|
connection default;
|
||||||
|
SET DEBUG_SYNC="now WAIT_FOR con_default";
|
||||||
|
UPDATE t1 SET f1 = NULL;
|
||||||
|
UPDATE t1 SET f1 = REPEAT('b', 9000);
|
||||||
|
SET DEBUG_SYNC="now SIGNAL con1_signal";
|
||||||
|
connection con1;
|
||||||
|
reap;
|
||||||
|
DROP TABLE t1;
|
||||||
|
connection default;
|
||||||
|
SET DEBUG_SYNC=RESET;
|
||||||
|
disconnect con1;
|
||||||
|
|
||||||
# Check that all connections opened by test cases in this file are really
|
# Check that all connections opened by test cases in this file are really
|
||||||
# gone so execution of other tests won't be affected by their presence.
|
# gone so execution of other tests won't be affected by their presence.
|
||||||
|
@ -2364,6 +2364,8 @@ func_exit_committed:
|
|||||||
mtr_start(&mtr);
|
mtr_start(&mtr);
|
||||||
index->set_modified(mtr);
|
index->set_modified(mtr);
|
||||||
|
|
||||||
|
ut_free(pcur.old_rec_buf);
|
||||||
|
|
||||||
if (ROW_FOUND != row_search_index_entry(
|
if (ROW_FOUND != row_search_index_entry(
|
||||||
index, entry, BTR_MODIFY_TREE, &pcur, &mtr)) {
|
index, entry, BTR_MODIFY_TREE, &pcur, &mtr)) {
|
||||||
ut_ad(0);
|
ut_ad(0);
|
||||||
|
Reference in New Issue
Block a user