mariadb/mysql-test/main/log_tables-big.test
Lena Startseva 9854fb6fa7 MDEV-31003: Second execution for ps-protocol
This patch adds for "--ps-protocol" second execution
of queries "SELECT".
Also in this patch it is added ability to disable/enable
(--disable_ps2_protocol/--enable_ps2_protocol) second
execution for "--ps-prototocol" in testcases.
2023-07-26 17:15:00 +07:00

42 lines
1.3 KiB
Text

# this test needs multithreaded mysqltest
-- source include/not_embedded.inc
# Test sleeps for long times
--source include/big_test.inc
# check that CSV engine was compiled in
--source include/have_csv.inc
set @log_output.saved = @@global.log_output;
set @@global.log_output = 'TABLE';
connect (con1,localhost,root,,);
connect (con2,localhost,root,,);
#
# Bug #27638: slow logging to CSV table inserts bad query_time and lock_time values
#
--disable_ps2_protocol
connection con1;
set session long_query_time=10;
select get_lock('bug27638', 1);
connection con2;
set session long_query_time=1;
select get_lock('bug27638', 2);
select if (query_time >= '00:00:01', 'OK', concat('WRONG: ',query_time)) as qt, sql_text from mysql.slow_log
where sql_text = 'select get_lock(\'bug27638\', 2)';
select get_lock('bug27638', 60);
select if (query_time >= '00:00:59', 'OK', concat('WRONG: ',query_time)) as qt, sql_text from mysql.slow_log
where sql_text = 'select get_lock(\'bug27638\', 60)';
select get_lock('bug27638', 101);
select if (query_time >= '00:01:40', 'OK', concat('WRONG: ',query_time)) as qt, sql_text from mysql.slow_log
where sql_text = 'select get_lock(\'bug27638\', 101)';
connection con1;
select release_lock('bug27638');
connection default;
disconnect con1;
disconnect con2;
--enable_ps2_protocol
set @@global.log_output = @log_output.saved;