Quellcodebibliothek Statistik Leitseite products/Sources/formale Sprachen/C/MariaDB/mysql-test/main/   (MariaDB Server Version 8.1-8.4©)  Datei vom 1.9.2026 mit Größe 833 B image not shown  

Quelle  aborted_clients.test  Sprache: unbekannt

 
Spracherkennung für: .test vermutete Sprache: SQL {SQL[96] Fortran[48] VHDL[48]} [Methode: maximale Elemente, drei Dimensionen]

# 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 GLOBAL 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;

[Dauer der Verarbeitung: 0.14 Sekunden, vorverarbeitet 2026-10-08]