1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-29 05:21:33 +03:00

Bug #45989 take 2 : memory leak after explain encounters an

error in the query.

Fixes a leak after materializing a GROUP BY subquery to a 
temp table when the subquery has a blob column in the SELECT
list.
Fixed by correctly destructing temporary buffers for re-usable
queries
This commit is contained in:
Georgi Kodinov
2010-02-02 18:30:23 +02:00
parent 8c65b726a5
commit a89d88dc0a
4 changed files with 60 additions and 1 deletions

View File

@ -4615,4 +4615,16 @@ FROM t1,t1 a
);
1
DROP TABLE t1;
#
# Bug #45989 take 2 : memory leak after explain encounters an
# error in the query
#
CREATE TABLE t1(a LONGTEXT);
INSERT INTO t1 VALUES (repeat('a',@@global.max_allowed_packet));
INSERT INTO t1 VALUES (repeat('b',@@global.max_allowed_packet));
EXPLAIN EXTENDED SELECT DISTINCT 1 FROM t1,
(SELECT DISTINCTROW a AS away FROM t1 GROUP BY a WITH ROLLUP) AS d1
WHERE t1.a = d1.a;
ERROR 42S22: Unknown column 'd1.a' in 'where clause'
DROP TABLE t1;
End of 5.1 tests.