summaryrefslogtreecommitdiff
path: root/mysql-test/r/profiling.result
diff options
context:
space:
mode:
authorunknown <cmiller@zippy.cornsilk.net>2007-04-03 19:50:55 -0400
committerunknown <cmiller@zippy.cornsilk.net>2007-04-03 19:50:55 -0400
commite3a20ee9152294237b3a520d733079051e69e340 (patch)
treee6c1362669f4c28c5bf9ebb1dbdd9d638c117392 /mysql-test/r/profiling.result
parentccfe1f09fde21199e90d307199aab3f10e599059 (diff)
downloadmariadb-git-e3a20ee9152294237b3a520d733079051e69e340.tar.gz
Backport:
B-g#27501: 5.0 significantly more sys ("kernel") time than 4.1 \ due to getrusage() calls Even if profiling is turned off, the parser makes calls to reset the state at the beginning of each query. That would eventually instantiate a PROFILE_ENTRY, which does indeed capture resource usage. Instead, now check that profiling is active before progressing far into the storage/expiration of old entries in the history. This has the pleasant side-effect that queries to toggle profiling are not recorded in the history. mysql-test/r/profiling.result: Now after we turn off profiling, the beginning of the next query refuses to enter the profiling code and it discards the info. sql/sql_profile.cc: Add the same condition twice: Once to abort storing previous query information and the other to abort initialization for this query that is starting. We do this symmetrically, before and after expiring old history entries, so that the counts are correct.
Diffstat (limited to 'mysql-test/r/profiling.result')
-rw-r--r--mysql-test/r/profiling.result2
1 files changed, 1 insertions, 1 deletions
diff --git a/mysql-test/r/profiling.result b/mysql-test/r/profiling.result
index a1e994220b9..75977f7f2e8 100644
--- a/mysql-test/r/profiling.result
+++ b/mysql-test/r/profiling.result
@@ -248,6 +248,7 @@ sum(id)
12
show profiles;
Query_ID Duration Query
+15 # select count(*) from t1
16 # insert into t1 select * from t1
17 # insert into t1 select * from t1
18 # insert into t1 select * from t1
@@ -277,7 +278,6 @@ Query_ID Duration Query
42 # insert into t1 values (1), (2), (3)
43 # insert into t1 values (1), (2), (3)
44 # select * from t1
-45 # set session profiling = OFF
set session profiling = ON;
select @@profiling;
@@profiling