| 36 | namespace phxbinlog { |
| 37 | |
| 38 | int MasterMonitor::MasterStart(const Option *option) { |
| 39 | |
| 40 | MySqlManager *mysql_manager = MySqlManager::GetGlobalMySqlManager(option); |
| 41 | |
| 42 | int ret = mysql_manager->Query("stop slave;"); |
| 43 | if (ret) |
| 44 | return ret; |
| 45 | |
| 46 | ret = mysql_manager->Query("set global super_read_only='off';"); |
| 47 | if (ret) |
| 48 | return ret; |
| 49 | |
| 50 | ret = mysql_manager->Query("set global read_only='off';"); |
| 51 | if (ret) |
| 52 | return ret; |
| 53 | return OK; |
| 54 | } |
| 55 | |
| 56 | int MasterMonitor::GetMySQLMaxGTIDList(const Option *option, vector<string> *gtid_list, bool is_master) { |
| 57 | int ret = MonitorComm::GetMySQLMaxGTIDList(option, "gtid_executed", gtid_list); |