summaryrefslogtreecommitdiff
path: root/plugin/handler_socket/handlersocket/database.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'plugin/handler_socket/handlersocket/database.cpp')
-rw-r--r--plugin/handler_socket/handlersocket/database.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/plugin/handler_socket/handlersocket/database.cpp b/plugin/handler_socket/handlersocket/database.cpp
index cfed9c42c0a..94eedbf6d04 100644
--- a/plugin/handler_socket/handlersocket/database.cpp
+++ b/plugin/handler_socket/handlersocket/database.cpp
@@ -304,6 +304,7 @@ dbcontext::init_thread(const void *stack_bottom, volatile int& shutdown_flag)
thd->db = 0;
thd->db = my_strdup("handlersocket", MYF(0));
}
+ thd->variables.option_bits |= OPTION_TABLE_LOCK;
my_pthread_setspecific_ptr(THR_THD, thd);
DBG_THR(fprintf(stderr, "HNDSOCK x0 %p\n", thd));
}
@@ -341,7 +342,7 @@ void
dbcontext::term_thread()
{
DBG_THR(fprintf(stderr, "HNDSOCK thread end %p\n", thd));
- unlock_tables_if();
+ close_tables_if();
my_pthread_setspecific_ptr(THR_THD, 0);
{
pthread_mutex_lock(&LOCK_thread_count);