1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-07 00:04:31 +03:00

MDEV-27037 mysqlbinlog emits a warning when reaching EOF before stop-datetime

Emit a warning in the event that we finished processing input files
before reaching the boundary indicated by --stop-datetime.
This commit is contained in:
Dave Gosselin
2024-07-22 11:13:06 -04:00
committed by Dave Gosselin
parent 242b67f1de
commit 95885261f0
3 changed files with 79 additions and 0 deletions

View File

@@ -2847,6 +2847,7 @@ static Exit_status dump_local_log_entries(PRINT_EVENT_INFO *print_event_info,
IO_CACHE cache,*file= &cache;
uchar tmp_buff[BIN_LOG_HEADER_SIZE];
Exit_status retval= OK_CONTINUE;
my_time_t last_ev_when= MY_TIME_T_MAX;
if (logname && strcmp(logname, "-") != 0)
{
@@ -2952,8 +2953,21 @@ static Exit_status dump_local_log_entries(PRINT_EVENT_INFO *print_event_info,
"end of input", stop_position);
}
/*
Emit a warning in the event that we finished processing input
before reaching the boundary indicated by --stop-datetime.
*/
if (stop_datetime != MY_TIME_T_MAX &&
stop_datetime > last_ev_when)
{
retval = OK_STOP;
warning("Did not reach stop datetime '%s' "
"before end of input", stop_datetime_str);
}
goto end;
}
last_ev_when= ev->when;
if ((retval= process_event(print_event_info, ev, old_off, logname)) !=
OK_CONTINUE)
goto end;