summaryrefslogtreecommitdiff
path: root/client/mysqlbinlog.cc
diff options
context:
space:
mode:
authorBrandon Nesterenko <brandon.nesterenko@mariadb.com>2021-09-22 11:25:52 -0600
committerBrandon Nesterenko <brandon.nesterenko@mariadb.com>2021-09-22 14:01:22 -0600
commitff5a568c347547d42787b79a36e0f786f1482f2e (patch)
treed30dcb7ada02439e6106b928514b42b617400791 /client/mysqlbinlog.cc
parent1cb218c37cc3fe01a1ff2fe9b1cbfb591e90d5ce (diff)
downloadmariadb-git-bb-10.2-MDEV-14608.tar.gz
MDEV-14608: mysqlbinlog lastest backupfile size is 0bb-10.2-MDEV-14608
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.cc1
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);
}