summaryrefslogtreecommitdiff
path: root/sql/sql_profile.cc
diff options
context:
space:
mode:
authorunknown <cmiller@zippy.cornsilk.net>2007-11-13 09:46:17 -0500
committerunknown <cmiller@zippy.cornsilk.net>2007-11-13 09:46:17 -0500
commit7eb9aac77e69e0bce9234958b50dde38140007a8 (patch)
treea965c70fa22a2751eacbcde6ec95b4fb00f7d2a8 /sql/sql_profile.cc
parentac180f8272f9be0cf2621c11e03e313b891c4417 (diff)
downloadmariadb-git-7eb9aac77e69e0bce9234958b50dde38140007a8.tar.gz
Insert profiling instructions into s-p code to make each statement
be profiled separately. Expand the time formats in i_s.profiling to wide enough for larger numbers. mysql-test/r/profiling.result: Show that each query inside a procedure is profiled separately. mysql-test/t/profiling.test: Show that each query inside a procedure is profiled separately. sql/sp_head.cc: Poke profiling into stored-procedure code. For statement parts only of routines, process them as profilable discrete queries. sql/sql_profile.cc: Encode decimal size correctly.
Diffstat (limited to 'sql/sql_profile.cc')
-rw-r--r--sql/sql_profile.cc4
1 files changed, 3 insertions, 1 deletions
diff --git a/sql/sql_profile.cc b/sql/sql_profile.cc
index fd2ae32c711..1922fa3bc2b 100644
--- a/sql/sql_profile.cc
+++ b/sql/sql_profile.cc
@@ -33,7 +33,9 @@
#include "my_sys.h"
#define TIME_FLOAT_DIGITS 9
-#define TIME_I_S_DECIMAL_SIZE (6*100)+6 /**< two vals encoded: (dec*100)+len */
+/** two vals encoded: (dec*100)+len */
+#define TIME_I_S_DECIMAL_SIZE (TIME_FLOAT_DIGITS*100)+(TIME_FLOAT_DIGITS-3)
+
#define MAX_QUERY_LENGTH 300
/* Reserved for systems that can't record the function name in source. */