mirror of
https://github.com/MariaDB/server.git
synced 2025-08-07 00:04:31 +03:00
Implement multiple-signal debug_sync
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.
This commit is contained in:
@@ -2,17 +2,17 @@ select @@global.debug_sync;
|
||||
ERROR HY000: Variable 'debug_sync' is a SESSION variable
|
||||
select @@session.debug_sync;
|
||||
@@session.debug_sync
|
||||
ON - current signal: ''
|
||||
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 signal: ''
|
||||
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 signal: ''
|
||||
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;
|
||||
|
Reference in New Issue
Block a user