diff options
author | unknown <cmiller@zippy.cornsilk.net> | 2007-11-14 15:11:58 -0500 |
---|---|---|
committer | unknown <cmiller@zippy.cornsilk.net> | 2007-11-14 15:11:58 -0500 |
commit | c1a36d80ef50b7cd23da893a08e7610d9e9dd02e (patch) | |
tree | 413750c08da07f9695b1935432266bfa83cc4f4b /sql/sql_class.cc | |
parent | a49d3f018b9562e847578d06766ced772519a333 (diff) | |
download | mariadb-git-c1a36d80ef50b7cd23da893a08e7610d9e9dd02e.tar.gz |
Push history-limiting code until after the code that adds new
history entries. Lazy deletion isn't smart or useful here.
Backport from 5.1 .
include/my_sys.h:
Prepare for rename in 5.1.
mysql-test/r/profiling.result:
Backport tests from 5.1.
mysql-test/t/profiling.test:
Backport tests from 5.1.
sql/mysql_priv.h:
Backport changes from 5.1 .
sql/sp_head.cc:
Backport changes from 5.1 .
sql/sql_class.cc:
Backport changes from 5.1 .
sql/sql_parse.cc:
Backport changes from 5.1 .
sql/sql_profile.cc:
Push history-limiting code until after the code that adds new
history entries. Lazy deletion isn't smart or useful here.
Correct for 5.0 member existance and execution.
sql/sql_profile.h:
Backport changes from 5.1 .
sql/sql_show.cc:
Backport changes from 5.1 .
Diffstat (limited to 'sql/sql_class.cc')
-rw-r--r-- | sql/sql_class.cc | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/sql/sql_class.cc b/sql/sql_class.cc index ebce723d577..a8725923624 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) + thd->profiling.status_change(info, calling_function, calling_file, calling_line); +#endif + thd->proc_info= info; + return old_info; +} THD::THD() |