From: Marc Alff Date: February 17 2011 6:00pm Subject: bzr push into mysql-trunk branch (marc.alff:3671 to 3672) List-Archive: http://lists.mysql.com/commits/131574 Message-Id: <201102171801.p1HI1eOj005860@rcsinet13.oracle.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit 3672 Marc Alff 2011-02-17 Cleanup for the performance schema test scripts: - formatting of *.opt files - improved the robustness of the table aggregation tests, to prevent spurious failures. modified: mysql-test/suite/perfschema/include/table_aggregate_load.inc mysql-test/suite/perfschema/include/table_aggregate_setup.inc mysql-test/suite/sys_vars/t/pfs_events_waits_history_long_size_basic-master.opt mysql-test/suite/sys_vars/t/pfs_events_waits_history_size_basic-master.opt mysql-test/suite/sys_vars/t/pfs_max_cond_classes_basic-master.opt mysql-test/suite/sys_vars/t/pfs_max_cond_instances_basic-master.opt mysql-test/suite/sys_vars/t/pfs_max_file_classes_basic-master.opt mysql-test/suite/sys_vars/t/pfs_max_file_handles_basic-master.opt mysql-test/suite/sys_vars/t/pfs_max_file_instances_basic-master.opt mysql-test/suite/sys_vars/t/pfs_max_mutex_classes_basic-master.opt mysql-test/suite/sys_vars/t/pfs_max_mutex_instances_basic-master.opt mysql-test/suite/sys_vars/t/pfs_max_rwlock_classes_basic-master.opt mysql-test/suite/sys_vars/t/pfs_max_rwlock_instances_basic-master.opt mysql-test/suite/sys_vars/t/pfs_max_table_handles_basic-master.opt mysql-test/suite/sys_vars/t/pfs_max_table_instances_basic-master.opt mysql-test/suite/sys_vars/t/pfs_max_thread_classes_basic-master.opt mysql-test/suite/sys_vars/t/pfs_max_thread_instances_basic-master.opt 3671 Tor Didriksen 2011-02-17 Post-push fix for Followup to Bug #11752069 modified: unittest/gunit/my_bitmap-t.cc === modified file 'mysql-test/suite/perfschema/include/table_aggregate_load.inc' --- a/mysql-test/suite/perfschema/include/table_aggregate_load.inc 2011-01-26 09:34:10 +0000 +++ b/mysql-test/suite/perfschema/include/table_aggregate_load.inc 2011-02-17 18:00:06 +0000 @@ -62,6 +62,13 @@ echo "================== con1 connected --connection default +# Wait for the connect to complete +let $wait_condition= + select count(*) = 1 from performance_schema.threads + where `TYPE`='FOREGROUND' and PROCESSLIST_USER + in ('user1', 'user2', 'user3', 'user4'); +--source include/wait_condition.inc + echo "================== Step 2 =================="; execute dump_thread; execute dump_global; @@ -118,6 +125,13 @@ echo "================== con2 connected --connection default +# Wait for the connect to complete +let $wait_condition= + select count(*) = 2 from performance_schema.threads + where `TYPE`='FOREGROUND' and PROCESSLIST_USER + in ('user1', 'user2', 'user3', 'user4'); +--source include/wait_condition.inc + echo "================== Step 4 =================="; execute dump_thread; execute dump_global; @@ -170,6 +184,13 @@ echo "================== con3 connected --connection default +# Wait for the connect to complete +let $wait_condition= + select count(*) = 3 from performance_schema.threads + where `TYPE`='FOREGROUND' and PROCESSLIST_USER + in ('user1', 'user2', 'user3', 'user4'); +--source include/wait_condition.inc + echo "================== Step 6 =================="; execute dump_thread; execute dump_global; @@ -222,6 +243,13 @@ echo "================== con4 connected --connection default +# Wait for the connect to complete +let $wait_condition= + select count(*) = 4 from performance_schema.threads + where `TYPE`='FOREGROUND' and PROCESSLIST_USER + in ('user1', 'user2', 'user3', 'user4'); +--source include/wait_condition.inc + echo "================== Step 8 =================="; execute dump_thread; execute dump_global; @@ -322,7 +350,8 @@ execute dump_objects_summary; # Wait for the disconnect to complete let $wait_condition= select count(*) = 3 from performance_schema.threads - where `TYPE`='FOREGROUND' and PROCESSLIST_USER like 'user%'; + where `TYPE`='FOREGROUND' and PROCESSLIST_USER + in ('user1', 'user2', 'user3', 'user4'); --source include/wait_condition.inc echo "================== con1 disconnected =================="; @@ -341,7 +370,8 @@ execute dump_objects_summary; # Wait for the disconnect to complete let $wait_condition= select count(*) = 2 from performance_schema.threads - where `TYPE`='FOREGROUND' and PROCESSLIST_USER like 'user%'; + where `TYPE`='FOREGROUND' and PROCESSLIST_USER + in ('user1', 'user2', 'user3', 'user4'); --source include/wait_condition.inc echo "================== con2 disconnected =================="; @@ -360,7 +390,8 @@ execute dump_objects_summary; # Wait for the disconnect to complete let $wait_condition= select count(*) = 1 from performance_schema.threads - where `TYPE`='FOREGROUND' and PROCESSLIST_USER like 'user%'; + where `TYPE`='FOREGROUND' and PROCESSLIST_USER + in ('user1', 'user2', 'user3', 'user4'); --source include/wait_condition.inc echo "================== con3 disconnected =================="; @@ -379,7 +410,8 @@ execute dump_objects_summary; # Wait for the disconnect to complete let $wait_condition= select count(*) = 0 from performance_schema.threads - where `TYPE`='FOREGROUND' and PROCESSLIST_USER like 'user%'; + where `TYPE`='FOREGROUND' and PROCESSLIST_USER + in ('user1', 'user2', 'user3', 'user4'); --source include/wait_condition.inc echo "================== con4 disconnected =================="; === modified file 'mysql-test/suite/perfschema/include/table_aggregate_setup.inc' --- a/mysql-test/suite/perfschema/include/table_aggregate_setup.inc 2011-02-16 14:38:29 +0000 +++ b/mysql-test/suite/perfschema/include/table_aggregate_setup.inc 2011-02-17 18:00:06 +0000 @@ -143,6 +143,14 @@ create table test.t1(a int, b int, c int create table test.t2 like test.t1; create table test.t3 like test.t1; +# +# Note: +# For test robustness and to avoid picking up noise from other tests scripts, +# it is better to use: +# in ('t1', 't2', 't3) +# explicitly instead of: +# like 't%' + prepare dump_thread from "select event_name, count_star from performance_schema.events_waits_summary_by_thread_by_event_name @@ -151,7 +159,7 @@ prepare dump_thread from \'wait/lock/table/sql/handler\') and thread_id in (select thread_id from performance_schema.threads - where processlist_user like \'user%\') + where processlist_user in (\'user1\', \'user2\', \'user3\', \'user4\')) order by thread_id, event_name;"; prepare dump_global from @@ -176,7 +184,8 @@ prepare dump_index_io from count_star, count_read, count_write, count_fetch, count_insert, count_update, count_delete from performance_schema.table_io_waits_summary_by_index_usage - where object_type='TABLE' and object_schema='test' and object_name like 't%' + where object_type='TABLE' and object_schema='test' + and object_name in ('t1', 't2', 't3') order by object_type, object_schema, object_name, index_name;"; prepare dump_table_io from @@ -184,7 +193,8 @@ prepare dump_table_io from count_star, count_read, count_write, count_fetch, count_insert, count_update, count_delete from performance_schema.table_io_waits_summary_by_table - where object_type='TABLE' and object_schema='test' and object_name like 't%' + where object_type='TABLE' and object_schema='test' + and object_name in ('t1', 't2', 't3') order by object_type, object_schema, object_name"; prepare dump_table_lock from @@ -196,13 +206,15 @@ prepare dump_table_lock from count_write_delayed, count_write_low_priority, count_write_external from performance_schema.table_lock_waits_summary_by_table - where object_type='TABLE' and object_schema='test' and object_name like 't%' + where object_type='TABLE' and object_schema='test' + and object_name in ('t1', 't2', 't3') order by object_type, object_schema, object_name"; prepare dump_objects_summary from "select object_type, object_schema, object_name, count_star from performance_schema.objects_summary_global_by_type - where object_type='TABLE' and object_schema='test' and object_name like 't%' + where object_type='TABLE' and object_schema='test' + and object_name in ('t1', 't2', 't3') order by object_type, object_schema, object_name"; --enable_query_log === modified file 'mysql-test/suite/sys_vars/t/pfs_events_waits_history_long_size_basic-master.opt' --- a/mysql-test/suite/sys_vars/t/pfs_events_waits_history_long_size_basic-master.opt 2010-01-07 05:42:07 +0000 +++ b/mysql-test/suite/sys_vars/t/pfs_events_waits_history_long_size_basic-master.opt 2011-02-17 18:00:06 +0000 @@ -1 +1,2 @@ ---loose-enable-performance-schema --loose-performance-schema-events-waits-history-long-size=15000 +--loose-enable-performance-schema +--loose-performance-schema-events-waits-history-long-size=15000 === modified file 'mysql-test/suite/sys_vars/t/pfs_events_waits_history_size_basic-master.opt' --- a/mysql-test/suite/sys_vars/t/pfs_events_waits_history_size_basic-master.opt 2010-01-07 05:42:07 +0000 +++ b/mysql-test/suite/sys_vars/t/pfs_events_waits_history_size_basic-master.opt 2011-02-17 18:00:06 +0000 @@ -1 +1,2 @@ ---loose-enable-performance-schema --loose-performance-schema-events-waits-history-size=15 +--loose-enable-performance-schema +--loose-performance-schema-events-waits-history-size=15 === modified file 'mysql-test/suite/sys_vars/t/pfs_max_cond_classes_basic-master.opt' --- a/mysql-test/suite/sys_vars/t/pfs_max_cond_classes_basic-master.opt 2010-01-07 05:42:07 +0000 +++ b/mysql-test/suite/sys_vars/t/pfs_max_cond_classes_basic-master.opt 2011-02-17 18:00:06 +0000 @@ -1 +1,2 @@ ---loose-enable-performance-schema --loose-performance-schema-max-cond-classes=123 +--loose-enable-performance-schema +--loose-performance-schema-max-cond-classes=123 === modified file 'mysql-test/suite/sys_vars/t/pfs_max_cond_instances_basic-master.opt' --- a/mysql-test/suite/sys_vars/t/pfs_max_cond_instances_basic-master.opt 2010-01-07 05:42:07 +0000 +++ b/mysql-test/suite/sys_vars/t/pfs_max_cond_instances_basic-master.opt 2011-02-17 18:00:06 +0000 @@ -1 +1,2 @@ ---loose-enable-performance-schema --loose-performance-schema-max-cond-instances=123 +--loose-enable-performance-schema +--loose-performance-schema-max-cond-instances=123 === modified file 'mysql-test/suite/sys_vars/t/pfs_max_file_classes_basic-master.opt' --- a/mysql-test/suite/sys_vars/t/pfs_max_file_classes_basic-master.opt 2010-01-07 05:42:07 +0000 +++ b/mysql-test/suite/sys_vars/t/pfs_max_file_classes_basic-master.opt 2011-02-17 18:00:06 +0000 @@ -1 +1,2 @@ ---loose-enable-performance-schema --loose-performance-schema-max-file-classes=123 +--loose-enable-performance-schema +--loose-performance-schema-max-file-classes=123 === modified file 'mysql-test/suite/sys_vars/t/pfs_max_file_handles_basic-master.opt' --- a/mysql-test/suite/sys_vars/t/pfs_max_file_handles_basic-master.opt 2010-01-07 05:42:07 +0000 +++ b/mysql-test/suite/sys_vars/t/pfs_max_file_handles_basic-master.opt 2011-02-17 18:00:06 +0000 @@ -1 +1,2 @@ ---loose-enable-performance-schema --loose-performance-schema-max-file-handles=123 +--loose-enable-performance-schema +--loose-performance-schema-max-file-handles=123 === modified file 'mysql-test/suite/sys_vars/t/pfs_max_file_instances_basic-master.opt' --- a/mysql-test/suite/sys_vars/t/pfs_max_file_instances_basic-master.opt 2010-01-07 05:42:07 +0000 +++ b/mysql-test/suite/sys_vars/t/pfs_max_file_instances_basic-master.opt 2011-02-17 18:00:06 +0000 @@ -1 +1,2 @@ ---loose-enable-performance-schema --loose-performance-schema-max-file-instances=123 +--loose-enable-performance-schema +--loose-performance-schema-max-file-instances=123 === modified file 'mysql-test/suite/sys_vars/t/pfs_max_mutex_classes_basic-master.opt' --- a/mysql-test/suite/sys_vars/t/pfs_max_mutex_classes_basic-master.opt 2010-01-07 05:42:07 +0000 +++ b/mysql-test/suite/sys_vars/t/pfs_max_mutex_classes_basic-master.opt 2011-02-17 18:00:06 +0000 @@ -1 +1,2 @@ ---loose-enable-performance-schema --loose-performance-schema-max-mutex-classes=123 +--loose-enable-performance-schema +--loose-performance-schema-max-mutex-classes=123 === modified file 'mysql-test/suite/sys_vars/t/pfs_max_mutex_instances_basic-master.opt' --- a/mysql-test/suite/sys_vars/t/pfs_max_mutex_instances_basic-master.opt 2010-01-07 05:42:07 +0000 +++ b/mysql-test/suite/sys_vars/t/pfs_max_mutex_instances_basic-master.opt 2011-02-17 18:00:06 +0000 @@ -1 +1,2 @@ ---loose-enable-performance-schema --loose-performance-schema-max-mutex-instances=123 +--loose-enable-performance-schema +--loose-performance-schema-max-mutex-instances=123 === modified file 'mysql-test/suite/sys_vars/t/pfs_max_rwlock_classes_basic-master.opt' --- a/mysql-test/suite/sys_vars/t/pfs_max_rwlock_classes_basic-master.opt 2010-01-07 05:42:07 +0000 +++ b/mysql-test/suite/sys_vars/t/pfs_max_rwlock_classes_basic-master.opt 2011-02-17 18:00:06 +0000 @@ -1 +1,2 @@ ---loose-enable-performance-schema --loose-performance-schema-max-rwlock-classes=123 +--loose-enable-performance-schema +--loose-performance-schema-max-rwlock-classes=123 === modified file 'mysql-test/suite/sys_vars/t/pfs_max_rwlock_instances_basic-master.opt' --- a/mysql-test/suite/sys_vars/t/pfs_max_rwlock_instances_basic-master.opt 2010-01-07 05:42:07 +0000 +++ b/mysql-test/suite/sys_vars/t/pfs_max_rwlock_instances_basic-master.opt 2011-02-17 18:00:06 +0000 @@ -1 +1,2 @@ ---loose-enable-performance-schema --loose-performance-schema-max-rwlock-instances=123 +--loose-enable-performance-schema +--loose-performance-schema-max-rwlock-instances=123 === modified file 'mysql-test/suite/sys_vars/t/pfs_max_table_handles_basic-master.opt' --- a/mysql-test/suite/sys_vars/t/pfs_max_table_handles_basic-master.opt 2010-01-07 05:42:07 +0000 +++ b/mysql-test/suite/sys_vars/t/pfs_max_table_handles_basic-master.opt 2011-02-17 18:00:06 +0000 @@ -1 +1,2 @@ ---loose-enable-performance-schema --loose-performance-schema-max-table-handles=123 +--loose-enable-performance-schema +--loose-performance-schema-max-table-handles=123 === modified file 'mysql-test/suite/sys_vars/t/pfs_max_table_instances_basic-master.opt' --- a/mysql-test/suite/sys_vars/t/pfs_max_table_instances_basic-master.opt 2010-01-07 05:42:07 +0000 +++ b/mysql-test/suite/sys_vars/t/pfs_max_table_instances_basic-master.opt 2011-02-17 18:00:06 +0000 @@ -1 +1,2 @@ ---loose-enable-performance-schema --loose-performance-schema-max-table-instances=123 +--loose-enable-performance-schema +--loose-performance-schema-max-table-instances=123 === modified file 'mysql-test/suite/sys_vars/t/pfs_max_thread_classes_basic-master.opt' --- a/mysql-test/suite/sys_vars/t/pfs_max_thread_classes_basic-master.opt 2010-01-07 05:42:07 +0000 +++ b/mysql-test/suite/sys_vars/t/pfs_max_thread_classes_basic-master.opt 2011-02-17 18:00:06 +0000 @@ -1 +1,2 @@ ---loose-enable-performance-schema --loose-performance-schema-max-thread-classes=123 +--loose-enable-performance-schema +--loose-performance-schema-max-thread-classes=123 === modified file 'mysql-test/suite/sys_vars/t/pfs_max_thread_instances_basic-master.opt' --- a/mysql-test/suite/sys_vars/t/pfs_max_thread_instances_basic-master.opt 2010-01-07 05:42:07 +0000 +++ b/mysql-test/suite/sys_vars/t/pfs_max_thread_instances_basic-master.opt 2011-02-17 18:00:06 +0000 @@ -1 +1,2 @@ ---loose-enable-performance-schema --loose-performance-schema-max-thread-instances=123 +--loose-enable-performance-schema +--loose-performance-schema-max-thread-instances=123 No bundle (reason: useless for push emails).