1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-01 03:47:19 +03:00

proc_info_hook, mysys access to thd->proc_info

include/my_global.h:
  move __func__ definition to my_global.h
include/my_sys.h:
  proc_info_hook
mysys/my_static.c:
  proc_info_hook
sql/mysqld.cc:
  proc_info_hook
sql/sql_class.cc:
  support thd==0 in set_thd_proc_info
sql/sql_profile.cc:
  move __func__ definition to my_global.h
sql/sql_profile.h:
  move __func__ definition to my_global.h
This commit is contained in:
Sergei Golubchik
2008-08-27 14:15:06 +02:00
parent e2219ec965
commit ca23272e1e
7 changed files with 42 additions and 29 deletions

View File

@ -248,13 +248,16 @@ int thd_tablespace_op(const THD *thd)
extern "C"
const char *set_thd_proc_info(THD *thd, const char *info,
const char *calling_function,
const char *calling_file,
const char *set_thd_proc_info(THD *thd, const char *info,
const char *calling_function,
const char *calling_file,
const unsigned int calling_line)
{
if (!thd)
thd= current_thd;
const char *old_info= thd->proc_info;
DBUG_PRINT("proc_info", ("%s:%d %s", calling_file, calling_line,
DBUG_PRINT("proc_info", ("%s:%d %s", calling_file, calling_line,
(info != NULL) ? info : "(null)"));
#if defined(ENABLED_PROFILING) && defined(COMMUNITY_SERVER)
thd->profiling.status_change(info, calling_function, calling_file, calling_line);