mirror of
https://github.com/MariaDB/server.git
synced 2025-01-17 04:22:27 +01:00
Fix redundant call to update_binlog_end_pos() (probably merge error).
Signed-off-by: Kristian Nielsen <knielsen@knielsen-hq.org>
This commit is contained in:
parent
f612e1c2bc
commit
038d29258d
1 changed files with 6 additions and 6 deletions
12
sql/log.cc
12
sql/log.cc
|
@ -7767,15 +7767,19 @@ MYSQL_BIN_LOG::
|
|||
write_binlog_checkpoint_event_already_locked(const char *name_arg, uint len)
|
||||
{
|
||||
my_off_t offset;
|
||||
bool err;
|
||||
Binlog_checkpoint_log_event ev(name_arg, len);
|
||||
|
||||
/*
|
||||
Note that we must sync the binlog checkpoint to disk.
|
||||
Otherwise a subsequent log purge could delete binlogs that XA recovery
|
||||
thinks are needed (even though they are not really).
|
||||
*/
|
||||
if (!write_event(&ev) && !flush_and_sync(0))
|
||||
err= write_event(&ev) || flush_and_sync(0);
|
||||
offset= my_b_tell(&log_file);
|
||||
if (!err)
|
||||
{
|
||||
update_binlog_end_pos();
|
||||
update_binlog_end_pos(offset);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -7790,10 +7794,6 @@ write_binlog_checkpoint_event_already_locked(const char *name_arg, uint len)
|
|||
sql_print_error("Failed to write binlog checkpoint event to binary log");
|
||||
}
|
||||
|
||||
offset= my_b_tell(&log_file);
|
||||
|
||||
update_binlog_end_pos(offset);
|
||||
|
||||
/*
|
||||
Take mutex to protect against a reader seeing partial writes of 64-bit
|
||||
offset on 32-bit CPUs.
|
||||
|
|
Loading…
Reference in a new issue