List:Commits« Previous MessageNext Message »
From:Marc Alff Date:May 20 2010 3:43pm
Subject:bzr commit into mysql-next-mr branch (marc.alff:3146) WL#4674
View as plain text  
#At file:///Users/malff/BZR_TREE/mysql-next-mr-wl4674/ based on revid:marc.alff@stripped

 3146 Marc Alff	2010-05-20
      WL#4674 PERFORMANCE SCHEMA SETUP_ACTORS
      
      Added test cases

    added:
      mysql-test/suite/perfschema/r/setup_actors.result
      mysql-test/suite/perfschema/r/start_server_no_setup_actors.result
      mysql-test/suite/perfschema/t/setup_actors.test
      mysql-test/suite/perfschema/t/start_server_no_setup_actors-master.opt
      mysql-test/suite/perfschema/t/start_server_no_setup_actors.test
    modified:
      mysql-test/suite/perfschema/t/disabled.def
=== added file 'mysql-test/suite/perfschema/r/setup_actors.result'
--- a/mysql-test/suite/perfschema/r/setup_actors.result	1970-01-01 00:00:00 +0000
+++ b/mysql-test/suite/perfschema/r/setup_actors.result	2010-05-20 15:43:53 +0000
@@ -0,0 +1,71 @@
+truncate table performance_schema.SETUP_ACTORS;
+insert into performance_schema.SETUP_ACTORS
+values ('hosta', 'user1', '%');
+insert into performance_schema.SETUP_ACTORS
+values ('%', 'user2', '%');
+insert into performance_schema.SETUP_ACTORS
+values ('localhost', 'user3', '%');
+insert into performance_schema.SETUP_ACTORS
+values ('hostb', '%', '%');
+select * from performance_schema.SETUP_ACTORS
+order by USER, HOST, ROLE;
+HOST	USER	ROLE
+hostb	%	%
+hosta	user1	%
+%	user2	%
+localhost	user3	%
+grant ALL on *.* to user1@localhost;
+grant ALL on *.* to user2@localhost;
+grant ALL on *.* to user3@localhost;
+grant ALL on *.* to user4@localhost;
+flush privileges;
+select NAME, TYPE, INSTRUMENTED, PROCESSLIST_USER, PROCESSLIST_HOST
+from performance_schema.THREADS
+where PROCESSLIST_ID=connection_id();
+NAME	TYPE	INSTRUMENTED	PROCESSLIST_USER	PROCESSLIST_HOST
+thread/sql/one_connection	FOREGROUND	NO	user1	localhost
+select NAME, TYPE, INSTRUMENTED, PROCESSLIST_USER, PROCESSLIST_HOST
+from performance_schema.THREADS
+where PROCESSLIST_ID=connection_id();
+NAME	TYPE	INSTRUMENTED	PROCESSLIST_USER	PROCESSLIST_HOST
+thread/sql/one_connection	FOREGROUND	YES	user2	localhost
+select NAME, TYPE, INSTRUMENTED, PROCESSLIST_USER, PROCESSLIST_HOST
+from performance_schema.THREADS
+where PROCESSLIST_ID=connection_id();
+NAME	TYPE	INSTRUMENTED	PROCESSLIST_USER	PROCESSLIST_HOST
+thread/sql/one_connection	FOREGROUND	YES	user3	localhost
+select NAME, TYPE, INSTRUMENTED, PROCESSLIST_USER, PROCESSLIST_HOST
+from performance_schema.THREADS
+where PROCESSLIST_ID=connection_id();
+NAME	TYPE	INSTRUMENTED	PROCESSLIST_USER	PROCESSLIST_HOST
+thread/sql/one_connection	FOREGROUND	NO	user4	localhost
+insert into performance_schema.SETUP_ACTORS
+values ('%', 'localhost', '%');
+select * from performance_schema.SETUP_ACTORS
+order by USER, HOST, ROLE;
+HOST	USER	ROLE
+hostb	%	%
+%	localhost	%
+hosta	user1	%
+%	user2	%
+localhost	user3	%
+select NAME, TYPE, INSTRUMENTED, PROCESSLIST_USER, PROCESSLIST_HOST
+from performance_schema.THREADS
+where PROCESSLIST_ID=connection_id();
+NAME	TYPE	INSTRUMENTED	PROCESSLIST_USER	PROCESSLIST_HOST
+thread/sql/one_connection	FOREGROUND	NO	user4	localhost
+revoke all privileges, grant option from user1@localhost;
+revoke all privileges, grant option from user2@localhost;
+revoke all privileges, grant option from user3@localhost;
+revoke all privileges, grant option from user4@localhost;
+drop user user1@localhost;
+drop user user2@localhost;
+drop user user3@localhost;
+drop user user4@localhost;
+flush privileges;
+truncate table performance_schema.SETUP_ACTORS;
+insert into performance_schema.SETUP_ACTORS
+values ('%', '%', '%');
+select * from performance_schema.SETUP_ACTORS;
+HOST	USER	ROLE
+%	%	%

=== added file 'mysql-test/suite/perfschema/r/start_server_no_setup_actors.result'
--- a/mysql-test/suite/perfschema/r/start_server_no_setup_actors.result	1970-01-01 00:00:00 +0000
+++ b/mysql-test/suite/perfschema/r/start_server_no_setup_actors.result	2010-05-20 15:43:53 +0000
@@ -0,0 +1,65 @@
+show databases;
+Database
+information_schema
+mtr
+mysql
+performance_schema
+test
+select count(*) from performance_schema.PERFORMANCE_TIMERS;
+count(*)
+5
+select count(*) from performance_schema.SETUP_CONSUMERS;
+count(*)
+8
+select count(*) > 0 from performance_schema.SETUP_INSTRUMENTS;
+count(*) > 0
+1
+select count(*) from performance_schema.SETUP_TIMERS;
+count(*)
+1
+select * from performance_schema.COND_INSTANCES;
+select * from performance_schema.EVENTS_WAITS_CURRENT;
+select * from performance_schema.EVENTS_WAITS_HISTORY;
+select * from performance_schema.EVENTS_WAITS_HISTORY_LONG;
+select * from performance_schema.EVENTS_WAITS_SUMMARY_BY_EVENT_NAME;
+select * from performance_schema.EVENTS_WAITS_SUMMARY_BY_INSTANCE;
+select * from performance_schema.EVENTS_WAITS_SUMMARY_BY_THREAD_BY_EVENT_NAME;
+select * from performance_schema.FILE_INSTANCES;
+select * from performance_schema.FILE_SUMMARY_BY_EVENT_NAME;
+select * from performance_schema.FILE_SUMMARY_BY_INSTANCE;
+select * from performance_schema.MUTEX_INSTANCES;
+select * from performance_schema.PERFORMANCE_TIMERS;
+select * from performance_schema.RWLOCK_INSTANCES;
+select * from performance_schema.SETUP_ACTORS;
+select * from performance_schema.SETUP_CONSUMERS;
+select * from performance_schema.SETUP_INSTRUMENTS;
+select * from performance_schema.SETUP_OBJECTS;
+select * from performance_schema.SETUP_TIMERS;
+select * from performance_schema.THREADS;
+show variables like "performance_schema%";
+Variable_name	Value
+performance_schema	ON
+performance_schema_events_waits_history_long_size	10000
+performance_schema_events_waits_history_size	10
+performance_schema_max_cond_classes	80
+performance_schema_max_cond_instances	1000
+performance_schema_max_file_classes	50
+performance_schema_max_file_handles	32768
+performance_schema_max_file_instances	10000
+performance_schema_max_mutex_classes	200
+performance_schema_max_mutex_instances	1000
+performance_schema_max_rwlock_classes	20
+performance_schema_max_rwlock_instances	1000
+performance_schema_max_table_handles	100000
+performance_schema_max_table_instances	50000
+performance_schema_max_thread_classes	50
+performance_schema_max_thread_instances	1000
+performance_schema_setup_actors_size	0
+show engine PERFORMANCE_SCHEMA status;
+show status like "performance_schema%";
+show variables like "performance_schema_setup_actors_size";
+Variable_name	Value
+performance_schema_setup_actors_size	0
+select count(*) from performance_schema.SETUP_ACTORS;
+count(*)
+0

=== modified file 'mysql-test/suite/perfschema/t/disabled.def'
--- a/mysql-test/suite/perfschema/t/disabled.def	2010-05-04 06:53:22 +0000
+++ b/mysql-test/suite/perfschema/t/disabled.def	2010-05-20 15:43:53 +0000
@@ -25,3 +25,5 @@
 #
 ##############################################################################
 
+pfs_upgrade : Waiting to merge WL#5291
+

=== added file 'mysql-test/suite/perfschema/t/setup_actors.test'
--- a/mysql-test/suite/perfschema/t/setup_actors.test	1970-01-01 00:00:00 +0000
+++ b/mysql-test/suite/perfschema/t/setup_actors.test	2010-05-20 15:43:53 +0000
@@ -0,0 +1,109 @@
+# Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; version 2 of the License.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+
+--source include/not_embedded.inc
+--source include/have_perfschema.inc
+
+truncate table performance_schema.SETUP_ACTORS;
+
+insert into performance_schema.SETUP_ACTORS
+  values ('hosta', 'user1', '%');
+
+insert into performance_schema.SETUP_ACTORS
+  values ('%', 'user2', '%');
+
+insert into performance_schema.SETUP_ACTORS
+  values ('localhost', 'user3', '%');
+
+insert into performance_schema.SETUP_ACTORS
+  values ('hostb', '%', '%');
+
+select * from performance_schema.SETUP_ACTORS
+  order by USER, HOST, ROLE;
+
+grant ALL on *.* to user1@localhost;
+grant ALL on *.* to user2@localhost;
+grant ALL on *.* to user3@localhost;
+grant ALL on *.* to user4@localhost;
+
+flush privileges;
+
+connect (con1, localhost, user1, , );
+
+select NAME, TYPE, INSTRUMENTED, PROCESSLIST_USER, PROCESSLIST_HOST
+  from performance_schema.THREADS
+  where PROCESSLIST_ID=connection_id();
+
+--disconnect con1
+
+connect (con2, localhost, user2, , );
+
+select NAME, TYPE, INSTRUMENTED, PROCESSLIST_USER, PROCESSLIST_HOST
+  from performance_schema.THREADS
+  where PROCESSLIST_ID=connection_id();
+
+--disconnect con2
+
+connect (con3, localhost, user3, , );
+
+select NAME, TYPE, INSTRUMENTED, PROCESSLIST_USER, PROCESSLIST_HOST
+  from performance_schema.THREADS
+  where PROCESSLIST_ID=connection_id();
+
+--disconnect con3
+
+connect (con4, localhost, user4, , );
+
+select NAME, TYPE, INSTRUMENTED, PROCESSLIST_USER, PROCESSLIST_HOST
+  from performance_schema.THREADS
+  where PROCESSLIST_ID=connection_id();
+
+--disconnect con4
+
+--connection default
+
+insert into performance_schema.SETUP_ACTORS
+  values ('%', 'localhost', '%');
+
+select * from performance_schema.SETUP_ACTORS
+  order by USER, HOST, ROLE;
+
+connect (con4b, localhost, user4, , );
+
+select NAME, TYPE, INSTRUMENTED, PROCESSLIST_USER, PROCESSLIST_HOST
+  from performance_schema.THREADS
+  where PROCESSLIST_ID=connection_id();
+
+--disconnect con4b
+
+--connection default
+
+revoke all privileges, grant option from user1@localhost;
+revoke all privileges, grant option from user2@localhost;
+revoke all privileges, grant option from user3@localhost;
+revoke all privileges, grant option from user4@localhost;
+drop user user1@localhost;
+drop user user2@localhost;
+drop user user3@localhost;
+drop user user4@localhost;
+flush privileges;
+
+truncate table performance_schema.SETUP_ACTORS;
+
+insert into performance_schema.SETUP_ACTORS
+  values ('%', '%', '%');
+
+select * from performance_schema.SETUP_ACTORS;
+

=== added file 'mysql-test/suite/perfschema/t/start_server_no_setup_actors-master.opt'
--- a/mysql-test/suite/perfschema/t/start_server_no_setup_actors-master.opt	1970-01-01 00:00:00 +0000
+++ b/mysql-test/suite/perfschema/t/start_server_no_setup_actors-master.opt	2010-05-20 15:43:53 +0000
@@ -0,0 +1,2 @@
+--loose-enable-performance-schema
+--loose-performance_schema_setup_actors_size=0

=== added file 'mysql-test/suite/perfschema/t/start_server_no_setup_actors.test'
--- a/mysql-test/suite/perfschema/t/start_server_no_setup_actors.test	1970-01-01 00:00:00 +0000
+++ b/mysql-test/suite/perfschema/t/start_server_no_setup_actors.test	2010-05-20 15:43:53 +0000
@@ -0,0 +1,28 @@
+# Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; version 2 of the License.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+
+# Tests for PERFORMANCE_SCHEMA
+
+--source include/not_embedded.inc
+--source include/have_perfschema.inc
+
+--source ../include/start_server_common.inc
+
+# Expect no setup_actors
+show variables like "performance_schema_setup_actors_size";
+
+# Expect no setup_actors
+select count(*) from performance_schema.SETUP_ACTORS;
+


Attachment: [text/bzr-bundle] bzr/marc.alff@oracle.com-20100520154353-rwgv4g16kqhon2cr.bundle
Thread
bzr commit into mysql-next-mr branch (marc.alff:3146) WL#4674Marc Alff20 May