List:Commits« Previous MessageNext Message »
From:Marc Alff Date:March 10 2011 12:30pm
Subject:bzr commit into mysql-trunk branch (marc.alff:3749)
View as plain text  
#At file:///Users/malff/BZR_TREE/mysql-trunk-merge/ based on revid:marc.alff@stripped

 3749 Marc Alff	2011-03-10 [merge]
      Merge mysql-5.5 --> mysql-trunk

    modified:
      mysql-test/suite/perfschema/r/relaylog.result
      mysql-test/suite/perfschema/t/relaylog.test
=== modified file 'mysql-test/suite/perfschema/r/relaylog.result'
--- a/mysql-test/suite/perfschema/r/relaylog.result	2011-03-10 10:08:09 +0000
+++ b/mysql-test/suite/perfschema/r/relaylog.result	2011-03-10 12:30:05 +0000
@@ -9,33 +9,55 @@ Log_name	Pos	Event_type	Server_id	End_lo
 slave-bin.000001	#	Query	#	#	use `test`; create table test.t1(a int)
 slave-bin.000001	#	Query	#	#	use `test`; DROP TABLE `t1` /* generated by server */
 "============ Performance schema on master ============"
-select * from performance_schema.file_summary_by_instance
+select
+substring(file_name, locate("master-", file_name)) as FILE_NAME,
+EVENT_NAME,
+if (count_read > 0, "MANY", "NONE") as COUNT_READ,
+if (count_write > 0,"MANY", "NONE") as COUNT_WRITE,
+if (sum_number_of_bytes_read > 0, "MANY", "NONE") as SUM_NUMBER_OF_BYTES_READ,
+if (sum_number_of_bytes_write > 0, "MANY", "NONE") as SUM_NUMBER_OF_BYTES_WRITE
+from performance_schema.file_summary_by_instance
 where file_name like "%master-%" order by file_name;
 FILE_NAME	EVENT_NAME	COUNT_READ	COUNT_WRITE	SUM_NUMBER_OF_BYTES_READ	SUM_NUMBER_OF_BYTES_WRITE
-[DATADIR]master-bin.000001	wait/io/file/sql/binlog	6	4	228	343
-[DATADIR]master-bin.index	wait/io/file/sql/binlog_index	0	0	0	0
+master-bin.000001	wait/io/file/sql/binlog	MANY	MANY	MANY	MANY
+master-bin.index	wait/io/file/sql/binlog_index	NONE	NONE	NONE	NONE
 select * from performance_schema.file_summary_by_instance
 where file_name like "%slave-%" order by file_name;
 FILE_NAME	EVENT_NAME	COUNT_READ	COUNT_WRITE	SUM_NUMBER_OF_BYTES_READ	SUM_NUMBER_OF_BYTES_WRITE
 "Expect a master binlog + binlog_index"
-select * from performance_schema.file_summary_by_instance
+select
+substring(file_name, locate("master-", file_name)) as FILE_NAME,
+EVENT_NAME,
+if (count_read > 0, "MANY", "NONE") as COUNT_READ,
+if (count_write > 0,"MANY", "NONE") as COUNT_WRITE,
+if (sum_number_of_bytes_read > 0, "MANY", "NONE") as SUM_NUMBER_OF_BYTES_READ,
+if (sum_number_of_bytes_write > 0, "MANY", "NONE") as SUM_NUMBER_OF_BYTES_WRITE
+from performance_schema.file_summary_by_instance
 where event_name like "%binlog%" order by file_name;
 FILE_NAME	EVENT_NAME	COUNT_READ	COUNT_WRITE	SUM_NUMBER_OF_BYTES_READ	SUM_NUMBER_OF_BYTES_WRITE
-[DATADIR]master-bin.000001	wait/io/file/sql/binlog	6	4	228	343
-[DATADIR]master-bin.index	wait/io/file/sql/binlog_index	0	0	0	0
-select * from performance_schema.file_summary_by_event_name
+master-bin.000001	wait/io/file/sql/binlog	MANY	MANY	MANY	MANY
+master-bin.index	wait/io/file/sql/binlog_index	NONE	NONE	NONE	NONE
+select
+EVENT_NAME,
+if (count_read > 0, "MANY", "NONE") as COUNT_READ,
+if (count_write > 0,"MANY", "NONE") as COUNT_WRITE,
+if (sum_number_of_bytes_read > 0, "MANY", "NONE") as SUM_NUMBER_OF_BYTES_READ,
+if (sum_number_of_bytes_write > 0, "MANY", "NONE") as SUM_NUMBER_OF_BYTES_WRITE
+from performance_schema.file_summary_by_event_name
 where event_name like "%binlog%" order by event_name;
 EVENT_NAME	COUNT_READ	COUNT_WRITE	SUM_NUMBER_OF_BYTES_READ	SUM_NUMBER_OF_BYTES_WRITE
-wait/io/file/sql/binlog	6	4	228	343
-wait/io/file/sql/binlog_index	2	0	0	0
-select event_name, count_star
+wait/io/file/sql/binlog	MANY	MANY	MANY	MANY
+wait/io/file/sql/binlog_index	MANY	NONE	NONE	NONE
+select
+EVENT_NAME,
+if (count_star > 0, "MANY", "NONE") as COUNT_STAR
 from performance_schema.events_waits_summary_global_by_event_name
 where event_name like "%MYSQL_BIN_LOG%" order by event_name;
-event_name	count_star
-wait/synch/cond/sql/MYSQL_BIN_LOG::COND_prep_xids	0
-wait/synch/cond/sql/MYSQL_BIN_LOG::update_cond	1
-wait/synch/mutex/sql/MYSQL_BIN_LOG::LOCK_index	4
-wait/synch/mutex/sql/MYSQL_BIN_LOG::LOCK_prep_xids	0
+EVENT_NAME	COUNT_STAR
+wait/synch/cond/sql/MYSQL_BIN_LOG::COND_prep_xids	NONE
+wait/synch/cond/sql/MYSQL_BIN_LOG::update_cond	MANY
+wait/synch/mutex/sql/MYSQL_BIN_LOG::LOCK_index	MANY
+wait/synch/mutex/sql/MYSQL_BIN_LOG::LOCK_prep_xids	NONE
 "Expect no slave relay log"
 select * from performance_schema.file_summary_by_instance
 where event_name like "%relaylog%" order by file_name;
@@ -54,49 +76,86 @@ wait/synch/mutex/sql/MYSQL_RELAY_LOG::LO
 select * from performance_schema.file_summary_by_instance
 where file_name like "%master-%" order by file_name;
 FILE_NAME	EVENT_NAME	COUNT_READ	COUNT_WRITE	SUM_NUMBER_OF_BYTES_READ	SUM_NUMBER_OF_BYTES_WRITE
-select * from performance_schema.file_summary_by_instance
+select
+substring(file_name, locate("slave-", file_name)) as FILE_NAME,
+EVENT_NAME,
+if (count_read > 0, "MANY", "NONE") as COUNT_READ,
+if (count_write > 0,"MANY", "NONE") as COUNT_WRITE,
+if (sum_number_of_bytes_read > 0, "MANY", "NONE") as SUM_NUMBER_OF_BYTES_READ,
+if (sum_number_of_bytes_write > 0, "MANY", "NONE") as SUM_NUMBER_OF_BYTES_WRITE
+from performance_schema.file_summary_by_instance
 where file_name like "%slave-%" order by file_name;
 FILE_NAME	EVENT_NAME	COUNT_READ	COUNT_WRITE	SUM_NUMBER_OF_BYTES_READ	SUM_NUMBER_OF_BYTES_WRITE
-[DATADIR]slave-bin.000001	wait/io/file/sql/binlog	3	8	616	652
-[DATADIR]slave-bin.index	wait/io/file/sql/binlog_index	0	0	0	0
-[DATADIR]slave-relay-bin.000001	wait/io/file/sql/relaylog	4	3	391	277
-[DATADIR]slave-relay-bin.000002	wait/io/file/sql/relaylog	2	4	382	382
-[DATADIR]slave-relay-bin.index	wait/io/file/sql/binlog_index	0	0	0	0
+slave-bin.000001	wait/io/file/sql/binlog	MANY	MANY	MANY	MANY
+slave-bin.index	wait/io/file/sql/binlog_index	NONE	NONE	NONE	NONE
+slave-relay-bin.000001	wait/io/file/sql/relaylog	MANY	MANY	MANY	MANY
+slave-relay-bin.000002	wait/io/file/sql/relaylog	MANY	MANY	MANY	MANY
+slave-relay-bin.index	wait/io/file/sql/binlog_index	NONE	NONE	NONE	NONE
 "Expect a slave binlog + binlog_index"
-select * from performance_schema.file_summary_by_instance
+select
+substring(file_name, locate("slave-", file_name)) as FILE_NAME,
+EVENT_NAME,
+if (count_read > 0, "MANY", "NONE") as COUNT_READ,
+if (count_write > 0,"MANY", "NONE") as COUNT_WRITE,
+if (sum_number_of_bytes_read > 0, "MANY", "NONE") as SUM_NUMBER_OF_BYTES_READ,
+if (sum_number_of_bytes_write > 0, "MANY", "NONE") as SUM_NUMBER_OF_BYTES_WRITE
+from performance_schema.file_summary_by_instance
 where event_name like "%binlog%" order by file_name;
 FILE_NAME	EVENT_NAME	COUNT_READ	COUNT_WRITE	SUM_NUMBER_OF_BYTES_READ	SUM_NUMBER_OF_BYTES_WRITE
-[DATADIR]slave-bin.000001	wait/io/file/sql/binlog	3	8	616	652
-[DATADIR]slave-bin.index	wait/io/file/sql/binlog_index	0	0	0	0
-[DATADIR]slave-relay-bin.index	wait/io/file/sql/binlog_index	0	0	0	0
-select * from performance_schema.file_summary_by_event_name
+slave-bin.000001	wait/io/file/sql/binlog	MANY	MANY	MANY	MANY
+slave-bin.index	wait/io/file/sql/binlog_index	NONE	NONE	NONE	NONE
+slave-relay-bin.index	wait/io/file/sql/binlog_index	NONE	NONE	NONE	NONE
+select
+EVENT_NAME,
+if (count_read > 0, "MANY", "NONE") as COUNT_READ,
+if (count_write > 0,"MANY", "NONE") as COUNT_WRITE,
+if (sum_number_of_bytes_read > 0, "MANY", "NONE") as SUM_NUMBER_OF_BYTES_READ,
+if (sum_number_of_bytes_write > 0, "MANY", "NONE") as SUM_NUMBER_OF_BYTES_WRITE
+from performance_schema.file_summary_by_event_name
 where event_name like "%binlog%" order by event_name;
 EVENT_NAME	COUNT_READ	COUNT_WRITE	SUM_NUMBER_OF_BYTES_READ	SUM_NUMBER_OF_BYTES_WRITE
-wait/io/file/sql/binlog	3	8	616	652
-wait/io/file/sql/binlog_index	8	0	75	0
-select event_name, count_star
+wait/io/file/sql/binlog	MANY	MANY	MANY	MANY
+wait/io/file/sql/binlog_index	MANY	NONE	MANY	NONE
+select
+EVENT_NAME,
+if (count_star > 0, "MANY", "NONE") as COUNT_STAR
 from performance_schema.events_waits_summary_global_by_event_name
 where event_name like "%MYSQL_BIN_LOG%" order by event_name;
-event_name	count_star
-wait/synch/cond/sql/MYSQL_BIN_LOG::COND_prep_xids	0
-wait/synch/cond/sql/MYSQL_BIN_LOG::update_cond	0
-wait/synch/mutex/sql/MYSQL_BIN_LOG::LOCK_index	6
-wait/synch/mutex/sql/MYSQL_BIN_LOG::LOCK_prep_xids	0
+EVENT_NAME	COUNT_STAR
+wait/synch/cond/sql/MYSQL_BIN_LOG::COND_prep_xids	NONE
+wait/synch/cond/sql/MYSQL_BIN_LOG::update_cond	NONE
+wait/synch/mutex/sql/MYSQL_BIN_LOG::LOCK_index	MANY
+wait/synch/mutex/sql/MYSQL_BIN_LOG::LOCK_prep_xids	NONE
 "Expect a slave relay log"
-select * from performance_schema.file_summary_by_instance
+select
+substring(file_name, locate("slave-", file_name)) as FILE_NAME,
+EVENT_NAME,
+if (count_read > 0, "MANY", "NONE") as COUNT_READ,
+if (count_write > 0,"MANY", "NONE") as COUNT_WRITE,
+if (sum_number_of_bytes_read > 0, "MANY", "NONE") as SUM_NUMBER_OF_BYTES_READ,
+if (sum_number_of_bytes_write > 0, "MANY", "NONE") as SUM_NUMBER_OF_BYTES_WRITE
+from performance_schema.file_summary_by_instance
 where event_name like "%relaylog%" order by file_name;
 FILE_NAME	EVENT_NAME	COUNT_READ	COUNT_WRITE	SUM_NUMBER_OF_BYTES_READ	SUM_NUMBER_OF_BYTES_WRITE
-[DATADIR]slave-relay-bin.000001	wait/io/file/sql/relaylog	4	3	391	277
-[DATADIR]slave-relay-bin.000002	wait/io/file/sql/relaylog	2	4	382	382
-select * from performance_schema.file_summary_by_event_name
+slave-relay-bin.000001	wait/io/file/sql/relaylog	MANY	MANY	MANY	MANY
+slave-relay-bin.000002	wait/io/file/sql/relaylog	MANY	MANY	MANY	MANY
+select
+EVENT_NAME,
+if (count_read > 0, "MANY", "NONE") as COUNT_READ,
+if (count_write > 0,"MANY", "NONE") as COUNT_WRITE,
+if (sum_number_of_bytes_read > 0, "MANY", "NONE") as SUM_NUMBER_OF_BYTES_READ,
+if (sum_number_of_bytes_write > 0, "MANY", "NONE") as SUM_NUMBER_OF_BYTES_WRITE
+from performance_schema.file_summary_by_event_name
 where event_name like "%relaylog%" order by event_name;
 EVENT_NAME	COUNT_READ	COUNT_WRITE	SUM_NUMBER_OF_BYTES_READ	SUM_NUMBER_OF_BYTES_WRITE
-wait/io/file/sql/relaylog	6	7	773	659
-wait/io/file/sql/relaylog_index	1	0	0	0
-select event_name, count_star
+wait/io/file/sql/relaylog	MANY	MANY	MANY	MANY
+wait/io/file/sql/relaylog_index	MANY	NONE	NONE	NONE
+select
+EVENT_NAME,
+if (count_star > 0, "MANY", "NONE") as COUNT_STAR
 from performance_schema.events_waits_summary_global_by_event_name
 where event_name like "%MYSQL_RELAY_LOG%" order by event_name;
-event_name	count_star
-wait/synch/cond/sql/MYSQL_RELAY_LOG::update_cond	2
-wait/synch/mutex/sql/MYSQL_RELAY_LOG::LOCK_index	13
+EVENT_NAME	COUNT_STAR
+wait/synch/cond/sql/MYSQL_RELAY_LOG::update_cond	MANY
+wait/synch/mutex/sql/MYSQL_RELAY_LOG::LOCK_index	MANY
 include/stop_slave.inc

=== modified file 'mysql-test/suite/perfschema/t/relaylog.test'
--- a/mysql-test/suite/perfschema/t/relaylog.test	2011-03-10 08:00:43 +0000
+++ b/mysql-test/suite/perfschema/t/relaylog.test	2011-03-10 12:02:28 +0000
@@ -34,32 +34,48 @@ drop table test.t1;
 connection master;
 -- echo "============ Performance schema on master ============"
 
-let $MYSQLD_DATADIR= `SELECT @@datadir`;
-
---replace_result $MYSQLD_DATADIR [DATADIR]
-select * from performance_schema.file_summary_by_instance
+select
+  substring(file_name, locate("master-", file_name)) as FILE_NAME,
+  EVENT_NAME,
+  if (count_read > 0, "MANY", "NONE") as COUNT_READ,
+  if (count_write > 0,"MANY", "NONE") as COUNT_WRITE,
+  if (sum_number_of_bytes_read > 0, "MANY", "NONE") as SUM_NUMBER_OF_BYTES_READ,
+  if (sum_number_of_bytes_write > 0, "MANY", "NONE") as SUM_NUMBER_OF_BYTES_WRITE
+  from performance_schema.file_summary_by_instance
   where file_name like "%master-%" order by file_name;
 
---replace_result $MYSQLD_DATADIR [DATADIR]
 select * from performance_schema.file_summary_by_instance
   where file_name like "%slave-%" order by file_name;
 
 -- echo "Expect a master binlog + binlog_index"
 
---replace_result $MYSQLD_DATADIR [DATADIR]
-select * from performance_schema.file_summary_by_instance
+select
+  substring(file_name, locate("master-", file_name)) as FILE_NAME,
+  EVENT_NAME,
+  if (count_read > 0, "MANY", "NONE") as COUNT_READ,
+  if (count_write > 0,"MANY", "NONE") as COUNT_WRITE,
+  if (sum_number_of_bytes_read > 0, "MANY", "NONE") as SUM_NUMBER_OF_BYTES_READ,
+  if (sum_number_of_bytes_write > 0, "MANY", "NONE") as SUM_NUMBER_OF_BYTES_WRITE
+  from performance_schema.file_summary_by_instance
   where event_name like "%binlog%" order by file_name;
 
-select * from performance_schema.file_summary_by_event_name
+select
+  EVENT_NAME,
+  if (count_read > 0, "MANY", "NONE") as COUNT_READ,
+  if (count_write > 0,"MANY", "NONE") as COUNT_WRITE,
+  if (sum_number_of_bytes_read > 0, "MANY", "NONE") as SUM_NUMBER_OF_BYTES_READ,
+  if (sum_number_of_bytes_write > 0, "MANY", "NONE") as SUM_NUMBER_OF_BYTES_WRITE
+  from performance_schema.file_summary_by_event_name
   where event_name like "%binlog%" order by event_name;
 
-select event_name, count_star
+select
+  EVENT_NAME,
+  if (count_star > 0, "MANY", "NONE") as COUNT_STAR
   from performance_schema.events_waits_summary_global_by_event_name
   where event_name like "%MYSQL_BIN_LOG%" order by event_name;
 
 -- echo "Expect no slave relay log"
 
---replace_result $MYSQLD_DATADIR [DATADIR]
 select * from performance_schema.file_summary_by_instance
   where event_name like "%relaylog%" order by file_name;
 
@@ -72,39 +88,70 @@ select * from performance_schema.events_
 sync_slave_with_master;
 -- echo "============ Performance schema on slave ============"
 
-let $MYSQLD_DATADIR= `SELECT @@datadir`;
-
---replace_result $MYSQLD_DATADIR [DATADIR]
 select * from performance_schema.file_summary_by_instance
   where file_name like "%master-%" order by file_name;
 
---replace_result $MYSQLD_DATADIR [DATADIR]
-select * from performance_schema.file_summary_by_instance
+select
+  substring(file_name, locate("slave-", file_name)) as FILE_NAME,
+  EVENT_NAME,
+  if (count_read > 0, "MANY", "NONE") as COUNT_READ,
+  if (count_write > 0,"MANY", "NONE") as COUNT_WRITE,
+  if (sum_number_of_bytes_read > 0, "MANY", "NONE") as SUM_NUMBER_OF_BYTES_READ,
+  if (sum_number_of_bytes_write > 0, "MANY", "NONE") as SUM_NUMBER_OF_BYTES_WRITE
+  from performance_schema.file_summary_by_instance
   where file_name like "%slave-%" order by file_name;
 
 -- echo "Expect a slave binlog + binlog_index"
 
---replace_result $MYSQLD_DATADIR [DATADIR]
-select * from performance_schema.file_summary_by_instance
+select
+  substring(file_name, locate("slave-", file_name)) as FILE_NAME,
+  EVENT_NAME,
+  if (count_read > 0, "MANY", "NONE") as COUNT_READ,
+  if (count_write > 0,"MANY", "NONE") as COUNT_WRITE,
+  if (sum_number_of_bytes_read > 0, "MANY", "NONE") as SUM_NUMBER_OF_BYTES_READ,
+  if (sum_number_of_bytes_write > 0, "MANY", "NONE") as SUM_NUMBER_OF_BYTES_WRITE
+  from performance_schema.file_summary_by_instance
   where event_name like "%binlog%" order by file_name;
 
-select * from performance_schema.file_summary_by_event_name
+select
+  EVENT_NAME,
+  if (count_read > 0, "MANY", "NONE") as COUNT_READ,
+  if (count_write > 0,"MANY", "NONE") as COUNT_WRITE,
+  if (sum_number_of_bytes_read > 0, "MANY", "NONE") as SUM_NUMBER_OF_BYTES_READ,
+  if (sum_number_of_bytes_write > 0, "MANY", "NONE") as SUM_NUMBER_OF_BYTES_WRITE
+  from performance_schema.file_summary_by_event_name
   where event_name like "%binlog%" order by event_name;
 
-select event_name, count_star
+select
+  EVENT_NAME,
+  if (count_star > 0, "MANY", "NONE") as COUNT_STAR
   from performance_schema.events_waits_summary_global_by_event_name
   where event_name like "%MYSQL_BIN_LOG%" order by event_name;
 
 -- echo "Expect a slave relay log"
 
---replace_result $MYSQLD_DATADIR [DATADIR]
-select * from performance_schema.file_summary_by_instance
+select
+  substring(file_name, locate("slave-", file_name)) as FILE_NAME,
+  EVENT_NAME,
+  if (count_read > 0, "MANY", "NONE") as COUNT_READ,
+  if (count_write > 0,"MANY", "NONE") as COUNT_WRITE,
+  if (sum_number_of_bytes_read > 0, "MANY", "NONE") as SUM_NUMBER_OF_BYTES_READ,
+  if (sum_number_of_bytes_write > 0, "MANY", "NONE") as SUM_NUMBER_OF_BYTES_WRITE
+  from performance_schema.file_summary_by_instance
   where event_name like "%relaylog%" order by file_name;
 
-select * from performance_schema.file_summary_by_event_name
+select
+  EVENT_NAME,
+  if (count_read > 0, "MANY", "NONE") as COUNT_READ,
+  if (count_write > 0,"MANY", "NONE") as COUNT_WRITE,
+  if (sum_number_of_bytes_read > 0, "MANY", "NONE") as SUM_NUMBER_OF_BYTES_READ,
+  if (sum_number_of_bytes_write > 0, "MANY", "NONE") as SUM_NUMBER_OF_BYTES_WRITE
+  from performance_schema.file_summary_by_event_name
   where event_name like "%relaylog%" order by event_name;
 
-select event_name, count_star
+select
+  EVENT_NAME,
+  if (count_star > 0, "MANY", "NONE") as COUNT_STAR
   from performance_schema.events_waits_summary_global_by_event_name
   where event_name like "%MYSQL_RELAY_LOG%" order by event_name;
 

No bundle (reason: revision is a merge).
Thread
bzr commit into mysql-trunk branch (marc.alff:3749) Marc Alff10 Mar