From b40b3720cbba133ee76ef336bf89bbf5c03ac403 Mon Sep 17 00:00:00 2001 From: Sergey Vojtovich Date: Thu, 2 Apr 2020 00:39:54 +0400 Subject: MDEV-21348 - column compression memory leak The Storage-Engine Independent Column Compression does not call deflateEnd() when deflate() does not return Z_STREAM_END. This for instance happens when the data is already (externally) compressed and deflate() needs more space than the original data. This patch is based on contribution by Martijn Broenland. --- mysql-test/main/column_compression.test | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'mysql-test/main/column_compression.test') diff --git a/mysql-test/main/column_compression.test b/mysql-test/main/column_compression.test index 092125735cf..1560b23ad3e 100644 --- a/mysql-test/main/column_compression.test +++ b/mysql-test/main/column_compression.test @@ -255,3 +255,14 @@ DROP TABLE t1; CREATE TABLE t1 (a NVARCHAR(10) COMPRESSED BINARY COMPRESSED); --error ER_PARSE_ERROR CREATE TABLE t1 (a NVARCHAR(10) COMPRESSED DEFAULT '' COMPRESSED); + + +--echo # +--echo # MDEV-21348 - Memory leak in Storage-Engine Independent Column +--echo # Compression +--echo # +CREATE TABLE t1(a BLOB COMPRESSED); +SET column_compression_threshold=0; +INSERT INTO t1 VALUES('aa'); +SET column_compression_threshold=DEFAULT; +DROP TABLE t1; -- cgit v1.2.1