doc and astyle fixes

This commit is contained in:
Timofey Turenko
2018-08-29 11:29:42 +03:00
committed by Markus Mäkelä
parent 0ce183d7e3
commit 4fd6d075cb
41 changed files with 153 additions and 142 deletions

View File

@ -59,8 +59,8 @@ int main(int argc, char** argv)
for (int i = FIRST_MOD_NODE; i < NODE_COUNT; i++)
{
if (mysql_query(nodes[i], STOP_SLAVE) != 0 ||
mysql_query(nodes[i], RESET_SLAVE) != 0 ||
mysql_query(nodes[i], READ_ONLY_OFF) != 0)
mysql_query(nodes[i], RESET_SLAVE) != 0 ||
mysql_query(nodes[i], READ_ONLY_OFF) != 0)
{
test.assert(false, "Could not stop slave connections and/or disable read_only for node %d.", i);
return test.global_result;
@ -110,7 +110,7 @@ int main(int argc, char** argv)
// Finally, fix replication by telling the current master to replicate from server4
test.tprintf("Setting server 1 to replicate from server 4. Manually rejoin servers 2 and 3.");
const char CHANGE_CMD_FMT[] = "CHANGE MASTER TO MASTER_HOST = '%s', MASTER_PORT = %d, "
"MASTER_USE_GTID = current_pos, MASTER_USER='repl', MASTER_PASSWORD = 'repl';";
"MASTER_USE_GTID = current_pos, MASTER_USER='repl', MASTER_PASSWORD = 'repl';";
char cmd[256];
snprintf(cmd, sizeof(cmd), CHANGE_CMD_FMT, test.repl->IP[3], test.repl->port[3]);
mysql_query(nodes[0], cmd);
@ -125,13 +125,13 @@ int main(int argc, char** argv)
test.assert(master_id == 4, "Server 4 should be the cluster master.");
StringSet node0_states = test.get_server_status("server1");
bool states_n0_ok = (node0_states.find("Slave") != node0_states.end() &&
node0_states.find("Relay Master") == node0_states.end());
node0_states.find("Relay Master") == node0_states.end());
test.assert(states_n0_ok, "Server 1 is not a slave when it should be.");
if (states_n0_ok)
{
int ec;
test.maxscales->ssh_node_output(0,
"maxadmin call command mysqlmon switchover MySQL-Monitor server1 server4" , true, &ec);
"maxadmin call command mysqlmon switchover MySQL-Monitor server1 server4" , true, &ec);
test.maxscales->wait_for_monitor();
master_id = get_master_server_id(test);
test.assert(master_id == 1, "Server 1 should be the cluster master.");