mirror of
https://github.com/MariaDB/server.git
synced 2026-05-17 20:37:12 +02:00
MDEV-34614 mysqlbinlog warn on EOF before GTID in --stop-position
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” `--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. The `Gtid_event_filter` family provides the the warning mechanism polymorphically and through the new public method `verify_completed_state`. This design is hierarchically extensible (e.g., to `--ignore-server-ids`). This commit also includes minor touchups: * `rpl_gtid.cc`: adjust cases when a `Window_gtid_event_filter` has only one of `--start-` and `--stop-position` (without intensive refactors) * `rpl_gtid.cc`: function docs improvements * `rpl_gtid.h`: Remove unimplemented, red-herring function prototype `Window_gtid_event_filter::verify_gtid_is_expected` Reviewed-by: Brandon Nesterenko <brandon.nesterenko@mariadb.com>
This commit is contained in:
parent
d9bb59e7af
commit
bd3ee3a9a2
7 changed files with 410 additions and 21 deletions
|
|
@ -3711,7 +3711,8 @@ int main(int argc, char** argv)
|
|||
}
|
||||
|
||||
/*
|
||||
Emit a warning if we finished processing input before reaching the stop
|
||||
Emit warning(s) (in Gtid_event_filter::verify_completed_state() for GTID(s))
|
||||
if we finished processing input before reaching the stop
|
||||
boundaries indicated by --stop-datetime or --stop-position.
|
||||
*/
|
||||
if (stop_datetime != MY_TIME_T_MAX &&
|
||||
|
|
@ -3722,6 +3723,8 @@ int main(int argc, char** argv)
|
|||
stop_position > last_processed_ev.position)
|
||||
warning("Did not reach stop position %llu before end of input",
|
||||
stop_position);
|
||||
if (position_gtid_filter)
|
||||
position_gtid_filter->verify_final_state();
|
||||
|
||||
/*
|
||||
If enable flashback, need to print the events from the end to the
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue