[MDEV-32517] Memory leak on running query in PS mode with condition that has 'ANY/SOME (subquery)' clause and any kind of the following comparisons '>', '>=', '<', '<=' ' Created: 2023-10-19  Updated: 2023-11-01  Resolved: 2023-11-01

Status: Closed
Project: MariaDB Server
Component/s: Prepared Statements
Affects Version/s: 10.4
Fix Version/s: 10.4.32, 10.5.23, 10.6.16, 10.10.7, 10.11.6, 11.0.4, 11.1.3, 11.2.2, 11.3.1

Type: Bug Priority: Critical
Reporter: Dmitry Shulga Assignee: Dmitry Shulga
Resolution: Duplicate Votes: 0
Labels: None

Issue Links:
PartOf
is part of MDEV-14959 Control over memory allocated for SP/PS Stalled

 Description   

The following test cases executed with --ps-protocol fail with assert on server built in debug mode with -DWITH_PROTECT_STATEMENT_MEMROOT

CREATE TABLE t1 (s1 CHAR(1));
INSERT INTO t1 VALUES ('a');
SELECT * FROM t1 WHERE _utf8'a' > ANY (SELECT s1 FROM t1);
DROP TABLE t1;

CREATE TABLE t1 (f1 CHAR(3) CHARACTER SET utf8 NULL, f2 CHAR(3) CHARACTER SET latin1 NULL);
INSERT INTO t1 VALUES ('foo','bar');
SELECT * FROM t1 WHERE f2 >= SOME ( SELECT f1 FROM t1 );
DROP TABLE t1;

In case the condition of the query is changed to '=' the above mentioned tests cases be completed without assert failures.



 Comments   
Comment by Dmitry Shulga [ 2023-11-01 ]

The root cause of this issue was fixed in the task MDEV-32569

Generated at Thu Feb 08 10:31:57 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.