Clean up server status printing

Uses mostly the status functions for reading the flags. Strickly
speaking this breaks the REST API since in some cases (status combinations)
the printed string is different from what was printed before.
This commit is contained in:
Esa Korhonen
2018-07-30 16:16:35 +03:00
parent f7e3d4c2fb
commit 836db54800
4 changed files with 76 additions and 62 deletions

View File

@ -809,7 +809,7 @@ void MariaDBServer::monitor_server()
bool MariaDBServer::update_slave_status(string* errmsg_out)
{
/** Clear old states */
clear_status(SERVER_SLAVE | SERVER_MASTER | SERVER_RELAY_MASTER | SERVER_SLAVE_OF_EXT_MASTER);
clear_status(SERVER_SLAVE | SERVER_MASTER | SERVER_RELAY | SERVER_SLAVE_OF_EXT_MASTER);
bool rval = false;
if (do_show_slave_status(errmsg_out))