diff options
author | Sergei Golubchik <serg@mariadb.org> | 2020-02-14 16:28:05 +0100 |
---|---|---|
committer | Sergei Golubchik <serg@mariadb.org> | 2020-03-10 19:24:22 +0100 |
commit | 05779bc6f1a585156c572fbcd89c78b3b1f51f5d (patch) | |
tree | 9ac80b8694aa9f21633f705cee7f08f7145c1e5d /sql/debug_sync.cc | |
parent | 22b6d8487aa08123c30092c1f1df48e31c79eff3 (diff) | |
download | mariadb-git-05779bc6f1a585156c572fbcd89c78b3b1f51f5d.tar.gz |
perfschema mdl related instrumentation changes
Diffstat (limited to 'sql/debug_sync.cc')
-rw-r--r-- | sql/debug_sync.cc | 25 |
1 files changed, 22 insertions, 3 deletions
diff --git a/sql/debug_sync.cc b/sql/debug_sync.cc index 759e28b8589..fdca2c47dbc 100644 --- a/sql/debug_sync.cc +++ b/sql/debug_sync.cc @@ -122,6 +122,25 @@ static void init_debug_sync_psi_keys(void) /** + Set the THD::proc_info without instrumentation. + This method is private to DEBUG_SYNC, + and on purpose avoid any use of: + - the SHOW PROFILE instrumentation + - the PERFORMANCE_SCHEMA instrumentation + so that using DEBUG_SYNC() in the server code + does not cause the instrumentations to record + spurious data. +*/ +static const char* +debug_sync_thd_proc_info(THD *thd, const char* info) +{ + const char* old_proc_info= thd->proc_info; + thd->proc_info= info; + return old_proc_info; +} + + +/** Initialize the debug sync facility at server start. @return status @@ -1365,7 +1384,7 @@ static void debug_sync_execute(THD *thd, st_debug_sync_action *action) strxnmov(ds_control->ds_proc_info, sizeof(ds_control->ds_proc_info)-1, "debug sync point: ", action->sync_point.c_ptr(), NullS); old_proc_info= thd->proc_info; - thd_proc_info(thd, ds_control->ds_proc_info); + debug_sync_thd_proc_info(thd, ds_control->ds_proc_info); } /* @@ -1483,11 +1502,11 @@ static void debug_sync_execute(THD *thd, st_debug_sync_action *action) mysql_mutex_lock(&thd->mysys_var->mutex); thd->mysys_var->current_mutex= old_mutex; thd->mysys_var->current_cond= old_cond; - thd_proc_info(thd, old_proc_info); + debug_sync_thd_proc_info(thd, old_proc_info); mysql_mutex_unlock(&thd->mysys_var->mutex); } else - thd_proc_info(thd, old_proc_info); + debug_sync_thd_proc_info(thd, old_proc_info); } else { |