Details
-
Bug
-
Status: Closed (View Workflow)
-
Critical
-
Resolution: Fixed
-
10.4(EOL), 10.5, 10.6, 10.11, 11.0(EOL)
-
None
Description
The following test case from subselect4.test fails if the server is built with -DWITH_PROTECT_STATEMENT_MEMROOT:BOOL=ON
CREATE TABLE t1 ( f1 int) ; |
INSERT INTO t1 VALUES (2),(3); |
CREATE TABLE t2 (f2 int) ; |
INSERT INTO t2 VALUES (2),(3); |
PREPARE st1 FROM ' |
SELECT * FROM t2
|
WHERE f2 <= SOME ( SELECT f1 FROM t1 );
|
'; |
EXECUTE st1; |
EXECUTE st1; |
The test case fails with the assertion abort that points to re-allocation of ref_pointer_array in the function setup_ref_array() that happens at the second execution of the prepared statement.
This does not cause any leak of the statement memory because this reallocation may happen only once. Yet it would be better if such reallocation is avoided in order not to cause aborts with -DWITH_PROTECT_STATEMENT_MEMROOT:BOOL=ON