Details
-
Bug
-
Status: Closed (View Workflow)
-
Critical
-
Resolution: Fixed
-
None
-
None
Description
CREATE TABLE t1 (id INT, value INT); |
CREATE TABLE t2 (id INT); |
 |
PREPARE stmt FROM 'UPDATE t1 t1 SET value = (SELECT 1 FROM t2 WHERE id = t1.id)'; |
execute stmt; |
insert into t1 values (1,10),(2,10),(3,10); |
insert into t2 values (1),(2); |
execute stmt; # <<=== Memory leak happens on running this statement |
select * from t1; |
deallocate prepare stmt; |
DROP TABLE t1,t2; |
The above use case doesn't show memory leaking on 10.11.
The similar issue could take place on running the DELETE statement with the LIMIT clause in PS/SP mode. So, this task also about fixing a memory leak in the code that processes the DELETE statement.
Attachments
Issue Links
- causes
-
MDEV-35249 Assertion `(mem_root->flags & 4) == 0' failed in convert_subq_to_jtbm
- Closed
- is part of
-
MDEV-14959 Control over memory allocated for SP/PS
- Closed
- relates to
-
MDEV-33858 Assertion `(mem_root->flags & 4) == 0' fails on 2nd execution of PS with -DWITH_PROTECT_STATEMENT_MEMROOT=ON
- Closed
-
MDEV-34757 assertion of (mem_root->flags & 4) == 0 fails in 2nd ps execution with partition pruning
- Closed