MXS-1513: Flush logs before tables during switchover_demote_master
In this order, the new binary log file will have 1 event instead of 0. In total, only 1 event is added.
This commit is contained in:
parent
3c88bf1ec6
commit
b29a8eb4f8
@ -3598,10 +3598,10 @@ static bool switchover_demote_master(MYSQL_MONITOR* mon,
|
||||
const char* query = "SET GLOBAL read_only=1;";
|
||||
if (mxs_mysql_query(current_master->con, query) == 0)
|
||||
{
|
||||
query = "FLUSH TABLES;";
|
||||
query = "FLUSH LOGS;";
|
||||
if (mxs_mysql_query(current_master->con, query) == 0)
|
||||
{
|
||||
query = "FLUSH LOGS;";
|
||||
query = "FLUSH TABLES;";
|
||||
if (mxs_mysql_query(current_master->con, query) == 0)
|
||||
{
|
||||
query = "";
|
||||
|
Loading…
x
Reference in New Issue
Block a user