mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03:00
MDEV-29600 Memory leak in row_log_table_apply_update()
row_log_table_apply_update(): Free the pcur.old_rec_buf before returning.
It may be allocated by btr_pcur_store_position() inside
btr_blob_log_check_t::check() and btr_store_big_rec_extern_fields().
This memory leak was introduced in
commit 2e814d4702
(MariaDB Server 10.2.2)
via mysql/mysql-server@ce0a1e85e2
(MySQL 5.7.5).
This commit is contained in:
@ -433,7 +433,6 @@ c22f c1 c3 c4
|
||||
5 46 46foofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoo Online
|
||||
connection con1;
|
||||
ALTER TABLE t1 DISCARD TABLESPACE;
|
||||
disconnect con1;
|
||||
connection default;
|
||||
SHOW CREATE TABLE t1;
|
||||
Table Create Table
|
||||
@ -447,6 +446,23 @@ t1 CREATE TABLE `t1` (
|
||||
SET DEBUG_SYNC = 'RESET';
|
||||
SET GLOBAL innodb_monitor_disable = module_ddl;
|
||||
DROP TABLE t1;
|
||||
#
|
||||
# MDEV-29600 Memory leak in row_log_table_apply_update()
|
||||
#
|
||||
CREATE TABLE t1 (pk INT PRIMARY KEY, f TEXT) ENGINE=InnoDB;
|
||||
INSERT INTO t1 SET pk=1;
|
||||
connection con1;
|
||||
SET DEBUG_SYNC = 'row_log_table_apply1_before SIGNAL created WAIT_FOR updated';
|
||||
ALTER TABLE t1 FORCE;
|
||||
connection default;
|
||||
SET DEBUG_SYNC = 'now WAIT_FOR created';
|
||||
UPDATE t1 SET f = REPEAT('a', 20000);
|
||||
SET DEBUG_SYNC = 'now SIGNAL updated';
|
||||
connection con1;
|
||||
disconnect con1;
|
||||
connection default;
|
||||
DROP TABLE t1;
|
||||
SET DEBUG_SYNC = 'RESET';
|
||||
SET GLOBAL innodb_file_per_table = @global_innodb_file_per_table_orig;
|
||||
SET GLOBAL innodb_monitor_enable = default;
|
||||
SET GLOBAL innodb_monitor_disable = default;
|
||||
|
@ -388,7 +388,6 @@ SELECT * FROM t1 LIMIT 10;
|
||||
|
||||
connection con1;
|
||||
ALTER TABLE t1 DISCARD TABLESPACE;
|
||||
disconnect con1;
|
||||
|
||||
connection default;
|
||||
SHOW CREATE TABLE t1;
|
||||
@ -396,6 +395,30 @@ SET DEBUG_SYNC = 'RESET';
|
||||
SET GLOBAL innodb_monitor_disable = module_ddl;
|
||||
DROP TABLE t1;
|
||||
|
||||
--echo #
|
||||
--echo # MDEV-29600 Memory leak in row_log_table_apply_update()
|
||||
--echo #
|
||||
|
||||
CREATE TABLE t1 (pk INT PRIMARY KEY, f TEXT) ENGINE=InnoDB;
|
||||
INSERT INTO t1 SET pk=1;
|
||||
|
||||
connection con1;
|
||||
SET DEBUG_SYNC = 'row_log_table_apply1_before SIGNAL created WAIT_FOR updated';
|
||||
send ALTER TABLE t1 FORCE;
|
||||
|
||||
connection default;
|
||||
SET DEBUG_SYNC = 'now WAIT_FOR created';
|
||||
UPDATE t1 SET f = REPEAT('a', 20000);
|
||||
SET DEBUG_SYNC = 'now SIGNAL updated';
|
||||
|
||||
connection con1;
|
||||
reap;
|
||||
disconnect con1;
|
||||
|
||||
connection default;
|
||||
DROP TABLE t1;
|
||||
SET DEBUG_SYNC = 'RESET';
|
||||
|
||||
# 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.
|
||||
--source include/wait_until_count_sessions.inc
|
||||
|
Reference in New Issue
Block a user