summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNikita Malyavin <nikitamalyavin@gmail.com>2023-01-30 20:01:49 +0300
committerNikita Malyavin <nikitamalyavin@gmail.com>2023-02-02 14:13:11 +0300
commitcc0d85428a9c780870d8018aed4767af302cf6ca (patch)
tree2df0f22efdbf61be1b8ccfa46b9ab65567a166c5
parent22d22f154cb7f794501b478e351bc63bd860919d (diff)
downloadmariadb-git-bb-10.10-MDEV-16440-test.tar.gz
lost signal. enjoy!bb-10.10-MDEV-16440-test
-rw-r--r--mysql-test/suite/perfschema/t/tpool.opt1
-rw-r--r--mysql-test/suite/perfschema/t/tpool.test42
-rw-r--r--sql/threadpool_generic.cc1
3 files changed, 44 insertions, 0 deletions
diff --git a/mysql-test/suite/perfschema/t/tpool.opt b/mysql-test/suite/perfschema/t/tpool.opt
new file mode 100644
index 00000000000..5b919d3093b
--- /dev/null
+++ b/mysql-test/suite/perfschema/t/tpool.opt
@@ -0,0 +1 @@
+--thread-handling=pool-of-threads
diff --git a/mysql-test/suite/perfschema/t/tpool.test b/mysql-test/suite/perfschema/t/tpool.test
new file mode 100644
index 00000000000..55847c86b7e
--- /dev/null
+++ b/mysql-test/suite/perfschema/t/tpool.test
@@ -0,0 +1,42 @@
+--source include/have_perfschema.inc
+--source include/have_debug_sync.inc
+--source include/not_embedded.inc
+
+--echo # Initialization
+
+SELECT THREAD_ID INTO @def_thread_id FROM performance_schema.threads
+ WHERE PROCESSLIST_ID = CONNECTION_ID();
+
+--connect (con1, localhost, root,,)
+set time_zone= '+10:00';
+
+SELECT THREAD_ID INTO @con1_thread_id FROM performance_schema.threads
+ WHERE PROCESSLIST_ID = CONNECTION_ID();
+
+let $con1_thread_id= `select @con1_thread_id`;
+let $con1_kill_thread_id= `select CONNECTION_ID()`;
+
+--connection default
+--disable_query_log
+eval set @con1_thread_id= $con1_thread_id;
+eval set @con1_kill_thread_id= $con1_kill_thread_id;
+--enable_query_log
+
+--echo # End of initialization
+
+--connection con1
+--send
+set debug_sync= "start_io_before_disable SIGNAL net WAIT_FOR pass";
+--connection default
+set debug_sync= "now WAIT_FOR net";
+set debug_sync= "apc_after_notify SIGNAL pass";
+SELECT thread_id = @def_thread_id as current, variable_value
+ FROM performance_schema.variables_by_thread
+ WHERE variable_name = "time_zone";
+
+set debug_sync= "now SIGNAL pass";
+--connection con1
+--reap
+--connection default
+
+set debug_sync=reset;
diff --git a/sql/threadpool_generic.cc b/sql/threadpool_generic.cc
index 960c7ada784..e5269e2e01f 100644
--- a/sql/threadpool_generic.cc
+++ b/sql/threadpool_generic.cc
@@ -1550,6 +1550,7 @@ int TP_connection_generic::start_io()
}
#ifdef HAVE_DISABLE_QUEUEING
DBUG_ASSERT(disable_queue);
+ DEBUG_SYNC(thd, "start_io_before_disable");
disable_queue= 0;
#endif