403Webshell
Server IP : 88.99.149.37  /  Your IP : 216.73.216.141
Web Server : nginx/1.31.2
System : Linux server-88-99-149-37 6.12.0-124.56.5.el10_1.x86_64 #1 SMP PREEMPT_DYNAMIC Fri May 15 06:12:08 EDT 2026 x86_64
User : muralimurth ( 1015)
PHP Version : 8.4.23
Disable Function : exec,system,passthru,shell_exec,proc_close,proc_open,dl,popen,show_source,posix_kill,posix_mkfifo,posix_getpwuid,posix_setpgid,posix_setsid,posix_setuid,posix_setgid,posix_seteuid,posix_setegid,posix_uname
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : ON
Directory :  /usr/local/mysql/mysql-test/main/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /usr/local/mysql/mysql-test/main/mdev-33070.test
--source include/not_embedded.inc
--source include/have_pool_of_threads.inc

--echo # MDEV-33070 Thread pool starvation at oversubscribe threshold

# The server is started with a single thread group, a dedicated listener,
# one worker thread, and thread_pool_oversubscribe=1.
#
# c1 and c2 run long queries and occupy the one worker plus the one allowed
# oversubscribe slot. c3 submits a trivial INSERT which the listener can only
# enqueue, because it is sent only after both c1 and c2 are confirmed running.
#
# Before the fix, after c1 was killed the worker stayed at the oversubscribe
# threshold and went to sleep instead of dequeuing c3. Because
# thread_pool_dedicated_listener=ON, only the worker can drain the queue, so if
# c3 is still pending while c1 and c2 run and completes only after c1 is
# killed, then the worker resumed dequeuing.

CREATE TABLE t1 (a INT);

--connect (c1, localhost, root,,)
--connect (c2, localhost, root,,)
--connect (c3, localhost, root,,)
--connect (extra_con, 127.0.0.1, root,,test,$MASTER_EXTRA_PORT,)

--connection c1
--let $c1_id= `SELECT CONNECTION_ID()`
--send SELECT SLEEP(1000)

--connection extra_con
let $wait_condition=
  SELECT COUNT(*) > 0 FROM INFORMATION_SCHEMA.PROCESSLIST
  WHERE STATE='User sleep' AND ID=$c1_id;
--source include/wait_condition.inc

--connection c2
--let $c2_id= `SELECT CONNECTION_ID()`
--send SELECT SLEEP(1000)

--connection extra_con
let $wait_condition=
  SELECT COUNT(*) > 0 FROM INFORMATION_SCHEMA.PROCESSLIST
  WHERE STATE='User sleep' AND ID=$c2_id;
--source include/wait_condition.inc

--connection c3
--send INSERT INTO t1 VALUES (1)

--connection extra_con
--replace_result $c1_id c1_id
eval KILL QUERY $c1_id;

let $wait_timeout= 10;
let $wait_condition=
  SELECT COUNT(*) = 1 FROM t1;
--source include/wait_condition.inc
SELECT COUNT(*) = 1 FROM t1;

--connection c1
--error 0,ER_QUERY_INTERRUPTED,ER_STATEMENT_TIMEOUT
--reap
--disconnect c1

--connection extra_con
--replace_result $c2_id c2_id
eval KILL QUERY $c2_id;

--connection c2
--error 0,ER_QUERY_INTERRUPTED
--reap
--disconnect c2

--connection c3
--reap
--disconnect c3

--connection extra_con
SELECT COUNT(*) = 1 FROM t1;
--disconnect extra_con

--connection default
DROP TABLE t1;
--echo # End of MDEV-33070 tests

Youez - 2016 - github.com/yon3zu
LinuXploit