diff options
author | Georgi Kodinov <joro@sun.com> | 2009-05-15 12:29:41 +0300 |
---|---|---|
committer | Georgi Kodinov <joro@sun.com> | 2009-05-15 12:29:41 +0300 |
commit | 803ce846a3df2919507e1337279d19f485c3ba1d (patch) | |
tree | c3b41def997782186e86266e0ac9001b6eca7c81 /sql/sql_class.cc | |
parent | 9a0e01d73ec0f4d6ce70b055d1bdabded763921c (diff) | |
parent | 1a1b16719dad0a9d6f858d32feae89798fb81a80 (diff) | |
download | mariadb-git-803ce846a3df2919507e1337279d19f485c3ba1d.tar.gz |
merged 5.0-main -> 5.0-bugteam
Diffstat (limited to 'sql/sql_class.cc')
-rw-r--r-- | sql/sql_class.cc | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/sql/sql_class.cc b/sql/sql_class.cc index bb6a51d48d7..387e7022d71 100644 --- a/sql/sql_class.cc +++ b/sql/sql_class.cc @@ -165,6 +165,20 @@ Open_tables_state::Open_tables_state(ulong version_arg) reset_open_tables_state(); } +extern "C" +const char *set_thd_proc_info(THD *thd, const char *info, + const char *calling_function, + const char *calling_file, + const unsigned int calling_line) +{ + const char *old_info= thd->proc_info; + DBUG_PRINT("proc_info", ("%s:%d %s", calling_file, calling_line, info)); +#if defined(ENABLED_PROFILING) && defined(COMMUNITY_SERVER) + thd->profiling.status_change(info, calling_function, calling_file, calling_line); +#endif + thd->proc_info= info; + return old_info; +} THD::THD() @@ -258,6 +272,9 @@ THD::THD() init(); /* Initialize sub structures */ init_sql_alloc(&warn_root, WARN_ALLOC_BLOCK_SIZE, WARN_ALLOC_PREALLOC_SIZE); +#if defined(ENABLED_PROFILING) && defined(COMMUNITY_SERVER) + profiling.set_thd(this); +#endif user_connect=(USER_CONN *)0; hash_init(&user_vars, system_charset_info, USER_VARS_HASH_SIZE, 0, 0, (hash_get_key) get_var_key, |