diff options
author | Brandon Nesterenko <brandon.nesterenko@mariadb.com> | 2021-09-22 11:25:52 -0600 |
---|---|---|
committer | Brandon Nesterenko <brandon.nesterenko@mariadb.com> | 2022-03-24 07:40:29 -0600 |
commit | 174f1734a9672c13928dfd03d49d25c4325f0ce3 (patch) | |
tree | 5ef92f159f06200b5d82fca6388a84a1d48188d9 /client/mysqlbinlog.cc | |
parent | 8153c974e60901f5f029b925de75afa3a68f3066 (diff) | |
download | mariadb-git-174f1734a9672c13928dfd03d49d25c4325f0ce3.tar.gz |
MDEV-14608: mysqlbinlog lastest backupfile size is 0
Problem:
========
When using mariadb-binlog with --raw and --stop-never, events from
the master's currently active log file should be written to their
respective log file specified by --result-file, and shown on-disk.
There is a bug where mariadb-binlog does not flush the result file
to disk when new events are received
Solution:
========
Add a function call to flush mariadb-binlog’s result file after
receiving an event in --raw mode.
Reviewed By:
============
Andrei Elkin <andrei.elkin@mariadb.com>
Diffstat (limited to 'client/mysqlbinlog.cc')
-rw-r--r-- | client/mysqlbinlog.cc | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/client/mysqlbinlog.cc b/client/mysqlbinlog.cc index 4e28876cdf6..c7c71f6b00d 100644 --- a/client/mysqlbinlog.cc +++ b/client/mysqlbinlog.cc @@ -2510,6 +2510,7 @@ static Exit_status handle_event_raw_mode(PRINT_EVENT_INFO *print_event_info, error("Could not write into log file '%s'", out_file_name); DBUG_RETURN(ERROR_STOP); } + fflush(result_file); DBUG_RETURN(OK_CONTINUE); } |