From 8b4fe6382eb366fc087bf6d275eac9ec6931e5f6 Mon Sep 17 00:00:00 2001 From: Tor Didriksen Date: Thu, 27 Jan 2011 14:25:27 +0100 Subject: Bug #59273 show profile source doesn't show Source_function or truncates Source_file Fixed the 'show profile source' part of the bug. Leaving SHOW ENGINE INNODB MUTEX to a separate patch. sql/sql_class.cc: Use base_name(calling_file) for dbug trace and profiling. --- sql/sql_class.cc | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'sql/sql_class.cc') diff --git a/sql/sql_class.cc b/sql/sql_class.cc index c058e66df97..bc6086eaf19 100644 --- a/sql/sql_class.cc +++ b/sql/sql_class.cc @@ -272,10 +272,11 @@ const char *set_thd_proc_info(void *thd_arg, const char *info, thd= current_thd; const char *old_info= thd->proc_info; - DBUG_PRINT("proc_info", ("%s:%d %s", calling_file, calling_line, - (info != NULL) ? info : "(null)")); + const char *basename= calling_file ? base_name(calling_file) : NULL; + DBUG_PRINT("proc_info", ("%s:%d %s", basename, calling_line, info)); + #if defined(ENABLED_PROFILING) - thd->profiling.status_change(info, calling_function, calling_file, calling_line); + thd->profiling.status_change(info, calling_function, basename, calling_line); #endif thd->proc_info= info; return old_info; -- cgit v1.2.1