Details
-
Bug
-
Status: Closed (View Workflow)
-
Critical
-
Resolution: Duplicate
-
None
-
None
Description
The following test case fails if the server is built with -DWITH_PROTECT_STATEMENT_MEMROOT:BOOL=ON
CREATE TABLE t1 (a INT,b INT); |
INSERT INTO t1 VALUES (10,1),(20,2),(30,3),(40,4); |
CREATE VIEW v1 AS |
SELECT a,1 as b FROM t1 WHERE a>(SELECT AVG(a) FROM t1 t) AND b>(SELECT 1); |
DELIMITER |;
|
CREATE FUNCTION f1() RETURNS INT |
BEGIN
|
DECLARE a TYPE OF v1.a DEFAULT 10; |
RETURN a+1; |
END; |
|
|
DELIMITER ;|
|
PREPARE stmt FROM "SELECT f1();"; |
EXECUTE stmt; |
EXECUTE stmt; |
DEALLOCATE PREPARE stmt; |
DROP FUNCTION f1; |
DROP VIEW v1; |
DROP TABLE t1; |
Attachments
Issue Links
- blocks
-
MDEV-30073 Wrong result on 2nd execution of PS for query with NOT EXISTS
- Stalled