mirror of
https://github.com/MariaDB/server.git
synced 2025-08-08 11:22:35 +03:00
Replication:
Now the I/O thread (in flush_master_info()) flushes the relay log to disk after reading every event. Slower but provides additionnal safety in case of brutal crash. I had to make the flush optional (i.e. add a if(some_bool_argument) in the function) because sometimes flush_master_info() is called when there is no usable relay log (the relay log's IO_CACHE is not initialized so can't be flushed).
This commit is contained in:
@@ -1085,8 +1085,11 @@ int change_master(THD* thd, MASTER_INFO* mi)
|
||||
strmake(mi->master_log_name, mi->rli.group_master_log_name,
|
||||
sizeof(mi->master_log_name)-1);
|
||||
}
|
||||
|
||||
flush_master_info(mi);
|
||||
/*
|
||||
Relay log's IO_CACHE may not be inited, if rli->inited==0 (server was never
|
||||
a slave before).
|
||||
*/
|
||||
flush_master_info(mi, 0);
|
||||
if (need_relay_log_purge)
|
||||
{
|
||||
relay_log_purge= 1;
|
||||
|
Reference in New Issue
Block a user