summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVicențiu Ciorbaru <cvicentiu@gmail.com>2023-02-04 12:10:31 +0200
committerVicențiu Ciorbaru <cvicentiu@gmail.com>2023-02-15 15:08:16 +0200
commite83ae66e4a08f5efcbc7d86d47603db6f1570009 (patch)
tree7885ad59e98d324f8a9983a3b91706ffb970ae9d
parent96a3b11d13c263b89a70cf6e01efa442b7ac079d (diff)
downloadmariadb-git-e83ae66e4a08f5efcbc7d86d47603db6f1570009.tar.gz
Update comments to match new debug_sync implementation
-rw-r--r--mysql-test/main/debug_sync.test11
-rw-r--r--sql/debug_sync.cc7
2 files changed, 8 insertions, 10 deletions
diff --git a/mysql-test/main/debug_sync.test b/mysql-test/main/debug_sync.test
index 1dc3dc9c71e..6e75ba9624c 100644
--- a/mysql-test/main/debug_sync.test
+++ b/mysql-test/main/debug_sync.test
@@ -231,15 +231,12 @@ SHOW VARIABLES LIKE 'DEBUG_SYNC';
# immediately after setting of the DEBUG_SYNC variable.
# So it is executed before the SET statement ends.
#
-# NOTE: There is only one global signal (say "signal post" or "flag mast").
-# A SIGNAL action writes its signal into it ("sets a flag").
-# The signal persists until explicitly overwritten.
+# NOTE: There can be multiple active signals at the same time.
+# A SIGNAL action appends its signal into signals set.
+# The signal persists until waited on.
# To avoid confusion for later tests, it is recommended to clear
-# the signal by signalling "empty" ("setting the 'empty' flag"):
-# SET DEBUG_SYNC= 'now SIGNAL empty';
-# Preferably you can reset the whole facility with:
+# the signal set by running
# SET DEBUG_SYNC= 'RESET';
-# The signal is then '' (really empty) which connot be done otherwise.
#
#
diff --git a/sql/debug_sync.cc b/sql/debug_sync.cc
index aa6956060b4..eac111d32d7 100644
--- a/sql/debug_sync.cc
+++ b/sql/debug_sync.cc
@@ -1344,7 +1344,8 @@ static bool debug_sync_eval_action(THD *thd, char *action_str, char *action_end)
/*
Try NO_CLEAR_EVENT.
*/
- if (!my_strcasecmp(system_charset_info, token, "NO_CLEAR_EVENT")) {
+ if (!my_strcasecmp(system_charset_info, token, "NO_CLEAR_EVENT"))
+ {
action->clear_event= false;
/* Get next token. If none follows, set action. */
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)
/*
- Wait until global signal string matches the wait_for string.
- Interrupt when thread or query is killed or facility disabled.
+ Wait until the signal set contains the wait_for string.
+ Interrupt when thread or query is killed or facility is disabled.
The facility can become disabled when some thread cannot get
the required dynamic memory allocated.
*/