summaryrefslogtreecommitdiff
path: root/mysql-test/t/row.test
diff options
context:
space:
mode:
authorSergey Glukhov <Sergey.Glukhov@sun.com>2010-04-16 16:42:34 +0500
committerSergey Glukhov <Sergey.Glukhov@sun.com>2010-04-16 16:42:34 +0500
commit649deaa8a1ab7660322152156b862a27de78d327 (patch)
tree474c979243c95c185ebce8f4157c5158e7b9870c /mysql-test/t/row.test
parent16fadb10b5d2a9328b5caa85963a3d851b35cef4 (diff)
downloadmariadb-git-649deaa8a1ab7660322152156b862a27de78d327.tar.gz
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/r/ps.result: test case mysql-test/r/row.result: test case mysql-test/t/ps.test: test case mysql-test/t/row.test: test case sql/item_cmpfunc.h: -added Arg_comparator::cleanup() method which frees 'comparators' array. -added Item_bool_func2::cleanup() method which calls Arg_comparator::cleanup() method
Diffstat (limited to 'mysql-test/t/row.test')
-rw-r--r--mysql-test/t/row.test11
1 files changed, 11 insertions, 0 deletions
diff --git a/mysql-test/t/row.test b/mysql-test/t/row.test
index fcc4259168b..cec44078279 100644
--- a/mysql-test/t/row.test
+++ b/mysql-test/t/row.test
@@ -255,3 +255,14 @@ select * from t1,t2 where (a,b) = (c,d);
select host,user from mysql.user where (host,user) = ('localhost','test');
drop table t1,t2;
+
+--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);
+--disable_warnings
+SELECT 1 FROM t1 WHERE ROW(a, b) >=
+ROW('1', (SELECT 1 FROM t1 WHERE a > 1234));
+--enable_warnings
+DROP TABLE t1;