diff --git a/storage/tianchi/ha_tse.cc b/storage/tianchi/ha_tse.cc index cb5fcd22a624cacc14da29b6155aa0a2d1d62b91..4765f3883a728d96dcb4f55cc7ff8f8a4db7d9c8 100644 --- a/storage/tianchi/ha_tse.cc +++ b/storage/tianchi/ha_tse.cc @@ -4305,11 +4305,17 @@ int tse_set_cluster_role_by_cantian(bool is_slave) { opt_readonly = false; tse_log_system("[Disaster Recovery] set super_read_only = false."); } else { - tse_ddl_broadcast_request local_req {{0}, {0}, {0}, {0}, 0, 0, 0, 0, {0}}; - memcpy(local_req.user_name, "super_read_only", strlen("super_read_only")); - memcpy(local_req.user_ip, "off", strlen("off")); - ctc_set_sys_var(&local_req); - tse_log_system("[Disaster Recovery] ctc_set_sys_var: local_req->user_ip: %s", local_req.user_ip); + tse_ddl_broadcast_request local_req_sro {{0}, {0}, {0}, {0}, 0, 0, 0, 0, {0}}; + memcpy(local_req_sro.user_name, "super_read_only", strlen("super_read_only")); + memcpy(local_req_sro.user_ip, "off", strlen("off")); + ctc_set_sys_var(&local_req_sro); + tse_log_system("[Disaster Recovery] ctc_set_sys_var: local_req->user_ip: %s", local_req_sro.user_ip); + + tse_ddl_broadcast_request local_req_ro {{0}, {0}, {0}, {0}, 0, 0, 0, 0, {0}}; + memcpy(local_req_ro.user_name, "read_only", strlen("read_only")); + memcpy(local_req_ro.user_ip, "off", strlen("off")); + ctc_set_sys_var(&local_req_ro); + tse_log_system("[Disaster Recovery] ctc_set_sys_var: local_req->user_ip: %s", local_req_ro.user_ip); } } return 0;