Skip to content

Commit e83ae66

Browse files
committed
Update comments to match new debug_sync implementation
1 parent 96a3b11 commit e83ae66

File tree

2 files changed

+8
-10
lines changed

2 files changed

+8
-10
lines changed

mysql-test/main/debug_sync.test

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -231,15 +231,12 @@ SHOW VARIABLES LIKE 'DEBUG_SYNC';
231231
# immediately after setting of the DEBUG_SYNC variable.
232232
# So it is executed before the SET statement ends.
233233
#
234-
# NOTE: There is only one global signal (say "signal post" or "flag mast").
235-
# A SIGNAL action writes its signal into it ("sets a flag").
236-
# The signal persists until explicitly overwritten.
234+
# NOTE: There can be multiple active signals at the same time.
235+
# A SIGNAL action appends its signal into signals set.
236+
# The signal persists until waited on.
237237
# To avoid confusion for later tests, it is recommended to clear
238-
# the signal by signalling "empty" ("setting the 'empty' flag"):
239-
# SET DEBUG_SYNC= 'now SIGNAL empty';
240-
# Preferably you can reset the whole facility with:
238+
# the signal set by running
241239
# SET DEBUG_SYNC= 'RESET';
242-
# The signal is then '' (really empty) which connot be done otherwise.
243240
#
244241

245242
#

sql/debug_sync.cc

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1344,7 +1344,8 @@ static bool debug_sync_eval_action(THD *thd, char *action_str, char *action_end)
13441344
/*
13451345
Try NO_CLEAR_EVENT.
13461346
*/
1347-
if (!my_strcasecmp(system_charset_info, token, "NO_CLEAR_EVENT")) {
1347+
if (!my_strcasecmp(system_charset_info, token, "NO_CLEAR_EVENT"))
1348+
{
13481349
action->clear_event= false;
13491350
/* Get next token. If none follows, set action. */
13501351
if (!(ptr = debug_sync_token(&token, &token_length, ptr, action_end))) goto set_action;
@@ -1634,8 +1635,8 @@ static void debug_sync_execute(THD *thd, st_debug_sync_action *action)
16341635

16351636

16361637
/*
1637-
Wait until global signal string matches the wait_for string.
1638-
Interrupt when thread or query is killed or facility disabled.
1638+
Wait until the signal set contains the wait_for string.
1639+
Interrupt when thread or query is killed or facility is disabled.
16391640
The facility can become disabled when some thread cannot get
16401641
the required dynamic memory allocated.
16411642
*/

0 commit comments

Comments
 (0)