From: Christopher Powers Date: January 6 2012 4:29pm Subject: bzr push into mysql-trunk branch (chris.powers:3709 to 3710) Bug#12790483 List-Archive: http://lists.mysql.com/commits/142330 X-Bug: 12790483 Message-Id: <201201061630.q06GUi2U000878@acsmt358.oracle.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit 3710 Christopher Powers 2012-01-06 Bug#12790483 - OBJECTS_SUMMARY_GLOBAL_BY_TYPE AND RENAME TABLE Further updates to perfschema.misc.test to verify PFS table shares. modified: mysql-test/suite/perfschema/r/misc.result mysql-test/suite/perfschema/t/misc.test 3709 Christopher Powers 2012-01-06 [merge] local merge modified: include/mysql/psi/mysql_socket.h include/mysql/psi/mysql_table.h include/mysql/psi/mysql_thread.h include/mysql/psi/psi.h include/mysql/psi/psi_abi_v0.h.pp include/mysql/psi/psi_abi_v1.h.pp include/mysql/psi/psi_abi_v2.h.pp mysql-test/include/show_slave_status.inc mysql-test/suite/binlog/r/binlog_stm_unsafe_warning.result mysql-test/suite/binlog/t/binlog_stm_unsafe_warning.test mysql-test/suite/engines/funcs/r/tc_rename_error.result mysql-test/suite/rpl/r/rpl_log_pos.result mysql-test/suite/rpl/r/rpl_manual_change_index_file.result mysql-test/suite/rpl/t/rpl_log_pos.test mysql-test/suite/rpl/t/rpl_manual_change_index_file.test mysys/psi_noop.c sql/handler.cc storage/innobase/include/os0sync.ic storage/innobase/include/sync0rw.ic storage/innobase/include/sync0sync.ic storage/perfschema/pfs.cc storage/perfschema/pfs_instr.cc storage/perfschema/pfs_instr.h storage/perfschema/pfs_instr_class.cc storage/perfschema/pfs_server.cc storage/perfschema/pfs_stat.h storage/perfschema/table_events_waits.cc storage/perfschema/unittest/pfs-t.cc === modified file 'mysql-test/suite/perfschema/r/misc.result' --- a/mysql-test/suite/perfschema/r/misc.result 2012-01-04 18:29:43 +0000 +++ b/mysql-test/suite/perfschema/r/misc.result 2012-01-06 15:54:45 +0000 @@ -19,6 +19,21 @@ DROP TABLE test.t_after; SELECT object_schema, object_name FROM performance_schema.objects_summary_global_by_type WHERE object_schema='test'; object_schema object_name +CREATE TABLE test.t1(a INT); +INSERT INTO test.t1 VALUES (1); +CREATE VIEW test.v1 AS SELECT * FROM test.t1; +SELECT COUNT(*) FROM test.v1; +COUNT(*) +1 +SELECT object_schema, object_name FROM performance_schema.objects_summary_global_by_type +WHERE object_schema='test'; +object_schema object_name +test t1 +DROP VIEW test.v1; +DROP TABLE test.t1; +SELECT object_schema, object_name FROM performance_schema.objects_summary_global_by_type +WHERE object_schema='test'; +object_schema object_name SELECT EVENT_ID FROM performance_schema.events_waits_current WHERE THREAD_ID IN (SELECT THREAD_ID FROM performance_schema.threads) === modified file 'mysql-test/suite/perfschema/t/misc.test' --- a/mysql-test/suite/perfschema/t/misc.test 2012-01-04 18:29:43 +0000 +++ b/mysql-test/suite/perfschema/t/misc.test 2012-01-06 15:54:45 +0000 @@ -39,6 +39,26 @@ SELECT object_schema, object_name FROM p WHERE object_schema='test'; # +# Verify table views are ignored by the table io instrumentation. +# + +CREATE TABLE test.t1(a INT); +INSERT INTO test.t1 VALUES (1); +CREATE VIEW test.v1 AS SELECT * FROM test.t1; +SELECT COUNT(*) FROM test.v1; + +# Verify that a PFS table share was not created for the view. +SELECT object_schema, object_name FROM performance_schema.objects_summary_global_by_type + WHERE object_schema='test'; + +DROP VIEW test.v1; +DROP TABLE test.t1; + +SELECT object_schema, object_name FROM performance_schema.objects_summary_global_by_type + WHERE object_schema='test'; + + +# # Bug#45496 Performance schema: assertion fails in # ha_perfschema::rnd_init:223 # === modified file 'storage/perfschema/pfs.cc' --- a/storage/perfschema/pfs.cc 2012-01-06 09:03:53 +0000 +++ b/storage/perfschema/pfs.cc 2012-01-06 15:25:14 +0000 @@ -1479,8 +1479,8 @@ static void destroy_cond_v1(PSI_cond* co static PSI_table_share* get_table_share_v1(my_bool temporary, TABLE_SHARE *share) { - /* Ignore temporary tables. */ - if (temporary) + /* Ignore temporary tables and views. */ + if (temporary || share->is_view) return NULL; /* An instrumented thread is required, for LF_PINS. */ PFS_thread *pfs_thread= my_pthread_getspecific_ptr(PFS_thread*, THR_PFS); No bundle (reason: useless for push emails).