List:Commits« Previous MessageNext Message »
From:Marc Alff Date:April 28 2011 10:01pm
Subject:bzr commit into mysql-trunk branch (marc.alff:3339) Bug#12409247
View as plain text  
#At file:///Users/malff/BZR_TREE/mysql-trunk-bug12409247/ based on revid:davi.arnaut@stripped

 3339 Marc Alff	2011-04-28
      Bug#12409247 - STAGE TIMER DEFAULT SHOULD BE NANOSECONDS
      
      Changed the STAGE timer default unit to be NANOSECOND.
      Adjusted the test suite accordingly.

    modified:
      mysql-test/suite/perfschema/r/column_privilege.result
      mysql-test/suite/perfschema/r/dml_setup_timers.result
      mysql-test/suite/perfschema/r/start_server_nothing.result
      mysql-test/suite/perfschema/t/column_privilege.test
      mysql-test/suite/perfschema/t/dml_setup_timers.test
      storage/perfschema/pfs_timer.cc
=== modified file 'mysql-test/suite/perfschema/r/column_privilege.result'
--- a/mysql-test/suite/perfschema/r/column_privilege.result	2011-02-14 14:23:55 +0000
+++ b/mysql-test/suite/perfschema/r/column_privilege.result	2011-04-28 22:01:07 +0000
@@ -24,7 +24,3 @@ REVOKE ALL PRIVILEGES, GRANT OPTION FROM
 DROP USER 'pfs_user_5'@localhost;
 flush privileges;
 UPDATE performance_schema.setup_instruments SET enabled = 'YES', timed = 'YES';
-UPDATE performance_schema.setup_consumers SET enabled = 'YES';
-UPDATE performance_schema.setup_timers SET timer_name = 'CYCLE' where name="wait_timer";
-UPDATE performance_schema.setup_timers SET timer_name = 'CYCLE' where name="stage_timer";
-UPDATE performance_schema.setup_timers SET timer_name = 'NANOSECONDS' where name="statement_timer";

=== modified file 'mysql-test/suite/perfschema/r/dml_setup_timers.result'
--- a/mysql-test/suite/perfschema/r/dml_setup_timers.result	2011-02-14 14:23:55 +0000
+++ b/mysql-test/suite/perfschema/r/dml_setup_timers.result	2011-04-28 22:01:07 +0000
@@ -1,7 +1,7 @@
 select * from performance_schema.setup_timers;
 NAME	TIMER_NAME
 wait	CYCLE
-stage	CYCLE
+stage	NANOSECOND
 statement	NANOSECOND
 select * from performance_schema.setup_timers
 where name='Wait';
@@ -11,7 +11,6 @@ select * from performance_schema.setup_t
 where timer_name='CYCLE';
 NAME	TIMER_NAME
 wait	CYCLE
-stage	CYCLE
 insert into performance_schema.setup_timers
 set name='FOO', timer_name='CYCLE';
 ERROR 42000: INSERT command denied to user 'root'@'localhost' for table 'setup_timers'
@@ -36,3 +35,14 @@ LOCK TABLES performance_schema.setup_tim
 UNLOCK TABLES;
 LOCK TABLES performance_schema.setup_timers WRITE;
 UNLOCK TABLES;
+update performance_schema.setup_timers
+set timer_name='CYCLE' where name="wait";
+update performance_schema.setup_timers
+set timer_name='NANOSECOND' where name="stage";
+update performance_schema.setup_timers
+set timer_name='NANOSECOND' where name="statement";
+select * from performance_schema.setup_timers;
+NAME	TIMER_NAME
+wait	CYCLE
+stage	NANOSECOND
+statement	NANOSECOND

=== modified file 'mysql-test/suite/perfschema/r/start_server_nothing.result'
--- a/mysql-test/suite/perfschema/r/start_server_nothing.result	2011-02-15 14:31:13 +0000
+++ b/mysql-test/suite/perfschema/r/start_server_nothing.result	2011-04-28 22:01:07 +0000
@@ -131,7 +131,7 @@ thread_instrumentation	YES
 select * from performance_schema.setup_timers;
 NAME	TIMER_NAME
 wait	CYCLE
-stage	CYCLE
+stage	NANOSECOND
 statement	NANOSECOND
 select * from performance_schema.cond_instances;
 NAME	OBJECT_INSTANCE_BEGIN

=== modified file 'mysql-test/suite/perfschema/t/column_privilege.test'
--- a/mysql-test/suite/perfschema/t/column_privilege.test	2011-02-14 14:23:55 +0000
+++ b/mysql-test/suite/perfschema/t/column_privilege.test	2011-04-28 22:01:07 +0000
@@ -73,8 +73,4 @@ REVOKE ALL PRIVILEGES, GRANT OPTION FROM
 DROP USER 'pfs_user_5'@localhost;
 flush privileges;
 UPDATE performance_schema.setup_instruments SET enabled = 'YES', timed = 'YES';
-UPDATE performance_schema.setup_consumers SET enabled = 'YES';
-UPDATE performance_schema.setup_timers SET timer_name = 'CYCLE' where name="wait_timer";
-UPDATE performance_schema.setup_timers SET timer_name = 'CYCLE' where name="stage_timer";
-UPDATE performance_schema.setup_timers SET timer_name = 'NANOSECONDS' where name="statement_timer";
 

=== modified file 'mysql-test/suite/perfschema/t/dml_setup_timers.test'
--- a/mysql-test/suite/perfschema/t/dml_setup_timers.test	2010-11-08 19:35:17 +0000
+++ b/mysql-test/suite/perfschema/t/dml_setup_timers.test	2011-04-28 22:01:07 +0000
@@ -55,3 +55,14 @@ UNLOCK TABLES;
 LOCK TABLES performance_schema.setup_timers WRITE;
 UNLOCK TABLES;
 
+# Cleanup, restore the default values
+
+update performance_schema.setup_timers
+ set timer_name='CYCLE' where name="wait";
+update performance_schema.setup_timers
+ set timer_name='NANOSECOND' where name="stage";
+update performance_schema.setup_timers
+ set timer_name='NANOSECOND' where name="statement";
+
+select * from performance_schema.setup_timers;
+

=== modified file 'storage/perfschema/pfs_timer.cc'
--- a/storage/perfschema/pfs_timer.cc	2011-02-14 14:23:55 +0000
+++ b/storage/perfschema/pfs_timer.cc	2011-04-28 22:01:07 +0000
@@ -23,7 +23,7 @@
 #include "my_rdtsc.h"
 
 enum_timer_name wait_timer= TIMER_NAME_CYCLE;
-enum_timer_name stage_timer= TIMER_NAME_CYCLE;
+enum_timer_name stage_timer= TIMER_NAME_NANOSEC;
 enum_timer_name statement_timer= TIMER_NAME_NANOSEC;
 MY_TIMER_INFO pfs_timer_info;
 


Attachment: [text/bzr-bundle] bzr/marc.alff@oracle.com-20110428220107-qky2956tychat5kz.bundle
Thread
bzr commit into mysql-trunk branch (marc.alff:3339) Bug#12409247Marc Alff29 Apr