mirror of
https://github.com/MariaDB/server.git
synced 2025-08-01 03:47:19 +03:00
perfschema mdl related instrumentation changes
This commit is contained in:
@ -121,6 +121,25 @@ static void init_debug_sync_psi_keys(void)
|
||||
#endif /* HAVE_PSI_INTERFACE */
|
||||
|
||||
|
||||
/**
|
||||
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.
|
||||
|
||||
@ -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
|
||||
{
|
||||
|
Reference in New Issue
Block a user