summaryrefslogtreecommitdiff
path: root/mysql-test/suite/innodb/t
diff options
context:
space:
mode:
authorMarko Mäkelä <marko.makela@mariadb.com>2022-09-22 11:18:00 +0300
committerMarko Mäkelä <marko.makela@mariadb.com>2022-09-22 11:18:00 +0300
commitce23802c0e4c85018f2141d2ebb0602dc0d3d6d8 (patch)
tree9287e0ecd1de4f8665bfa1d1a2427c1aaea2036b /mysql-test/suite/innodb/t
parent2d5cfdc570350d663aea52c8f4ca58d481ce8f8e (diff)
downloadmariadb-git-ce23802c0e4c85018f2141d2ebb0602dc0d3d6d8.tar.gz
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 2e814d4702d71a04388386a9f591d14a35980bfe (MariaDB Server 10.2.2) via mysql/mysql-server@ce0a1e85e24e48b8171f767b44330da635a6ea0a (MySQL 5.7.5).
Diffstat (limited to 'mysql-test/suite/innodb/t')
-rw-r--r--mysql-test/suite/innodb/t/innodb-table-online.test25
1 files changed, 24 insertions, 1 deletions
diff --git a/mysql-test/suite/innodb/t/innodb-table-online.test b/mysql-test/suite/innodb/t/innodb-table-online.test
index c48ce6331f2..997b0a5bf10 100644
--- a/mysql-test/suite/innodb/t/innodb-table-online.test
+++ b/mysql-test/suite/innodb/t/innodb-table-online.test
@@ -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