List:Commits« Previous MessageNext Message »
From:Chad MILLER Date:December 14 2007 1:57pm
Subject:bk commit into 5.1 tree (cmiller:1.2493)
View as plain text  
Below is the list of changes that have just been committed into a local
5.1 repository of cmiller. When cmiller does a push these changes will
be propagated to the main repository and, within 24 hours after the
push, to the public repository.
For information on how to access the public repository
see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html

ChangeSet@stripped, 2007-12-14 08:57:37-05:00, cmiller@stripped +3 -0
  Correct complaints of reviewers and clean up test.

  mysql-test/r/profiling.result@stripped, 2007-12-14 08:57:32-05:00, cmiller@stripped +21 -80
    Remove unnecessary verbosity.
    
    Remove section of test that is impossible to test with PS protocol.

  mysql-test/t/profiling.test@stripped, 2007-12-14 08:57:32-05:00, cmiller@stripped +28 -9
    Remove unnecessary verbosity.
    
    Remove section of test that is impossible to test with PS protocol.

  sql/sql_profile.h@stripped, 2007-12-14 08:57:32-05:00, cmiller@stripped +10 -10
    Make bit flags unsigned ints.

diff -Nrup a/mysql-test/r/profiling.result b/mysql-test/r/profiling.result
--- a/mysql-test/r/profiling.result	2007-11-13 09:46:15 -05:00
+++ b/mysql-test/r/profiling.result	2007-12-14 08:57:32 -05:00
@@ -308,88 +308,41 @@ create table profile_log (how_many int);
 drop procedure if exists p1;
 drop procedure if exists p2;
 drop procedure if exists p3;
-create procedure p1 () modifies sql data begin set profiling = ON; select 'This p1 should show up in profiling'; insert into profile_log select count(*) from information_schema.profiling; end//
-create procedure p2() deterministic begin set profiling = ON; call p1(); select 'This p2 should show up in profiling'; end//
-create procedure p3 () reads sql data begin set profiling = ON; select 'This p3 should show up in profiling'; show profile; end//
-select count(*) as count_before_p1 from information_schema.profiling;
-count_before_p1
-535
+create procedure p1 () 
+modifies sql data 
+begin 
+set profiling = ON; 
+select 'This p1 should show up in profiling'; 
+insert into profile_log select count(*) from information_schema.profiling; 
+end//
+create procedure p2() 
+deterministic 
+begin 
+set profiling = ON; 
+call p1(); 
+select 'This p2 should show up in profiling'; 
+end//
+create procedure p3 () 
+reads sql data 
+begin 
+set profiling = ON; 
+select 'This p3 should show up in profiling'; 
+show profile; 
+end//
 first call to p1
 call p1;
-This p1 should show up in profiling
-This p1 should show up in profiling
 select * from profile_log;
-how_many
-528
 second call to p1
 call p1;
-This p1 should show up in profiling
-This p1 should show up in profiling
 select * from profile_log;
-how_many
-528
-478
 third call to p1
 call p1;
-This p1 should show up in profiling
-This p1 should show up in profiling
 select * from profile_log;
-how_many
-528
-478
-443
 set session profiling = OFF;
 call p2;
-This p1 should show up in profiling
-This p1 should show up in profiling
-This p2 should show up in profiling
-This p2 should show up in profiling
 set session profiling = OFF;
 call p3;
-This p3 should show up in profiling
-This p3 should show up in profiling
-Status	Duration
-continuing inside routine	#
-checking permissions	#
-Opening tables	#
-init	#
-optimizing	#
-executing	#
-end	#
-query end	#
-closing tables	#
 show profiles;
-Query_ID	Duration	Query
-#	#	create table t3 (id int not null primary key)
-#	#	insert into t1 values (1), (2), (3)
-#	#	insert into t2 values (1), (2), (3)
-#	#	insert into t3 values (1), (2), (3)
-#	#	select * from t1
-#	#	delete from t1
-#	#	insert into t1 values (1), (2), (3)
-#	#	insert into t1 values (1), (2), (3)
-#	#	select * from t1
-#	#	select @@profiling
-#	#	create function f1() returns varchar(50) return 'hello'
-#	#	select @@profiling
-#	#	select @@profiling
-#	#	select 'This p1 should show up in profiling'
-#	#	insert into profile_log select count(*) from information_schema.profiling
-#	#	select * from profile_log
-#	#	SET profiling = ON
-#	#	select 'This p1 should show up in profiling'
-#	#	insert into profile_log select count(*) from information_schema.profiling
-#	#	select * from profile_log
-#	#	SET profiling = ON
-#	#	select 'This p1 should show up in profiling'
-#	#	insert into profile_log select count(*) from information_schema.profiling
-#	#	select * from profile_log
-#	#	SET profiling = ON
-#	#	select 'This p1 should show up in profiling'
-#	#	insert into profile_log select count(*) from information_schema.profiling
-#	#	select 'This p2 should show up in profiling'
-#	#	select 'This p3 should show up in profiling'
-#	#	show profile
 drop procedure if exists p1;
 drop procedure if exists p2;
 drop procedure if exists p3;
@@ -458,17 +411,5 @@ drop view if exists v1;
 Warnings:
 Note	1051	Unknown table 'test.v1'
 drop function if exists f1;
-select 1; select 2; select 3;;
-1
-1
-2
-2
-3
-3
-select state from information_schema.profiling where seq=1 order by query_id desc limit 3;
-state
-continuing
-continuing
-starting
 set session profiling = OFF;
 End of 5.0 tests
diff -Nrup a/mysql-test/t/profiling.test b/mysql-test/t/profiling.test
--- a/mysql-test/t/profiling.test	2007-11-13 09:46:15 -05:00
+++ b/mysql-test/t/profiling.test	2007-12-14 08:57:32 -05:00
@@ -157,12 +157,30 @@ drop procedure if exists p3;
 --enable_warnings
 
 delimiter //;
-create procedure p1 () modifies sql data begin set profiling = ON; select 'This p1 should show up in profiling'; insert into profile_log select count(*) from information_schema.profiling; end//
-create procedure p2() deterministic begin set profiling = ON; call p1(); select 'This p2 should show up in profiling'; end//
-create procedure p3 () reads sql data begin set profiling = ON; select 'This p3 should show up in profiling'; show profile; end//
+create procedure p1 () 
+  modifies sql data 
+begin 
+  set profiling = ON; 
+  select 'This p1 should show up in profiling'; 
+  insert into profile_log select count(*) from information_schema.profiling; 
+end//
+create procedure p2() 
+  deterministic 
+begin 
+  set profiling = ON; 
+  call p1(); 
+  select 'This p2 should show up in profiling'; 
+end//
+create procedure p3 () 
+  reads sql data 
+begin 
+  set profiling = ON; 
+  select 'This p3 should show up in profiling'; 
+  show profile; 
+end//
 delimiter ;//
 
-select count(*) as count_before_p1 from information_schema.profiling;
+--disable_result_log
 --echo first call to p1
 call p1;
 select * from profile_log;
@@ -175,11 +193,11 @@ select * from profile_log;
 set session profiling = OFF;
 call p2;
 set session profiling = OFF;
---replace_column 2 #
 call p3;
 
 --replace_column 1 # 2 #
 show profiles;
+--enable_result_log
 
 drop procedure if exists p1;
 drop procedure if exists p2;
@@ -235,10 +253,11 @@ drop table if exists t1, t2, t3;
 drop view if exists v1;
 drop function if exists f1;
 
-# Multiple queries in one packet.
---eval select 1; select 2; select 3;
-# two continuations, one starting
-select state from information_schema.profiling where seq=1 order by query_id desc limit 3;
+## Multiple queries in one packet.  Combo statements don't work with ps-proto.
+#--eval select 1; select 2; select 3;
+## two continuations, one starting
+#select state from information_schema.profiling where seq=1 order by query_id desc limit 3;
+
 
 ## last thing in the file
 set session profiling = OFF;
diff -Nrup a/sql/sql_profile.h b/sql/sql_profile.h
--- a/sql/sql_profile.h	2007-11-09 14:45:41 -05:00
+++ b/sql/sql_profile.h	2007-12-14 08:57:32 -05:00
@@ -42,16 +42,16 @@ int fill_query_profile_statistics_info(T
 int make_profile_table_for_show(THD *thd, ST_SCHEMA_TABLE *schema_table);
 
 
-#define PROFILE_NONE         0
-#define PROFILE_CPU          (1<<0)
-#define PROFILE_MEMORY       (1<<1)
-#define PROFILE_BLOCK_IO     (1<<2)
-#define PROFILE_CONTEXT      (1<<3)
-#define PROFILE_PAGE_FAULTS  (1<<4)
-#define PROFILE_IPC          (1<<5)
-#define PROFILE_SWAPS        (1<<6)
-#define PROFILE_SOURCE       (1<<16)
-#define PROFILE_ALL          (~0)
+#define PROFILE_NONE         (uint)0
+#define PROFILE_CPU          (uint)(1<<0)
+#define PROFILE_MEMORY       (uint)(1<<1)
+#define PROFILE_BLOCK_IO     (uint)(1<<2)
+#define PROFILE_CONTEXT      (uint)(1<<3)
+#define PROFILE_PAGE_FAULTS  (uint)(1<<4)
+#define PROFILE_IPC          (uint)(1<<5)
+#define PROFILE_SWAPS        (uint)(1<<6)
+#define PROFILE_SOURCE       (uint)(1<<16)
+#define PROFILE_ALL          (uint)(~0)
 
 
 #if defined(ENABLED_PROFILING) && defined(COMMUNITY_SERVER)
Thread
bk commit into 5.1 tree (cmiller:1.2493)Chad MILLER14 Dec