From: Marc Alff Date: December 2 2010 4:39pm Subject: bzr push into mysql-trunk-bugfixing branch (marc.alff:3409 to 3410) WL#4816 List-Archive: http://lists.mysql.com/commits/125831 Message-Id: <201012021640.oB26MVqE026158@acsinet15.oracle.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit 3410 Marc Alff 2010-12-02 Merge cleanup, reconciled: - WL#4816 PERFORMANCE SCHEMA SUMMARIES - performance schema bug fixes within mysql-trunk-bugfixing added: mysql-test/suite/perfschema/t/thread_cache-master.opt modified: mysql-test/suite/perfschema/t/thread_cache.test storage/perfschema/pfs_instr.cc storage/perfschema/table_setup_objects.cc 3409 Marc Alff 2010-12-02 [merge] Merge mysql-trunk (WL#4816) --> mysql-trunk-bugfixing removed: Doxyfile-wl4895 mysql-test/suite/perfschema/r/schema.result added: Doxyfile-perfschema mysql-test/suite/perfschema/r/ddl_os_global_by_type.result mysql-test/suite/perfschema/r/ddl_setup_objects.result mysql-test/suite/perfschema/r/dml_os_global_by_type.result mysql-test/suite/perfschema/r/dml_setup_objects.result mysql-test/suite/perfschema/r/setup_objects.result mysql-test/suite/perfschema/r/start_server_no_setup_objects.result mysql-test/suite/perfschema/t/ddl_os_global_by_type.test mysql-test/suite/perfschema/t/ddl_setup_objects.test mysql-test/suite/perfschema/t/dml_os_global_by_type.test mysql-test/suite/perfschema/t/dml_setup_objects.test mysql-test/suite/perfschema/t/setup_objects.test mysql-test/suite/perfschema/t/start_server_no_setup_objects-master.opt mysql-test/suite/perfschema/t/start_server_no_setup_objects.test mysql-test/suite/sys_vars/r/pfs_setup_objects_size_basic.result mysql-test/suite/sys_vars/t/pfs_setup_objects_size_basic-master.opt mysql-test/suite/sys_vars/t/pfs_setup_objects_size_basic.test storage/perfschema/pfs_setup_object.cc storage/perfschema/pfs_setup_object.h storage/perfschema/table_ews_by_thread_by_event_name.cc storage/perfschema/table_ews_by_thread_by_event_name.h storage/perfschema/table_helper.cc storage/perfschema/table_os_global_by_type.cc storage/perfschema/table_os_global_by_type.h storage/perfschema/table_setup_objects.cc storage/perfschema/table_setup_objects.h storage/perfschema/unittest/stub_pfs_defaults.h storage/perfschema/unittest/stub_server_misc.h renamed: storage/perfschema/unittest/stub_server_misc.h => storage/perfschema/unittest/stub_server_misc.h.moved modified: .bzrignore mysql-test/r/mysqld--help-notwin.result mysql-test/r/mysqld--help-win.result mysql-test/suite/perfschema/include/schema.inc mysql-test/suite/perfschema/include/start_server_common.inc mysql-test/suite/perfschema/r/dml_setup_consumers.result mysql-test/suite/perfschema/r/information_schema.result mysql-test/suite/perfschema/r/pfs_upgrade_lc0.result mysql-test/suite/perfschema/r/pfs_upgrade_lc1.result mysql-test/suite/perfschema/r/pfs_upgrade_lc2.result mysql-test/suite/perfschema/r/privilege_table_io.result mysql-test/suite/perfschema/r/schema_lc0.result mysql-test/suite/perfschema/r/schema_lc1.result mysql-test/suite/perfschema/r/schema_lc2.result mysql-test/suite/perfschema/r/start_server_no_cond_class.result mysql-test/suite/perfschema/r/start_server_no_cond_inst.result mysql-test/suite/perfschema/r/start_server_no_file_class.result mysql-test/suite/perfschema/r/start_server_no_file_inst.result mysql-test/suite/perfschema/r/start_server_no_mutex_class.result mysql-test/suite/perfschema/r/start_server_no_mutex_inst.result mysql-test/suite/perfschema/r/start_server_no_rwlock_class.result mysql-test/suite/perfschema/r/start_server_no_rwlock_inst.result mysql-test/suite/perfschema/r/start_server_no_setup_actors.result mysql-test/suite/perfschema/r/start_server_no_table_hdl.result mysql-test/suite/perfschema/r/start_server_no_table_inst.result mysql-test/suite/perfschema/r/start_server_no_thread_class.result mysql-test/suite/perfschema/r/start_server_no_thread_inst.result mysql-test/suite/perfschema/r/start_server_nothing.result mysql-test/suite/perfschema/r/start_server_off.result mysql-test/suite/perfschema/r/start_server_on.result mysql-test/suite/perfschema_stress/r/modify.result mysql-test/suite/perfschema_stress/r/read.result mysql-test/suite/perfschema_stress/t/modify.test mysql-test/suite/perfschema_stress/t/read.test mysql-test/suite/perfschema_stress/t/setup.test scripts/mysql_system_tables.sql sql/sys_vars.cc storage/perfschema/CMakeLists.txt storage/perfschema/pfs.cc storage/perfschema/pfs_defaults.cc storage/perfschema/pfs_engine_table.cc storage/perfschema/pfs_events_waits.cc storage/perfschema/pfs_events_waits.h storage/perfschema/pfs_instr.cc storage/perfschema/pfs_instr.h storage/perfschema/pfs_instr_class.cc storage/perfschema/pfs_instr_class.h storage/perfschema/pfs_server.cc storage/perfschema/pfs_server.h storage/perfschema/pfs_stat.h storage/perfschema/pfs_timer.cc storage/perfschema/pfs_timer.h storage/perfschema/table_all_instr.cc storage/perfschema/table_all_instr.h storage/perfschema/table_events_waits.cc storage/perfschema/table_events_waits.h storage/perfschema/table_events_waits_summary.cc storage/perfschema/table_events_waits_summary.h storage/perfschema/table_ews_global_by_event_name.cc storage/perfschema/table_ews_global_by_event_name.h storage/perfschema/table_file_summary.cc storage/perfschema/table_file_summary.h storage/perfschema/table_helper.h storage/perfschema/table_setup_consumers.cc storage/perfschema/table_setup_instruments.cc storage/perfschema/unittest/pfs-t.cc storage/perfschema/unittest/pfs_instr-oom-t.cc storage/perfschema/unittest/pfs_instr-t.cc storage/perfschema/unittest/pfs_instr_class-t.cc === added file 'mysql-test/suite/perfschema/t/thread_cache-master.opt' --- a/mysql-test/suite/perfschema/t/thread_cache-master.opt 1970-01-01 00:00:00 +0000 +++ b/mysql-test/suite/perfschema/t/thread_cache-master.opt 2010-12-02 16:38:55 +0000 @@ -0,0 +1 @@ +--loose-performance_schema_max_thread_class=200 === modified file 'mysql-test/suite/perfschema/t/thread_cache.test' --- a/mysql-test/suite/perfschema/t/thread_cache.test 2010-12-01 18:46:51 +0000 +++ b/mysql-test/suite/perfschema/t/thread_cache.test 2010-12-02 16:38:55 +0000 @@ -18,6 +18,12 @@ --source include/not_embedded.inc --source include/have_perfschema.inc +# +# Important note: +# this test is extremely sensitive to how threads are running inside the server, +# so it has it's own -master.opt file, to enforce it runs alone in mysqld +# + # Setup flush status; @@ -58,6 +64,10 @@ select @thread_id_increment; --connection default +# Debug +# select * from performance_schema.threads +# where name like "thread/sql/one_connection"; + # Wait for the disconnect con2 to complete let $wait_condition= select count(*) = 2 from performance_schema.threads @@ -76,6 +86,10 @@ let $con3_THREAD_ID=`select thread_id fr --connection default +# Debug +# select * from performance_schema.threads +# where name like "thread/sql/one_connection"; + # Wait for the disconnect con1 and con3 to complete let $wait_condition= select count(*) = 1 from performance_schema.threads @@ -122,6 +136,10 @@ select @thread_id_increment; --connection default +# Debug +# select * from performance_schema.threads +# where name like "thread/sql/one_connection"; + # Wait for the disconnect con2 to complete let $wait_condition= select count(*) = 2 from performance_schema.threads @@ -140,6 +158,10 @@ let $con3_THREAD_ID=`select thread_id fr --connection default +# Debug +# select * from performance_schema.threads +# where name like "thread/sql/one_connection"; + # Wait for the disconnect con1 and con3 to complete let $wait_condition= select count(*) = 1 from performance_schema.threads === modified file 'storage/perfschema/pfs_instr.cc' --- a/storage/perfschema/pfs_instr.cc 2010-12-02 15:05:07 +0000 +++ b/storage/perfschema/pfs_instr.cc 2010-12-02 16:38:55 +0000 @@ -686,26 +686,17 @@ PFS_thread* create_thread(PFS_thread_cla PFS_mutex *sanitize_mutex(PFS_mutex *unsafe) { - if ((&mutex_array[0] <= unsafe) && - (unsafe < &mutex_array[mutex_max])) - return unsafe; - return NULL; + SANITIZE_ARRAY_BODY(PFS_mutex, mutex_array, mutex_max, unsafe); } PFS_rwlock *sanitize_rwlock(PFS_rwlock *unsafe) { - if ((&rwlock_array[0] <= unsafe) && - (unsafe < &rwlock_array[rwlock_max])) - return unsafe; - return NULL; + SANITIZE_ARRAY_BODY(PFS_rwlock, rwlock_array, rwlock_max, unsafe); } PFS_cond *sanitize_cond(PFS_cond *unsafe) { - if ((&cond_array[0] <= unsafe) && - (unsafe < &cond_array[cond_max])) - return unsafe; - return NULL; + SANITIZE_ARRAY_BODY(PFS_cond, cond_array, cond_max, unsafe); } /** @@ -744,10 +735,7 @@ const char *sanitize_file_name(const cha PFS_file *sanitize_file(PFS_file *unsafe) { - if ((&file_array[0] <= unsafe) && - (unsafe < &file_array[file_max])) - return unsafe; - return NULL; + SANITIZE_ARRAY_BODY(PFS_file, file_array, file_max, unsafe); } /** === modified file 'storage/perfschema/table_setup_objects.cc' --- a/storage/perfschema/table_setup_objects.cc 2010-11-15 07:40:07 +0000 +++ b/storage/perfschema/table_setup_objects.cc 2010-12-02 16:38:55 +0000 @@ -297,7 +297,6 @@ int table_setup_objects::update_row_valu case 0: /* OBJECT_TYPE */ case 1: /* OBJECT_SCHEMA */ case 2: /* OBJECT_NAME */ - my_error(ER_WRONG_PERFSCHEMA_USAGE, MYF(0)); return HA_ERR_WRONG_COMMAND; #if 0 case 3: /* ENABLED */ No bundle (reason: useless for push emails).