summaryrefslogtreecommitdiff
path: root/sql/sql_class.cc
diff options
context:
space:
mode:
Diffstat (limited to 'sql/sql_class.cc')
-rw-r--r--sql/sql_class.cc2
1 files changed, 2 insertions, 0 deletions
diff --git a/sql/sql_class.cc b/sql/sql_class.cc
index 997432e3af9..1ec2d8b3c9e 100644
--- a/sql/sql_class.cc
+++ b/sql/sql_class.cc
@@ -64,6 +64,7 @@
#include "sql_callback.h"
#include "lock.h"
#include "sql_connect.h"
+#include "repl_failsafe.h"
/*
The following is used to initialise Table_ident with a internal
@@ -1535,6 +1536,7 @@ THD::~THD()
if (rgi_slave)
rgi_slave->cleanup_after_session();
my_free(semisync_info);
+ unregister_slave(this, true, true);
#endif
free_root(&main_mem_root, MYF(0));