Files
MaxScale/system-test/binlog_change_master_gtid.cpp
2020-07-28 16:15:50 +03:00

26 lines
689 B
C++

/**
* The GTID version of binlog_change_master
*/
#include <maxtest/testconnections.hh>
#include "binlog_change_master_common.cpp"
int main(int argc, char* argv[])
{
TestConnections test(argc, argv);
test.binlog_master_gtid = true;
test.binlog_slave_gtid = true;
auto cb = [&](MYSQL* blr) {
test.try_query(blr, "STOP SLAVE");
test.try_query(blr, "CHANGE MASTER TO MASTER_HOST='%s', MASTER_PORT=%d,"
"MASTER_USE_GTID=SLAVE_POS",
test.repl->IP[2], test.repl->port[2]);
test.try_query(blr, "START SLAVE");
};
run_test(test, cb);
return test.global_result;
}