mariadb/mysql-test/main/reset_connection.test
Lena Startseva 72ba96a48e MDEV-27691: make working view-protocol
Tests with checking metadata or that cannot be run with
the view-protocol are excluded from --view-protocol.
For tests that do not allow the use of an additional connection,
the util connection is disabled with "--disable_service_connection".
Also cases with bugs for --view-protocol are disabled.
2022-09-23 17:36:20 +07:00

43 lines
961 B
Text

--source include/not_embedded.inc
FLUSH STATUS;
--disable_result_log
--disable_query_log
--disable_service_connection
let $i = 10;
begin;
while ($i)
{
dec $i;
SELECT 1;
}
commit;
--enable_query_log
--enable_result_log
SHOW local STATUS LIKE 'com_select';
--reset_connection
SHOW local STATUS LIKE 'com_select';
--echo # Test if charset changes after reset (utf8)
connect(utf8_conn,localhost,root,,,,,CHARSET=utf8);
connection utf8_conn;
SELECT IF(@@character_set_client='utf8','OK', 'FAIL') AS RESULT;
--reset_connection
SELECT IF(@@character_set_client='utf8','OK', 'FAIL') AS RESULT;
disconnect utf8_conn;
--echo # Test if charset changes after reset (latin1)
connect(latin1_conn,localhost,root,,,,,CHARSET=latin1);
connection latin1_conn;
SELECT IF(@@character_set_client='latin1','OK', 'FAIL') AS RESULT;
--reset_connection
SELECT IF(@@character_set_client='latin1','OK', 'FAIL') AS RESULT;
disconnect latin1_conn;
--enable_service_connection