mirror of
https://github.com/MariaDB/server.git
synced 2025-01-15 19:42:28 +01:00
Merge branch '11.1' into 11.2
This commit is contained in:
commit
2b11450d09
4 changed files with 34 additions and 5 deletions
|
@ -194,11 +194,7 @@ ELSE()
|
|||
ENDIF()
|
||||
|
||||
|
||||
IF("${MYSQL_NO_DASH_VERSION}" VERSION_LESS 11.2)
|
||||
SET(MEMPROTECT_DEFAULT ON)
|
||||
ELSE()
|
||||
SET(MEMPROTECT_DEFAULT OFF)
|
||||
ENDIF()
|
||||
SET(MEMPROTECT_DEFAULT ON)
|
||||
|
||||
OPTION(WITH_PROTECT_STATEMENT_MEMROOT "Enable protection of statement's memory root after first SP/PS execution. Turned into account only for debug build"
|
||||
${MEMPROTECT_DEFAULT})
|
||||
|
|
|
@ -149,6 +149,20 @@ DROP TABLE t1;
|
|||
DROP PROCEDURE p1;
|
||||
# End of 10.11 tests
|
||||
#
|
||||
# MDEV-34649: Memory leaks on running DELETE statement in PS mode with positional parameters
|
||||
#
|
||||
CREATE TABLE t1 (a INT, b VARCHAR(30)) CHARSET=utf8mb4;
|
||||
INSERT INTO t1 VALUES (1, 'one'), (0, NULL), (3, 'three'), (4, 'four');
|
||||
PREPARE stmt FROM 'DELETE FROM t1 WHERE b=?' ;
|
||||
SET @arg00=NULL;
|
||||
EXECUTE stmt USING @arg00;
|
||||
SET @arg00='one';
|
||||
EXECUTE stmt USING @arg00;
|
||||
# Clean up
|
||||
DEALLOCATE PREPARE stmt;
|
||||
DROP TABLE t1;
|
||||
# End of 11.1
|
||||
#
|
||||
# MDEV-34517: Memory leak on re-compilation of a failing statement inside a stored routine
|
||||
#
|
||||
CREATE TABLE t1 (a INT);
|
||||
|
|
|
@ -168,6 +168,24 @@ DROP PROCEDURE p1;
|
|||
|
||||
--echo # End of 10.11 tests
|
||||
|
||||
--echo #
|
||||
--echo # MDEV-34649: Memory leaks on running DELETE statement in PS mode with positional parameters
|
||||
--echo #
|
||||
CREATE TABLE t1 (a INT, b VARCHAR(30)) CHARSET=utf8mb4;
|
||||
INSERT INTO t1 VALUES (1, 'one'), (0, NULL), (3, 'three'), (4, 'four');
|
||||
PREPARE stmt FROM 'DELETE FROM t1 WHERE b=?' ;
|
||||
SET @arg00=NULL;
|
||||
EXECUTE stmt USING @arg00;
|
||||
SET @arg00='one';
|
||||
# Without the patch, attempt to run the same prepared statement the second time
|
||||
# would result in memory leaks
|
||||
EXECUTE stmt USING @arg00;
|
||||
--echo # Clean up
|
||||
DEALLOCATE PREPARE stmt;
|
||||
DROP TABLE t1;
|
||||
|
||||
--echo # End of 11.1
|
||||
|
||||
--echo #
|
||||
--echo # MDEV-34517: Memory leak on re-compilation of a failing statement inside a stored routine
|
||||
--echo #
|
||||
|
|
|
@ -912,6 +912,7 @@ cleanup:
|
|||
{
|
||||
thd->lex->current_select->save_leaf_tables(thd);
|
||||
thd->lex->current_select->leaf_tables_saved= true;
|
||||
thd->lex->current_select->first_cond_optimization= false;
|
||||
}
|
||||
|
||||
delete deltempfile;
|
||||
|
|
Loading…
Reference in a new issue