mirror of
https://github.com/MariaDB/server.git
synced 2025-12-24 11:21:21 +03:00
WL#4259 - Debug Sync Facility
Backport from 6.0 to 5.1.
Only those sync points are included, which are used in debug_sync.test.
The Debug Sync Facility allows to place synchronization points
in the code:
open_tables(...)
DEBUG_SYNC(thd, "after_open_tables");
lock_tables(...)
When activated, a sync point can
- Send a signal and/or
- Wait for a signal
Nomenclature:
- signal: A value of a global variable that persists
until overwritten by a new signal. The global
variable can also be seen as a "signal post"
or "flag mast". Then the signal is what is
attached to the "signal post" or "flag mast".
- send a signal: Assign the value (the signal) to the global
variable ("set a flag") and broadcast a
global condition to wake those waiting for
a signal.
- wait for a signal: Loop over waiting for the global condition until
the global value matches the wait-for signal.
Please find more information in the top comment in debug_sync.cc
or in the worklog entry.
This commit is contained in:
5
mysql-test/include/have_debug_sync.inc
Normal file
5
mysql-test/include/have_debug_sync.inc
Normal file
@@ -0,0 +1,5 @@
|
||||
--require r/have_debug_sync.require
|
||||
disable_query_log;
|
||||
let $value= query_get_value(SHOW VARIABLES LIKE 'debug_sync', Value, 1);
|
||||
eval SELECT ('$value' LIKE 'ON %') AS debug_sync;
|
||||
enable_query_log;
|
||||
Reference in New Issue
Block a user