mirror of
https://github.com/MariaDB/server.git
synced 2025-09-11 05:52:26 +03:00
MDEV-246 - Aborted_clients incremented during ordinary connection close
The problem was increment of aborted_threads variable due to thd->killed which was set when threadpool connection was terminated . The fix is not to set thd->killed anymore, there is no real reason for doing it.. Added a test that checks that status variable aborted_clients does not grow for ordinary disconnects, and that successful KILL increments this variable.
This commit is contained in:
26
mysql-test/t/aborted_clients.test
Normal file
26
mysql-test/t/aborted_clients.test
Normal file
@@ -0,0 +1,26 @@
|
||||
# Test case for MDEV-246, lp:992983
|
||||
# Check that ordinary connect/disconnect does not increase aborted_clients
|
||||
# status variable, but KILL connection does
|
||||
|
||||
-- source include/not_embedded.inc
|
||||
|
||||
FLUSH STATUS;
|
||||
# Connect/Disconnect look that aborted_clients stays 0
|
||||
connect (con1,localhost,root,,);
|
||||
disconnect con1;
|
||||
connection default;
|
||||
# Check that there is 0 aborted clients so far
|
||||
SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME='aborted_clients';
|
||||
|
||||
# Kill a connection, check that aborted_clients is incremented
|
||||
connect(con2,localhost,root,,);
|
||||
--disable_reconnect
|
||||
--error ER_CONNECTION_KILLED
|
||||
KILL CONNECTION_ID();
|
||||
disconnect con2;
|
||||
connection default;
|
||||
|
||||
# aborted clients must be 1 now
|
||||
SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME='aborted_clients';
|
||||
FLUSH STATUS;
|
||||
|
Reference in New Issue
Block a user