MDEV-33858 Assertion `(mem_root->flags & 4) == 0' fails on 2nd execution of PS with -DWITH_PROTECT_STATEMENT_MEMROOT=ON

Simply adding tests as the bug is fixed with a backport of MDEV-34447
This commit is contained in:
Yuchen Pei 2024-08-16 17:04:23 +10:00
parent 2c3e07df47
commit 00cb344085
No known key found for this signature in database
GPG Key ID: 3DD1B35105743563
2 changed files with 22 additions and 0 deletions

View File

@ -118,4 +118,13 @@ CALL p1(2);
# Clean up
DROP TABLE t1;
DROP PROCEDURE p1;
#
# MDEV-33858: Assertion `(mem_root->flags & 4) == 0' fails on 2nd execution of PS with -DWITH_PROTECT_STATEMENT_MEMROOT=ON
#
CREATE TABLE t (a INT);
INSERT INTO t VALUES (1),(2);
PREPARE stmt FROM "UPDATE t SET a = 0 LIMIT ?";
EXECUTE stmt USING 0;
EXECUTE stmt USING 1;
DROP TABLE t;
# End of 10.5 tests

View File

@ -142,4 +142,17 @@ CALL p1(2);
DROP TABLE t1;
DROP PROCEDURE p1;
--echo #
--echo # MDEV-33858: Assertion `(mem_root->flags & 4) == 0' fails on 2nd execution of PS with -DWITH_PROTECT_STATEMENT_MEMROOT=ON
--echo #
CREATE TABLE t (a INT);
INSERT INTO t VALUES (1),(2); # Optional, fails either way
PREPARE stmt FROM "UPDATE t SET a = 0 LIMIT ?";
EXECUTE stmt USING 0;
EXECUTE stmt USING 1;
# CLeanup
DROP TABLE t;
--echo # End of 10.5 tests