summaryrefslogtreecommitdiff
path: root/mysql-test/main/aborted_clients.test
diff options
context:
space:
mode:
authorMichael Widenius <monty@mariadb.org>2018-03-09 14:05:35 +0200
committerMonty <monty@mariadb.org>2018-03-29 13:59:44 +0300
commita7abddeffa6a760ce948c2dfb007cdf3f1a369d5 (patch)
tree70eb743fa965a17380bbc0ac88ae79ca1075b896 /mysql-test/main/aborted_clients.test
parentab1941266c59a19703a74b5593cf3f508a5752d7 (diff)
downloadmariadb-git-a7abddeffa6a760ce948c2dfb007cdf3f1a369d5.tar.gz
Create 'main' test directory and move 't' and 'r' there
Diffstat (limited to 'mysql-test/main/aborted_clients.test')
-rw-r--r--mysql-test/main/aborted_clients.test28
1 files changed, 28 insertions, 0 deletions
diff --git a/mysql-test/main/aborted_clients.test b/mysql-test/main/aborted_clients.test
new file mode 100644
index 00000000000..20ddc9991e6
--- /dev/null
+++ b/mysql-test/main/aborted_clients.test
@@ -0,0 +1,28 @@
+# 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
+-- source include/count_sessions.inc
+
+FLUSH STATUS;
+# Connect/Disconnect look that aborted_clients stays 0
+connect (con1,localhost,root,,);
+disconnect con1;
+connection default;
+-- source include/wait_until_count_sessions.inc
+# 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;
+-- source include/wait_until_count_sessions.inc
+
+# aborted clients must be 1 now
+SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME='aborted_clients';
+FLUSH STATUS;