Fix formatting in MariaDB Monitor

This commit is contained in:
Esa Korhonen
2018-01-11 15:05:35 +02:00
parent ff2ad05d0a
commit c2c898ee93

View File

@ -1409,7 +1409,8 @@ static bool do_show_slave_status(MYSQL_MONITOR* mon,
const char* gtid_io_pos = mxs_mysql_get_value(result, row, "Gtid_IO_Pos");
ss_dassert(gtid_io_pos);
serv_info->slave_status.gtid_io_pos = gtid_io_pos[0] != '\0' ?
Gtid(gtid_io_pos, mon->master_gtid_domain) : Gtid();
Gtid(gtid_io_pos, mon->master_gtid_domain) :
Gtid();
}
else
{
@ -2353,7 +2354,8 @@ monitorMain(void *arg)
{
monitor_clear_pending_status(root_master,
SERVER_SLAVE | SERVER_SLAVE_OF_EXTERNAL_MASTER);
server_clear_status_nolock(root_master->server, SERVER_SLAVE | SERVER_SLAVE_OF_EXTERNAL_MASTER);
server_clear_status_nolock(root_master->server,
SERVER_SLAVE | SERVER_SLAVE_OF_EXTERNAL_MASTER);
}
}
@ -3403,9 +3405,10 @@ MXS_MONITORED_SERVER* select_new_master(MYSQL_MONITOR* mon,
if (cand_io > master_io ||
// If io sequences are identical, the slave with more events processed wins.
(cand_io == master_io && (cand_processed > master_processed ||
// Finally, if binlog positions are identical, prefer a slave with
// log_slave_updates.
(cand_processed == master_processed && cand_updates && !master_updates))))
// Finally, if binlog positions are identical,
// prefer a slave with log_slave_updates.
(cand_processed == master_processed &&
cand_updates && !master_updates))))
{
select_this = true;
}
@ -4134,7 +4137,8 @@ static bool do_switchover(MYSQL_MONITOR* mon, MXS_MONITORED_SERVER* current_mast
{
redirected_slaves.push_back(demotion_target);
}
int redirects = redirect_slaves(mon, promotion_target, redirectable_slaves, &redirected_slaves);
int redirects = redirect_slaves(mon, promotion_target,
redirectable_slaves, &redirected_slaves);
bool success = redirectable_slaves.empty() ? start_ok : start_ok || redirects > 0;
if (success == false)