summaryrefslogtreecommitdiff
path: root/plugin/handler_socket
diff options
context:
space:
mode:
Diffstat (limited to 'plugin/handler_socket')
-rw-r--r--plugin/handler_socket/handlersocket/database.cpp13
-rw-r--r--plugin/handler_socket/plug.in20
2 files changed, 7 insertions, 26 deletions
diff --git a/plugin/handler_socket/handlersocket/database.cpp b/plugin/handler_socket/handlersocket/database.cpp
index 2d9785df6e2..b05b6384565 100644
--- a/plugin/handler_socket/handlersocket/database.cpp
+++ b/plugin/handler_socket/handlersocket/database.cpp
@@ -106,10 +106,10 @@ struct tablevec_entry {
struct expr_user_lock : private noncopyable {
expr_user_lock(THD *thd, int timeout)
- : lck_key("handlersocket_wr", 16, &my_charset_latin1),
- lck_timeout(timeout),
- lck_func_get_lock(&lck_key, &lck_timeout),
- lck_func_release_lock(&lck_key)
+ : lck_key(thd, "handlersocket_wr", 16, &my_charset_latin1),
+ lck_timeout(thd, timeout),
+ lck_func_get_lock(thd, &lck_key, &lck_timeout),
+ lck_func_release_lock(thd, &lck_key)
{
lck_key.fix_fields(thd, 0);
lck_timeout.fix_fields(thd, 0);
@@ -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));
}
@@ -343,7 +344,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);
@@ -1016,7 +1017,7 @@ dbcontext::cmd_open(dbcallback_i& cb, const cmd_open_args& arg)
tables.mdl_request.init(MDL_key::TABLE, arg.dbn, arg.tbl,
for_write_flag ? MDL_SHARED_WRITE : MDL_SHARED_READ, MDL_TRANSACTION);
Open_table_context ot_act(thd, 0);
- if (!open_table(thd, &tables, thd->mem_root, &ot_act)) {
+ if (!open_table(thd, &tables, &ot_act)) {
table = tables.table;
}
#else
diff --git a/plugin/handler_socket/plug.in b/plugin/handler_socket/plug.in
deleted file mode 100644
index fd351dec98d..00000000000
--- a/plugin/handler_socket/plug.in
+++ /dev/null
@@ -1,20 +0,0 @@
-MYSQL_PLUGIN(handlersocket, [HandlerSocket], [HandlerSocket], [max])
-MYSQL_PLUGIN_DYNAMIC(handlersocket, handlersocket.la)
-MYSQL_PLUGIN_ACTIONS(handlersocket,
-[
- ac_mysql_source_dir='$(top_srcdir)'
- MYSQL_INC="-I$ac_mysql_source_dir/sql"
- MYSQL_INC="$MYSQL_INC -I$ac_mysql_source_dir/include"
- MYSQL_INC="$MYSQL_INC -I$ac_mysql_source_dir/regex"
- MYSQL_INC="$MYSQL_INC -I$ac_mysql_source_dir"
- MYSQL_LIB='-L$(top_builddir)/libservices -lmysqlservices'
- PLUGIN_DIR='$(pkglibdir)/plugin'
- HANDLERSOCKET_SUBDIRS="libhsclient handlersocket client"
-
- AC_SUBST(MYSQL_INC)
- AC_SUBST(MYSQL_CFLAGS)
- AC_SUBST(MYSQL_LIB)
- AC_SUBST(PLUGIN_DIR)
- AC_SUBST(HANDLERSOCKET_SUBDIRS)
- AC_CONFIG_FILES(plugin/handler_socket/perl-Net-HandlerSocket/Makefile.PL)
-])