MCPcopy Create free account
hub / github.com/MariaDB/server / kill_callback_collect

Function kill_callback_collect

sql/sql_repl.cc:4297–4317  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

4295*/
4296
4297static 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/*

Callers

nothing calls this directly

Calls 3

get_commandMethod · 0.80
awake_no_mutexMethod · 0.80
remove_slaveMethod · 0.45

Tested by

no test coverage detected