| 4295 | */ |
| 4296 | |
| 4297 | static my_bool kill_callback_collect(THD *thd, kill_callback_arg *arg) |
| 4298 | { |
| 4299 | if (thd->get_command() == COM_BINLOG_DUMP && |
| 4300 | thd->variables.server_id == arg->slave_server_id && |
| 4301 | thd != arg->thd) |
| 4302 | { |
| 4303 | arg->counter++; |
| 4304 | mysql_mutex_lock(&thd->LOCK_thd_kill); // Lock from delete |
| 4305 | mysql_mutex_lock(&thd->LOCK_thd_data); |
| 4306 | thd->awake_no_mutex(KILL_SLAVE_SAME_ID); // Mark killed |
| 4307 | /* |
| 4308 | Remover the thread from ack_receiver to ensure it is not |
| 4309 | sending acks to the master anymore. |
| 4310 | */ |
| 4311 | ack_receiver.remove_slave(thd); |
| 4312 | |
| 4313 | mysql_mutex_unlock(&thd->LOCK_thd_data); |
| 4314 | mysql_mutex_unlock(&thd->LOCK_thd_kill); |
| 4315 | } |
| 4316 | return 0; |
| 4317 | } |
| 4318 | |
| 4319 | |
| 4320 | /* |
nothing calls this directly
no test coverage detected