-
Notifications
You must be signed in to change notification settings - Fork 1.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
MDEV-27037 mysqlbinlog emits a warning when reaching EOF before stop-condition #3400
Conversation
|
dfccd95
to
269b3d7
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the PR! Please see my notes.
269b3d7
to
d70f875
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @DaveGosselin-MariaDB for a quick update, the patch is coming along nicely 😄. I left a few more notes.
mysql-test/suite/binlog/t/binlog_mysqlbinlog_warn_stop_position.test
Outdated
Show resolved
Hide resolved
d70f875
to
3e83ea5
Compare
I need to investigate why some of the builders failed on my new test for the second commit while others did not. |
266a32d
to
aa1207f
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, thank you @DaveGosselin-MariaDB ! I just had one last minor thought for cleanup.
|
||
--source include/have_binlog_format_statement.inc | ||
|
||
--let assert_file= $MYSQLTEST_VARDIR/tmp/warn_pos_test_file.out |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the name assert_file
makes it seem like the file itself has content that will be validated, esp hinting towards assert_grep.inc
. But it is actually ignored. I think the name should set the expectation that the file is ignored.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, I made that change and added --echo
commands that reflect what's --exec
'd (to have parity with the ...warn_stop_position.test
file).
…condition Emit a warning in the event that we finished processing input files before reaching the boundary indicated by --stop-position.
…datetime Emit a warning in the event that we finished processing input files before reaching the boundary indicated by --stop-datetime.
aa1207f
to
23489ef
Compare
…e stop-condition * `binlog_mysqlbinlog_warn_stop_position`: Name the temporary output redirect as ignored to match `binlog_mysqlbinlog_warn_stop_datetime` * #3400 (comment) * `binlog_mysqlbinlog_warn_stop_datetime`: Remove duplicate case
This commit adds warnings for `--stop-position` GTIDs that were not reached at EOF, mainly as a follow-up to MDEV-27037 Mysqlbinlog should output a warning if EOF is found before its stop condition (#3400). `--stop-position` warnings inform possible mistakes in the input, especially for progress reporting of scripts/wrappers. MDEV-34614 enchances MDEV-27037 with individualized GTID validation, for GTID range selection weren’t in all versions that MDEV-27037 targeted. Unlike #3400, `Binlog_gtid_state_validator` provides the code behind this feature rather than `mysqlbinlog` itself. Motivations behind this decision are: * For a patch that’ll apply on older versions, this choice yields a smaller change footprint. * `Binlog_gtid_state_validator` is already prompting unreached *`--start-position`s* for `--gtid-strict-mode`/`-vvv`.
This commit adds warnings for `--stop-position` GTIDs that were not reached at EOF, mainly as a follow-up to MDEV-27037 Mysqlbinlog should output a warning if EOF is found before its stop condition (#3400). `--stop-position` warnings inform possible mistakes in the input, especially for progress reporting of scripts/wrappers. MDEV-34614 enhances MDEV-27037 with individualized GTID validation, for GTID range selection weren’t in all versions that MDEV-27037 targeted. Unlike #3400, `Binlog_gtid_state_validator` provides the code behind this feature rather than `mysqlbinlog` itself. Motivations behind this decision are: * For a patch that’ll apply on older versions, this choice yields a smaller change footprint. * `Binlog_gtid_state_validator` is already prompting unreached *`--start-position`s* for `--gtid-strict-mode`/`-vvv`.
This commit adds warnings for `--stop-position` GTIDs that were not reached at EOF, mainly as a follow-up to MDEV-27037 Mysqlbinlog should output a warning if EOF is found before its stop condition (#3400). `--stop-position` warnings inform possible mistakes in the input, especially for progress reporting of scripts/wrappers. MDEV-34614 enhances MDEV-27037 with individualized GTID validation, for GTID range selection weren’t in all versions that MDEV-27037 targeted. Unlike #3400, `Binlog_gtid_state_validator` provides the code behind this feature rather than `mysqlbinlog` itself. Motivations behind this decision are: * For a patch that’ll apply on older versions, this choice yields a smaller change footprint. * `Binlog_gtid_state_validator` is already prompting unreached *`--start-position`s* for `--gtid-strict-mode`/`-vvv`.
Emit warnings if finished processing input files before reaching the boundary conditions indicated by either
--stop-position
or--stop-datetime
.