diff options
Diffstat (limited to 'sql/sql_class.cc')
-rw-r--r-- | sql/sql_class.cc | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/sql/sql_class.cc b/sql/sql_class.cc index 494498cad55..38770a24dec 100644 --- a/sql/sql_class.cc +++ b/sql/sql_class.cc @@ -71,6 +71,7 @@ #ifdef HAVE_SYS_SYSCALL_H #include <sys/syscall.h> #endif +#include "repl_failsafe.h" /* The following is used to initialise Table_ident with a internal @@ -1417,6 +1418,10 @@ void THD::cleanup(void) DBUG_ASSERT(!mdl_context.has_locks()); apc_target.destroy(); +#ifdef HAVE_REPLICATION + unregister_slave(this, true, true); +#endif + cleanup_done=1; DBUG_VOID_RETURN; } |