mirror of
				https://github.com/MariaDB/server.git
				synced 2025-11-04 12:56:14 +01:00 
			
		
		
		
	Updated tests: cases with bugs or which cannot be run with the cursor-protocol were excluded with "--disable_cursor_protocol"/"--enable_cursor_protocol" Fix for v.10.5
		
			
				
	
	
		
			112 lines
		
	
	
	
		
			3.1 KiB
		
	
	
	
		
			Text
		
	
	
	
	
	
			
		
		
	
	
			112 lines
		
	
	
	
		
			3.1 KiB
		
	
	
	
		
			Text
		
	
	
	
	
	
-- source include/no_view_protocol.inc
 | 
						|
 | 
						|
#
 | 
						|
# MDEV-4578 information_schema.processlist reports incorrect value for Time (2147483647)
 | 
						|
#
 | 
						|
 | 
						|
source include/have_debug.inc;
 | 
						|
source include/have_debug_sync.inc;
 | 
						|
 | 
						|
let $tid= `SELECT CONNECTION_ID()`;
 | 
						|
SET DEBUG_SYNC = 'dispatch_command_before_set_time WAIT_FOR do_set_time';
 | 
						|
send SELECT 1;
 | 
						|
 | 
						|
connect (con1,localhost,root,,);
 | 
						|
 | 
						|
SET DEBUG_SYNC = 'fill_schema_processlist_after_unow SIGNAL do_set_time WAIT_FOR fill_schema_proceed';
 | 
						|
--replace_result $tid TID
 | 
						|
send_eval SELECT ID, TIME,TIME_MS FROM INFORMATION_SCHEMA.PROCESSLIST WHERE CONCAT(":", ID, ":") = ":$tid:";
 | 
						|
 | 
						|
connection default;
 | 
						|
reap;
 | 
						|
SET DEBUG_SYNC = 'now SIGNAL fill_schema_proceed';
 | 
						|
 | 
						|
connection con1;
 | 
						|
--replace_result $tid TID
 | 
						|
reap;
 | 
						|
set debug_sync='reset';
 | 
						|
connection default;
 | 
						|
 | 
						|
#
 | 
						|
# MDEV-4683 query start_time not reset when going to sleep
 | 
						|
#
 | 
						|
 | 
						|
connection con1;
 | 
						|
# This DBUG insertion triggers a DEBUG_SYNC signal "query_done" once
 | 
						|
# the below SELECT SLEEP(5) has gone from "Query" to "Sleep" command
 | 
						|
# state. (We cannot just set the DEBUG_SYNC directly here, because
 | 
						|
# then it can trigger at the end of the SET DEBUG_SYNC statement (or
 | 
						|
# at the end of the Prepare step of the SELECT, if --ps-protocol),
 | 
						|
# thus occuring too early).
 | 
						|
SET debug_dbug="+d,sleep_inject_query_done_debug_sync";
 | 
						|
select sleep(5); #run a query that will take some time
 | 
						|
connection default;
 | 
						|
 | 
						|
# Need to ensure that the previous query has really completed. Otherwise,
 | 
						|
# the select could see the previous query still in "Query" stage in the
 | 
						|
# processlist.
 | 
						|
SET DEBUG_SYNC = 'now WAIT_FOR query_done';
 | 
						|
 | 
						|
# verify that the time in COM_SLEEP doesn't include the query run time
 | 
						|
select command, time < 5 from information_schema.processlist where id != connection_id();
 | 
						|
 | 
						|
disconnect con1;
 | 
						|
connection default;
 | 
						|
set debug_sync='reset';
 | 
						|
 | 
						|
--echo End of 5.5 tests
 | 
						|
 | 
						|
--echo #
 | 
						|
--echo # 10.1 tests
 | 
						|
--echo #
 | 
						|
 | 
						|
--echo #
 | 
						|
--echo # MDEV-7807 information_schema.processlist truncates queries with binary strings
 | 
						|
--echo #
 | 
						|
 | 
						|
SET NAMES utf8;
 | 
						|
--vertical_results
 | 
						|
#Check after fix MDEV-31514
 | 
						|
--disable_cursor_protocol
 | 
						|
SELECT INFO, INFO_BINARY, 'xxx😎yyy' AS utf8mb4_string FROM INFORMATION_SCHEMA.PROCESSLIST WHERE INFO LIKE '%xxx%yyy%';
 | 
						|
--enable_cursor_protocol
 | 
						|
--horizontal_results
 | 
						|
 | 
						|
--echo #
 | 
						|
--echo # End of 10.1 tests
 | 
						|
--echo #
 | 
						|
 | 
						|
--echo #
 | 
						|
--echo # Start of 10.3 tests
 | 
						|
--echo #
 | 
						|
 | 
						|
--echo #
 | 
						|
--echo # MDEV-28131 Unexpected warning while selecting from information_schema.processlist
 | 
						|
--echo #
 | 
						|
 | 
						|
connect (conn1, localhost, root,,);
 | 
						|
connection conn1;
 | 
						|
let $ID= `select connection_id()`;
 | 
						|
send SELECT SLEEP(1000);
 | 
						|
connection default;
 | 
						|
let $wait_timeout= 10;
 | 
						|
let $wait_condition=select count(*)=1 from information_schema.processlist
 | 
						|
where state='User sleep' and info='SELECT SLEEP(1000)';
 | 
						|
--source include/wait_condition.inc
 | 
						|
SELECT progress FROM information_schema.processlist WHERE info='SELECT SLEEP(1000)';
 | 
						|
disable_query_log;
 | 
						|
eval kill $ID;
 | 
						|
enable_query_log;
 | 
						|
let $wait_timeout= 10;
 | 
						|
let $wait_condition=select count(*)=0 from information_schema.processlist
 | 
						|
where state='User sleep' and info='SELECT SLEEP(1000)';
 | 
						|
--source include/wait_condition.inc
 | 
						|
connection conn1;
 | 
						|
--error 2013,ER_CONNECTION_KILLED
 | 
						|
reap;
 | 
						|
connection default;
 | 
						|
disconnect conn1;
 | 
						|
 | 
						|
--echo #
 | 
						|
--echo # End of 10.3 tests
 | 
						|
--echo #
 |