Details
-
Bug
-
Status: Closed (View Workflow)
-
Critical
-
Resolution: Fixed
-
10.5, 10.6, 10.11, 10.4(EOL), 11.0(EOL)
-
None
Description
For the following test case a statement memory leak is detected when the server is built with -DWITH_PROTECT_STATEMENT_MEMROOT:BOOL=ON
CREATE TABLE t1 (a varchar(10)) ENGINE=MYISAM; |
CREATE TABLE t2 (b varchar(10) CHARACTER SET utf8) ENGINE=MYISAM; |
INSERT INTO t1 VALUES ('b'), ('a'), ('c'); |
INSERT INTO t2 VALUES ('c'), ('d'), ('b'); |
PREPARE stmt FROM "SELECT t1.a FROM t1 WHERE t1.a IN (SELECT t2.b FROM t2)"; |
EXECUTE stmt; |
EXECUTE stmt; |
DEALLOCATE PREPARE stmt; |
DROP TABLE t1,t2; |
The leak is detected in the function Type_std_attributes::agg_item_set_converter()
with the following memory allocation
Item_direct_ref_to_item *ref=
|
new (thd->mem_root) Item_direct_ref_to_item(thd, *arg);
|
Attachments
Issue Links
- blocks
-
MDEV-14959 Control over memory allocated for SP/PS
- Closed
- relates to
-
MDEV-32569 Failure when executing PS for query using IN subquery
- Closed