mirror of
				https://github.com/MariaDB/server.git
				synced 2025-11-03 20:36:16 +01:00 
			
		
		
		
	The patch is inspired from MySQL. Instead of using a single String to hold the current active debug_sync signal, use a Hash_set to store LEX_STRINGS. This patch ensures that a signal can not be lost, by being overwritten by another thread via set DEBUG_SYNC = '... SIGNAL ...'; All signals are kepts "alive" until they are consumed by a wait event. This requires updating test cases that assume the GLOBAL signal is never consumed. Follow-up work needed: Port the additional syntax that allows one to set multiple signals and also conditionally deactivate signals when waiting.
		
			
				
	
	
		
			21 lines
		
	
	
	
		
			856 B
		
	
	
	
		
			Text
		
	
	
	
	
	
			
		
		
	
	
			21 lines
		
	
	
	
		
			856 B
		
	
	
	
		
			Text
		
	
	
	
	
	
select @@global.debug_sync;
 | 
						|
ERROR HY000: Variable 'debug_sync' is a SESSION variable
 | 
						|
select @@session.debug_sync;
 | 
						|
@@session.debug_sync
 | 
						|
ON - current signals: ''
 | 
						|
show global variables like "debug_sync";
 | 
						|
Variable_name	Value
 | 
						|
show session variables like "debug_sync";
 | 
						|
Variable_name	Value
 | 
						|
debug_sync	ON - current signals: ''
 | 
						|
select * from information_schema.global_variables where variable_name="debug_sync";
 | 
						|
VARIABLE_NAME	VARIABLE_VALUE
 | 
						|
select * from information_schema.session_variables where variable_name="debug_sync";
 | 
						|
VARIABLE_NAME	VARIABLE_VALUE
 | 
						|
DEBUG_SYNC	ON - current signals: ''
 | 
						|
set @@session.debug_sync=1;
 | 
						|
ERROR 42000: Incorrect argument type to variable 'debug_sync'
 | 
						|
set @@session.debug_sync=1.1;
 | 
						|
ERROR 42000: Incorrect argument type to variable 'debug_sync'
 | 
						|
set @@session.debug_sync=1e1;
 | 
						|
ERROR 42000: Incorrect argument type to variable 'debug_sync'
 |