From 0d242648b5b10696e21d8fad3a35779e38d1b736 Mon Sep 17 00:00:00 2001 From: Sergey Glukhov Date: Fri, 16 Apr 2010 16:42:34 +0500 Subject: Bug#52124 memory leaks like a sieve in datetime, timestamp, time, date fields + warnings Arg_comparator initializes 'comparators' array in case of ROW comparison and does not free this array on destruction. It leads to memory leaks. The fix: -added Arg_comparator::cleanup() method which frees 'comparators' array. -added Item_bool_func2::cleanup() method which calls Arg_comparator::cleanup() method --- mysql-test/t/ps.test | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'mysql-test/t/ps.test') diff --git a/mysql-test/t/ps.test b/mysql-test/t/ps.test index d5f7eda5032..4390b70e9e9 100644 --- a/mysql-test/t/ps.test +++ b/mysql-test/t/ps.test @@ -3065,4 +3065,18 @@ select @plaintext; deallocate prepare encode; deallocate prepare decode; +--echo # +--echo # Bug#52124 memory leaks like a sieve in datetime, timestamp, time, date fields + warnings +--echo # +CREATE TABLE t1 (a DATETIME NOT NULL, b TINYINT); +INSERT INTO t1 VALUES (0, 0),(0, 0); +PREPARE stmt FROM "SELECT 1 FROM t1 WHERE +ROW(a, b) >= ROW('1', (SELECT 1 FROM t1 WHERE a > 1234))"; +--disable_warnings +EXECUTE stmt; +EXECUTE stmt; +--enable_warnings +DEALLOCATE PREPARE stmt; +DROP TABLE t1; + --echo End of 5.1 tests. -- cgit v1.2.1