-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
MDEV-31636 Memory leak in Sys_var_gtid_binlog_state::do_check()
If multiple variables are processed in the same query and one variable allocates heap memory while a later variable fails to be set, then we leaked the allcated heap memory. Mark variables such that we can free any associated memory during a failure in SQL parsing.
- Loading branch information
1 parent
450040e
commit 98ebf41
Showing
6 changed files
with
57 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
RESET MASTER; | ||
SET | ||
@@global.gtid_binlog_state='1-1-101,2-1-2002', | ||
@@global.slave_parallel_mode=x; | ||
ERROR 42000: Variable 'slave_parallel_mode' can't be set to the value of 'x' | ||
SELECT @@global.gtid_binlog_state; | ||
@@global.gtid_binlog_state | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
--source include/have_log_bin.inc | ||
RESET MASTER; | ||
--error ER_WRONG_VALUE_FOR_VAR | ||
SET | ||
@@global.gtid_binlog_state='1-1-101,2-1-2002', | ||
@@global.slave_parallel_mode=x; | ||
SELECT @@global.gtid_binlog_state; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters