MDEV-29804 Fix SHOW BINLOG EVENTS displaying incorrect session variable values#4766
MDEV-29804 Fix SHOW BINLOG EVENTS displaying incorrect session variable values#4766tarunw07 wants to merge 1 commit intoMariaDB:10.11from
Conversation
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; |
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.
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; | |||
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
|
@gkodinov I have pushed the following changes
|
|
@gkodinov Just a gentle reminder for this PR. |
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