| 24 | namespace phxbinlog { |
| 25 | |
| 26 | string MySqlStringHelper::GetChangeMasterQueryString(const string &master_ip, const uint32_t &master_port, |
| 27 | const string &replica_username, const string &replica_pwd) { |
| 28 | string connect_master_ip = master_ip; |
| 29 | uint32_t connect_master_port = master_port; |
| 30 | |
| 31 | char cmd[1024]; |
| 32 | sprintf(cmd, "change master to master_host='%s',master_port=%u," |
| 33 | "master_user='%s',master_password='%s',master_heartbeat_period = 20,MASTER_AUTO_POSITION = 1;", |
| 34 | connect_master_ip.c_str(), connect_master_port, replica_username.c_str(), replica_pwd.c_str()); |
| 35 | |
| 36 | return cmd; |
| 37 | } |
| 38 | |
| 39 | string MySqlStringHelper::GetSvrIDString(const uint32_t &svr_id) { |
| 40 | char cmd[1024]; |
nothing calls this directly
no outgoing calls
no test coverage detected