mirror of
https://github.com/MariaDB/server.git
synced 2025-09-02 09:41:40 +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 after doing the conversion.
This commit is contained in:
@@ -3585,4 +3585,21 @@ SELECT 1 FROM t1 GROUP BY
|
||||
(SELECT LAST_INSERT_ID() FROM t1 ORDER BY MIN(a) ASC LIMIT 1);
|
||||
DROP TABLE t1;
|
||||
|
||||
--echo #
|
||||
--echo # Bug #45989 take 2 : memory leak after explain encounters an
|
||||
--echo # error in the query
|
||||
--echo #
|
||||
|
||||
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));
|
||||
|
||||
--error ER_BAD_FIELD_ERROR
|
||||
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;
|
||||
|
||||
DROP TABLE t1;
|
||||
|
||||
|
||||
--echo End of 5.1 tests.
|
||||
|
Reference in New Issue
Block a user