-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
MDEV-23077: --flashback + --table produces buggy results #3968
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
base: 10.11
Are you sure you want to change the base?
Conversation
* Events of skipped tables were still queued and generates extraneous “Row event for unknown table” when flashing back. * Skipping a statement-end event left prior non-skipped events processed incompletely. Co-Authored-By: lukexwang <[email protected]>
--echo # | ||
--echo # MDEV-30698 Cover missing test cases for mariadb-binlog options | ||
--echo # --raw [and] --flashback | ||
--echo # | ||
|
||
--error 1 # --raw mode and --flashback mode are not allowed | ||
--exec $MYSQL_BINLOG -vv -B --raw --read-from-remote-server --user=root --host=127.0.0.1 --port=$MASTER_MYPORT master-bin.000003> $MYSQLTEST_VARDIR/tmp/mysqlbinlog_row_flashback_8.sql | ||
--exec $MYSQL_BINLOG -vv -B --raw --read-from-remote-server --user=root --host=127.0.0.1 --port=$MASTER_MYPORT master-bin.000003> $MYSQLTEST_VARDIR/tmp/mysqlbinlog_row_flashback_0.sql |
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.
We have a real Case 8 now.
@@ -955,14 +955,14 @@ static bool print_row_event(PRINT_EVENT_INFO *print_event_info, Log_event *ev, | |||
} | |||
|
|||
/* skip the event check */ | |||
if (skip_event) | |||
if (skip_event && !(opt_flashback && is_stmt_end)) |
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.
What #1674 did was copy-pasting the else
branch of the next if
to the previous if
tree as a new branch for (skip_event && opt_flashback && is_stmt_end)
.
Here, I reimplement it by skipping this intermediate “step” (?) for that exact condition.
While the diff is now smaller, it has become proof that our code is 🍝.
* Events of skipped databases were still queued and generates extraneous “Row event for unknown table” when flashing back. * Skipping a statement-end event left prior non-skipped events processed incompletely.
|
What problem is the patch trying to solve?
How can this PR be tested?
#1674 provided a
< CASE 8 >
forbinlog.flashback
which I simplified and corrected (?) to cover both bullet points.It also adds a
< CASE 9 >
checking the similar--database
excludes the not-specified database.PR quality check
This is a new feature or a refactoring, and the PR is based against themain
branch.--database
and--table
.This PR excludes them.