MDEV-29804 Fix SHOW BINLOG EVENTS displaying incorrect session variable values#4766
Open
tarunw07 wants to merge 1 commit intoMariaDB:10.11from
Open
MDEV-29804 Fix SHOW BINLOG EVENTS displaying incorrect session variable values#4766tarunw07 wants to merge 1 commit intoMariaDB:10.11from
tarunw07 wants to merge 1 commit intoMariaDB:10.11from
Conversation
gkodinov
requested changes
Mar 10, 2026
Member
gkodinov
left a comment
There was a problem hiding this comment.
Thank you for your contribution! This is a preliminary review.
Please rebase to 10.11.
| set foreign_key_checks= 0, sql_auto_is_null=1, check_constraint_checks=0, unique_checks=0; | ||
| create table t (a int, check(a>1), foreign key(a) references x (x)) engine=InnoDB as select 1 as a; | ||
|
|
||
| show binlog events; |
Member
There was a problem hiding this comment.
there is an include file that provides some stability to this. Right now the buildbot tests are failing because of this printing different things depending on how the server is compiled.
Author
There was a problem hiding this comment.
Ok I found that input file. I'll modify this test.
| @@ -0,0 +1,10 @@ | |||
| set foreign_key_checks= 0, sql_auto_is_null=1, check_constraint_checks=0, unique_checks=0; | |||
Member
There was a problem hiding this comment.
All the files in this suite are prefixed with "binlog_". And there's already a number of binlog_show_binlog_event*.test files in there.
I'd add a suffix saying what's actually tested.
d781678 to
a5f4c98
Compare
…le values Query_log_event::pack_info() was displaying inverted values for foreign_key_checks and unique_checks. The flags OPTION_NO_FOREIGN_KEY_CHECKS and OPTION_RELAXED_UNIQUE_CHECKS are set when these checks are *disabled* (i.e., when the user sets them to 0), but pack_info() was incorrectly printing them as =1. This caused SHOW BINLOG EVENTS to show foreign_key_checks=1 and unique_checks=1 when they were actually 0.
a5f4c98 to
9c289a3
Compare
Author
|
@gkodinov I have pushed the following changes
|
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Query_log_event::pack_info()was displaying inverted values forforeign_key_checksandunique_checksinSHOW BINLOG EVENTS.The flags
OPTION_NO_FOREIGN_KEY_CHECKSandOPTION_RELAXED_UNIQUE_CHECKSare set when these checks are disabled (value=0), but
pack_info()wasprinting them as
=1.Fix
foreign_key_checks=1→foreign_key_checks=0whenOPTION_NO_FOREIGN_KEY_CHECKSis setunique_checks=1→unique_checks=0whenOPTION_RELAXED_UNIQUE_CHECKSis setOpen Questions
check_constraint_checksis currently not being displayed inSHOW BINLOG EVENTSoutput even when set to a non-default value. Shouldcheck_constraint_checksalso be included in the output, and if so, should that fix be part of this patch?JIRA
https://jira.mariadb.org/browse/MDEV-29804