Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
MariaDB
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
MariaDB
Commits
3e3a3261
Commit
3e3a3261
authored
Aug 09, 2024
by
Oleksandr Byelkin
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch '11.1' into mariadb-11.1.6
parents
80abd847
fdaa44a4
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
34 additions
and
1 deletion
+34
-1
VERSION
VERSION
+1
-1
mysql-test/main/ps_mem_leaks.result
mysql-test/main/ps_mem_leaks.result
+14
-0
mysql-test/main/ps_mem_leaks.test
mysql-test/main/ps_mem_leaks.test
+18
-0
sql/sql_delete.cc
sql/sql_delete.cc
+1
-0
No files found.
VERSION
View file @
3e3a3261
MYSQL_VERSION_MAJOR=11
MYSQL_VERSION_MINOR=1
MYSQL_VERSION_PATCH=
6
MYSQL_VERSION_PATCH=
7
SERVER_MATURITY=stable
mysql-test/main/ps_mem_leaks.result
View file @
3e3a3261
...
...
@@ -148,3 +148,17 @@ CALL p1(2);
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
mysql-test/main/ps_mem_leaks.test
View file @
3e3a3261
...
...
@@ -167,3 +167,21 @@ DROP TABLE t1;
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
sql/sql_delete.cc
View file @
3e3a3261
...
...
@@ -912,6 +912,7 @@ bool Sql_cmd_delete::delete_from_single_table(THD *thd)
{
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
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment