List:Commits« Previous MessageNext Message »
From:Alfranio Correia Date:May 17 2011 8:09pm
Subject:bzr push into mysql-trunk-wl4832 branch (alfranio.correia:3082 to 3084)
View as plain text  
 3084 Alfranio Correia	2011-05-17 [merge]
      merge mysql-trunk --> mysql-trunk-wl4832

    removed:
      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/schema_lc0.result
      mysql-test/suite/perfschema/r/schema_lc1.result
      mysql-test/suite/perfschema/r/schema_lc2.result
      mysql-test/suite/perfschema/t/pfs_upgrade_lc0.test
      mysql-test/suite/perfschema/t/pfs_upgrade_lc1.test
      mysql-test/suite/perfschema/t/pfs_upgrade_lc2.test
      mysql-test/suite/perfschema/t/schema_lc0.test
      mysql-test/suite/perfschema/t/schema_lc1.test
      mysql-test/suite/perfschema/t/schema_lc2.test
    added:
      mysql-test/r/implicit_char_to_num_conversion.result
      mysql-test/suite/perfschema/r/pfs_upgrade.result
      mysql-test/suite/perfschema/r/schema.result
      mysql-test/suite/perfschema/t/pfs_upgrade.test
      mysql-test/suite/perfschema/t/schema.test
      mysql-test/t/implicit_char_to_num_conversion.test
    modified:
      .bzrignore
      mysql-test/collections/default.experimental
      mysql-test/r/having.result
      mysql-test/suite/rpl/r/rpl_begin_commit_rollback.result
      mysql-test/suite/rpl/t/rpl_begin_commit_rollback.test
      mysql-test/t/having.test
      mysys/lf_alloc-pin.c
      mysys/thr_alarm.c
      packaging/WiX/ca/CMakeLists.txt
      packaging/WiX/create_msi.cmake.in
      packaging/WiX/custom_ui.wxs
      sql/binlog.h
      sql/ha_partition.cc
      sql/ha_partition.h
      sql/handler.cc
      sql/item_xmlfunc.cc
      sql/item_xmlfunc.h
      sql/log_event.cc
      sql/mysqld.cc
      sql/mysqld.h
      sql/rpl_info_file.cc
      sql/rpl_injector.cc
      sql/rpl_injector.h
      sql/rpl_master.cc
      sql/rpl_rli.cc
      sql/rpl_rli.h
      sql/rpl_slave.cc
      sql/sql_acl.cc
      sql/sql_partition.h
      sql/sql_select.cc
      sql/transaction.cc
      storage/innobase/handler/i_s.cc
      storage/perfschema/pfs.cc
      storage/perfschema/pfs_instr_class.cc
      storage/perfschema/pfs_instr_class.h
      storage/perfschema/pfs_setup_object.h
      storage/perfschema/table_setup_instruments.cc
      storage/perfschema/table_setup_instruments.h
      strings/decimal.c
      unittest/mysys/lf-t.c
 3083 Alfranio Correia	2011-05-17
      Fixed recover routine in the context of WL#4832.
      
      The previous routine was considering a transaction as valid after
      reading the next begin event or reaching the end of the log. However,
      if the next begin was invalid the previous and valid transaction was
      removed from the binary log.
      
      We fixed the code by considering a transaction as valid when its
      commit is read and is valid.

    modified:
      sql/binlog.cc
 3082 Alfranio Correia	2011-05-13 [merge]
      merge mysql-trunk --> mysql-trunk-wl4832

    added:
      unittest/gunit/opt_range-t.cc
      unittest/gunit/test_utils.cc
      unittest/gunit/test_utils.h
    modified:
      CMakeLists.txt
      unittest/gunit/CMakeLists.txt
      unittest/gunit/item-t.cc
=== modified file '.bzrignore'
--- a/.bzrignore	2011-05-11 12:47:11 +0000
+++ b/.bzrignore	2011-05-16 08:52:10 +0000
@@ -3159,3 +3159,4 @@ VERSION.dep
 info_macros.cmake
 Docs/INFO_BIN
 Docs/INFO_SRC
+Testing

=== modified file 'mysql-test/collections/default.experimental'
--- a/mysql-test/collections/default.experimental	2011-05-09 17:44:44 +0000
+++ b/mysql-test/collections/default.experimental	2011-05-16 18:46:22 +0000
@@ -37,7 +37,7 @@ sys_vars.wait_timeout_func
 sys_vars.ndb_log_update_as_write_basic
 sys_vars.have_ndbcluster_basic
 sys_vars.ndb_log_updated_only_basic
-sys_vars.rpl_init_slave_func # Bug#12535301 2011-05-09 andrei sys_vars.rpl_init_slave_func mismatches in daily-5.5
+sys_vars.rpl_init_slave_func		 # Bug#12535301 2011-05-09 andrei sys_vars.rpl_init_slave_func mismatches in daily-5.5
 
 rpl_bhs.*                                # skozlov : WL#5139 - rpl_bhs suite generated "on-the-fly" at testing moment from rpl suite
 main.gis-rtree                           # svoj: due to BUG#38965

=== modified file 'mysql-test/r/having.result'
--- a/mysql-test/r/having.result	2011-04-22 08:05:02 +0000
+++ b/mysql-test/r/having.result	2011-05-16 11:01:28 +0000
@@ -589,3 +589,27 @@ pk	field1
 1	7
 drop table `t1`;
 End of 5.5 tests
+#
+# Bug#12402590 ASSERT AT PROTOCOL::END_STATEMENT ON MYSQL-TRUNK
+#              RUNNING RQG_OPT_SUBQUERY TEST
+#
+CREATE TABLE t2 (
+f1 INT,
+PRIMARY KEY (f1)
+);
+INSERT INTO t2 VALUES (1), (2);
+CREATE TABLE t1 (
+f1 INT,
+f2 VARCHAR(1),
+f3 VARCHAR(1),
+PRIMARY KEY (f1),
+KEY (f2, f1)
+);
+INSERT INTO t1 VALUES (8, 'g', 'g'), (11, 'a', 'a');
+SELECT t1.f1 FROM t1 JOIN t2 ON t2.f1 = t1.f1
+WHERE t1.f3 AND t1.f2 IN ('f')
+HAVING (1 ,6) IN (SELECT 3, 6)
+ORDER BY t1.f1;
+f1
+DROP TABLE t1, t2;
+End of 5.6 tests

=== added file 'mysql-test/r/implicit_char_to_num_conversion.result'
--- a/mysql-test/r/implicit_char_to_num_conversion.result	1970-01-01 00:00:00 +0000
+++ b/mysql-test/r/implicit_char_to_num_conversion.result	2011-05-14 16:14:49 +0000
@@ -0,0 +1,366 @@
+DROP TABLE IF EXISTS t5;
+CREATE TABLE t5(c1  BIT(2) PRIMARY KEY) ENGINE = <default_engine>;
+INSERT INTO t5 VALUES (0), (1), (2);
+SELECT HEX(c1) FROM t5 ORDER BY c1;
+HEX(c1)
+0
+1
+2
+SELECT HEX(c1) FROM t5 WHERE c1 = b'1' ORDER BY c1;
+HEX(c1)
+1
+SELECT HEX(c1) FROM t5 WHERE c1 <=> b'1' ORDER BY c1;
+HEX(c1)
+1
+SELECT HEX(c1) FROM t5 WHERE c1 != b'1' ORDER BY c1;
+HEX(c1)
+0
+2
+SELECT HEX(c1) FROM t5 WHERE c1 >= '1' ORDER BY c1;
+HEX(c1)
+1
+2
+SELECT HEX(c1) FROM t5 WHERE c1 <= '1' ORDER BY c1;
+HEX(c1)
+0
+1
+SELECT HEX(c1) FROM t5 WHERE c1 < '1' ORDER BY c1;
+HEX(c1)
+0
+SELECT HEX(c1) FROM t5 WHERE c1 > '0' ORDER BY c1;
+HEX(c1)
+1
+2
+DROP TABLE t5;
+CREATE TABLE t5(c1 FLOAT(5,2) PRIMARY KEY) ENGINE = <default_engine>;
+INSERT INTO t5 VALUES (95.95), (-10.10), (1), (0);
+SELECT c1 FROM t5 ORDER BY c1;
+c1
+-10.10
+0.00
+1.00
+95.95
+SELECT c1 FROM t5 WHERE c1 >= '95' ORDER BY c1;
+c1
+95.95
+SELECT c1 FROM t5 WHERE c1 <= '10.10' ORDER BY c1;
+c1
+-10.10
+0.00
+1.00
+SELECT c1 FROM t5 WHERE c1 != '1' ORDER BY c1;
+c1
+-10.10
+0.00
+95.95
+SELECT c1 FROM t5 WHERE c1 < '1' ORDER BY c1;
+c1
+-10.10
+0.00
+SELECT c1 FROM t5 WHERE c1 > '0' ORDER BY c1;
+c1
+1.00
+95.95
+DROP TABLE t5;
+CREATE TABLE t5(c1 TINYINT PRIMARY KEY) ENGINE = <default_engine>;
+INSERT INTO t5 VALUES (95), (10),(11),(-8);
+SELECT c1 FROM t5 ORDER BY c1;
+c1
+-8
+10
+11
+95
+SELECT c1 FROM t5 WHERE c1 = '10' ORDER BY c1;
+c1
+10
+SELECT c1 FROM t5 WHERE c1 <=> '10' ORDER BY c1;
+c1
+10
+SELECT c1 FROM t5 WHERE c1 >= '95' ORDER BY c1;
+c1
+95
+SELECT c1 FROM t5 WHERE c1 <= '11' ORDER BY c1;
+c1
+-8
+10
+11
+SELECT c1 FROM t5 WHERE c1 != '-8' ORDER BY c1;
+c1
+10
+11
+95
+SELECT c1 FROM t5 WHERE c1 < '11' ORDER BY c1;
+c1
+-8
+10
+SELECT c1 FROM t5 WHERE c1 > '10' ORDER BY c1;
+c1
+11
+95
+DROP TABLE t5;
+CREATE TABLE t5(c1 SMALLINT PRIMARY KEY) ENGINE = <default_engine>;
+INSERT INTO t5 VALUES (395), (-200), (100), (111);
+SELECT c1 FROM t5 ORDER BY c1;
+c1
+-200
+100
+111
+395
+SELECT c1 FROM t5 WHERE c1 = '100' ORDER BY c1;
+c1
+100
+SELECT c1 FROM t5 WHERE c1 <=> '100' ORDER BY c1;
+c1
+100
+SELECT c1 FROM t5 WHERE c1 >= '395' ORDER BY c1;
+c1
+395
+SELECT c1 FROM t5 WHERE c1 <= '-200' ORDER BY c1;
+c1
+-200
+SELECT c1 FROM t5 WHERE c1 != '100' ORDER BY c1;
+c1
+-200
+111
+395
+SELECT c1 FROM t5 WHERE c1 < '111' ORDER BY c1;
+c1
+-200
+100
+SELECT c1 FROM t5 WHERE c1 > '111' ORDER BY c1;
+c1
+395
+DROP TABLE t5;
+CREATE TABLE t5(c1 MEDIUMINT PRIMARY KEY) ENGINE = <default_engine>;
+INSERT INTO t5 VALUES (-8388607), (311),(215),(88608);
+SELECT c1 FROM t5 ORDER BY c1;
+c1
+-8388607
+215
+311
+88608
+SELECT c1 FROM t5 WHERE c1 = '311' ORDER BY c1;
+c1
+311
+SELECT c1 FROM t5 WHERE c1 <=> '311' ORDER BY c1;
+c1
+311
+SELECT c1 FROM t5 WHERE c1 >= '215' ORDER BY c1;
+c1
+215
+311
+88608
+SELECT c1 FROM t5 WHERE c1 <= '88608' ORDER BY c1;
+c1
+-8388607
+215
+311
+88608
+SELECT c1 FROM t5 WHERE c1 != '-8388607' ORDER BY c1;
+c1
+215
+311
+88608
+SELECT c1 FROM t5 WHERE c1 < '215' ORDER BY c1;
+c1
+-8388607
+SELECT c1 FROM t5 WHERE c1 > '215' ORDER BY c1;
+c1
+311
+88608
+DROP TABLE t5;
+CREATE TABLE t5(c1 INT PRIMARY KEY) ENGINE = <default_engine>;
+INSERT INTO t5 VALUES (-2147483647), (1011),(15),(9388607);
+SELECT c1 FROM t5 ORDER BY c1;
+c1
+-2147483647
+15
+1011
+9388607
+SELECT c1 FROM t5 WHERE c1 = '9388607' ORDER BY c1;
+c1
+9388607
+SELECT c1 FROM t5 WHERE c1 <=> '9388607' ORDER BY c1;
+c1
+9388607
+SELECT c1 FROM t5 WHERE c1 >= '15' ORDER BY c1;
+c1
+15
+1011
+9388607
+SELECT c1 FROM t5 WHERE c1 <= '1011' ORDER BY c1;
+c1
+-2147483647
+15
+1011
+SELECT c1 FROM t5 WHERE c1 != '-2147483647' ORDER BY c1;
+c1
+15
+1011
+9388607
+SELECT c1 FROM t5 WHERE c1 < '15' ORDER BY c1;
+c1
+-2147483647
+SELECT c1 FROM t5 WHERE c1 > '15' ORDER BY c1;
+c1
+1011
+9388607
+DROP TABLE t5;
+CREATE TABLE t5(c1 BIGINT PRIMARY KEY) ENGINE = <default_engine>;
+INSERT INTO t5 VALUES (-9223372036854775807), (12011),(500),(3372036854775808);
+SELECT c1 FROM t5 ORDER BY c1;
+c1
+-9223372036854775807
+500
+12011
+3372036854775808
+SELECT c1 FROM t5 WHERE c1 = '-9223372036854775807' ORDER BY c1;
+c1
+-9223372036854775807
+SELECT c1 FROM t5 WHERE c1 <=> '-9223372036854775807' ORDER BY c1;
+c1
+-9223372036854775807
+SELECT c1 FROM t5 WHERE c1 >= '12011' ORDER BY c1;
+c1
+12011
+3372036854775808
+SELECT c1 FROM t5 WHERE c1 <= '500' ORDER BY c1;
+c1
+-9223372036854775807
+500
+SELECT c1 FROM t5 WHERE c1 != '3372036854775808' ORDER BY c1;
+c1
+-9223372036854775807
+500
+12011
+SELECT c1 FROM t5 WHERE c1 < '12011' ORDER BY c1;
+c1
+-9223372036854775807
+500
+SELECT c1 FROM t5 WHERE c1 > '12011' ORDER BY c1;
+c1
+3372036854775808
+DROP TABLE t5;
+CREATE TABLE t5(c1 DOUBLE(5,2) PRIMARY KEY) ENGINE = <default_engine>;
+INSERT INTO t5 VALUES (95.95), (11.11),(5),(-908.92);
+SELECT c1 FROM t5 ORDER BY c1;
+c1
+-908.92
+5.00
+11.11
+95.95
+SELECT c1 FROM t5 WHERE c1 = '11.11' ORDER BY c1;
+c1
+11.11
+SELECT c1 FROM t5 WHERE c1 <=> '11.11' ORDER BY c1;
+c1
+11.11
+SELECT c1 FROM t5 WHERE c1 >= '5' ORDER BY c1;
+c1
+5.00
+11.11
+95.95
+SELECT c1 FROM t5 WHERE c1 <= '95.95' ORDER BY c1;
+c1
+-908.92
+5.00
+11.11
+95.95
+SELECT c1 FROM t5 WHERE c1 != '-908.92' ORDER BY c1;
+c1
+5.00
+11.11
+95.95
+SELECT c1 FROM t5 WHERE c1 < '95.95' ORDER BY c1;
+c1
+-908.92
+5.00
+11.11
+SELECT c1 FROM t5 WHERE c1 > '-908.92' ORDER BY c1;
+c1
+5.00
+11.11
+95.95
+DROP TABLE t5;
+CREATE TABLE t5(c1 NUMERIC(5,2) PRIMARY KEY) ENGINE = <default_engine>;
+INSERT INTO t5 VALUES (95.95), (11.11),(5),(-908.92);
+SELECT c1 FROM t5 ORDER BY c1;
+c1
+-908.92
+5.00
+11.11
+95.95
+SELECT c1 FROM t5 WHERE c1 = '11.11' ORDER BY c1;
+c1
+11.11
+SELECT c1 FROM t5 WHERE c1 <=> '11.11' ORDER BY c1;
+c1
+11.11
+SELECT c1 FROM t5 WHERE c1 >= '5' ORDER BY c1;
+c1
+5.00
+11.11
+95.95
+SELECT c1 FROM t5 WHERE c1 <= '95.95' ORDER BY c1;
+c1
+-908.92
+5.00
+11.11
+95.95
+SELECT c1 FROM t5 WHERE c1 != '-908.92' ORDER BY c1;
+c1
+5.00
+11.11
+95.95
+SELECT c1 FROM t5 WHERE c1 < '95.95' ORDER BY c1;
+c1
+-908.92
+5.00
+11.11
+SELECT c1 FROM t5 WHERE c1 > '-908.92' ORDER BY c1;
+c1
+5.00
+11.11
+95.95
+DROP TABLE t5;
+CREATE TABLE t5(c1 DECIMAL(5,2)  PRIMARY KEY) ENGINE = <default_engine>;
+INSERT INTO t5 VALUES (95.95), (11.11),(5),(-908.92);
+SELECT c1 FROM t5 ORDER BY c1;
+c1
+-908.92
+5.00
+11.11
+95.95
+SELECT c1 FROM t5 WHERE c1 = '11.11' ORDER BY c1;
+c1
+11.11
+SELECT c1 FROM t5 WHERE c1 <=> '11.11' ORDER BY c1;
+c1
+11.11
+SELECT c1 FROM t5 WHERE c1 >= '5' ORDER BY c1;
+c1
+5.00
+11.11
+95.95
+SELECT c1 FROM t5 WHERE c1 <= '95.95' ORDER BY c1;
+c1
+-908.92
+5.00
+11.11
+95.95
+SELECT c1 FROM t5 WHERE c1 != '-908.92' ORDER BY c1;
+c1
+5.00
+11.11
+95.95
+SELECT c1 FROM t5 WHERE c1 < '95.95' ORDER BY c1;
+c1
+-908.92
+5.00
+11.11
+SELECT c1 FROM t5 WHERE c1 > '-908.92' ORDER BY c1;
+c1
+5.00
+11.11
+95.95
+DROP TABLE t5;

=== added file 'mysql-test/suite/perfschema/r/pfs_upgrade.result'
--- a/mysql-test/suite/perfschema/r/pfs_upgrade.result	1970-01-01 00:00:00 +0000
+++ b/mysql-test/suite/perfschema/r/pfs_upgrade.result	2011-05-17 09:15:47 +0000
@@ -0,0 +1,228 @@
+drop table if exists test.user_table;
+drop procedure if exists test.user_proc;
+drop function if exists test.user_func;
+drop event if exists test.user_event;
+"Testing mysql_upgrade with TABLE performance_schema.user_table"
+create table test.user_table(a int);
+use performance_schema;
+show tables like "user_table";
+Tables_in_performance_schema (user_table)
+user_table
+ERROR 1050 (42S01) at line 70: Table 'cond_instances' already exists
+ERROR 1050 (42S01) at line 94: Table 'events_waits_current' already exists
+ERROR 1050 (42S01) at line 118: Table 'events_waits_history' already exists
+ERROR 1050 (42S01) at line 142: Table 'events_waits_history_long' already exists
+ERROR 1050 (42S01) at line 155: Table 'events_waits_summary_by_instance' already exists
+ERROR 1050 (42S01) at line 168: Table 'events_waits_summary_by_thread_by_event_name' already exists
+ERROR 1050 (42S01) at line 180: Table 'events_waits_summary_global_by_event_name' already exists
+ERROR 1050 (42S01) at line 189: Table 'file_instances' already exists
+ERROR 1050 (42S01) at line 200: Table 'file_summary_by_event_name' already exists
+ERROR 1050 (42S01) at line 212: Table 'file_summary_by_instance' already exists
+ERROR 1050 (42S01) at line 221: Table 'mutex_instances' already exists
+ERROR 1050 (42S01) at line 235: Table 'objects_summary_global_by_type' already exists
+ERROR 1050 (42S01) at line 245: Table 'performance_timers' already exists
+ERROR 1050 (42S01) at line 255: Table 'rwlock_instances' already exists
+ERROR 1050 (42S01) at line 264: Table 'setup_actors' already exists
+ERROR 1050 (42S01) at line 272: Table 'setup_consumers' already exists
+ERROR 1050 (42S01) at line 281: Table 'setup_instruments' already exists
+ERROR 1050 (42S01) at line 291: Table 'setup_objects' already exists
+ERROR 1050 (42S01) at line 299: Table 'setup_timers' already exists
+ERROR 1050 (42S01) at line 344: Table 'table_io_waits_summary_by_index_usage' already exists
+ERROR 1050 (42S01) at line 388: Table 'table_io_waits_summary_by_table' already exists
+ERROR 1050 (42S01) at line 467: Table 'table_lock_waits_summary_by_table' already exists
+ERROR 1050 (42S01) at line 487: Table 'threads' already exists
+ERROR 1050 (42S01) at line 502: Table 'events_stages_current' already exists
+ERROR 1050 (42S01) at line 517: Table 'events_stages_history' already exists
+ERROR 1050 (42S01) at line 532: Table 'events_stages_history_long' already exists
+ERROR 1050 (42S01) at line 545: Table 'events_stages_summary_by_thread_by_event_name' already exists
+ERROR 1050 (42S01) at line 557: Table 'events_stages_summary_global_by_event_name' already exists
+ERROR 1050 (42S01) at line 600: Table 'events_statements_current' already exists
+ERROR 1050 (42S01) at line 643: Table 'events_statements_history' already exists
+ERROR 1050 (42S01) at line 686: Table 'events_statements_history_long' already exists
+ERROR 1050 (42S01) at line 718: Table 'events_statements_summary_by_thread_by_event_name' already exists
+ERROR 1050 (42S01) at line 749: Table 'events_statements_summary_global_by_event_name' already exists
+ERROR 1644 (HY000) at line 1169: Unexpected content found in the performance_schema database.
+FATAL ERROR: Upgrade failed
+show tables like "user_table";
+Tables_in_performance_schema (user_table)
+user_table
+use test;
+drop table test.user_table;
+"Testing mysql_upgrade with VIEW performance_schema.user_view"
+create view test.user_view as select "Not supposed to be here";
+use performance_schema;
+show tables like "user_view";
+Tables_in_performance_schema (user_view)
+user_view
+ERROR 1050 (42S01) at line 70: Table 'cond_instances' already exists
+ERROR 1050 (42S01) at line 94: Table 'events_waits_current' already exists
+ERROR 1050 (42S01) at line 118: Table 'events_waits_history' already exists
+ERROR 1050 (42S01) at line 142: Table 'events_waits_history_long' already exists
+ERROR 1050 (42S01) at line 155: Table 'events_waits_summary_by_instance' already exists
+ERROR 1050 (42S01) at line 168: Table 'events_waits_summary_by_thread_by_event_name' already exists
+ERROR 1050 (42S01) at line 180: Table 'events_waits_summary_global_by_event_name' already exists
+ERROR 1050 (42S01) at line 189: Table 'file_instances' already exists
+ERROR 1050 (42S01) at line 200: Table 'file_summary_by_event_name' already exists
+ERROR 1050 (42S01) at line 212: Table 'file_summary_by_instance' already exists
+ERROR 1050 (42S01) at line 221: Table 'mutex_instances' already exists
+ERROR 1050 (42S01) at line 235: Table 'objects_summary_global_by_type' already exists
+ERROR 1050 (42S01) at line 245: Table 'performance_timers' already exists
+ERROR 1050 (42S01) at line 255: Table 'rwlock_instances' already exists
+ERROR 1050 (42S01) at line 264: Table 'setup_actors' already exists
+ERROR 1050 (42S01) at line 272: Table 'setup_consumers' already exists
+ERROR 1050 (42S01) at line 281: Table 'setup_instruments' already exists
+ERROR 1050 (42S01) at line 291: Table 'setup_objects' already exists
+ERROR 1050 (42S01) at line 299: Table 'setup_timers' already exists
+ERROR 1050 (42S01) at line 344: Table 'table_io_waits_summary_by_index_usage' already exists
+ERROR 1050 (42S01) at line 388: Table 'table_io_waits_summary_by_table' already exists
+ERROR 1050 (42S01) at line 467: Table 'table_lock_waits_summary_by_table' already exists
+ERROR 1050 (42S01) at line 487: Table 'threads' already exists
+ERROR 1050 (42S01) at line 502: Table 'events_stages_current' already exists
+ERROR 1050 (42S01) at line 517: Table 'events_stages_history' already exists
+ERROR 1050 (42S01) at line 532: Table 'events_stages_history_long' already exists
+ERROR 1050 (42S01) at line 545: Table 'events_stages_summary_by_thread_by_event_name' already exists
+ERROR 1050 (42S01) at line 557: Table 'events_stages_summary_global_by_event_name' already exists
+ERROR 1050 (42S01) at line 600: Table 'events_statements_current' already exists
+ERROR 1050 (42S01) at line 643: Table 'events_statements_history' already exists
+ERROR 1050 (42S01) at line 686: Table 'events_statements_history_long' already exists
+ERROR 1050 (42S01) at line 718: Table 'events_statements_summary_by_thread_by_event_name' already exists
+ERROR 1050 (42S01) at line 749: Table 'events_statements_summary_global_by_event_name' already exists
+ERROR 1644 (HY000) at line 1169: Unexpected content found in the performance_schema database.
+FATAL ERROR: Upgrade failed
+show tables like "user_view";
+Tables_in_performance_schema (user_view)
+user_view
+use test;
+drop view test.user_view;
+"Testing mysql_upgrade with PROCEDURE performance_schema.user_proc"
+create procedure test.user_proc()
+select "Not supposed to be here";
+update mysql.proc set db='performance_schema' where name='user_proc';
+ERROR 1050 (42S01) at line 70: Table 'cond_instances' already exists
+ERROR 1050 (42S01) at line 94: Table 'events_waits_current' already exists
+ERROR 1050 (42S01) at line 118: Table 'events_waits_history' already exists
+ERROR 1050 (42S01) at line 142: Table 'events_waits_history_long' already exists
+ERROR 1050 (42S01) at line 155: Table 'events_waits_summary_by_instance' already exists
+ERROR 1050 (42S01) at line 168: Table 'events_waits_summary_by_thread_by_event_name' already exists
+ERROR 1050 (42S01) at line 180: Table 'events_waits_summary_global_by_event_name' already exists
+ERROR 1050 (42S01) at line 189: Table 'file_instances' already exists
+ERROR 1050 (42S01) at line 200: Table 'file_summary_by_event_name' already exists
+ERROR 1050 (42S01) at line 212: Table 'file_summary_by_instance' already exists
+ERROR 1050 (42S01) at line 221: Table 'mutex_instances' already exists
+ERROR 1050 (42S01) at line 235: Table 'objects_summary_global_by_type' already exists
+ERROR 1050 (42S01) at line 245: Table 'performance_timers' already exists
+ERROR 1050 (42S01) at line 255: Table 'rwlock_instances' already exists
+ERROR 1050 (42S01) at line 264: Table 'setup_actors' already exists
+ERROR 1050 (42S01) at line 272: Table 'setup_consumers' already exists
+ERROR 1050 (42S01) at line 281: Table 'setup_instruments' already exists
+ERROR 1050 (42S01) at line 291: Table 'setup_objects' already exists
+ERROR 1050 (42S01) at line 299: Table 'setup_timers' already exists
+ERROR 1050 (42S01) at line 344: Table 'table_io_waits_summary_by_index_usage' already exists
+ERROR 1050 (42S01) at line 388: Table 'table_io_waits_summary_by_table' already exists
+ERROR 1050 (42S01) at line 467: Table 'table_lock_waits_summary_by_table' already exists
+ERROR 1050 (42S01) at line 487: Table 'threads' already exists
+ERROR 1050 (42S01) at line 502: Table 'events_stages_current' already exists
+ERROR 1050 (42S01) at line 517: Table 'events_stages_history' already exists
+ERROR 1050 (42S01) at line 532: Table 'events_stages_history_long' already exists
+ERROR 1050 (42S01) at line 545: Table 'events_stages_summary_by_thread_by_event_name' already exists
+ERROR 1050 (42S01) at line 557: Table 'events_stages_summary_global_by_event_name' already exists
+ERROR 1050 (42S01) at line 600: Table 'events_statements_current' already exists
+ERROR 1050 (42S01) at line 643: Table 'events_statements_history' already exists
+ERROR 1050 (42S01) at line 686: Table 'events_statements_history_long' already exists
+ERROR 1050 (42S01) at line 718: Table 'events_statements_summary_by_thread_by_event_name' already exists
+ERROR 1050 (42S01) at line 749: Table 'events_statements_summary_global_by_event_name' already exists
+ERROR 1644 (HY000) at line 1169: Unexpected content found in the performance_schema database.
+FATAL ERROR: Upgrade failed
+select name from mysql.proc where db='performance_schema';
+name
+user_proc
+update mysql.proc set db='test' where name='user_proc';
+drop procedure test.user_proc;
+"Testing mysql_upgrade with FUNCTION performance_schema.user_func"
+create function test.user_func() returns integer
+return 0;
+update mysql.proc set db='performance_schema' where name='user_func';
+ERROR 1050 (42S01) at line 70: Table 'cond_instances' already exists
+ERROR 1050 (42S01) at line 94: Table 'events_waits_current' already exists
+ERROR 1050 (42S01) at line 118: Table 'events_waits_history' already exists
+ERROR 1050 (42S01) at line 142: Table 'events_waits_history_long' already exists
+ERROR 1050 (42S01) at line 155: Table 'events_waits_summary_by_instance' already exists
+ERROR 1050 (42S01) at line 168: Table 'events_waits_summary_by_thread_by_event_name' already exists
+ERROR 1050 (42S01) at line 180: Table 'events_waits_summary_global_by_event_name' already exists
+ERROR 1050 (42S01) at line 189: Table 'file_instances' already exists
+ERROR 1050 (42S01) at line 200: Table 'file_summary_by_event_name' already exists
+ERROR 1050 (42S01) at line 212: Table 'file_summary_by_instance' already exists
+ERROR 1050 (42S01) at line 221: Table 'mutex_instances' already exists
+ERROR 1050 (42S01) at line 235: Table 'objects_summary_global_by_type' already exists
+ERROR 1050 (42S01) at line 245: Table 'performance_timers' already exists
+ERROR 1050 (42S01) at line 255: Table 'rwlock_instances' already exists
+ERROR 1050 (42S01) at line 264: Table 'setup_actors' already exists
+ERROR 1050 (42S01) at line 272: Table 'setup_consumers' already exists
+ERROR 1050 (42S01) at line 281: Table 'setup_instruments' already exists
+ERROR 1050 (42S01) at line 291: Table 'setup_objects' already exists
+ERROR 1050 (42S01) at line 299: Table 'setup_timers' already exists
+ERROR 1050 (42S01) at line 344: Table 'table_io_waits_summary_by_index_usage' already exists
+ERROR 1050 (42S01) at line 388: Table 'table_io_waits_summary_by_table' already exists
+ERROR 1050 (42S01) at line 467: Table 'table_lock_waits_summary_by_table' already exists
+ERROR 1050 (42S01) at line 487: Table 'threads' already exists
+ERROR 1050 (42S01) at line 502: Table 'events_stages_current' already exists
+ERROR 1050 (42S01) at line 517: Table 'events_stages_history' already exists
+ERROR 1050 (42S01) at line 532: Table 'events_stages_history_long' already exists
+ERROR 1050 (42S01) at line 545: Table 'events_stages_summary_by_thread_by_event_name' already exists
+ERROR 1050 (42S01) at line 557: Table 'events_stages_summary_global_by_event_name' already exists
+ERROR 1050 (42S01) at line 600: Table 'events_statements_current' already exists
+ERROR 1050 (42S01) at line 643: Table 'events_statements_history' already exists
+ERROR 1050 (42S01) at line 686: Table 'events_statements_history_long' already exists
+ERROR 1050 (42S01) at line 718: Table 'events_statements_summary_by_thread_by_event_name' already exists
+ERROR 1050 (42S01) at line 749: Table 'events_statements_summary_global_by_event_name' already exists
+ERROR 1644 (HY000) at line 1169: Unexpected content found in the performance_schema database.
+FATAL ERROR: Upgrade failed
+select name from mysql.proc where db='performance_schema';
+name
+user_func
+update mysql.proc set db='test' where name='user_func';
+drop function test.user_func;
+"Testing mysql_upgrade with EVENT performance_schema.user_event"
+create event test.user_event on schedule every 1 day do
+select "not supposed to be here";
+update mysql.event set db='performance_schema' where name='user_event';
+ERROR 1050 (42S01) at line 70: Table 'cond_instances' already exists
+ERROR 1050 (42S01) at line 94: Table 'events_waits_current' already exists
+ERROR 1050 (42S01) at line 118: Table 'events_waits_history' already exists
+ERROR 1050 (42S01) at line 142: Table 'events_waits_history_long' already exists
+ERROR 1050 (42S01) at line 155: Table 'events_waits_summary_by_instance' already exists
+ERROR 1050 (42S01) at line 168: Table 'events_waits_summary_by_thread_by_event_name' already exists
+ERROR 1050 (42S01) at line 180: Table 'events_waits_summary_global_by_event_name' already exists
+ERROR 1050 (42S01) at line 189: Table 'file_instances' already exists
+ERROR 1050 (42S01) at line 200: Table 'file_summary_by_event_name' already exists
+ERROR 1050 (42S01) at line 212: Table 'file_summary_by_instance' already exists
+ERROR 1050 (42S01) at line 221: Table 'mutex_instances' already exists
+ERROR 1050 (42S01) at line 235: Table 'objects_summary_global_by_type' already exists
+ERROR 1050 (42S01) at line 245: Table 'performance_timers' already exists
+ERROR 1050 (42S01) at line 255: Table 'rwlock_instances' already exists
+ERROR 1050 (42S01) at line 264: Table 'setup_actors' already exists
+ERROR 1050 (42S01) at line 272: Table 'setup_consumers' already exists
+ERROR 1050 (42S01) at line 281: Table 'setup_instruments' already exists
+ERROR 1050 (42S01) at line 291: Table 'setup_objects' already exists
+ERROR 1050 (42S01) at line 299: Table 'setup_timers' already exists
+ERROR 1050 (42S01) at line 344: Table 'table_io_waits_summary_by_index_usage' already exists
+ERROR 1050 (42S01) at line 388: Table 'table_io_waits_summary_by_table' already exists
+ERROR 1050 (42S01) at line 467: Table 'table_lock_waits_summary_by_table' already exists
+ERROR 1050 (42S01) at line 487: Table 'threads' already exists
+ERROR 1050 (42S01) at line 502: Table 'events_stages_current' already exists
+ERROR 1050 (42S01) at line 517: Table 'events_stages_history' already exists
+ERROR 1050 (42S01) at line 532: Table 'events_stages_history_long' already exists
+ERROR 1050 (42S01) at line 545: Table 'events_stages_summary_by_thread_by_event_name' already exists
+ERROR 1050 (42S01) at line 557: Table 'events_stages_summary_global_by_event_name' already exists
+ERROR 1050 (42S01) at line 600: Table 'events_statements_current' already exists
+ERROR 1050 (42S01) at line 643: Table 'events_statements_history' already exists
+ERROR 1050 (42S01) at line 686: Table 'events_statements_history_long' already exists
+ERROR 1050 (42S01) at line 718: Table 'events_statements_summary_by_thread_by_event_name' already exists
+ERROR 1050 (42S01) at line 749: Table 'events_statements_summary_global_by_event_name' already exists
+ERROR 1644 (HY000) at line 1169: Unexpected content found in the performance_schema database.
+FATAL ERROR: Upgrade failed
+select name from mysql.event where db='performance_schema';
+name
+user_event
+update mysql.event set db='test' where name='user_event';
+drop event test.user_event;

=== removed file 'mysql-test/suite/perfschema/r/pfs_upgrade_lc0.result'
--- a/mysql-test/suite/perfschema/r/pfs_upgrade_lc0.result	2011-02-25 16:41:57 +0000
+++ b/mysql-test/suite/perfschema/r/pfs_upgrade_lc0.result	1970-01-01 00:00:00 +0000
@@ -1,228 +0,0 @@
-drop table if exists test.user_table;
-drop procedure if exists test.user_proc;
-drop function if exists test.user_func;
-drop event if exists test.user_event;
-"Testing mysql_upgrade with TABLE performance_schema.user_table"
-create table test.user_table(a int);
-use performance_schema;
-show tables like "user_table";
-Tables_in_performance_schema (user_table)
-user_table
-ERROR 1050 (42S01) at line 70: Table 'cond_instances' already exists
-ERROR 1050 (42S01) at line 94: Table 'events_waits_current' already exists
-ERROR 1050 (42S01) at line 118: Table 'events_waits_history' already exists
-ERROR 1050 (42S01) at line 142: Table 'events_waits_history_long' already exists
-ERROR 1050 (42S01) at line 155: Table 'events_waits_summary_by_instance' already exists
-ERROR 1050 (42S01) at line 168: Table 'events_waits_summary_by_thread_by_event_name' already exists
-ERROR 1050 (42S01) at line 180: Table 'events_waits_summary_global_by_event_name' already exists
-ERROR 1050 (42S01) at line 189: Table 'file_instances' already exists
-ERROR 1050 (42S01) at line 200: Table 'file_summary_by_event_name' already exists
-ERROR 1050 (42S01) at line 212: Table 'file_summary_by_instance' already exists
-ERROR 1050 (42S01) at line 221: Table 'mutex_instances' already exists
-ERROR 1050 (42S01) at line 235: Table 'objects_summary_global_by_type' already exists
-ERROR 1050 (42S01) at line 245: Table 'performance_timers' already exists
-ERROR 1050 (42S01) at line 255: Table 'rwlock_instances' already exists
-ERROR 1050 (42S01) at line 264: Table 'setup_actors' already exists
-ERROR 1050 (42S01) at line 272: Table 'setup_consumers' already exists
-ERROR 1050 (42S01) at line 281: Table 'setup_instruments' already exists
-ERROR 1050 (42S01) at line 291: Table 'setup_objects' already exists
-ERROR 1050 (42S01) at line 299: Table 'setup_timers' already exists
-ERROR 1050 (42S01) at line 344: Table 'table_io_waits_summary_by_index_usage' already exists
-ERROR 1050 (42S01) at line 388: Table 'table_io_waits_summary_by_table' already exists
-ERROR 1050 (42S01) at line 467: Table 'table_lock_waits_summary_by_table' already exists
-ERROR 1050 (42S01) at line 487: Table 'threads' already exists
-ERROR 1050 (42S01) at line 502: Table 'events_stages_current' already exists
-ERROR 1050 (42S01) at line 517: Table 'events_stages_history' already exists
-ERROR 1050 (42S01) at line 532: Table 'events_stages_history_long' already exists
-ERROR 1050 (42S01) at line 545: Table 'events_stages_summary_by_thread_by_event_name' already exists
-ERROR 1050 (42S01) at line 557: Table 'events_stages_summary_global_by_event_name' already exists
-ERROR 1050 (42S01) at line 600: Table 'events_statements_current' already exists
-ERROR 1050 (42S01) at line 643: Table 'events_statements_history' already exists
-ERROR 1050 (42S01) at line 686: Table 'events_statements_history_long' already exists
-ERROR 1050 (42S01) at line 718: Table 'events_statements_summary_by_thread_by_event_name' already exists
-ERROR 1050 (42S01) at line 749: Table 'events_statements_summary_global_by_event_name' already exists
-ERROR 1644 (HY000) at line 1169: Unexpected content found in the performance_schema database.
-FATAL ERROR: Upgrade failed
-show tables like "user_table";
-Tables_in_performance_schema (user_table)
-user_table
-use test;
-drop table test.user_table;
-"Testing mysql_upgrade with VIEW performance_schema.user_view"
-create view test.user_view as select "Not supposed to be here";
-use performance_schema;
-show tables like "user_view";
-Tables_in_performance_schema (user_view)
-user_view
-ERROR 1050 (42S01) at line 70: Table 'cond_instances' already exists
-ERROR 1050 (42S01) at line 94: Table 'events_waits_current' already exists
-ERROR 1050 (42S01) at line 118: Table 'events_waits_history' already exists
-ERROR 1050 (42S01) at line 142: Table 'events_waits_history_long' already exists
-ERROR 1050 (42S01) at line 155: Table 'events_waits_summary_by_instance' already exists
-ERROR 1050 (42S01) at line 168: Table 'events_waits_summary_by_thread_by_event_name' already exists
-ERROR 1050 (42S01) at line 180: Table 'events_waits_summary_global_by_event_name' already exists
-ERROR 1050 (42S01) at line 189: Table 'file_instances' already exists
-ERROR 1050 (42S01) at line 200: Table 'file_summary_by_event_name' already exists
-ERROR 1050 (42S01) at line 212: Table 'file_summary_by_instance' already exists
-ERROR 1050 (42S01) at line 221: Table 'mutex_instances' already exists
-ERROR 1050 (42S01) at line 235: Table 'objects_summary_global_by_type' already exists
-ERROR 1050 (42S01) at line 245: Table 'performance_timers' already exists
-ERROR 1050 (42S01) at line 255: Table 'rwlock_instances' already exists
-ERROR 1050 (42S01) at line 264: Table 'setup_actors' already exists
-ERROR 1050 (42S01) at line 272: Table 'setup_consumers' already exists
-ERROR 1050 (42S01) at line 281: Table 'setup_instruments' already exists
-ERROR 1050 (42S01) at line 291: Table 'setup_objects' already exists
-ERROR 1050 (42S01) at line 299: Table 'setup_timers' already exists
-ERROR 1050 (42S01) at line 344: Table 'table_io_waits_summary_by_index_usage' already exists
-ERROR 1050 (42S01) at line 388: Table 'table_io_waits_summary_by_table' already exists
-ERROR 1050 (42S01) at line 467: Table 'table_lock_waits_summary_by_table' already exists
-ERROR 1050 (42S01) at line 487: Table 'threads' already exists
-ERROR 1050 (42S01) at line 502: Table 'events_stages_current' already exists
-ERROR 1050 (42S01) at line 517: Table 'events_stages_history' already exists
-ERROR 1050 (42S01) at line 532: Table 'events_stages_history_long' already exists
-ERROR 1050 (42S01) at line 545: Table 'events_stages_summary_by_thread_by_event_name' already exists
-ERROR 1050 (42S01) at line 557: Table 'events_stages_summary_global_by_event_name' already exists
-ERROR 1050 (42S01) at line 600: Table 'events_statements_current' already exists
-ERROR 1050 (42S01) at line 643: Table 'events_statements_history' already exists
-ERROR 1050 (42S01) at line 686: Table 'events_statements_history_long' already exists
-ERROR 1050 (42S01) at line 718: Table 'events_statements_summary_by_thread_by_event_name' already exists
-ERROR 1050 (42S01) at line 749: Table 'events_statements_summary_global_by_event_name' already exists
-ERROR 1644 (HY000) at line 1169: Unexpected content found in the performance_schema database.
-FATAL ERROR: Upgrade failed
-show tables like "user_view";
-Tables_in_performance_schema (user_view)
-user_view
-use test;
-drop view test.user_view;
-"Testing mysql_upgrade with PROCEDURE performance_schema.user_proc"
-create procedure test.user_proc()
-select "Not supposed to be here";
-update mysql.proc set db='performance_schema' where name='user_proc';
-ERROR 1050 (42S01) at line 70: Table 'cond_instances' already exists
-ERROR 1050 (42S01) at line 94: Table 'events_waits_current' already exists
-ERROR 1050 (42S01) at line 118: Table 'events_waits_history' already exists
-ERROR 1050 (42S01) at line 142: Table 'events_waits_history_long' already exists
-ERROR 1050 (42S01) at line 155: Table 'events_waits_summary_by_instance' already exists
-ERROR 1050 (42S01) at line 168: Table 'events_waits_summary_by_thread_by_event_name' already exists
-ERROR 1050 (42S01) at line 180: Table 'events_waits_summary_global_by_event_name' already exists
-ERROR 1050 (42S01) at line 189: Table 'file_instances' already exists
-ERROR 1050 (42S01) at line 200: Table 'file_summary_by_event_name' already exists
-ERROR 1050 (42S01) at line 212: Table 'file_summary_by_instance' already exists
-ERROR 1050 (42S01) at line 221: Table 'mutex_instances' already exists
-ERROR 1050 (42S01) at line 235: Table 'objects_summary_global_by_type' already exists
-ERROR 1050 (42S01) at line 245: Table 'performance_timers' already exists
-ERROR 1050 (42S01) at line 255: Table 'rwlock_instances' already exists
-ERROR 1050 (42S01) at line 264: Table 'setup_actors' already exists
-ERROR 1050 (42S01) at line 272: Table 'setup_consumers' already exists
-ERROR 1050 (42S01) at line 281: Table 'setup_instruments' already exists
-ERROR 1050 (42S01) at line 291: Table 'setup_objects' already exists
-ERROR 1050 (42S01) at line 299: Table 'setup_timers' already exists
-ERROR 1050 (42S01) at line 344: Table 'table_io_waits_summary_by_index_usage' already exists
-ERROR 1050 (42S01) at line 388: Table 'table_io_waits_summary_by_table' already exists
-ERROR 1050 (42S01) at line 467: Table 'table_lock_waits_summary_by_table' already exists
-ERROR 1050 (42S01) at line 487: Table 'threads' already exists
-ERROR 1050 (42S01) at line 502: Table 'events_stages_current' already exists
-ERROR 1050 (42S01) at line 517: Table 'events_stages_history' already exists
-ERROR 1050 (42S01) at line 532: Table 'events_stages_history_long' already exists
-ERROR 1050 (42S01) at line 545: Table 'events_stages_summary_by_thread_by_event_name' already exists
-ERROR 1050 (42S01) at line 557: Table 'events_stages_summary_global_by_event_name' already exists
-ERROR 1050 (42S01) at line 600: Table 'events_statements_current' already exists
-ERROR 1050 (42S01) at line 643: Table 'events_statements_history' already exists
-ERROR 1050 (42S01) at line 686: Table 'events_statements_history_long' already exists
-ERROR 1050 (42S01) at line 718: Table 'events_statements_summary_by_thread_by_event_name' already exists
-ERROR 1050 (42S01) at line 749: Table 'events_statements_summary_global_by_event_name' already exists
-ERROR 1644 (HY000) at line 1169: Unexpected content found in the performance_schema database.
-FATAL ERROR: Upgrade failed
-select name from mysql.proc where db='performance_schema';
-name
-user_proc
-update mysql.proc set db='test' where name='user_proc';
-drop procedure test.user_proc;
-"Testing mysql_upgrade with FUNCTION performance_schema.user_func"
-create function test.user_func() returns integer
-return 0;
-update mysql.proc set db='performance_schema' where name='user_func';
-ERROR 1050 (42S01) at line 70: Table 'cond_instances' already exists
-ERROR 1050 (42S01) at line 94: Table 'events_waits_current' already exists
-ERROR 1050 (42S01) at line 118: Table 'events_waits_history' already exists
-ERROR 1050 (42S01) at line 142: Table 'events_waits_history_long' already exists
-ERROR 1050 (42S01) at line 155: Table 'events_waits_summary_by_instance' already exists
-ERROR 1050 (42S01) at line 168: Table 'events_waits_summary_by_thread_by_event_name' already exists
-ERROR 1050 (42S01) at line 180: Table 'events_waits_summary_global_by_event_name' already exists
-ERROR 1050 (42S01) at line 189: Table 'file_instances' already exists
-ERROR 1050 (42S01) at line 200: Table 'file_summary_by_event_name' already exists
-ERROR 1050 (42S01) at line 212: Table 'file_summary_by_instance' already exists
-ERROR 1050 (42S01) at line 221: Table 'mutex_instances' already exists
-ERROR 1050 (42S01) at line 235: Table 'objects_summary_global_by_type' already exists
-ERROR 1050 (42S01) at line 245: Table 'performance_timers' already exists
-ERROR 1050 (42S01) at line 255: Table 'rwlock_instances' already exists
-ERROR 1050 (42S01) at line 264: Table 'setup_actors' already exists
-ERROR 1050 (42S01) at line 272: Table 'setup_consumers' already exists
-ERROR 1050 (42S01) at line 281: Table 'setup_instruments' already exists
-ERROR 1050 (42S01) at line 291: Table 'setup_objects' already exists
-ERROR 1050 (42S01) at line 299: Table 'setup_timers' already exists
-ERROR 1050 (42S01) at line 344: Table 'table_io_waits_summary_by_index_usage' already exists
-ERROR 1050 (42S01) at line 388: Table 'table_io_waits_summary_by_table' already exists
-ERROR 1050 (42S01) at line 467: Table 'table_lock_waits_summary_by_table' already exists
-ERROR 1050 (42S01) at line 487: Table 'threads' already exists
-ERROR 1050 (42S01) at line 502: Table 'events_stages_current' already exists
-ERROR 1050 (42S01) at line 517: Table 'events_stages_history' already exists
-ERROR 1050 (42S01) at line 532: Table 'events_stages_history_long' already exists
-ERROR 1050 (42S01) at line 545: Table 'events_stages_summary_by_thread_by_event_name' already exists
-ERROR 1050 (42S01) at line 557: Table 'events_stages_summary_global_by_event_name' already exists
-ERROR 1050 (42S01) at line 600: Table 'events_statements_current' already exists
-ERROR 1050 (42S01) at line 643: Table 'events_statements_history' already exists
-ERROR 1050 (42S01) at line 686: Table 'events_statements_history_long' already exists
-ERROR 1050 (42S01) at line 718: Table 'events_statements_summary_by_thread_by_event_name' already exists
-ERROR 1050 (42S01) at line 749: Table 'events_statements_summary_global_by_event_name' already exists
-ERROR 1644 (HY000) at line 1169: Unexpected content found in the performance_schema database.
-FATAL ERROR: Upgrade failed
-select name from mysql.proc where db='performance_schema';
-name
-user_func
-update mysql.proc set db='test' where name='user_func';
-drop function test.user_func;
-"Testing mysql_upgrade with EVENT performance_schema.user_event"
-create event test.user_event on schedule every 1 day do
-select "not supposed to be here";
-update mysql.event set db='performance_schema' where name='user_event';
-ERROR 1050 (42S01) at line 70: Table 'cond_instances' already exists
-ERROR 1050 (42S01) at line 94: Table 'events_waits_current' already exists
-ERROR 1050 (42S01) at line 118: Table 'events_waits_history' already exists
-ERROR 1050 (42S01) at line 142: Table 'events_waits_history_long' already exists
-ERROR 1050 (42S01) at line 155: Table 'events_waits_summary_by_instance' already exists
-ERROR 1050 (42S01) at line 168: Table 'events_waits_summary_by_thread_by_event_name' already exists
-ERROR 1050 (42S01) at line 180: Table 'events_waits_summary_global_by_event_name' already exists
-ERROR 1050 (42S01) at line 189: Table 'file_instances' already exists
-ERROR 1050 (42S01) at line 200: Table 'file_summary_by_event_name' already exists
-ERROR 1050 (42S01) at line 212: Table 'file_summary_by_instance' already exists
-ERROR 1050 (42S01) at line 221: Table 'mutex_instances' already exists
-ERROR 1050 (42S01) at line 235: Table 'objects_summary_global_by_type' already exists
-ERROR 1050 (42S01) at line 245: Table 'performance_timers' already exists
-ERROR 1050 (42S01) at line 255: Table 'rwlock_instances' already exists
-ERROR 1050 (42S01) at line 264: Table 'setup_actors' already exists
-ERROR 1050 (42S01) at line 272: Table 'setup_consumers' already exists
-ERROR 1050 (42S01) at line 281: Table 'setup_instruments' already exists
-ERROR 1050 (42S01) at line 291: Table 'setup_objects' already exists
-ERROR 1050 (42S01) at line 299: Table 'setup_timers' already exists
-ERROR 1050 (42S01) at line 344: Table 'table_io_waits_summary_by_index_usage' already exists
-ERROR 1050 (42S01) at line 388: Table 'table_io_waits_summary_by_table' already exists
-ERROR 1050 (42S01) at line 467: Table 'table_lock_waits_summary_by_table' already exists
-ERROR 1050 (42S01) at line 487: Table 'threads' already exists
-ERROR 1050 (42S01) at line 502: Table 'events_stages_current' already exists
-ERROR 1050 (42S01) at line 517: Table 'events_stages_history' already exists
-ERROR 1050 (42S01) at line 532: Table 'events_stages_history_long' already exists
-ERROR 1050 (42S01) at line 545: Table 'events_stages_summary_by_thread_by_event_name' already exists
-ERROR 1050 (42S01) at line 557: Table 'events_stages_summary_global_by_event_name' already exists
-ERROR 1050 (42S01) at line 600: Table 'events_statements_current' already exists
-ERROR 1050 (42S01) at line 643: Table 'events_statements_history' already exists
-ERROR 1050 (42S01) at line 686: Table 'events_statements_history_long' already exists
-ERROR 1050 (42S01) at line 718: Table 'events_statements_summary_by_thread_by_event_name' already exists
-ERROR 1050 (42S01) at line 749: Table 'events_statements_summary_global_by_event_name' already exists
-ERROR 1644 (HY000) at line 1169: Unexpected content found in the performance_schema database.
-FATAL ERROR: Upgrade failed
-select name from mysql.event where db='performance_schema';
-name
-user_event
-update mysql.event set db='test' where name='user_event';
-drop event test.user_event;

=== removed file 'mysql-test/suite/perfschema/r/pfs_upgrade_lc1.result'
--- a/mysql-test/suite/perfschema/r/pfs_upgrade_lc1.result	2011-02-25 16:41:57 +0000
+++ b/mysql-test/suite/perfschema/r/pfs_upgrade_lc1.result	1970-01-01 00:00:00 +0000
@@ -1,228 +0,0 @@
-drop table if exists test.user_table;
-drop procedure if exists test.user_proc;
-drop function if exists test.user_func;
-drop event if exists test.user_event;
-"Testing mysql_upgrade with TABLE performance_schema.user_table"
-create table test.user_table(a int);
-use performance_schema;
-show tables like "user_table";
-Tables_in_performance_schema (user_table)
-user_table
-ERROR 1050 (42S01) at line 70: Table 'cond_instances' already exists
-ERROR 1050 (42S01) at line 94: Table 'events_waits_current' already exists
-ERROR 1050 (42S01) at line 118: Table 'events_waits_history' already exists
-ERROR 1050 (42S01) at line 142: Table 'events_waits_history_long' already exists
-ERROR 1050 (42S01) at line 155: Table 'events_waits_summary_by_instance' already exists
-ERROR 1050 (42S01) at line 168: Table 'events_waits_summary_by_thread_by_event_name' already exists
-ERROR 1050 (42S01) at line 180: Table 'events_waits_summary_global_by_event_name' already exists
-ERROR 1050 (42S01) at line 189: Table 'file_instances' already exists
-ERROR 1050 (42S01) at line 200: Table 'file_summary_by_event_name' already exists
-ERROR 1050 (42S01) at line 212: Table 'file_summary_by_instance' already exists
-ERROR 1050 (42S01) at line 221: Table 'mutex_instances' already exists
-ERROR 1050 (42S01) at line 235: Table 'objects_summary_global_by_type' already exists
-ERROR 1050 (42S01) at line 245: Table 'performance_timers' already exists
-ERROR 1050 (42S01) at line 255: Table 'rwlock_instances' already exists
-ERROR 1050 (42S01) at line 264: Table 'setup_actors' already exists
-ERROR 1050 (42S01) at line 272: Table 'setup_consumers' already exists
-ERROR 1050 (42S01) at line 281: Table 'setup_instruments' already exists
-ERROR 1050 (42S01) at line 291: Table 'setup_objects' already exists
-ERROR 1050 (42S01) at line 299: Table 'setup_timers' already exists
-ERROR 1050 (42S01) at line 344: Table 'table_io_waits_summary_by_index_usage' already exists
-ERROR 1050 (42S01) at line 388: Table 'table_io_waits_summary_by_table' already exists
-ERROR 1050 (42S01) at line 467: Table 'table_lock_waits_summary_by_table' already exists
-ERROR 1050 (42S01) at line 487: Table 'threads' already exists
-ERROR 1050 (42S01) at line 502: Table 'events_stages_current' already exists
-ERROR 1050 (42S01) at line 517: Table 'events_stages_history' already exists
-ERROR 1050 (42S01) at line 532: Table 'events_stages_history_long' already exists
-ERROR 1050 (42S01) at line 545: Table 'events_stages_summary_by_thread_by_event_name' already exists
-ERROR 1050 (42S01) at line 557: Table 'events_stages_summary_global_by_event_name' already exists
-ERROR 1050 (42S01) at line 600: Table 'events_statements_current' already exists
-ERROR 1050 (42S01) at line 643: Table 'events_statements_history' already exists
-ERROR 1050 (42S01) at line 686: Table 'events_statements_history_long' already exists
-ERROR 1050 (42S01) at line 718: Table 'events_statements_summary_by_thread_by_event_name' already exists
-ERROR 1050 (42S01) at line 749: Table 'events_statements_summary_global_by_event_name' already exists
-ERROR 1644 (HY000) at line 1169: Unexpected content found in the performance_schema database.
-FATAL ERROR: Upgrade failed
-show tables like "user_table";
-Tables_in_performance_schema (user_table)
-user_table
-use test;
-drop table test.user_table;
-"Testing mysql_upgrade with VIEW performance_schema.user_view"
-create view test.user_view as select "Not supposed to be here";
-use performance_schema;
-show tables like "user_view";
-Tables_in_performance_schema (user_view)
-user_view
-ERROR 1050 (42S01) at line 70: Table 'cond_instances' already exists
-ERROR 1050 (42S01) at line 94: Table 'events_waits_current' already exists
-ERROR 1050 (42S01) at line 118: Table 'events_waits_history' already exists
-ERROR 1050 (42S01) at line 142: Table 'events_waits_history_long' already exists
-ERROR 1050 (42S01) at line 155: Table 'events_waits_summary_by_instance' already exists
-ERROR 1050 (42S01) at line 168: Table 'events_waits_summary_by_thread_by_event_name' already exists
-ERROR 1050 (42S01) at line 180: Table 'events_waits_summary_global_by_event_name' already exists
-ERROR 1050 (42S01) at line 189: Table 'file_instances' already exists
-ERROR 1050 (42S01) at line 200: Table 'file_summary_by_event_name' already exists
-ERROR 1050 (42S01) at line 212: Table 'file_summary_by_instance' already exists
-ERROR 1050 (42S01) at line 221: Table 'mutex_instances' already exists
-ERROR 1050 (42S01) at line 235: Table 'objects_summary_global_by_type' already exists
-ERROR 1050 (42S01) at line 245: Table 'performance_timers' already exists
-ERROR 1050 (42S01) at line 255: Table 'rwlock_instances' already exists
-ERROR 1050 (42S01) at line 264: Table 'setup_actors' already exists
-ERROR 1050 (42S01) at line 272: Table 'setup_consumers' already exists
-ERROR 1050 (42S01) at line 281: Table 'setup_instruments' already exists
-ERROR 1050 (42S01) at line 291: Table 'setup_objects' already exists
-ERROR 1050 (42S01) at line 299: Table 'setup_timers' already exists
-ERROR 1050 (42S01) at line 344: Table 'table_io_waits_summary_by_index_usage' already exists
-ERROR 1050 (42S01) at line 388: Table 'table_io_waits_summary_by_table' already exists
-ERROR 1050 (42S01) at line 467: Table 'table_lock_waits_summary_by_table' already exists
-ERROR 1050 (42S01) at line 487: Table 'threads' already exists
-ERROR 1050 (42S01) at line 502: Table 'events_stages_current' already exists
-ERROR 1050 (42S01) at line 517: Table 'events_stages_history' already exists
-ERROR 1050 (42S01) at line 532: Table 'events_stages_history_long' already exists
-ERROR 1050 (42S01) at line 545: Table 'events_stages_summary_by_thread_by_event_name' already exists
-ERROR 1050 (42S01) at line 557: Table 'events_stages_summary_global_by_event_name' already exists
-ERROR 1050 (42S01) at line 600: Table 'events_statements_current' already exists
-ERROR 1050 (42S01) at line 643: Table 'events_statements_history' already exists
-ERROR 1050 (42S01) at line 686: Table 'events_statements_history_long' already exists
-ERROR 1050 (42S01) at line 718: Table 'events_statements_summary_by_thread_by_event_name' already exists
-ERROR 1050 (42S01) at line 749: Table 'events_statements_summary_global_by_event_name' already exists
-ERROR 1644 (HY000) at line 1169: Unexpected content found in the performance_schema database.
-FATAL ERROR: Upgrade failed
-show tables like "user_view";
-Tables_in_performance_schema (user_view)
-user_view
-use test;
-drop view test.user_view;
-"Testing mysql_upgrade with PROCEDURE performance_schema.user_proc"
-create procedure test.user_proc()
-select "Not supposed to be here";
-update mysql.proc set db='performance_schema' where name='user_proc';
-ERROR 1050 (42S01) at line 70: Table 'cond_instances' already exists
-ERROR 1050 (42S01) at line 94: Table 'events_waits_current' already exists
-ERROR 1050 (42S01) at line 118: Table 'events_waits_history' already exists
-ERROR 1050 (42S01) at line 142: Table 'events_waits_history_long' already exists
-ERROR 1050 (42S01) at line 155: Table 'events_waits_summary_by_instance' already exists
-ERROR 1050 (42S01) at line 168: Table 'events_waits_summary_by_thread_by_event_name' already exists
-ERROR 1050 (42S01) at line 180: Table 'events_waits_summary_global_by_event_name' already exists
-ERROR 1050 (42S01) at line 189: Table 'file_instances' already exists
-ERROR 1050 (42S01) at line 200: Table 'file_summary_by_event_name' already exists
-ERROR 1050 (42S01) at line 212: Table 'file_summary_by_instance' already exists
-ERROR 1050 (42S01) at line 221: Table 'mutex_instances' already exists
-ERROR 1050 (42S01) at line 235: Table 'objects_summary_global_by_type' already exists
-ERROR 1050 (42S01) at line 245: Table 'performance_timers' already exists
-ERROR 1050 (42S01) at line 255: Table 'rwlock_instances' already exists
-ERROR 1050 (42S01) at line 264: Table 'setup_actors' already exists
-ERROR 1050 (42S01) at line 272: Table 'setup_consumers' already exists
-ERROR 1050 (42S01) at line 281: Table 'setup_instruments' already exists
-ERROR 1050 (42S01) at line 291: Table 'setup_objects' already exists
-ERROR 1050 (42S01) at line 299: Table 'setup_timers' already exists
-ERROR 1050 (42S01) at line 344: Table 'table_io_waits_summary_by_index_usage' already exists
-ERROR 1050 (42S01) at line 388: Table 'table_io_waits_summary_by_table' already exists
-ERROR 1050 (42S01) at line 467: Table 'table_lock_waits_summary_by_table' already exists
-ERROR 1050 (42S01) at line 487: Table 'threads' already exists
-ERROR 1050 (42S01) at line 502: Table 'events_stages_current' already exists
-ERROR 1050 (42S01) at line 517: Table 'events_stages_history' already exists
-ERROR 1050 (42S01) at line 532: Table 'events_stages_history_long' already exists
-ERROR 1050 (42S01) at line 545: Table 'events_stages_summary_by_thread_by_event_name' already exists
-ERROR 1050 (42S01) at line 557: Table 'events_stages_summary_global_by_event_name' already exists
-ERROR 1050 (42S01) at line 600: Table 'events_statements_current' already exists
-ERROR 1050 (42S01) at line 643: Table 'events_statements_history' already exists
-ERROR 1050 (42S01) at line 686: Table 'events_statements_history_long' already exists
-ERROR 1050 (42S01) at line 718: Table 'events_statements_summary_by_thread_by_event_name' already exists
-ERROR 1050 (42S01) at line 749: Table 'events_statements_summary_global_by_event_name' already exists
-ERROR 1644 (HY000) at line 1169: Unexpected content found in the performance_schema database.
-FATAL ERROR: Upgrade failed
-select name from mysql.proc where db='performance_schema';
-name
-user_proc
-update mysql.proc set db='test' where name='user_proc';
-drop procedure test.user_proc;
-"Testing mysql_upgrade with FUNCTION performance_schema.user_func"
-create function test.user_func() returns integer
-return 0;
-update mysql.proc set db='performance_schema' where name='user_func';
-ERROR 1050 (42S01) at line 70: Table 'cond_instances' already exists
-ERROR 1050 (42S01) at line 94: Table 'events_waits_current' already exists
-ERROR 1050 (42S01) at line 118: Table 'events_waits_history' already exists
-ERROR 1050 (42S01) at line 142: Table 'events_waits_history_long' already exists
-ERROR 1050 (42S01) at line 155: Table 'events_waits_summary_by_instance' already exists
-ERROR 1050 (42S01) at line 168: Table 'events_waits_summary_by_thread_by_event_name' already exists
-ERROR 1050 (42S01) at line 180: Table 'events_waits_summary_global_by_event_name' already exists
-ERROR 1050 (42S01) at line 189: Table 'file_instances' already exists
-ERROR 1050 (42S01) at line 200: Table 'file_summary_by_event_name' already exists
-ERROR 1050 (42S01) at line 212: Table 'file_summary_by_instance' already exists
-ERROR 1050 (42S01) at line 221: Table 'mutex_instances' already exists
-ERROR 1050 (42S01) at line 235: Table 'objects_summary_global_by_type' already exists
-ERROR 1050 (42S01) at line 245: Table 'performance_timers' already exists
-ERROR 1050 (42S01) at line 255: Table 'rwlock_instances' already exists
-ERROR 1050 (42S01) at line 264: Table 'setup_actors' already exists
-ERROR 1050 (42S01) at line 272: Table 'setup_consumers' already exists
-ERROR 1050 (42S01) at line 281: Table 'setup_instruments' already exists
-ERROR 1050 (42S01) at line 291: Table 'setup_objects' already exists
-ERROR 1050 (42S01) at line 299: Table 'setup_timers' already exists
-ERROR 1050 (42S01) at line 344: Table 'table_io_waits_summary_by_index_usage' already exists
-ERROR 1050 (42S01) at line 388: Table 'table_io_waits_summary_by_table' already exists
-ERROR 1050 (42S01) at line 467: Table 'table_lock_waits_summary_by_table' already exists
-ERROR 1050 (42S01) at line 487: Table 'threads' already exists
-ERROR 1050 (42S01) at line 502: Table 'events_stages_current' already exists
-ERROR 1050 (42S01) at line 517: Table 'events_stages_history' already exists
-ERROR 1050 (42S01) at line 532: Table 'events_stages_history_long' already exists
-ERROR 1050 (42S01) at line 545: Table 'events_stages_summary_by_thread_by_event_name' already exists
-ERROR 1050 (42S01) at line 557: Table 'events_stages_summary_global_by_event_name' already exists
-ERROR 1050 (42S01) at line 600: Table 'events_statements_current' already exists
-ERROR 1050 (42S01) at line 643: Table 'events_statements_history' already exists
-ERROR 1050 (42S01) at line 686: Table 'events_statements_history_long' already exists
-ERROR 1050 (42S01) at line 718: Table 'events_statements_summary_by_thread_by_event_name' already exists
-ERROR 1050 (42S01) at line 749: Table 'events_statements_summary_global_by_event_name' already exists
-ERROR 1644 (HY000) at line 1169: Unexpected content found in the performance_schema database.
-FATAL ERROR: Upgrade failed
-select name from mysql.proc where db='performance_schema';
-name
-user_func
-update mysql.proc set db='test' where name='user_func';
-drop function test.user_func;
-"Testing mysql_upgrade with EVENT performance_schema.user_event"
-create event test.user_event on schedule every 1 day do
-select "not supposed to be here";
-update mysql.event set db='performance_schema' where name='user_event';
-ERROR 1050 (42S01) at line 70: Table 'cond_instances' already exists
-ERROR 1050 (42S01) at line 94: Table 'events_waits_current' already exists
-ERROR 1050 (42S01) at line 118: Table 'events_waits_history' already exists
-ERROR 1050 (42S01) at line 142: Table 'events_waits_history_long' already exists
-ERROR 1050 (42S01) at line 155: Table 'events_waits_summary_by_instance' already exists
-ERROR 1050 (42S01) at line 168: Table 'events_waits_summary_by_thread_by_event_name' already exists
-ERROR 1050 (42S01) at line 180: Table 'events_waits_summary_global_by_event_name' already exists
-ERROR 1050 (42S01) at line 189: Table 'file_instances' already exists
-ERROR 1050 (42S01) at line 200: Table 'file_summary_by_event_name' already exists
-ERROR 1050 (42S01) at line 212: Table 'file_summary_by_instance' already exists
-ERROR 1050 (42S01) at line 221: Table 'mutex_instances' already exists
-ERROR 1050 (42S01) at line 235: Table 'objects_summary_global_by_type' already exists
-ERROR 1050 (42S01) at line 245: Table 'performance_timers' already exists
-ERROR 1050 (42S01) at line 255: Table 'rwlock_instances' already exists
-ERROR 1050 (42S01) at line 264: Table 'setup_actors' already exists
-ERROR 1050 (42S01) at line 272: Table 'setup_consumers' already exists
-ERROR 1050 (42S01) at line 281: Table 'setup_instruments' already exists
-ERROR 1050 (42S01) at line 291: Table 'setup_objects' already exists
-ERROR 1050 (42S01) at line 299: Table 'setup_timers' already exists
-ERROR 1050 (42S01) at line 344: Table 'table_io_waits_summary_by_index_usage' already exists
-ERROR 1050 (42S01) at line 388: Table 'table_io_waits_summary_by_table' already exists
-ERROR 1050 (42S01) at line 467: Table 'table_lock_waits_summary_by_table' already exists
-ERROR 1050 (42S01) at line 487: Table 'threads' already exists
-ERROR 1050 (42S01) at line 502: Table 'events_stages_current' already exists
-ERROR 1050 (42S01) at line 517: Table 'events_stages_history' already exists
-ERROR 1050 (42S01) at line 532: Table 'events_stages_history_long' already exists
-ERROR 1050 (42S01) at line 545: Table 'events_stages_summary_by_thread_by_event_name' already exists
-ERROR 1050 (42S01) at line 557: Table 'events_stages_summary_global_by_event_name' already exists
-ERROR 1050 (42S01) at line 600: Table 'events_statements_current' already exists
-ERROR 1050 (42S01) at line 643: Table 'events_statements_history' already exists
-ERROR 1050 (42S01) at line 686: Table 'events_statements_history_long' already exists
-ERROR 1050 (42S01) at line 718: Table 'events_statements_summary_by_thread_by_event_name' already exists
-ERROR 1050 (42S01) at line 749: Table 'events_statements_summary_global_by_event_name' already exists
-ERROR 1644 (HY000) at line 1169: Unexpected content found in the performance_schema database.
-FATAL ERROR: Upgrade failed
-select name from mysql.event where db='performance_schema';
-name
-user_event
-update mysql.event set db='test' where name='user_event';
-drop event test.user_event;

=== removed file 'mysql-test/suite/perfschema/r/pfs_upgrade_lc2.result'
--- a/mysql-test/suite/perfschema/r/pfs_upgrade_lc2.result	2011-02-25 16:41:57 +0000
+++ b/mysql-test/suite/perfschema/r/pfs_upgrade_lc2.result	1970-01-01 00:00:00 +0000
@@ -1,228 +0,0 @@
-drop table if exists test.user_table;
-drop procedure if exists test.user_proc;
-drop function if exists test.user_func;
-drop event if exists test.user_event;
-"Testing mysql_upgrade with TABLE performance_schema.user_table"
-create table test.user_table(a int);
-use performance_schema;
-show tables like "user_table";
-Tables_in_performance_schema (user_table)
-user_table
-ERROR 1050 (42S01) at line 70: Table 'cond_instances' already exists
-ERROR 1050 (42S01) at line 94: Table 'events_waits_current' already exists
-ERROR 1050 (42S01) at line 118: Table 'events_waits_history' already exists
-ERROR 1050 (42S01) at line 142: Table 'events_waits_history_long' already exists
-ERROR 1050 (42S01) at line 155: Table 'events_waits_summary_by_instance' already exists
-ERROR 1050 (42S01) at line 168: Table 'events_waits_summary_by_thread_by_event_name' already exists
-ERROR 1050 (42S01) at line 180: Table 'events_waits_summary_global_by_event_name' already exists
-ERROR 1050 (42S01) at line 189: Table 'file_instances' already exists
-ERROR 1050 (42S01) at line 200: Table 'file_summary_by_event_name' already exists
-ERROR 1050 (42S01) at line 212: Table 'file_summary_by_instance' already exists
-ERROR 1050 (42S01) at line 221: Table 'mutex_instances' already exists
-ERROR 1050 (42S01) at line 235: Table 'objects_summary_global_by_type' already exists
-ERROR 1050 (42S01) at line 245: Table 'performance_timers' already exists
-ERROR 1050 (42S01) at line 255: Table 'rwlock_instances' already exists
-ERROR 1050 (42S01) at line 264: Table 'setup_actors' already exists
-ERROR 1050 (42S01) at line 272: Table 'setup_consumers' already exists
-ERROR 1050 (42S01) at line 281: Table 'setup_instruments' already exists
-ERROR 1050 (42S01) at line 291: Table 'setup_objects' already exists
-ERROR 1050 (42S01) at line 299: Table 'setup_timers' already exists
-ERROR 1050 (42S01) at line 344: Table 'table_io_waits_summary_by_index_usage' already exists
-ERROR 1050 (42S01) at line 388: Table 'table_io_waits_summary_by_table' already exists
-ERROR 1050 (42S01) at line 467: Table 'table_lock_waits_summary_by_table' already exists
-ERROR 1050 (42S01) at line 487: Table 'threads' already exists
-ERROR 1050 (42S01) at line 502: Table 'events_stages_current' already exists
-ERROR 1050 (42S01) at line 517: Table 'events_stages_history' already exists
-ERROR 1050 (42S01) at line 532: Table 'events_stages_history_long' already exists
-ERROR 1050 (42S01) at line 545: Table 'events_stages_summary_by_thread_by_event_name' already exists
-ERROR 1050 (42S01) at line 557: Table 'events_stages_summary_global_by_event_name' already exists
-ERROR 1050 (42S01) at line 600: Table 'events_statements_current' already exists
-ERROR 1050 (42S01) at line 643: Table 'events_statements_history' already exists
-ERROR 1050 (42S01) at line 686: Table 'events_statements_history_long' already exists
-ERROR 1050 (42S01) at line 718: Table 'events_statements_summary_by_thread_by_event_name' already exists
-ERROR 1050 (42S01) at line 749: Table 'events_statements_summary_global_by_event_name' already exists
-ERROR 1644 (HY000) at line 1169: Unexpected content found in the performance_schema database.
-FATAL ERROR: Upgrade failed
-show tables like "user_table";
-Tables_in_performance_schema (user_table)
-user_table
-use test;
-drop table test.user_table;
-"Testing mysql_upgrade with VIEW performance_schema.user_view"
-create view test.user_view as select "Not supposed to be here";
-use performance_schema;
-show tables like "user_view";
-Tables_in_performance_schema (user_view)
-user_view
-ERROR 1050 (42S01) at line 70: Table 'cond_instances' already exists
-ERROR 1050 (42S01) at line 94: Table 'events_waits_current' already exists
-ERROR 1050 (42S01) at line 118: Table 'events_waits_history' already exists
-ERROR 1050 (42S01) at line 142: Table 'events_waits_history_long' already exists
-ERROR 1050 (42S01) at line 155: Table 'events_waits_summary_by_instance' already exists
-ERROR 1050 (42S01) at line 168: Table 'events_waits_summary_by_thread_by_event_name' already exists
-ERROR 1050 (42S01) at line 180: Table 'events_waits_summary_global_by_event_name' already exists
-ERROR 1050 (42S01) at line 189: Table 'file_instances' already exists
-ERROR 1050 (42S01) at line 200: Table 'file_summary_by_event_name' already exists
-ERROR 1050 (42S01) at line 212: Table 'file_summary_by_instance' already exists
-ERROR 1050 (42S01) at line 221: Table 'mutex_instances' already exists
-ERROR 1050 (42S01) at line 235: Table 'objects_summary_global_by_type' already exists
-ERROR 1050 (42S01) at line 245: Table 'performance_timers' already exists
-ERROR 1050 (42S01) at line 255: Table 'rwlock_instances' already exists
-ERROR 1050 (42S01) at line 264: Table 'setup_actors' already exists
-ERROR 1050 (42S01) at line 272: Table 'setup_consumers' already exists
-ERROR 1050 (42S01) at line 281: Table 'setup_instruments' already exists
-ERROR 1050 (42S01) at line 291: Table 'setup_objects' already exists
-ERROR 1050 (42S01) at line 299: Table 'setup_timers' already exists
-ERROR 1050 (42S01) at line 344: Table 'table_io_waits_summary_by_index_usage' already exists
-ERROR 1050 (42S01) at line 388: Table 'table_io_waits_summary_by_table' already exists
-ERROR 1050 (42S01) at line 467: Table 'table_lock_waits_summary_by_table' already exists
-ERROR 1050 (42S01) at line 487: Table 'threads' already exists
-ERROR 1050 (42S01) at line 502: Table 'events_stages_current' already exists
-ERROR 1050 (42S01) at line 517: Table 'events_stages_history' already exists
-ERROR 1050 (42S01) at line 532: Table 'events_stages_history_long' already exists
-ERROR 1050 (42S01) at line 545: Table 'events_stages_summary_by_thread_by_event_name' already exists
-ERROR 1050 (42S01) at line 557: Table 'events_stages_summary_global_by_event_name' already exists
-ERROR 1050 (42S01) at line 600: Table 'events_statements_current' already exists
-ERROR 1050 (42S01) at line 643: Table 'events_statements_history' already exists
-ERROR 1050 (42S01) at line 686: Table 'events_statements_history_long' already exists
-ERROR 1050 (42S01) at line 718: Table 'events_statements_summary_by_thread_by_event_name' already exists
-ERROR 1050 (42S01) at line 749: Table 'events_statements_summary_global_by_event_name' already exists
-ERROR 1644 (HY000) at line 1169: Unexpected content found in the performance_schema database.
-FATAL ERROR: Upgrade failed
-show tables like "user_view";
-Tables_in_performance_schema (user_view)
-user_view
-use test;
-drop view test.user_view;
-"Testing mysql_upgrade with PROCEDURE performance_schema.user_proc"
-create procedure test.user_proc()
-select "Not supposed to be here";
-update mysql.proc set db='performance_schema' where name='user_proc';
-ERROR 1050 (42S01) at line 70: Table 'cond_instances' already exists
-ERROR 1050 (42S01) at line 94: Table 'events_waits_current' already exists
-ERROR 1050 (42S01) at line 118: Table 'events_waits_history' already exists
-ERROR 1050 (42S01) at line 142: Table 'events_waits_history_long' already exists
-ERROR 1050 (42S01) at line 155: Table 'events_waits_summary_by_instance' already exists
-ERROR 1050 (42S01) at line 168: Table 'events_waits_summary_by_thread_by_event_name' already exists
-ERROR 1050 (42S01) at line 180: Table 'events_waits_summary_global_by_event_name' already exists
-ERROR 1050 (42S01) at line 189: Table 'file_instances' already exists
-ERROR 1050 (42S01) at line 200: Table 'file_summary_by_event_name' already exists
-ERROR 1050 (42S01) at line 212: Table 'file_summary_by_instance' already exists
-ERROR 1050 (42S01) at line 221: Table 'mutex_instances' already exists
-ERROR 1050 (42S01) at line 235: Table 'objects_summary_global_by_type' already exists
-ERROR 1050 (42S01) at line 245: Table 'performance_timers' already exists
-ERROR 1050 (42S01) at line 255: Table 'rwlock_instances' already exists
-ERROR 1050 (42S01) at line 264: Table 'setup_actors' already exists
-ERROR 1050 (42S01) at line 272: Table 'setup_consumers' already exists
-ERROR 1050 (42S01) at line 281: Table 'setup_instruments' already exists
-ERROR 1050 (42S01) at line 291: Table 'setup_objects' already exists
-ERROR 1050 (42S01) at line 299: Table 'setup_timers' already exists
-ERROR 1050 (42S01) at line 344: Table 'table_io_waits_summary_by_index_usage' already exists
-ERROR 1050 (42S01) at line 388: Table 'table_io_waits_summary_by_table' already exists
-ERROR 1050 (42S01) at line 467: Table 'table_lock_waits_summary_by_table' already exists
-ERROR 1050 (42S01) at line 487: Table 'threads' already exists
-ERROR 1050 (42S01) at line 502: Table 'events_stages_current' already exists
-ERROR 1050 (42S01) at line 517: Table 'events_stages_history' already exists
-ERROR 1050 (42S01) at line 532: Table 'events_stages_history_long' already exists
-ERROR 1050 (42S01) at line 545: Table 'events_stages_summary_by_thread_by_event_name' already exists
-ERROR 1050 (42S01) at line 557: Table 'events_stages_summary_global_by_event_name' already exists
-ERROR 1050 (42S01) at line 600: Table 'events_statements_current' already exists
-ERROR 1050 (42S01) at line 643: Table 'events_statements_history' already exists
-ERROR 1050 (42S01) at line 686: Table 'events_statements_history_long' already exists
-ERROR 1050 (42S01) at line 718: Table 'events_statements_summary_by_thread_by_event_name' already exists
-ERROR 1050 (42S01) at line 749: Table 'events_statements_summary_global_by_event_name' already exists
-ERROR 1644 (HY000) at line 1169: Unexpected content found in the performance_schema database.
-FATAL ERROR: Upgrade failed
-select name from mysql.proc where db='performance_schema';
-name
-user_proc
-update mysql.proc set db='test' where name='user_proc';
-drop procedure test.user_proc;
-"Testing mysql_upgrade with FUNCTION performance_schema.user_func"
-create function test.user_func() returns integer
-return 0;
-update mysql.proc set db='performance_schema' where name='user_func';
-ERROR 1050 (42S01) at line 70: Table 'cond_instances' already exists
-ERROR 1050 (42S01) at line 94: Table 'events_waits_current' already exists
-ERROR 1050 (42S01) at line 118: Table 'events_waits_history' already exists
-ERROR 1050 (42S01) at line 142: Table 'events_waits_history_long' already exists
-ERROR 1050 (42S01) at line 155: Table 'events_waits_summary_by_instance' already exists
-ERROR 1050 (42S01) at line 168: Table 'events_waits_summary_by_thread_by_event_name' already exists
-ERROR 1050 (42S01) at line 180: Table 'events_waits_summary_global_by_event_name' already exists
-ERROR 1050 (42S01) at line 189: Table 'file_instances' already exists
-ERROR 1050 (42S01) at line 200: Table 'file_summary_by_event_name' already exists
-ERROR 1050 (42S01) at line 212: Table 'file_summary_by_instance' already exists
-ERROR 1050 (42S01) at line 221: Table 'mutex_instances' already exists
-ERROR 1050 (42S01) at line 235: Table 'objects_summary_global_by_type' already exists
-ERROR 1050 (42S01) at line 245: Table 'performance_timers' already exists
-ERROR 1050 (42S01) at line 255: Table 'rwlock_instances' already exists
-ERROR 1050 (42S01) at line 264: Table 'setup_actors' already exists
-ERROR 1050 (42S01) at line 272: Table 'setup_consumers' already exists
-ERROR 1050 (42S01) at line 281: Table 'setup_instruments' already exists
-ERROR 1050 (42S01) at line 291: Table 'setup_objects' already exists
-ERROR 1050 (42S01) at line 299: Table 'setup_timers' already exists
-ERROR 1050 (42S01) at line 344: Table 'table_io_waits_summary_by_index_usage' already exists
-ERROR 1050 (42S01) at line 388: Table 'table_io_waits_summary_by_table' already exists
-ERROR 1050 (42S01) at line 467: Table 'table_lock_waits_summary_by_table' already exists
-ERROR 1050 (42S01) at line 487: Table 'threads' already exists
-ERROR 1050 (42S01) at line 502: Table 'events_stages_current' already exists
-ERROR 1050 (42S01) at line 517: Table 'events_stages_history' already exists
-ERROR 1050 (42S01) at line 532: Table 'events_stages_history_long' already exists
-ERROR 1050 (42S01) at line 545: Table 'events_stages_summary_by_thread_by_event_name' already exists
-ERROR 1050 (42S01) at line 557: Table 'events_stages_summary_global_by_event_name' already exists
-ERROR 1050 (42S01) at line 600: Table 'events_statements_current' already exists
-ERROR 1050 (42S01) at line 643: Table 'events_statements_history' already exists
-ERROR 1050 (42S01) at line 686: Table 'events_statements_history_long' already exists
-ERROR 1050 (42S01) at line 718: Table 'events_statements_summary_by_thread_by_event_name' already exists
-ERROR 1050 (42S01) at line 749: Table 'events_statements_summary_global_by_event_name' already exists
-ERROR 1644 (HY000) at line 1169: Unexpected content found in the performance_schema database.
-FATAL ERROR: Upgrade failed
-select name from mysql.proc where db='performance_schema';
-name
-user_func
-update mysql.proc set db='test' where name='user_func';
-drop function test.user_func;
-"Testing mysql_upgrade with EVENT performance_schema.user_event"
-create event test.user_event on schedule every 1 day do
-select "not supposed to be here";
-update mysql.event set db='performance_schema' where name='user_event';
-ERROR 1050 (42S01) at line 70: Table 'cond_instances' already exists
-ERROR 1050 (42S01) at line 94: Table 'events_waits_current' already exists
-ERROR 1050 (42S01) at line 118: Table 'events_waits_history' already exists
-ERROR 1050 (42S01) at line 142: Table 'events_waits_history_long' already exists
-ERROR 1050 (42S01) at line 155: Table 'events_waits_summary_by_instance' already exists
-ERROR 1050 (42S01) at line 168: Table 'events_waits_summary_by_thread_by_event_name' already exists
-ERROR 1050 (42S01) at line 180: Table 'events_waits_summary_global_by_event_name' already exists
-ERROR 1050 (42S01) at line 189: Table 'file_instances' already exists
-ERROR 1050 (42S01) at line 200: Table 'file_summary_by_event_name' already exists
-ERROR 1050 (42S01) at line 212: Table 'file_summary_by_instance' already exists
-ERROR 1050 (42S01) at line 221: Table 'mutex_instances' already exists
-ERROR 1050 (42S01) at line 235: Table 'objects_summary_global_by_type' already exists
-ERROR 1050 (42S01) at line 245: Table 'performance_timers' already exists
-ERROR 1050 (42S01) at line 255: Table 'rwlock_instances' already exists
-ERROR 1050 (42S01) at line 264: Table 'setup_actors' already exists
-ERROR 1050 (42S01) at line 272: Table 'setup_consumers' already exists
-ERROR 1050 (42S01) at line 281: Table 'setup_instruments' already exists
-ERROR 1050 (42S01) at line 291: Table 'setup_objects' already exists
-ERROR 1050 (42S01) at line 299: Table 'setup_timers' already exists
-ERROR 1050 (42S01) at line 344: Table 'table_io_waits_summary_by_index_usage' already exists
-ERROR 1050 (42S01) at line 388: Table 'table_io_waits_summary_by_table' already exists
-ERROR 1050 (42S01) at line 467: Table 'table_lock_waits_summary_by_table' already exists
-ERROR 1050 (42S01) at line 487: Table 'threads' already exists
-ERROR 1050 (42S01) at line 502: Table 'events_stages_current' already exists
-ERROR 1050 (42S01) at line 517: Table 'events_stages_history' already exists
-ERROR 1050 (42S01) at line 532: Table 'events_stages_history_long' already exists
-ERROR 1050 (42S01) at line 545: Table 'events_stages_summary_by_thread_by_event_name' already exists
-ERROR 1050 (42S01) at line 557: Table 'events_stages_summary_global_by_event_name' already exists
-ERROR 1050 (42S01) at line 600: Table 'events_statements_current' already exists
-ERROR 1050 (42S01) at line 643: Table 'events_statements_history' already exists
-ERROR 1050 (42S01) at line 686: Table 'events_statements_history_long' already exists
-ERROR 1050 (42S01) at line 718: Table 'events_statements_summary_by_thread_by_event_name' already exists
-ERROR 1050 (42S01) at line 749: Table 'events_statements_summary_global_by_event_name' already exists
-ERROR 1644 (HY000) at line 1169: Unexpected content found in the performance_schema database.
-FATAL ERROR: Upgrade failed
-select name from mysql.event where db='performance_schema';
-name
-user_event
-update mysql.event set db='test' where name='user_event';
-drop event test.user_event;

=== added file 'mysql-test/suite/perfschema/r/schema.result'
--- a/mysql-test/suite/perfschema/r/schema.result	1970-01-01 00:00:00 +0000
+++ b/mysql-test/suite/perfschema/r/schema.result	2011-05-17 09:15:47 +0000
@@ -0,0 +1,663 @@
+show databases like 'performance_schema';
+Database (performance_schema)
+performance_schema
+show create database performance_schema;
+Database	Create Database
+performance_schema	CREATE DATABASE `performance_schema` /*!40100 DEFAULT CHARACTER SET utf8 */
+use performance_schema;
+show tables;
+Tables_in_performance_schema
+cond_instances
+events_stages_current
+events_stages_history
+events_stages_history_long
+events_stages_summary_by_thread_by_event_name
+events_stages_summary_global_by_event_name
+events_statements_current
+events_statements_history
+events_statements_history_long
+events_statements_summary_by_thread_by_event_name
+events_statements_summary_global_by_event_name
+events_waits_current
+events_waits_history
+events_waits_history_long
+events_waits_summary_by_instance
+events_waits_summary_by_thread_by_event_name
+events_waits_summary_global_by_event_name
+file_instances
+file_summary_by_event_name
+file_summary_by_instance
+mutex_instances
+objects_summary_global_by_type
+performance_timers
+rwlock_instances
+setup_actors
+setup_consumers
+setup_instruments
+setup_objects
+setup_timers
+table_io_waits_summary_by_index_usage
+table_io_waits_summary_by_table
+table_lock_waits_summary_by_table
+threads
+show create table cond_instances;
+Table	Create Table
+cond_instances	CREATE TABLE `cond_instances` (
+  `NAME` varchar(128) NOT NULL,
+  `OBJECT_INSTANCE_BEGIN` bigint(20) NOT NULL
+) ENGINE=PERFORMANCE_SCHEMA DEFAULT CHARSET=utf8
+show create table events_stages_current;
+Table	Create Table
+events_stages_current	CREATE TABLE `events_stages_current` (
+  `THREAD_ID` int(11) NOT NULL,
+  `EVENT_ID` bigint(20) unsigned NOT NULL,
+  `EVENT_NAME` varchar(128) NOT NULL,
+  `SOURCE` varchar(64) DEFAULT NULL,
+  `TIMER_START` bigint(20) unsigned DEFAULT NULL,
+  `TIMER_END` bigint(20) unsigned DEFAULT NULL,
+  `TIMER_WAIT` bigint(20) unsigned DEFAULT NULL,
+  `NESTING_EVENT_ID` bigint(20) unsigned DEFAULT NULL,
+  `NESTING_EVENT_TYPE` enum('STATEMENT','STAGE','WAIT') DEFAULT NULL
+) ENGINE=PERFORMANCE_SCHEMA DEFAULT CHARSET=utf8
+show create table events_stages_history;
+Table	Create Table
+events_stages_history	CREATE TABLE `events_stages_history` (
+  `THREAD_ID` int(11) NOT NULL,
+  `EVENT_ID` bigint(20) unsigned NOT NULL,
+  `EVENT_NAME` varchar(128) NOT NULL,
+  `SOURCE` varchar(64) DEFAULT NULL,
+  `TIMER_START` bigint(20) unsigned DEFAULT NULL,
+  `TIMER_END` bigint(20) unsigned DEFAULT NULL,
+  `TIMER_WAIT` bigint(20) unsigned DEFAULT NULL,
+  `NESTING_EVENT_ID` bigint(20) unsigned DEFAULT NULL,
+  `NESTING_EVENT_TYPE` enum('STATEMENT','STAGE','WAIT') DEFAULT NULL
+) ENGINE=PERFORMANCE_SCHEMA DEFAULT CHARSET=utf8
+show create table events_stages_history_long;
+Table	Create Table
+events_stages_history_long	CREATE TABLE `events_stages_history_long` (
+  `THREAD_ID` int(11) NOT NULL,
+  `EVENT_ID` bigint(20) unsigned NOT NULL,
+  `EVENT_NAME` varchar(128) NOT NULL,
+  `SOURCE` varchar(64) DEFAULT NULL,
+  `TIMER_START` bigint(20) unsigned DEFAULT NULL,
+  `TIMER_END` bigint(20) unsigned DEFAULT NULL,
+  `TIMER_WAIT` bigint(20) unsigned DEFAULT NULL,
+  `NESTING_EVENT_ID` bigint(20) unsigned DEFAULT NULL,
+  `NESTING_EVENT_TYPE` enum('STATEMENT','STAGE','WAIT') DEFAULT NULL
+) ENGINE=PERFORMANCE_SCHEMA DEFAULT CHARSET=utf8
+show create table events_stages_summary_by_thread_by_event_name;
+Table	Create Table
+events_stages_summary_by_thread_by_event_name	CREATE TABLE `events_stages_summary_by_thread_by_event_name` (
+  `THREAD_ID` int(11) NOT NULL,
+  `EVENT_NAME` varchar(128) NOT NULL,
+  `COUNT_STAR` bigint(20) unsigned NOT NULL,
+  `SUM_TIMER_WAIT` bigint(20) unsigned NOT NULL,
+  `MIN_TIMER_WAIT` bigint(20) unsigned NOT NULL,
+  `AVG_TIMER_WAIT` bigint(20) unsigned NOT NULL,
+  `MAX_TIMER_WAIT` bigint(20) unsigned NOT NULL
+) ENGINE=PERFORMANCE_SCHEMA DEFAULT CHARSET=utf8
+show create table events_stages_summary_global_by_event_name;
+Table	Create Table
+events_stages_summary_global_by_event_name	CREATE TABLE `events_stages_summary_global_by_event_name` (
+  `EVENT_NAME` varchar(128) NOT NULL,
+  `COUNT_STAR` bigint(20) unsigned NOT NULL,
+  `SUM_TIMER_WAIT` bigint(20) unsigned NOT NULL,
+  `MIN_TIMER_WAIT` bigint(20) unsigned NOT NULL,
+  `AVG_TIMER_WAIT` bigint(20) unsigned NOT NULL,
+  `MAX_TIMER_WAIT` bigint(20) unsigned NOT NULL
+) ENGINE=PERFORMANCE_SCHEMA DEFAULT CHARSET=utf8
+show create table events_statements_current;
+Table	Create Table
+events_statements_current	CREATE TABLE `events_statements_current` (
+  `THREAD_ID` int(11) NOT NULL,
+  `EVENT_ID` bigint(20) unsigned NOT NULL,
+  `EVENT_NAME` varchar(128) NOT NULL,
+  `SOURCE` varchar(64) DEFAULT NULL,
+  `TIMER_START` bigint(20) unsigned DEFAULT NULL,
+  `TIMER_END` bigint(20) unsigned DEFAULT NULL,
+  `TIMER_WAIT` bigint(20) unsigned DEFAULT NULL,
+  `LOCK_TIME` bigint(20) unsigned NOT NULL,
+  `SQL_TEXT` longtext,
+  `CURRENT_SCHEMA` varchar(64) DEFAULT NULL,
+  `OBJECT_TYPE` varchar(64) DEFAULT NULL,
+  `OBJECT_SCHEMA` varchar(64) DEFAULT NULL,
+  `OBJECT_NAME` varchar(64) DEFAULT NULL,
+  `OBJECT_INSTANCE_BEGIN` bigint(20) DEFAULT NULL,
+  `MYSQL_ERRNO` int(11) DEFAULT NULL,
+  `RETURNED_SQLSTATE` varchar(5) DEFAULT NULL,
+  `MESSAGE_TEXT` varchar(128) DEFAULT NULL,
+  `ERRORS` bigint(20) unsigned NOT NULL,
+  `WARNINGS` bigint(20) unsigned NOT NULL,
+  `ROWS_AFFECTED` bigint(20) unsigned NOT NULL,
+  `ROWS_SENT` bigint(20) unsigned NOT NULL,
+  `ROWS_EXAMINED` bigint(20) unsigned NOT NULL,
+  `CREATED_TMP_DISK_TABLES` bigint(20) unsigned NOT NULL,
+  `CREATED_TMP_TABLES` bigint(20) unsigned NOT NULL,
+  `SELECT_FULL_JOIN` bigint(20) unsigned NOT NULL,
+  `SELECT_FULL_RANGE_JOIN` bigint(20) unsigned NOT NULL,
+  `SELECT_RANGE` bigint(20) unsigned NOT NULL,
+  `SELECT_RANGE_CHECK` bigint(20) unsigned NOT NULL,
+  `SELECT_SCAN` bigint(20) unsigned NOT NULL,
+  `SORT_MERGE_PASSES` bigint(20) unsigned NOT NULL,
+  `SORT_RANGE` bigint(20) unsigned NOT NULL,
+  `SORT_ROWS` bigint(20) unsigned NOT NULL,
+  `SORT_SCAN` bigint(20) unsigned NOT NULL,
+  `NO_INDEX_USED` bigint(20) unsigned NOT NULL,
+  `NO_GOOD_INDEX_USED` bigint(20) unsigned NOT NULL,
+  `NESTING_EVENT_ID` bigint(20) unsigned DEFAULT NULL,
+  `NESTING_EVENT_TYPE` enum('STATEMENT','STAGE','WAIT') DEFAULT NULL
+) ENGINE=PERFORMANCE_SCHEMA DEFAULT CHARSET=utf8
+show create table events_statements_history;
+Table	Create Table
+events_statements_history	CREATE TABLE `events_statements_history` (
+  `THREAD_ID` int(11) NOT NULL,
+  `EVENT_ID` bigint(20) unsigned NOT NULL,
+  `EVENT_NAME` varchar(128) NOT NULL,
+  `SOURCE` varchar(64) DEFAULT NULL,
+  `TIMER_START` bigint(20) unsigned DEFAULT NULL,
+  `TIMER_END` bigint(20) unsigned DEFAULT NULL,
+  `TIMER_WAIT` bigint(20) unsigned DEFAULT NULL,
+  `LOCK_TIME` bigint(20) unsigned NOT NULL,
+  `SQL_TEXT` longtext,
+  `CURRENT_SCHEMA` varchar(64) DEFAULT NULL,
+  `OBJECT_TYPE` varchar(64) DEFAULT NULL,
+  `OBJECT_SCHEMA` varchar(64) DEFAULT NULL,
+  `OBJECT_NAME` varchar(64) DEFAULT NULL,
+  `OBJECT_INSTANCE_BEGIN` bigint(20) DEFAULT NULL,
+  `MYSQL_ERRNO` int(11) DEFAULT NULL,
+  `RETURNED_SQLSTATE` varchar(5) DEFAULT NULL,
+  `MESSAGE_TEXT` varchar(128) DEFAULT NULL,
+  `ERRORS` bigint(20) unsigned NOT NULL,
+  `WARNINGS` bigint(20) unsigned NOT NULL,
+  `ROWS_AFFECTED` bigint(20) unsigned NOT NULL,
+  `ROWS_SENT` bigint(20) unsigned NOT NULL,
+  `ROWS_EXAMINED` bigint(20) unsigned NOT NULL,
+  `CREATED_TMP_DISK_TABLES` bigint(20) unsigned NOT NULL,
+  `CREATED_TMP_TABLES` bigint(20) unsigned NOT NULL,
+  `SELECT_FULL_JOIN` bigint(20) unsigned NOT NULL,
+  `SELECT_FULL_RANGE_JOIN` bigint(20) unsigned NOT NULL,
+  `SELECT_RANGE` bigint(20) unsigned NOT NULL,
+  `SELECT_RANGE_CHECK` bigint(20) unsigned NOT NULL,
+  `SELECT_SCAN` bigint(20) unsigned NOT NULL,
+  `SORT_MERGE_PASSES` bigint(20) unsigned NOT NULL,
+  `SORT_RANGE` bigint(20) unsigned NOT NULL,
+  `SORT_ROWS` bigint(20) unsigned NOT NULL,
+  `SORT_SCAN` bigint(20) unsigned NOT NULL,
+  `NO_INDEX_USED` bigint(20) unsigned NOT NULL,
+  `NO_GOOD_INDEX_USED` bigint(20) unsigned NOT NULL,
+  `NESTING_EVENT_ID` bigint(20) unsigned DEFAULT NULL,
+  `NESTING_EVENT_TYPE` enum('STATEMENT','STAGE','WAIT') DEFAULT NULL
+) ENGINE=PERFORMANCE_SCHEMA DEFAULT CHARSET=utf8
+show create table events_statements_history_long;
+Table	Create Table
+events_statements_history_long	CREATE TABLE `events_statements_history_long` (
+  `THREAD_ID` int(11) NOT NULL,
+  `EVENT_ID` bigint(20) unsigned NOT NULL,
+  `EVENT_NAME` varchar(128) NOT NULL,
+  `SOURCE` varchar(64) DEFAULT NULL,
+  `TIMER_START` bigint(20) unsigned DEFAULT NULL,
+  `TIMER_END` bigint(20) unsigned DEFAULT NULL,
+  `TIMER_WAIT` bigint(20) unsigned DEFAULT NULL,
+  `LOCK_TIME` bigint(20) unsigned NOT NULL,
+  `SQL_TEXT` longtext,
+  `CURRENT_SCHEMA` varchar(64) DEFAULT NULL,
+  `OBJECT_TYPE` varchar(64) DEFAULT NULL,
+  `OBJECT_SCHEMA` varchar(64) DEFAULT NULL,
+  `OBJECT_NAME` varchar(64) DEFAULT NULL,
+  `OBJECT_INSTANCE_BEGIN` bigint(20) DEFAULT NULL,
+  `MYSQL_ERRNO` int(11) DEFAULT NULL,
+  `RETURNED_SQLSTATE` varchar(5) DEFAULT NULL,
+  `MESSAGE_TEXT` varchar(128) DEFAULT NULL,
+  `ERRORS` bigint(20) unsigned NOT NULL,
+  `WARNINGS` bigint(20) unsigned NOT NULL,
+  `ROWS_AFFECTED` bigint(20) unsigned NOT NULL,
+  `ROWS_SENT` bigint(20) unsigned NOT NULL,
+  `ROWS_EXAMINED` bigint(20) unsigned NOT NULL,
+  `CREATED_TMP_DISK_TABLES` bigint(20) unsigned NOT NULL,
+  `CREATED_TMP_TABLES` bigint(20) unsigned NOT NULL,
+  `SELECT_FULL_JOIN` bigint(20) unsigned NOT NULL,
+  `SELECT_FULL_RANGE_JOIN` bigint(20) unsigned NOT NULL,
+  `SELECT_RANGE` bigint(20) unsigned NOT NULL,
+  `SELECT_RANGE_CHECK` bigint(20) unsigned NOT NULL,
+  `SELECT_SCAN` bigint(20) unsigned NOT NULL,
+  `SORT_MERGE_PASSES` bigint(20) unsigned NOT NULL,
+  `SORT_RANGE` bigint(20) unsigned NOT NULL,
+  `SORT_ROWS` bigint(20) unsigned NOT NULL,
+  `SORT_SCAN` bigint(20) unsigned NOT NULL,
+  `NO_INDEX_USED` bigint(20) unsigned NOT NULL,
+  `NO_GOOD_INDEX_USED` bigint(20) unsigned NOT NULL,
+  `NESTING_EVENT_ID` bigint(20) unsigned DEFAULT NULL,
+  `NESTING_EVENT_TYPE` enum('STATEMENT','STAGE','WAIT') DEFAULT NULL
+) ENGINE=PERFORMANCE_SCHEMA DEFAULT CHARSET=utf8
+show create table events_statements_summary_by_thread_by_event_name;
+Table	Create Table
+events_statements_summary_by_thread_by_event_name	CREATE TABLE `events_statements_summary_by_thread_by_event_name` (
+  `THREAD_ID` int(11) NOT NULL,
+  `EVENT_NAME` varchar(128) NOT NULL,
+  `COUNT_STAR` bigint(20) unsigned NOT NULL,
+  `SUM_TIMER_WAIT` bigint(20) unsigned NOT NULL,
+  `MIN_TIMER_WAIT` bigint(20) unsigned NOT NULL,
+  `AVG_TIMER_WAIT` bigint(20) unsigned NOT NULL,
+  `MAX_TIMER_WAIT` bigint(20) unsigned NOT NULL,
+  `SUM_LOCK_TIME` bigint(20) unsigned NOT NULL,
+  `SUM_ERRORS` bigint(20) unsigned NOT NULL,
+  `SUM_WARNINGS` bigint(20) unsigned NOT NULL,
+  `SUM_ROWS_AFFECTED` bigint(20) unsigned NOT NULL,
+  `SUM_ROWS_SENT` bigint(20) unsigned NOT NULL,
+  `SUM_ROWS_EXAMINED` bigint(20) unsigned NOT NULL,
+  `SUM_CREATED_TMP_DISK_TABLES` bigint(20) unsigned NOT NULL,
+  `SUM_CREATED_TMP_TABLES` bigint(20) unsigned NOT NULL,
+  `SUM_SELECT_FULL_JOIN` bigint(20) unsigned NOT NULL,
+  `SUM_SELECT_FULL_RANGE_JOIN` bigint(20) unsigned NOT NULL,
+  `SUM_SELECT_RANGE` bigint(20) unsigned NOT NULL,
+  `SUM_SELECT_RANGE_CHECK` bigint(20) unsigned NOT NULL,
+  `SUM_SELECT_SCAN` bigint(20) unsigned NOT NULL,
+  `SUM_SORT_MERGE_PASSES` bigint(20) unsigned NOT NULL,
+  `SUM_SORT_RANGE` bigint(20) unsigned NOT NULL,
+  `SUM_SORT_ROWS` bigint(20) unsigned NOT NULL,
+  `SUM_SORT_SCAN` bigint(20) unsigned NOT NULL,
+  `SUM_NO_INDEX_USED` bigint(20) unsigned NOT NULL,
+  `SUM_NO_GOOD_INDEX_USED` bigint(20) unsigned NOT NULL
+) ENGINE=PERFORMANCE_SCHEMA DEFAULT CHARSET=utf8
+show create table events_statements_summary_global_by_event_name;
+Table	Create Table
+events_statements_summary_global_by_event_name	CREATE TABLE `events_statements_summary_global_by_event_name` (
+  `EVENT_NAME` varchar(128) NOT NULL,
+  `COUNT_STAR` bigint(20) unsigned NOT NULL,
+  `SUM_TIMER_WAIT` bigint(20) unsigned NOT NULL,
+  `MIN_TIMER_WAIT` bigint(20) unsigned NOT NULL,
+  `AVG_TIMER_WAIT` bigint(20) unsigned NOT NULL,
+  `MAX_TIMER_WAIT` bigint(20) unsigned NOT NULL,
+  `SUM_LOCK_TIME` bigint(20) unsigned NOT NULL,
+  `SUM_ERRORS` bigint(20) unsigned NOT NULL,
+  `SUM_WARNINGS` bigint(20) unsigned NOT NULL,
+  `SUM_ROWS_AFFECTED` bigint(20) unsigned NOT NULL,
+  `SUM_ROWS_SENT` bigint(20) unsigned NOT NULL,
+  `SUM_ROWS_EXAMINED` bigint(20) unsigned NOT NULL,
+  `SUM_CREATED_TMP_DISK_TABLES` bigint(20) unsigned NOT NULL,
+  `SUM_CREATED_TMP_TABLES` bigint(20) unsigned NOT NULL,
+  `SUM_SELECT_FULL_JOIN` bigint(20) unsigned NOT NULL,
+  `SUM_SELECT_FULL_RANGE_JOIN` bigint(20) unsigned NOT NULL,
+  `SUM_SELECT_RANGE` bigint(20) unsigned NOT NULL,
+  `SUM_SELECT_RANGE_CHECK` bigint(20) unsigned NOT NULL,
+  `SUM_SELECT_SCAN` bigint(20) unsigned NOT NULL,
+  `SUM_SORT_MERGE_PASSES` bigint(20) unsigned NOT NULL,
+  `SUM_SORT_RANGE` bigint(20) unsigned NOT NULL,
+  `SUM_SORT_ROWS` bigint(20) unsigned NOT NULL,
+  `SUM_SORT_SCAN` bigint(20) unsigned NOT NULL,
+  `SUM_NO_INDEX_USED` bigint(20) unsigned NOT NULL,
+  `SUM_NO_GOOD_INDEX_USED` bigint(20) unsigned NOT NULL
+) ENGINE=PERFORMANCE_SCHEMA DEFAULT CHARSET=utf8
+show create table events_waits_current;
+Table	Create Table
+events_waits_current	CREATE TABLE `events_waits_current` (
+  `THREAD_ID` int(11) NOT NULL,
+  `EVENT_ID` bigint(20) unsigned NOT NULL,
+  `EVENT_NAME` varchar(128) NOT NULL,
+  `SOURCE` varchar(64) DEFAULT NULL,
+  `TIMER_START` bigint(20) unsigned DEFAULT NULL,
+  `TIMER_END` bigint(20) unsigned DEFAULT NULL,
+  `TIMER_WAIT` bigint(20) unsigned DEFAULT NULL,
+  `SPINS` int(10) unsigned DEFAULT NULL,
+  `OBJECT_SCHEMA` varchar(64) DEFAULT NULL,
+  `OBJECT_NAME` varchar(512) DEFAULT NULL,
+  `INDEX_NAME` varchar(64) DEFAULT NULL,
+  `OBJECT_TYPE` varchar(64) DEFAULT NULL,
+  `OBJECT_INSTANCE_BEGIN` bigint(20) NOT NULL,
+  `NESTING_EVENT_ID` bigint(20) unsigned DEFAULT NULL,
+  `NESTING_EVENT_TYPE` enum('STATEMENT','STAGE','WAIT') DEFAULT NULL,
+  `OPERATION` varchar(32) NOT NULL,
+  `NUMBER_OF_BYTES` bigint(20) unsigned DEFAULT NULL,
+  `FLAGS` int(10) unsigned DEFAULT NULL
+) ENGINE=PERFORMANCE_SCHEMA DEFAULT CHARSET=utf8
+show create table events_waits_history;
+Table	Create Table
+events_waits_history	CREATE TABLE `events_waits_history` (
+  `THREAD_ID` int(11) NOT NULL,
+  `EVENT_ID` bigint(20) unsigned NOT NULL,
+  `EVENT_NAME` varchar(128) NOT NULL,
+  `SOURCE` varchar(64) DEFAULT NULL,
+  `TIMER_START` bigint(20) unsigned DEFAULT NULL,
+  `TIMER_END` bigint(20) unsigned DEFAULT NULL,
+  `TIMER_WAIT` bigint(20) unsigned DEFAULT NULL,
+  `SPINS` int(10) unsigned DEFAULT NULL,
+  `OBJECT_SCHEMA` varchar(64) DEFAULT NULL,
+  `OBJECT_NAME` varchar(512) DEFAULT NULL,
+  `INDEX_NAME` varchar(64) DEFAULT NULL,
+  `OBJECT_TYPE` varchar(64) DEFAULT NULL,
+  `OBJECT_INSTANCE_BEGIN` bigint(20) NOT NULL,
+  `NESTING_EVENT_ID` bigint(20) unsigned DEFAULT NULL,
+  `NESTING_EVENT_TYPE` enum('STATEMENT','STAGE','WAIT') DEFAULT NULL,
+  `OPERATION` varchar(32) NOT NULL,
+  `NUMBER_OF_BYTES` bigint(20) unsigned DEFAULT NULL,
+  `FLAGS` int(10) unsigned DEFAULT NULL
+) ENGINE=PERFORMANCE_SCHEMA DEFAULT CHARSET=utf8
+show create table events_waits_history_long;
+Table	Create Table
+events_waits_history_long	CREATE TABLE `events_waits_history_long` (
+  `THREAD_ID` int(11) NOT NULL,
+  `EVENT_ID` bigint(20) unsigned NOT NULL,
+  `EVENT_NAME` varchar(128) NOT NULL,
+  `SOURCE` varchar(64) DEFAULT NULL,
+  `TIMER_START` bigint(20) unsigned DEFAULT NULL,
+  `TIMER_END` bigint(20) unsigned DEFAULT NULL,
+  `TIMER_WAIT` bigint(20) unsigned DEFAULT NULL,
+  `SPINS` int(10) unsigned DEFAULT NULL,
+  `OBJECT_SCHEMA` varchar(64) DEFAULT NULL,
+  `OBJECT_NAME` varchar(512) DEFAULT NULL,
+  `INDEX_NAME` varchar(64) DEFAULT NULL,
+  `OBJECT_TYPE` varchar(64) DEFAULT NULL,
+  `OBJECT_INSTANCE_BEGIN` bigint(20) NOT NULL,
+  `NESTING_EVENT_ID` bigint(20) unsigned DEFAULT NULL,
+  `NESTING_EVENT_TYPE` enum('STATEMENT','STAGE','WAIT') DEFAULT NULL,
+  `OPERATION` varchar(32) NOT NULL,
+  `NUMBER_OF_BYTES` bigint(20) unsigned DEFAULT NULL,
+  `FLAGS` int(10) unsigned DEFAULT NULL
+) ENGINE=PERFORMANCE_SCHEMA DEFAULT CHARSET=utf8
+show create table events_waits_summary_by_instance;
+Table	Create Table
+events_waits_summary_by_instance	CREATE TABLE `events_waits_summary_by_instance` (
+  `EVENT_NAME` varchar(128) NOT NULL,
+  `OBJECT_INSTANCE_BEGIN` bigint(20) NOT NULL,
+  `COUNT_STAR` bigint(20) unsigned NOT NULL,
+  `SUM_TIMER_WAIT` bigint(20) unsigned NOT NULL,
+  `MIN_TIMER_WAIT` bigint(20) unsigned NOT NULL,
+  `AVG_TIMER_WAIT` bigint(20) unsigned NOT NULL,
+  `MAX_TIMER_WAIT` bigint(20) unsigned NOT NULL
+) ENGINE=PERFORMANCE_SCHEMA DEFAULT CHARSET=utf8
+show create table events_waits_summary_by_thread_by_event_name;
+Table	Create Table
+events_waits_summary_by_thread_by_event_name	CREATE TABLE `events_waits_summary_by_thread_by_event_name` (
+  `THREAD_ID` int(11) NOT NULL,
+  `EVENT_NAME` varchar(128) NOT NULL,
+  `COUNT_STAR` bigint(20) unsigned NOT NULL,
+  `SUM_TIMER_WAIT` bigint(20) unsigned NOT NULL,
+  `MIN_TIMER_WAIT` bigint(20) unsigned NOT NULL,
+  `AVG_TIMER_WAIT` bigint(20) unsigned NOT NULL,
+  `MAX_TIMER_WAIT` bigint(20) unsigned NOT NULL
+) ENGINE=PERFORMANCE_SCHEMA DEFAULT CHARSET=utf8
+show create table events_waits_summary_global_by_event_name;
+Table	Create Table
+events_waits_summary_global_by_event_name	CREATE TABLE `events_waits_summary_global_by_event_name` (
+  `EVENT_NAME` varchar(128) NOT NULL,
+  `COUNT_STAR` bigint(20) unsigned NOT NULL,
+  `SUM_TIMER_WAIT` bigint(20) unsigned NOT NULL,
+  `MIN_TIMER_WAIT` bigint(20) unsigned NOT NULL,
+  `AVG_TIMER_WAIT` bigint(20) unsigned NOT NULL,
+  `MAX_TIMER_WAIT` bigint(20) unsigned NOT NULL
+) ENGINE=PERFORMANCE_SCHEMA DEFAULT CHARSET=utf8
+show create table file_instances;
+Table	Create Table
+file_instances	CREATE TABLE `file_instances` (
+  `FILE_NAME` varchar(512) NOT NULL,
+  `EVENT_NAME` varchar(128) NOT NULL,
+  `OPEN_COUNT` int(10) unsigned NOT NULL
+) ENGINE=PERFORMANCE_SCHEMA DEFAULT CHARSET=utf8
+show create table file_summary_by_event_name;
+Table	Create Table
+file_summary_by_event_name	CREATE TABLE `file_summary_by_event_name` (
+  `EVENT_NAME` varchar(128) NOT NULL,
+  `COUNT_READ` bigint(20) unsigned NOT NULL,
+  `COUNT_WRITE` bigint(20) unsigned NOT NULL,
+  `SUM_NUMBER_OF_BYTES_READ` bigint(20) unsigned NOT NULL,
+  `SUM_NUMBER_OF_BYTES_WRITE` bigint(20) unsigned NOT NULL
+) ENGINE=PERFORMANCE_SCHEMA DEFAULT CHARSET=utf8
+show create table file_summary_by_instance;
+Table	Create Table
+file_summary_by_instance	CREATE TABLE `file_summary_by_instance` (
+  `FILE_NAME` varchar(512) NOT NULL,
+  `EVENT_NAME` varchar(128) NOT NULL,
+  `COUNT_READ` bigint(20) unsigned NOT NULL,
+  `COUNT_WRITE` bigint(20) unsigned NOT NULL,
+  `SUM_NUMBER_OF_BYTES_READ` bigint(20) unsigned NOT NULL,
+  `SUM_NUMBER_OF_BYTES_WRITE` bigint(20) unsigned NOT NULL
+) ENGINE=PERFORMANCE_SCHEMA DEFAULT CHARSET=utf8
+show create table mutex_instances;
+Table	Create Table
+mutex_instances	CREATE TABLE `mutex_instances` (
+  `NAME` varchar(128) NOT NULL,
+  `OBJECT_INSTANCE_BEGIN` bigint(20) NOT NULL,
+  `LOCKED_BY_THREAD_ID` int(11) DEFAULT NULL
+) ENGINE=PERFORMANCE_SCHEMA DEFAULT CHARSET=utf8
+show create table objects_summary_global_by_type;
+Table	Create Table
+objects_summary_global_by_type	CREATE TABLE `objects_summary_global_by_type` (
+  `OBJECT_TYPE` varchar(64) DEFAULT NULL,
+  `OBJECT_SCHEMA` varchar(64) DEFAULT NULL,
+  `OBJECT_NAME` varchar(64) DEFAULT NULL,
+  `COUNT_STAR` bigint(20) unsigned NOT NULL,
+  `SUM_TIMER_WAIT` bigint(20) unsigned NOT NULL,
+  `MIN_TIMER_WAIT` bigint(20) unsigned NOT NULL,
+  `AVG_TIMER_WAIT` bigint(20) unsigned NOT NULL,
+  `MAX_TIMER_WAIT` bigint(20) unsigned NOT NULL
+) ENGINE=PERFORMANCE_SCHEMA DEFAULT CHARSET=utf8
+show create table performance_timers;
+Table	Create Table
+performance_timers	CREATE TABLE `performance_timers` (
+  `TIMER_NAME` enum('CYCLE','NANOSECOND','MICROSECOND','MILLISECOND','TICK') NOT NULL,
+  `TIMER_FREQUENCY` bigint(20) DEFAULT NULL,
+  `TIMER_RESOLUTION` bigint(20) DEFAULT NULL,
+  `TIMER_OVERHEAD` bigint(20) DEFAULT NULL
+) ENGINE=PERFORMANCE_SCHEMA DEFAULT CHARSET=utf8
+show create table rwlock_instances;
+Table	Create Table
+rwlock_instances	CREATE TABLE `rwlock_instances` (
+  `NAME` varchar(128) NOT NULL,
+  `OBJECT_INSTANCE_BEGIN` bigint(20) NOT NULL,
+  `WRITE_LOCKED_BY_THREAD_ID` int(11) DEFAULT NULL,
+  `READ_LOCKED_BY_COUNT` int(10) unsigned NOT NULL
+) ENGINE=PERFORMANCE_SCHEMA DEFAULT CHARSET=utf8
+show create table setup_actors;
+Table	Create Table
+setup_actors	CREATE TABLE `setup_actors` (
+  `HOST` char(60) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT '%',
+  `USER` char(16) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT '%',
+  `ROLE` char(16) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT '%'
+) ENGINE=PERFORMANCE_SCHEMA DEFAULT CHARSET=utf8
+show create table setup_consumers;
+Table	Create Table
+setup_consumers	CREATE TABLE `setup_consumers` (
+  `NAME` varchar(64) NOT NULL,
+  `ENABLED` enum('YES','NO') NOT NULL
+) ENGINE=PERFORMANCE_SCHEMA DEFAULT CHARSET=utf8
+show create table setup_instruments;
+Table	Create Table
+setup_instruments	CREATE TABLE `setup_instruments` (
+  `NAME` varchar(128) NOT NULL,
+  `ENABLED` enum('YES','NO') NOT NULL,
+  `TIMED` enum('YES','NO') NOT NULL
+) ENGINE=PERFORMANCE_SCHEMA DEFAULT CHARSET=utf8
+show create table setup_objects;
+Table	Create Table
+setup_objects	CREATE TABLE `setup_objects` (
+  `OBJECT_TYPE` enum('TABLE') NOT NULL DEFAULT 'TABLE',
+  `OBJECT_SCHEMA` varchar(64) DEFAULT '%',
+  `OBJECT_NAME` varchar(64) NOT NULL DEFAULT '%',
+  `TIMED` enum('YES','NO') NOT NULL DEFAULT 'YES'
+) ENGINE=PERFORMANCE_SCHEMA DEFAULT CHARSET=utf8
+show create table setup_timers;
+Table	Create Table
+setup_timers	CREATE TABLE `setup_timers` (
+  `NAME` varchar(64) NOT NULL,
+  `TIMER_NAME` enum('CYCLE','NANOSECOND','MICROSECOND','MILLISECOND','TICK') NOT NULL
+) ENGINE=PERFORMANCE_SCHEMA DEFAULT CHARSET=utf8
+show create table table_io_waits_summary_by_index_usage;
+Table	Create Table
+table_io_waits_summary_by_index_usage	CREATE TABLE `table_io_waits_summary_by_index_usage` (
+  `OBJECT_TYPE` varchar(64) DEFAULT NULL,
+  `OBJECT_SCHEMA` varchar(64) DEFAULT NULL,
+  `OBJECT_NAME` varchar(64) DEFAULT NULL,
+  `INDEX_NAME` varchar(64) DEFAULT NULL,
+  `COUNT_STAR` bigint(20) unsigned NOT NULL,
+  `SUM_TIMER_WAIT` bigint(20) unsigned NOT NULL,
+  `MIN_TIMER_WAIT` bigint(20) unsigned NOT NULL,
+  `AVG_TIMER_WAIT` bigint(20) unsigned NOT NULL,
+  `MAX_TIMER_WAIT` bigint(20) unsigned NOT NULL,
+  `COUNT_READ` bigint(20) unsigned NOT NULL,
+  `SUM_TIMER_READ` bigint(20) unsigned NOT NULL,
+  `MIN_TIMER_READ` bigint(20) unsigned NOT NULL,
+  `AVG_TIMER_READ` bigint(20) unsigned NOT NULL,
+  `MAX_TIMER_READ` bigint(20) unsigned NOT NULL,
+  `COUNT_WRITE` bigint(20) unsigned NOT NULL,
+  `SUM_TIMER_WRITE` bigint(20) unsigned NOT NULL,
+  `MIN_TIMER_WRITE` bigint(20) unsigned NOT NULL,
+  `AVG_TIMER_WRITE` bigint(20) unsigned NOT NULL,
+  `MAX_TIMER_WRITE` bigint(20) unsigned NOT NULL,
+  `COUNT_FETCH` bigint(20) unsigned NOT NULL,
+  `SUM_TIMER_FETCH` bigint(20) unsigned NOT NULL,
+  `MIN_TIMER_FETCH` bigint(20) unsigned NOT NULL,
+  `AVG_TIMER_FETCH` bigint(20) unsigned NOT NULL,
+  `MAX_TIMER_FETCH` bigint(20) unsigned NOT NULL,
+  `COUNT_INSERT` bigint(20) unsigned NOT NULL,
+  `SUM_TIMER_INSERT` bigint(20) unsigned NOT NULL,
+  `MIN_TIMER_INSERT` bigint(20) unsigned NOT NULL,
+  `AVG_TIMER_INSERT` bigint(20) unsigned NOT NULL,
+  `MAX_TIMER_INSERT` bigint(20) unsigned NOT NULL,
+  `COUNT_UPDATE` bigint(20) unsigned NOT NULL,
+  `SUM_TIMER_UPDATE` bigint(20) unsigned NOT NULL,
+  `MIN_TIMER_UPDATE` bigint(20) unsigned NOT NULL,
+  `AVG_TIMER_UPDATE` bigint(20) unsigned NOT NULL,
+  `MAX_TIMER_UPDATE` bigint(20) unsigned NOT NULL,
+  `COUNT_DELETE` bigint(20) unsigned NOT NULL,
+  `SUM_TIMER_DELETE` bigint(20) unsigned NOT NULL,
+  `MIN_TIMER_DELETE` bigint(20) unsigned NOT NULL,
+  `AVG_TIMER_DELETE` bigint(20) unsigned NOT NULL,
+  `MAX_TIMER_DELETE` bigint(20) unsigned NOT NULL
+) ENGINE=PERFORMANCE_SCHEMA DEFAULT CHARSET=utf8
+show create table table_io_waits_summary_by_table;
+Table	Create Table
+table_io_waits_summary_by_table	CREATE TABLE `table_io_waits_summary_by_table` (
+  `OBJECT_TYPE` varchar(64) DEFAULT NULL,
+  `OBJECT_SCHEMA` varchar(64) DEFAULT NULL,
+  `OBJECT_NAME` varchar(64) DEFAULT NULL,
+  `COUNT_STAR` bigint(20) unsigned NOT NULL,
+  `SUM_TIMER_WAIT` bigint(20) unsigned NOT NULL,
+  `MIN_TIMER_WAIT` bigint(20) unsigned NOT NULL,
+  `AVG_TIMER_WAIT` bigint(20) unsigned NOT NULL,
+  `MAX_TIMER_WAIT` bigint(20) unsigned NOT NULL,
+  `COUNT_READ` bigint(20) unsigned NOT NULL,
+  `SUM_TIMER_READ` bigint(20) unsigned NOT NULL,
+  `MIN_TIMER_READ` bigint(20) unsigned NOT NULL,
+  `AVG_TIMER_READ` bigint(20) unsigned NOT NULL,
+  `MAX_TIMER_READ` bigint(20) unsigned NOT NULL,
+  `COUNT_WRITE` bigint(20) unsigned NOT NULL,
+  `SUM_TIMER_WRITE` bigint(20) unsigned NOT NULL,
+  `MIN_TIMER_WRITE` bigint(20) unsigned NOT NULL,
+  `AVG_TIMER_WRITE` bigint(20) unsigned NOT NULL,
+  `MAX_TIMER_WRITE` bigint(20) unsigned NOT NULL,
+  `COUNT_FETCH` bigint(20) unsigned NOT NULL,
+  `SUM_TIMER_FETCH` bigint(20) unsigned NOT NULL,
+  `MIN_TIMER_FETCH` bigint(20) unsigned NOT NULL,
+  `AVG_TIMER_FETCH` bigint(20) unsigned NOT NULL,
+  `MAX_TIMER_FETCH` bigint(20) unsigned NOT NULL,
+  `COUNT_INSERT` bigint(20) unsigned NOT NULL,
+  `SUM_TIMER_INSERT` bigint(20) unsigned NOT NULL,
+  `MIN_TIMER_INSERT` bigint(20) unsigned NOT NULL,
+  `AVG_TIMER_INSERT` bigint(20) unsigned NOT NULL,
+  `MAX_TIMER_INSERT` bigint(20) unsigned NOT NULL,
+  `COUNT_UPDATE` bigint(20) unsigned NOT NULL,
+  `SUM_TIMER_UPDATE` bigint(20) unsigned NOT NULL,
+  `MIN_TIMER_UPDATE` bigint(20) unsigned NOT NULL,
+  `AVG_TIMER_UPDATE` bigint(20) unsigned NOT NULL,
+  `MAX_TIMER_UPDATE` bigint(20) unsigned NOT NULL,
+  `COUNT_DELETE` bigint(20) unsigned NOT NULL,
+  `SUM_TIMER_DELETE` bigint(20) unsigned NOT NULL,
+  `MIN_TIMER_DELETE` bigint(20) unsigned NOT NULL,
+  `AVG_TIMER_DELETE` bigint(20) unsigned NOT NULL,
+  `MAX_TIMER_DELETE` bigint(20) unsigned NOT NULL
+) ENGINE=PERFORMANCE_SCHEMA DEFAULT CHARSET=utf8
+show create table table_lock_waits_summary_by_table;
+Table	Create Table
+table_lock_waits_summary_by_table	CREATE TABLE `table_lock_waits_summary_by_table` (
+  `OBJECT_TYPE` varchar(64) DEFAULT NULL,
+  `OBJECT_SCHEMA` varchar(64) DEFAULT NULL,
+  `OBJECT_NAME` varchar(64) DEFAULT NULL,
+  `COUNT_STAR` bigint(20) unsigned NOT NULL,
+  `SUM_TIMER_WAIT` bigint(20) unsigned NOT NULL,
+  `MIN_TIMER_WAIT` bigint(20) unsigned NOT NULL,
+  `AVG_TIMER_WAIT` bigint(20) unsigned NOT NULL,
+  `MAX_TIMER_WAIT` bigint(20) unsigned NOT NULL,
+  `COUNT_READ` bigint(20) unsigned NOT NULL,
+  `SUM_TIMER_READ` bigint(20) unsigned NOT NULL,
+  `MIN_TIMER_READ` bigint(20) unsigned NOT NULL,
+  `AVG_TIMER_READ` bigint(20) unsigned NOT NULL,
+  `MAX_TIMER_READ` bigint(20) unsigned NOT NULL,
+  `COUNT_WRITE` bigint(20) unsigned NOT NULL,
+  `SUM_TIMER_WRITE` bigint(20) unsigned NOT NULL,
+  `MIN_TIMER_WRITE` bigint(20) unsigned NOT NULL,
+  `AVG_TIMER_WRITE` bigint(20) unsigned NOT NULL,
+  `MAX_TIMER_WRITE` bigint(20) unsigned NOT NULL,
+  `COUNT_READ_NORMAL` bigint(20) unsigned NOT NULL,
+  `SUM_TIMER_READ_NORMAL` bigint(20) unsigned NOT NULL,
+  `MIN_TIMER_READ_NORMAL` bigint(20) unsigned NOT NULL,
+  `AVG_TIMER_READ_NORMAL` bigint(20) unsigned NOT NULL,
+  `MAX_TIMER_READ_NORMAL` bigint(20) unsigned NOT NULL,
+  `COUNT_READ_WITH_SHARED_LOCKS` bigint(20) unsigned NOT NULL,
+  `SUM_TIMER_READ_WITH_SHARED_LOCKS` bigint(20) unsigned NOT NULL,
+  `MIN_TIMER_READ_WITH_SHARED_LOCKS` bigint(20) unsigned NOT NULL,
+  `AVG_TIMER_READ_WITH_SHARED_LOCKS` bigint(20) unsigned NOT NULL,
+  `MAX_TIMER_READ_WITH_SHARED_LOCKS` bigint(20) unsigned NOT NULL,
+  `COUNT_READ_HIGH_PRIORITY` bigint(20) unsigned NOT NULL,
+  `SUM_TIMER_READ_HIGH_PRIORITY` bigint(20) unsigned NOT NULL,
+  `MIN_TIMER_READ_HIGH_PRIORITY` bigint(20) unsigned NOT NULL,
+  `AVG_TIMER_READ_HIGH_PRIORITY` bigint(20) unsigned NOT NULL,
+  `MAX_TIMER_READ_HIGH_PRIORITY` bigint(20) unsigned NOT NULL,
+  `COUNT_READ_NO_INSERT` bigint(20) unsigned NOT NULL,
+  `SUM_TIMER_READ_NO_INSERT` bigint(20) unsigned NOT NULL,
+  `MIN_TIMER_READ_NO_INSERT` bigint(20) unsigned NOT NULL,
+  `AVG_TIMER_READ_NO_INSERT` bigint(20) unsigned NOT NULL,
+  `MAX_TIMER_READ_NO_INSERT` bigint(20) unsigned NOT NULL,
+  `COUNT_READ_EXTERNAL` bigint(20) unsigned NOT NULL,
+  `SUM_TIMER_READ_EXTERNAL` bigint(20) unsigned NOT NULL,
+  `MIN_TIMER_READ_EXTERNAL` bigint(20) unsigned NOT NULL,
+  `AVG_TIMER_READ_EXTERNAL` bigint(20) unsigned NOT NULL,
+  `MAX_TIMER_READ_EXTERNAL` bigint(20) unsigned NOT NULL,
+  `COUNT_WRITE_ALLOW_WRITE` bigint(20) unsigned NOT NULL,
+  `SUM_TIMER_WRITE_ALLOW_WRITE` bigint(20) unsigned NOT NULL,
+  `MIN_TIMER_WRITE_ALLOW_WRITE` bigint(20) unsigned NOT NULL,
+  `AVG_TIMER_WRITE_ALLOW_WRITE` bigint(20) unsigned NOT NULL,
+  `MAX_TIMER_WRITE_ALLOW_WRITE` bigint(20) unsigned NOT NULL,
+  `COUNT_WRITE_CONCURRENT_INSERT` bigint(20) unsigned NOT NULL,
+  `SUM_TIMER_WRITE_CONCURRENT_INSERT` bigint(20) unsigned NOT NULL,
+  `MIN_TIMER_WRITE_CONCURRENT_INSERT` bigint(20) unsigned NOT NULL,
+  `AVG_TIMER_WRITE_CONCURRENT_INSERT` bigint(20) unsigned NOT NULL,
+  `MAX_TIMER_WRITE_CONCURRENT_INSERT` bigint(20) unsigned NOT NULL,
+  `COUNT_WRITE_DELAYED` bigint(20) unsigned NOT NULL,
+  `SUM_TIMER_WRITE_DELAYED` bigint(20) unsigned NOT NULL,
+  `MIN_TIMER_WRITE_DELAYED` bigint(20) unsigned NOT NULL,
+  `AVG_TIMER_WRITE_DELAYED` bigint(20) unsigned NOT NULL,
+  `MAX_TIMER_WRITE_DELAYED` bigint(20) unsigned NOT NULL,
+  `COUNT_WRITE_LOW_PRIORITY` bigint(20) unsigned NOT NULL,
+  `SUM_TIMER_WRITE_LOW_PRIORITY` bigint(20) unsigned NOT NULL,
+  `MIN_TIMER_WRITE_LOW_PRIORITY` bigint(20) unsigned NOT NULL,
+  `AVG_TIMER_WRITE_LOW_PRIORITY` bigint(20) unsigned NOT NULL,
+  `MAX_TIMER_WRITE_LOW_PRIORITY` bigint(20) unsigned NOT NULL,
+  `COUNT_WRITE_NORMAL` bigint(20) unsigned NOT NULL,
+  `SUM_TIMER_WRITE_NORMAL` bigint(20) unsigned NOT NULL,
+  `MIN_TIMER_WRITE_NORMAL` bigint(20) unsigned NOT NULL,
+  `AVG_TIMER_WRITE_NORMAL` bigint(20) unsigned NOT NULL,
+  `MAX_TIMER_WRITE_NORMAL` bigint(20) unsigned NOT NULL,
+  `COUNT_WRITE_EXTERNAL` bigint(20) unsigned NOT NULL,
+  `SUM_TIMER_WRITE_EXTERNAL` bigint(20) unsigned NOT NULL,
+  `MIN_TIMER_WRITE_EXTERNAL` bigint(20) unsigned NOT NULL,
+  `AVG_TIMER_WRITE_EXTERNAL` bigint(20) unsigned NOT NULL,
+  `MAX_TIMER_WRITE_EXTERNAL` bigint(20) unsigned NOT NULL
+) ENGINE=PERFORMANCE_SCHEMA DEFAULT CHARSET=utf8
+show create table threads;
+Table	Create Table
+threads	CREATE TABLE `threads` (
+  `THREAD_ID` int(11) NOT NULL,
+  `NAME` varchar(128) NOT NULL,
+  `TYPE` varchar(10) NOT NULL,
+  `PROCESSLIST_ID` int(11) DEFAULT NULL,
+  `PROCESSLIST_USER` varchar(16) DEFAULT NULL,
+  `PROCESSLIST_HOST` varchar(60) DEFAULT NULL,
+  `PROCESSLIST_DB` varchar(64) DEFAULT NULL,
+  `PROCESSLIST_COMMAND` varchar(16) DEFAULT NULL,
+  `PROCESSLIST_TIME` bigint(20) DEFAULT NULL,
+  `PROCESSLIST_STATE` varchar(64) DEFAULT NULL,
+  `PROCESSLIST_INFO` longtext,
+  `PARENT_THREAD_ID` int(11) DEFAULT NULL,
+  `ROLE` varchar(64) DEFAULT NULL,
+  `INSTRUMENTED` enum('YES','NO') NOT NULL
+) ENGINE=PERFORMANCE_SCHEMA DEFAULT CHARSET=utf8

=== removed file 'mysql-test/suite/perfschema/r/schema_lc0.result'
--- a/mysql-test/suite/perfschema/r/schema_lc0.result	2011-02-15 17:14:15 +0000
+++ b/mysql-test/suite/perfschema/r/schema_lc0.result	1970-01-01 00:00:00 +0000
@@ -1,663 +0,0 @@
-show databases like 'performance_schema';
-Database (performance_schema)
-performance_schema
-show create database performance_schema;
-Database	Create Database
-performance_schema	CREATE DATABASE `performance_schema` /*!40100 DEFAULT CHARACTER SET utf8 */
-use performance_schema;
-show tables;
-Tables_in_performance_schema
-cond_instances
-events_stages_current
-events_stages_history
-events_stages_history_long
-events_stages_summary_by_thread_by_event_name
-events_stages_summary_global_by_event_name
-events_statements_current
-events_statements_history
-events_statements_history_long
-events_statements_summary_by_thread_by_event_name
-events_statements_summary_global_by_event_name
-events_waits_current
-events_waits_history
-events_waits_history_long
-events_waits_summary_by_instance
-events_waits_summary_by_thread_by_event_name
-events_waits_summary_global_by_event_name
-file_instances
-file_summary_by_event_name
-file_summary_by_instance
-mutex_instances
-objects_summary_global_by_type
-performance_timers
-rwlock_instances
-setup_actors
-setup_consumers
-setup_instruments
-setup_objects
-setup_timers
-table_io_waits_summary_by_index_usage
-table_io_waits_summary_by_table
-table_lock_waits_summary_by_table
-threads
-show create table cond_instances;
-Table	Create Table
-cond_instances	CREATE TABLE `cond_instances` (
-  `NAME` varchar(128) NOT NULL,
-  `OBJECT_INSTANCE_BEGIN` bigint(20) NOT NULL
-) ENGINE=PERFORMANCE_SCHEMA DEFAULT CHARSET=utf8
-show create table events_stages_current;
-Table	Create Table
-events_stages_current	CREATE TABLE `events_stages_current` (
-  `THREAD_ID` int(11) NOT NULL,
-  `EVENT_ID` bigint(20) unsigned NOT NULL,
-  `EVENT_NAME` varchar(128) NOT NULL,
-  `SOURCE` varchar(64) DEFAULT NULL,
-  `TIMER_START` bigint(20) unsigned DEFAULT NULL,
-  `TIMER_END` bigint(20) unsigned DEFAULT NULL,
-  `TIMER_WAIT` bigint(20) unsigned DEFAULT NULL,
-  `NESTING_EVENT_ID` bigint(20) unsigned DEFAULT NULL,
-  `NESTING_EVENT_TYPE` enum('STATEMENT','STAGE','WAIT') DEFAULT NULL
-) ENGINE=PERFORMANCE_SCHEMA DEFAULT CHARSET=utf8
-show create table events_stages_history;
-Table	Create Table
-events_stages_history	CREATE TABLE `events_stages_history` (
-  `THREAD_ID` int(11) NOT NULL,
-  `EVENT_ID` bigint(20) unsigned NOT NULL,
-  `EVENT_NAME` varchar(128) NOT NULL,
-  `SOURCE` varchar(64) DEFAULT NULL,
-  `TIMER_START` bigint(20) unsigned DEFAULT NULL,
-  `TIMER_END` bigint(20) unsigned DEFAULT NULL,
-  `TIMER_WAIT` bigint(20) unsigned DEFAULT NULL,
-  `NESTING_EVENT_ID` bigint(20) unsigned DEFAULT NULL,
-  `NESTING_EVENT_TYPE` enum('STATEMENT','STAGE','WAIT') DEFAULT NULL
-) ENGINE=PERFORMANCE_SCHEMA DEFAULT CHARSET=utf8
-show create table events_stages_history_long;
-Table	Create Table
-events_stages_history_long	CREATE TABLE `events_stages_history_long` (
-  `THREAD_ID` int(11) NOT NULL,
-  `EVENT_ID` bigint(20) unsigned NOT NULL,
-  `EVENT_NAME` varchar(128) NOT NULL,
-  `SOURCE` varchar(64) DEFAULT NULL,
-  `TIMER_START` bigint(20) unsigned DEFAULT NULL,
-  `TIMER_END` bigint(20) unsigned DEFAULT NULL,
-  `TIMER_WAIT` bigint(20) unsigned DEFAULT NULL,
-  `NESTING_EVENT_ID` bigint(20) unsigned DEFAULT NULL,
-  `NESTING_EVENT_TYPE` enum('STATEMENT','STAGE','WAIT') DEFAULT NULL
-) ENGINE=PERFORMANCE_SCHEMA DEFAULT CHARSET=utf8
-show create table events_stages_summary_by_thread_by_event_name;
-Table	Create Table
-events_stages_summary_by_thread_by_event_name	CREATE TABLE `events_stages_summary_by_thread_by_event_name` (
-  `THREAD_ID` int(11) NOT NULL,
-  `EVENT_NAME` varchar(128) NOT NULL,
-  `COUNT_STAR` bigint(20) unsigned NOT NULL,
-  `SUM_TIMER_WAIT` bigint(20) unsigned NOT NULL,
-  `MIN_TIMER_WAIT` bigint(20) unsigned NOT NULL,
-  `AVG_TIMER_WAIT` bigint(20) unsigned NOT NULL,
-  `MAX_TIMER_WAIT` bigint(20) unsigned NOT NULL
-) ENGINE=PERFORMANCE_SCHEMA DEFAULT CHARSET=utf8
-show create table events_stages_summary_global_by_event_name;
-Table	Create Table
-events_stages_summary_global_by_event_name	CREATE TABLE `events_stages_summary_global_by_event_name` (
-  `EVENT_NAME` varchar(128) NOT NULL,
-  `COUNT_STAR` bigint(20) unsigned NOT NULL,
-  `SUM_TIMER_WAIT` bigint(20) unsigned NOT NULL,
-  `MIN_TIMER_WAIT` bigint(20) unsigned NOT NULL,
-  `AVG_TIMER_WAIT` bigint(20) unsigned NOT NULL,
-  `MAX_TIMER_WAIT` bigint(20) unsigned NOT NULL
-) ENGINE=PERFORMANCE_SCHEMA DEFAULT CHARSET=utf8
-show create table events_statements_current;
-Table	Create Table
-events_statements_current	CREATE TABLE `events_statements_current` (
-  `THREAD_ID` int(11) NOT NULL,
-  `EVENT_ID` bigint(20) unsigned NOT NULL,
-  `EVENT_NAME` varchar(128) NOT NULL,
-  `SOURCE` varchar(64) DEFAULT NULL,
-  `TIMER_START` bigint(20) unsigned DEFAULT NULL,
-  `TIMER_END` bigint(20) unsigned DEFAULT NULL,
-  `TIMER_WAIT` bigint(20) unsigned DEFAULT NULL,
-  `LOCK_TIME` bigint(20) unsigned NOT NULL,
-  `SQL_TEXT` longtext,
-  `CURRENT_SCHEMA` varchar(64) DEFAULT NULL,
-  `OBJECT_TYPE` varchar(64) DEFAULT NULL,
-  `OBJECT_SCHEMA` varchar(64) DEFAULT NULL,
-  `OBJECT_NAME` varchar(64) DEFAULT NULL,
-  `OBJECT_INSTANCE_BEGIN` bigint(20) DEFAULT NULL,
-  `MYSQL_ERRNO` int(11) DEFAULT NULL,
-  `RETURNED_SQLSTATE` varchar(5) DEFAULT NULL,
-  `MESSAGE_TEXT` varchar(128) DEFAULT NULL,
-  `ERRORS` bigint(20) unsigned NOT NULL,
-  `WARNINGS` bigint(20) unsigned NOT NULL,
-  `ROWS_AFFECTED` bigint(20) unsigned NOT NULL,
-  `ROWS_SENT` bigint(20) unsigned NOT NULL,
-  `ROWS_EXAMINED` bigint(20) unsigned NOT NULL,
-  `CREATED_TMP_DISK_TABLES` bigint(20) unsigned NOT NULL,
-  `CREATED_TMP_TABLES` bigint(20) unsigned NOT NULL,
-  `SELECT_FULL_JOIN` bigint(20) unsigned NOT NULL,
-  `SELECT_FULL_RANGE_JOIN` bigint(20) unsigned NOT NULL,
-  `SELECT_RANGE` bigint(20) unsigned NOT NULL,
-  `SELECT_RANGE_CHECK` bigint(20) unsigned NOT NULL,
-  `SELECT_SCAN` bigint(20) unsigned NOT NULL,
-  `SORT_MERGE_PASSES` bigint(20) unsigned NOT NULL,
-  `SORT_RANGE` bigint(20) unsigned NOT NULL,
-  `SORT_ROWS` bigint(20) unsigned NOT NULL,
-  `SORT_SCAN` bigint(20) unsigned NOT NULL,
-  `NO_INDEX_USED` bigint(20) unsigned NOT NULL,
-  `NO_GOOD_INDEX_USED` bigint(20) unsigned NOT NULL,
-  `NESTING_EVENT_ID` bigint(20) unsigned DEFAULT NULL,
-  `NESTING_EVENT_TYPE` enum('STATEMENT','STAGE','WAIT') DEFAULT NULL
-) ENGINE=PERFORMANCE_SCHEMA DEFAULT CHARSET=utf8
-show create table events_statements_history;
-Table	Create Table
-events_statements_history	CREATE TABLE `events_statements_history` (
-  `THREAD_ID` int(11) NOT NULL,
-  `EVENT_ID` bigint(20) unsigned NOT NULL,
-  `EVENT_NAME` varchar(128) NOT NULL,
-  `SOURCE` varchar(64) DEFAULT NULL,
-  `TIMER_START` bigint(20) unsigned DEFAULT NULL,
-  `TIMER_END` bigint(20) unsigned DEFAULT NULL,
-  `TIMER_WAIT` bigint(20) unsigned DEFAULT NULL,
-  `LOCK_TIME` bigint(20) unsigned NOT NULL,
-  `SQL_TEXT` longtext,
-  `CURRENT_SCHEMA` varchar(64) DEFAULT NULL,
-  `OBJECT_TYPE` varchar(64) DEFAULT NULL,
-  `OBJECT_SCHEMA` varchar(64) DEFAULT NULL,
-  `OBJECT_NAME` varchar(64) DEFAULT NULL,
-  `OBJECT_INSTANCE_BEGIN` bigint(20) DEFAULT NULL,
-  `MYSQL_ERRNO` int(11) DEFAULT NULL,
-  `RETURNED_SQLSTATE` varchar(5) DEFAULT NULL,
-  `MESSAGE_TEXT` varchar(128) DEFAULT NULL,
-  `ERRORS` bigint(20) unsigned NOT NULL,
-  `WARNINGS` bigint(20) unsigned NOT NULL,
-  `ROWS_AFFECTED` bigint(20) unsigned NOT NULL,
-  `ROWS_SENT` bigint(20) unsigned NOT NULL,
-  `ROWS_EXAMINED` bigint(20) unsigned NOT NULL,
-  `CREATED_TMP_DISK_TABLES` bigint(20) unsigned NOT NULL,
-  `CREATED_TMP_TABLES` bigint(20) unsigned NOT NULL,
-  `SELECT_FULL_JOIN` bigint(20) unsigned NOT NULL,
-  `SELECT_FULL_RANGE_JOIN` bigint(20) unsigned NOT NULL,
-  `SELECT_RANGE` bigint(20) unsigned NOT NULL,
-  `SELECT_RANGE_CHECK` bigint(20) unsigned NOT NULL,
-  `SELECT_SCAN` bigint(20) unsigned NOT NULL,
-  `SORT_MERGE_PASSES` bigint(20) unsigned NOT NULL,
-  `SORT_RANGE` bigint(20) unsigned NOT NULL,
-  `SORT_ROWS` bigint(20) unsigned NOT NULL,
-  `SORT_SCAN` bigint(20) unsigned NOT NULL,
-  `NO_INDEX_USED` bigint(20) unsigned NOT NULL,
-  `NO_GOOD_INDEX_USED` bigint(20) unsigned NOT NULL,
-  `NESTING_EVENT_ID` bigint(20) unsigned DEFAULT NULL,
-  `NESTING_EVENT_TYPE` enum('STATEMENT','STAGE','WAIT') DEFAULT NULL
-) ENGINE=PERFORMANCE_SCHEMA DEFAULT CHARSET=utf8
-show create table events_statements_history_long;
-Table	Create Table
-events_statements_history_long	CREATE TABLE `events_statements_history_long` (
-  `THREAD_ID` int(11) NOT NULL,
-  `EVENT_ID` bigint(20) unsigned NOT NULL,
-  `EVENT_NAME` varchar(128) NOT NULL,
-  `SOURCE` varchar(64) DEFAULT NULL,
-  `TIMER_START` bigint(20) unsigned DEFAULT NULL,
-  `TIMER_END` bigint(20) unsigned DEFAULT NULL,
-  `TIMER_WAIT` bigint(20) unsigned DEFAULT NULL,
-  `LOCK_TIME` bigint(20) unsigned NOT NULL,
-  `SQL_TEXT` longtext,
-  `CURRENT_SCHEMA` varchar(64) DEFAULT NULL,
-  `OBJECT_TYPE` varchar(64) DEFAULT NULL,
-  `OBJECT_SCHEMA` varchar(64) DEFAULT NULL,
-  `OBJECT_NAME` varchar(64) DEFAULT NULL,
-  `OBJECT_INSTANCE_BEGIN` bigint(20) DEFAULT NULL,
-  `MYSQL_ERRNO` int(11) DEFAULT NULL,
-  `RETURNED_SQLSTATE` varchar(5) DEFAULT NULL,
-  `MESSAGE_TEXT` varchar(128) DEFAULT NULL,
-  `ERRORS` bigint(20) unsigned NOT NULL,
-  `WARNINGS` bigint(20) unsigned NOT NULL,
-  `ROWS_AFFECTED` bigint(20) unsigned NOT NULL,
-  `ROWS_SENT` bigint(20) unsigned NOT NULL,
-  `ROWS_EXAMINED` bigint(20) unsigned NOT NULL,
-  `CREATED_TMP_DISK_TABLES` bigint(20) unsigned NOT NULL,
-  `CREATED_TMP_TABLES` bigint(20) unsigned NOT NULL,
-  `SELECT_FULL_JOIN` bigint(20) unsigned NOT NULL,
-  `SELECT_FULL_RANGE_JOIN` bigint(20) unsigned NOT NULL,
-  `SELECT_RANGE` bigint(20) unsigned NOT NULL,
-  `SELECT_RANGE_CHECK` bigint(20) unsigned NOT NULL,
-  `SELECT_SCAN` bigint(20) unsigned NOT NULL,
-  `SORT_MERGE_PASSES` bigint(20) unsigned NOT NULL,
-  `SORT_RANGE` bigint(20) unsigned NOT NULL,
-  `SORT_ROWS` bigint(20) unsigned NOT NULL,
-  `SORT_SCAN` bigint(20) unsigned NOT NULL,
-  `NO_INDEX_USED` bigint(20) unsigned NOT NULL,
-  `NO_GOOD_INDEX_USED` bigint(20) unsigned NOT NULL,
-  `NESTING_EVENT_ID` bigint(20) unsigned DEFAULT NULL,
-  `NESTING_EVENT_TYPE` enum('STATEMENT','STAGE','WAIT') DEFAULT NULL
-) ENGINE=PERFORMANCE_SCHEMA DEFAULT CHARSET=utf8
-show create table events_statements_summary_by_thread_by_event_name;
-Table	Create Table
-events_statements_summary_by_thread_by_event_name	CREATE TABLE `events_statements_summary_by_thread_by_event_name` (
-  `THREAD_ID` int(11) NOT NULL,
-  `EVENT_NAME` varchar(128) NOT NULL,
-  `COUNT_STAR` bigint(20) unsigned NOT NULL,
-  `SUM_TIMER_WAIT` bigint(20) unsigned NOT NULL,
-  `MIN_TIMER_WAIT` bigint(20) unsigned NOT NULL,
-  `AVG_TIMER_WAIT` bigint(20) unsigned NOT NULL,
-  `MAX_TIMER_WAIT` bigint(20) unsigned NOT NULL,
-  `SUM_LOCK_TIME` bigint(20) unsigned NOT NULL,
-  `SUM_ERRORS` bigint(20) unsigned NOT NULL,
-  `SUM_WARNINGS` bigint(20) unsigned NOT NULL,
-  `SUM_ROWS_AFFECTED` bigint(20) unsigned NOT NULL,
-  `SUM_ROWS_SENT` bigint(20) unsigned NOT NULL,
-  `SUM_ROWS_EXAMINED` bigint(20) unsigned NOT NULL,
-  `SUM_CREATED_TMP_DISK_TABLES` bigint(20) unsigned NOT NULL,
-  `SUM_CREATED_TMP_TABLES` bigint(20) unsigned NOT NULL,
-  `SUM_SELECT_FULL_JOIN` bigint(20) unsigned NOT NULL,
-  `SUM_SELECT_FULL_RANGE_JOIN` bigint(20) unsigned NOT NULL,
-  `SUM_SELECT_RANGE` bigint(20) unsigned NOT NULL,
-  `SUM_SELECT_RANGE_CHECK` bigint(20) unsigned NOT NULL,
-  `SUM_SELECT_SCAN` bigint(20) unsigned NOT NULL,
-  `SUM_SORT_MERGE_PASSES` bigint(20) unsigned NOT NULL,
-  `SUM_SORT_RANGE` bigint(20) unsigned NOT NULL,
-  `SUM_SORT_ROWS` bigint(20) unsigned NOT NULL,
-  `SUM_SORT_SCAN` bigint(20) unsigned NOT NULL,
-  `SUM_NO_INDEX_USED` bigint(20) unsigned NOT NULL,
-  `SUM_NO_GOOD_INDEX_USED` bigint(20) unsigned NOT NULL
-) ENGINE=PERFORMANCE_SCHEMA DEFAULT CHARSET=utf8
-show create table events_statements_summary_global_by_event_name;
-Table	Create Table
-events_statements_summary_global_by_event_name	CREATE TABLE `events_statements_summary_global_by_event_name` (
-  `EVENT_NAME` varchar(128) NOT NULL,
-  `COUNT_STAR` bigint(20) unsigned NOT NULL,
-  `SUM_TIMER_WAIT` bigint(20) unsigned NOT NULL,
-  `MIN_TIMER_WAIT` bigint(20) unsigned NOT NULL,
-  `AVG_TIMER_WAIT` bigint(20) unsigned NOT NULL,
-  `MAX_TIMER_WAIT` bigint(20) unsigned NOT NULL,
-  `SUM_LOCK_TIME` bigint(20) unsigned NOT NULL,
-  `SUM_ERRORS` bigint(20) unsigned NOT NULL,
-  `SUM_WARNINGS` bigint(20) unsigned NOT NULL,
-  `SUM_ROWS_AFFECTED` bigint(20) unsigned NOT NULL,
-  `SUM_ROWS_SENT` bigint(20) unsigned NOT NULL,
-  `SUM_ROWS_EXAMINED` bigint(20) unsigned NOT NULL,
-  `SUM_CREATED_TMP_DISK_TABLES` bigint(20) unsigned NOT NULL,
-  `SUM_CREATED_TMP_TABLES` bigint(20) unsigned NOT NULL,
-  `SUM_SELECT_FULL_JOIN` bigint(20) unsigned NOT NULL,
-  `SUM_SELECT_FULL_RANGE_JOIN` bigint(20) unsigned NOT NULL,
-  `SUM_SELECT_RANGE` bigint(20) unsigned NOT NULL,
-  `SUM_SELECT_RANGE_CHECK` bigint(20) unsigned NOT NULL,
-  `SUM_SELECT_SCAN` bigint(20) unsigned NOT NULL,
-  `SUM_SORT_MERGE_PASSES` bigint(20) unsigned NOT NULL,
-  `SUM_SORT_RANGE` bigint(20) unsigned NOT NULL,
-  `SUM_SORT_ROWS` bigint(20) unsigned NOT NULL,
-  `SUM_SORT_SCAN` bigint(20) unsigned NOT NULL,
-  `SUM_NO_INDEX_USED` bigint(20) unsigned NOT NULL,
-  `SUM_NO_GOOD_INDEX_USED` bigint(20) unsigned NOT NULL
-) ENGINE=PERFORMANCE_SCHEMA DEFAULT CHARSET=utf8
-show create table events_waits_current;
-Table	Create Table
-events_waits_current	CREATE TABLE `events_waits_current` (
-  `THREAD_ID` int(11) NOT NULL,
-  `EVENT_ID` bigint(20) unsigned NOT NULL,
-  `EVENT_NAME` varchar(128) NOT NULL,
-  `SOURCE` varchar(64) DEFAULT NULL,
-  `TIMER_START` bigint(20) unsigned DEFAULT NULL,
-  `TIMER_END` bigint(20) unsigned DEFAULT NULL,
-  `TIMER_WAIT` bigint(20) unsigned DEFAULT NULL,
-  `SPINS` int(10) unsigned DEFAULT NULL,
-  `OBJECT_SCHEMA` varchar(64) DEFAULT NULL,
-  `OBJECT_NAME` varchar(512) DEFAULT NULL,
-  `INDEX_NAME` varchar(64) DEFAULT NULL,
-  `OBJECT_TYPE` varchar(64) DEFAULT NULL,
-  `OBJECT_INSTANCE_BEGIN` bigint(20) NOT NULL,
-  `NESTING_EVENT_ID` bigint(20) unsigned DEFAULT NULL,
-  `NESTING_EVENT_TYPE` enum('STATEMENT','STAGE','WAIT') DEFAULT NULL,
-  `OPERATION` varchar(32) NOT NULL,
-  `NUMBER_OF_BYTES` bigint(20) unsigned DEFAULT NULL,
-  `FLAGS` int(10) unsigned DEFAULT NULL
-) ENGINE=PERFORMANCE_SCHEMA DEFAULT CHARSET=utf8
-show create table events_waits_history;
-Table	Create Table
-events_waits_history	CREATE TABLE `events_waits_history` (
-  `THREAD_ID` int(11) NOT NULL,
-  `EVENT_ID` bigint(20) unsigned NOT NULL,
-  `EVENT_NAME` varchar(128) NOT NULL,
-  `SOURCE` varchar(64) DEFAULT NULL,
-  `TIMER_START` bigint(20) unsigned DEFAULT NULL,
-  `TIMER_END` bigint(20) unsigned DEFAULT NULL,
-  `TIMER_WAIT` bigint(20) unsigned DEFAULT NULL,
-  `SPINS` int(10) unsigned DEFAULT NULL,
-  `OBJECT_SCHEMA` varchar(64) DEFAULT NULL,
-  `OBJECT_NAME` varchar(512) DEFAULT NULL,
-  `INDEX_NAME` varchar(64) DEFAULT NULL,
-  `OBJECT_TYPE` varchar(64) DEFAULT NULL,
-  `OBJECT_INSTANCE_BEGIN` bigint(20) NOT NULL,
-  `NESTING_EVENT_ID` bigint(20) unsigned DEFAULT NULL,
-  `NESTING_EVENT_TYPE` enum('STATEMENT','STAGE','WAIT') DEFAULT NULL,
-  `OPERATION` varchar(32) NOT NULL,
-  `NUMBER_OF_BYTES` bigint(20) unsigned DEFAULT NULL,
-  `FLAGS` int(10) unsigned DEFAULT NULL
-) ENGINE=PERFORMANCE_SCHEMA DEFAULT CHARSET=utf8
-show create table events_waits_history_long;
-Table	Create Table
-events_waits_history_long	CREATE TABLE `events_waits_history_long` (
-  `THREAD_ID` int(11) NOT NULL,
-  `EVENT_ID` bigint(20) unsigned NOT NULL,
-  `EVENT_NAME` varchar(128) NOT NULL,
-  `SOURCE` varchar(64) DEFAULT NULL,
-  `TIMER_START` bigint(20) unsigned DEFAULT NULL,
-  `TIMER_END` bigint(20) unsigned DEFAULT NULL,
-  `TIMER_WAIT` bigint(20) unsigned DEFAULT NULL,
-  `SPINS` int(10) unsigned DEFAULT NULL,
-  `OBJECT_SCHEMA` varchar(64) DEFAULT NULL,
-  `OBJECT_NAME` varchar(512) DEFAULT NULL,
-  `INDEX_NAME` varchar(64) DEFAULT NULL,
-  `OBJECT_TYPE` varchar(64) DEFAULT NULL,
-  `OBJECT_INSTANCE_BEGIN` bigint(20) NOT NULL,
-  `NESTING_EVENT_ID` bigint(20) unsigned DEFAULT NULL,
-  `NESTING_EVENT_TYPE` enum('STATEMENT','STAGE','WAIT') DEFAULT NULL,
-  `OPERATION` varchar(32) NOT NULL,
-  `NUMBER_OF_BYTES` bigint(20) unsigned DEFAULT NULL,
-  `FLAGS` int(10) unsigned DEFAULT NULL
-) ENGINE=PERFORMANCE_SCHEMA DEFAULT CHARSET=utf8
-show create table events_waits_summary_by_instance;
-Table	Create Table
-events_waits_summary_by_instance	CREATE TABLE `events_waits_summary_by_instance` (
-  `EVENT_NAME` varchar(128) NOT NULL,
-  `OBJECT_INSTANCE_BEGIN` bigint(20) NOT NULL,
-  `COUNT_STAR` bigint(20) unsigned NOT NULL,
-  `SUM_TIMER_WAIT` bigint(20) unsigned NOT NULL,
-  `MIN_TIMER_WAIT` bigint(20) unsigned NOT NULL,
-  `AVG_TIMER_WAIT` bigint(20) unsigned NOT NULL,
-  `MAX_TIMER_WAIT` bigint(20) unsigned NOT NULL
-) ENGINE=PERFORMANCE_SCHEMA DEFAULT CHARSET=utf8
-show create table events_waits_summary_by_thread_by_event_name;
-Table	Create Table
-events_waits_summary_by_thread_by_event_name	CREATE TABLE `events_waits_summary_by_thread_by_event_name` (
-  `THREAD_ID` int(11) NOT NULL,
-  `EVENT_NAME` varchar(128) NOT NULL,
-  `COUNT_STAR` bigint(20) unsigned NOT NULL,
-  `SUM_TIMER_WAIT` bigint(20) unsigned NOT NULL,
-  `MIN_TIMER_WAIT` bigint(20) unsigned NOT NULL,
-  `AVG_TIMER_WAIT` bigint(20) unsigned NOT NULL,
-  `MAX_TIMER_WAIT` bigint(20) unsigned NOT NULL
-) ENGINE=PERFORMANCE_SCHEMA DEFAULT CHARSET=utf8
-show create table events_waits_summary_global_by_event_name;
-Table	Create Table
-events_waits_summary_global_by_event_name	CREATE TABLE `events_waits_summary_global_by_event_name` (
-  `EVENT_NAME` varchar(128) NOT NULL,
-  `COUNT_STAR` bigint(20) unsigned NOT NULL,
-  `SUM_TIMER_WAIT` bigint(20) unsigned NOT NULL,
-  `MIN_TIMER_WAIT` bigint(20) unsigned NOT NULL,
-  `AVG_TIMER_WAIT` bigint(20) unsigned NOT NULL,
-  `MAX_TIMER_WAIT` bigint(20) unsigned NOT NULL
-) ENGINE=PERFORMANCE_SCHEMA DEFAULT CHARSET=utf8
-show create table file_instances;
-Table	Create Table
-file_instances	CREATE TABLE `file_instances` (
-  `FILE_NAME` varchar(512) NOT NULL,
-  `EVENT_NAME` varchar(128) NOT NULL,
-  `OPEN_COUNT` int(10) unsigned NOT NULL
-) ENGINE=PERFORMANCE_SCHEMA DEFAULT CHARSET=utf8
-show create table file_summary_by_event_name;
-Table	Create Table
-file_summary_by_event_name	CREATE TABLE `file_summary_by_event_name` (
-  `EVENT_NAME` varchar(128) NOT NULL,
-  `COUNT_READ` bigint(20) unsigned NOT NULL,
-  `COUNT_WRITE` bigint(20) unsigned NOT NULL,
-  `SUM_NUMBER_OF_BYTES_READ` bigint(20) unsigned NOT NULL,
-  `SUM_NUMBER_OF_BYTES_WRITE` bigint(20) unsigned NOT NULL
-) ENGINE=PERFORMANCE_SCHEMA DEFAULT CHARSET=utf8
-show create table file_summary_by_instance;
-Table	Create Table
-file_summary_by_instance	CREATE TABLE `file_summary_by_instance` (
-  `FILE_NAME` varchar(512) NOT NULL,
-  `EVENT_NAME` varchar(128) NOT NULL,
-  `COUNT_READ` bigint(20) unsigned NOT NULL,
-  `COUNT_WRITE` bigint(20) unsigned NOT NULL,
-  `SUM_NUMBER_OF_BYTES_READ` bigint(20) unsigned NOT NULL,
-  `SUM_NUMBER_OF_BYTES_WRITE` bigint(20) unsigned NOT NULL
-) ENGINE=PERFORMANCE_SCHEMA DEFAULT CHARSET=utf8
-show create table mutex_instances;
-Table	Create Table
-mutex_instances	CREATE TABLE `mutex_instances` (
-  `NAME` varchar(128) NOT NULL,
-  `OBJECT_INSTANCE_BEGIN` bigint(20) NOT NULL,
-  `LOCKED_BY_THREAD_ID` int(11) DEFAULT NULL
-) ENGINE=PERFORMANCE_SCHEMA DEFAULT CHARSET=utf8
-show create table objects_summary_global_by_type;
-Table	Create Table
-objects_summary_global_by_type	CREATE TABLE `objects_summary_global_by_type` (
-  `OBJECT_TYPE` varchar(64) DEFAULT NULL,
-  `OBJECT_SCHEMA` varchar(64) DEFAULT NULL,
-  `OBJECT_NAME` varchar(64) DEFAULT NULL,
-  `COUNT_STAR` bigint(20) unsigned NOT NULL,
-  `SUM_TIMER_WAIT` bigint(20) unsigned NOT NULL,
-  `MIN_TIMER_WAIT` bigint(20) unsigned NOT NULL,
-  `AVG_TIMER_WAIT` bigint(20) unsigned NOT NULL,
-  `MAX_TIMER_WAIT` bigint(20) unsigned NOT NULL
-) ENGINE=PERFORMANCE_SCHEMA DEFAULT CHARSET=utf8
-show create table performance_timers;
-Table	Create Table
-performance_timers	CREATE TABLE `performance_timers` (
-  `TIMER_NAME` enum('CYCLE','NANOSECOND','MICROSECOND','MILLISECOND','TICK') NOT NULL,
-  `TIMER_FREQUENCY` bigint(20) DEFAULT NULL,
-  `TIMER_RESOLUTION` bigint(20) DEFAULT NULL,
-  `TIMER_OVERHEAD` bigint(20) DEFAULT NULL
-) ENGINE=PERFORMANCE_SCHEMA DEFAULT CHARSET=utf8
-show create table rwlock_instances;
-Table	Create Table
-rwlock_instances	CREATE TABLE `rwlock_instances` (
-  `NAME` varchar(128) NOT NULL,
-  `OBJECT_INSTANCE_BEGIN` bigint(20) NOT NULL,
-  `WRITE_LOCKED_BY_THREAD_ID` int(11) DEFAULT NULL,
-  `READ_LOCKED_BY_COUNT` int(10) unsigned NOT NULL
-) ENGINE=PERFORMANCE_SCHEMA DEFAULT CHARSET=utf8
-show create table setup_actors;
-Table	Create Table
-setup_actors	CREATE TABLE `setup_actors` (
-  `HOST` char(60) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT '%',
-  `USER` char(16) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT '%',
-  `ROLE` char(16) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT '%'
-) ENGINE=PERFORMANCE_SCHEMA DEFAULT CHARSET=utf8
-show create table setup_consumers;
-Table	Create Table
-setup_consumers	CREATE TABLE `setup_consumers` (
-  `NAME` varchar(64) NOT NULL,
-  `ENABLED` enum('YES','NO') NOT NULL
-) ENGINE=PERFORMANCE_SCHEMA DEFAULT CHARSET=utf8
-show create table setup_instruments;
-Table	Create Table
-setup_instruments	CREATE TABLE `setup_instruments` (
-  `NAME` varchar(128) NOT NULL,
-  `ENABLED` enum('YES','NO') NOT NULL,
-  `TIMED` enum('YES','NO') NOT NULL
-) ENGINE=PERFORMANCE_SCHEMA DEFAULT CHARSET=utf8
-show create table setup_objects;
-Table	Create Table
-setup_objects	CREATE TABLE `setup_objects` (
-  `OBJECT_TYPE` enum('TABLE') NOT NULL DEFAULT 'TABLE',
-  `OBJECT_SCHEMA` varchar(64) DEFAULT '%',
-  `OBJECT_NAME` varchar(64) NOT NULL DEFAULT '%',
-  `TIMED` enum('YES','NO') NOT NULL DEFAULT 'YES'
-) ENGINE=PERFORMANCE_SCHEMA DEFAULT CHARSET=utf8
-show create table setup_timers;
-Table	Create Table
-setup_timers	CREATE TABLE `setup_timers` (
-  `NAME` varchar(64) NOT NULL,
-  `TIMER_NAME` enum('CYCLE','NANOSECOND','MICROSECOND','MILLISECOND','TICK') NOT NULL
-) ENGINE=PERFORMANCE_SCHEMA DEFAULT CHARSET=utf8
-show create table table_io_waits_summary_by_index_usage;
-Table	Create Table
-table_io_waits_summary_by_index_usage	CREATE TABLE `table_io_waits_summary_by_index_usage` (
-  `OBJECT_TYPE` varchar(64) DEFAULT NULL,
-  `OBJECT_SCHEMA` varchar(64) DEFAULT NULL,
-  `OBJECT_NAME` varchar(64) DEFAULT NULL,
-  `INDEX_NAME` varchar(64) DEFAULT NULL,
-  `COUNT_STAR` bigint(20) unsigned NOT NULL,
-  `SUM_TIMER_WAIT` bigint(20) unsigned NOT NULL,
-  `MIN_TIMER_WAIT` bigint(20) unsigned NOT NULL,
-  `AVG_TIMER_WAIT` bigint(20) unsigned NOT NULL,
-  `MAX_TIMER_WAIT` bigint(20) unsigned NOT NULL,
-  `COUNT_READ` bigint(20) unsigned NOT NULL,
-  `SUM_TIMER_READ` bigint(20) unsigned NOT NULL,
-  `MIN_TIMER_READ` bigint(20) unsigned NOT NULL,
-  `AVG_TIMER_READ` bigint(20) unsigned NOT NULL,
-  `MAX_TIMER_READ` bigint(20) unsigned NOT NULL,
-  `COUNT_WRITE` bigint(20) unsigned NOT NULL,
-  `SUM_TIMER_WRITE` bigint(20) unsigned NOT NULL,
-  `MIN_TIMER_WRITE` bigint(20) unsigned NOT NULL,
-  `AVG_TIMER_WRITE` bigint(20) unsigned NOT NULL,
-  `MAX_TIMER_WRITE` bigint(20) unsigned NOT NULL,
-  `COUNT_FETCH` bigint(20) unsigned NOT NULL,
-  `SUM_TIMER_FETCH` bigint(20) unsigned NOT NULL,
-  `MIN_TIMER_FETCH` bigint(20) unsigned NOT NULL,
-  `AVG_TIMER_FETCH` bigint(20) unsigned NOT NULL,
-  `MAX_TIMER_FETCH` bigint(20) unsigned NOT NULL,
-  `COUNT_INSERT` bigint(20) unsigned NOT NULL,
-  `SUM_TIMER_INSERT` bigint(20) unsigned NOT NULL,
-  `MIN_TIMER_INSERT` bigint(20) unsigned NOT NULL,
-  `AVG_TIMER_INSERT` bigint(20) unsigned NOT NULL,
-  `MAX_TIMER_INSERT` bigint(20) unsigned NOT NULL,
-  `COUNT_UPDATE` bigint(20) unsigned NOT NULL,
-  `SUM_TIMER_UPDATE` bigint(20) unsigned NOT NULL,
-  `MIN_TIMER_UPDATE` bigint(20) unsigned NOT NULL,
-  `AVG_TIMER_UPDATE` bigint(20) unsigned NOT NULL,
-  `MAX_TIMER_UPDATE` bigint(20) unsigned NOT NULL,
-  `COUNT_DELETE` bigint(20) unsigned NOT NULL,
-  `SUM_TIMER_DELETE` bigint(20) unsigned NOT NULL,
-  `MIN_TIMER_DELETE` bigint(20) unsigned NOT NULL,
-  `AVG_TIMER_DELETE` bigint(20) unsigned NOT NULL,
-  `MAX_TIMER_DELETE` bigint(20) unsigned NOT NULL
-) ENGINE=PERFORMANCE_SCHEMA DEFAULT CHARSET=utf8
-show create table table_io_waits_summary_by_table;
-Table	Create Table
-table_io_waits_summary_by_table	CREATE TABLE `table_io_waits_summary_by_table` (
-  `OBJECT_TYPE` varchar(64) DEFAULT NULL,
-  `OBJECT_SCHEMA` varchar(64) DEFAULT NULL,
-  `OBJECT_NAME` varchar(64) DEFAULT NULL,
-  `COUNT_STAR` bigint(20) unsigned NOT NULL,
-  `SUM_TIMER_WAIT` bigint(20) unsigned NOT NULL,
-  `MIN_TIMER_WAIT` bigint(20) unsigned NOT NULL,
-  `AVG_TIMER_WAIT` bigint(20) unsigned NOT NULL,
-  `MAX_TIMER_WAIT` bigint(20) unsigned NOT NULL,
-  `COUNT_READ` bigint(20) unsigned NOT NULL,
-  `SUM_TIMER_READ` bigint(20) unsigned NOT NULL,
-  `MIN_TIMER_READ` bigint(20) unsigned NOT NULL,
-  `AVG_TIMER_READ` bigint(20) unsigned NOT NULL,
-  `MAX_TIMER_READ` bigint(20) unsigned NOT NULL,
-  `COUNT_WRITE` bigint(20) unsigned NOT NULL,
-  `SUM_TIMER_WRITE` bigint(20) unsigned NOT NULL,
-  `MIN_TIMER_WRITE` bigint(20) unsigned NOT NULL,
-  `AVG_TIMER_WRITE` bigint(20) unsigned NOT NULL,
-  `MAX_TIMER_WRITE` bigint(20) unsigned NOT NULL,
-  `COUNT_FETCH` bigint(20) unsigned NOT NULL,
-  `SUM_TIMER_FETCH` bigint(20) unsigned NOT NULL,
-  `MIN_TIMER_FETCH` bigint(20) unsigned NOT NULL,
-  `AVG_TIMER_FETCH` bigint(20) unsigned NOT NULL,
-  `MAX_TIMER_FETCH` bigint(20) unsigned NOT NULL,
-  `COUNT_INSERT` bigint(20) unsigned NOT NULL,
-  `SUM_TIMER_INSERT` bigint(20) unsigned NOT NULL,
-  `MIN_TIMER_INSERT` bigint(20) unsigned NOT NULL,
-  `AVG_TIMER_INSERT` bigint(20) unsigned NOT NULL,
-  `MAX_TIMER_INSERT` bigint(20) unsigned NOT NULL,
-  `COUNT_UPDATE` bigint(20) unsigned NOT NULL,
-  `SUM_TIMER_UPDATE` bigint(20) unsigned NOT NULL,
-  `MIN_TIMER_UPDATE` bigint(20) unsigned NOT NULL,
-  `AVG_TIMER_UPDATE` bigint(20) unsigned NOT NULL,
-  `MAX_TIMER_UPDATE` bigint(20) unsigned NOT NULL,
-  `COUNT_DELETE` bigint(20) unsigned NOT NULL,
-  `SUM_TIMER_DELETE` bigint(20) unsigned NOT NULL,
-  `MIN_TIMER_DELETE` bigint(20) unsigned NOT NULL,
-  `AVG_TIMER_DELETE` bigint(20) unsigned NOT NULL,
-  `MAX_TIMER_DELETE` bigint(20) unsigned NOT NULL
-) ENGINE=PERFORMANCE_SCHEMA DEFAULT CHARSET=utf8
-show create table table_lock_waits_summary_by_table;
-Table	Create Table
-table_lock_waits_summary_by_table	CREATE TABLE `table_lock_waits_summary_by_table` (
-  `OBJECT_TYPE` varchar(64) DEFAULT NULL,
-  `OBJECT_SCHEMA` varchar(64) DEFAULT NULL,
-  `OBJECT_NAME` varchar(64) DEFAULT NULL,
-  `COUNT_STAR` bigint(20) unsigned NOT NULL,
-  `SUM_TIMER_WAIT` bigint(20) unsigned NOT NULL,
-  `MIN_TIMER_WAIT` bigint(20) unsigned NOT NULL,
-  `AVG_TIMER_WAIT` bigint(20) unsigned NOT NULL,
-  `MAX_TIMER_WAIT` bigint(20) unsigned NOT NULL,
-  `COUNT_READ` bigint(20) unsigned NOT NULL,
-  `SUM_TIMER_READ` bigint(20) unsigned NOT NULL,
-  `MIN_TIMER_READ` bigint(20) unsigned NOT NULL,
-  `AVG_TIMER_READ` bigint(20) unsigned NOT NULL,
-  `MAX_TIMER_READ` bigint(20) unsigned NOT NULL,
-  `COUNT_WRITE` bigint(20) unsigned NOT NULL,
-  `SUM_TIMER_WRITE` bigint(20) unsigned NOT NULL,
-  `MIN_TIMER_WRITE` bigint(20) unsigned NOT NULL,
-  `AVG_TIMER_WRITE` bigint(20) unsigned NOT NULL,
-  `MAX_TIMER_WRITE` bigint(20) unsigned NOT NULL,
-  `COUNT_READ_NORMAL` bigint(20) unsigned NOT NULL,
-  `SUM_TIMER_READ_NORMAL` bigint(20) unsigned NOT NULL,
-  `MIN_TIMER_READ_NORMAL` bigint(20) unsigned NOT NULL,
-  `AVG_TIMER_READ_NORMAL` bigint(20) unsigned NOT NULL,
-  `MAX_TIMER_READ_NORMAL` bigint(20) unsigned NOT NULL,
-  `COUNT_READ_WITH_SHARED_LOCKS` bigint(20) unsigned NOT NULL,
-  `SUM_TIMER_READ_WITH_SHARED_LOCKS` bigint(20) unsigned NOT NULL,
-  `MIN_TIMER_READ_WITH_SHARED_LOCKS` bigint(20) unsigned NOT NULL,
-  `AVG_TIMER_READ_WITH_SHARED_LOCKS` bigint(20) unsigned NOT NULL,
-  `MAX_TIMER_READ_WITH_SHARED_LOCKS` bigint(20) unsigned NOT NULL,
-  `COUNT_READ_HIGH_PRIORITY` bigint(20) unsigned NOT NULL,
-  `SUM_TIMER_READ_HIGH_PRIORITY` bigint(20) unsigned NOT NULL,
-  `MIN_TIMER_READ_HIGH_PRIORITY` bigint(20) unsigned NOT NULL,
-  `AVG_TIMER_READ_HIGH_PRIORITY` bigint(20) unsigned NOT NULL,
-  `MAX_TIMER_READ_HIGH_PRIORITY` bigint(20) unsigned NOT NULL,
-  `COUNT_READ_NO_INSERT` bigint(20) unsigned NOT NULL,
-  `SUM_TIMER_READ_NO_INSERT` bigint(20) unsigned NOT NULL,
-  `MIN_TIMER_READ_NO_INSERT` bigint(20) unsigned NOT NULL,
-  `AVG_TIMER_READ_NO_INSERT` bigint(20) unsigned NOT NULL,
-  `MAX_TIMER_READ_NO_INSERT` bigint(20) unsigned NOT NULL,
-  `COUNT_READ_EXTERNAL` bigint(20) unsigned NOT NULL,
-  `SUM_TIMER_READ_EXTERNAL` bigint(20) unsigned NOT NULL,
-  `MIN_TIMER_READ_EXTERNAL` bigint(20) unsigned NOT NULL,
-  `AVG_TIMER_READ_EXTERNAL` bigint(20) unsigned NOT NULL,
-  `MAX_TIMER_READ_EXTERNAL` bigint(20) unsigned NOT NULL,
-  `COUNT_WRITE_ALLOW_WRITE` bigint(20) unsigned NOT NULL,
-  `SUM_TIMER_WRITE_ALLOW_WRITE` bigint(20) unsigned NOT NULL,
-  `MIN_TIMER_WRITE_ALLOW_WRITE` bigint(20) unsigned NOT NULL,
-  `AVG_TIMER_WRITE_ALLOW_WRITE` bigint(20) unsigned NOT NULL,
-  `MAX_TIMER_WRITE_ALLOW_WRITE` bigint(20) unsigned NOT NULL,
-  `COUNT_WRITE_CONCURRENT_INSERT` bigint(20) unsigned NOT NULL,
-  `SUM_TIMER_WRITE_CONCURRENT_INSERT` bigint(20) unsigned NOT NULL,
-  `MIN_TIMER_WRITE_CONCURRENT_INSERT` bigint(20) unsigned NOT NULL,
-  `AVG_TIMER_WRITE_CONCURRENT_INSERT` bigint(20) unsigned NOT NULL,
-  `MAX_TIMER_WRITE_CONCURRENT_INSERT` bigint(20) unsigned NOT NULL,
-  `COUNT_WRITE_DELAYED` bigint(20) unsigned NOT NULL,
-  `SUM_TIMER_WRITE_DELAYED` bigint(20) unsigned NOT NULL,
-  `MIN_TIMER_WRITE_DELAYED` bigint(20) unsigned NOT NULL,
-  `AVG_TIMER_WRITE_DELAYED` bigint(20) unsigned NOT NULL,
-  `MAX_TIMER_WRITE_DELAYED` bigint(20) unsigned NOT NULL,
-  `COUNT_WRITE_LOW_PRIORITY` bigint(20) unsigned NOT NULL,
-  `SUM_TIMER_WRITE_LOW_PRIORITY` bigint(20) unsigned NOT NULL,
-  `MIN_TIMER_WRITE_LOW_PRIORITY` bigint(20) unsigned NOT NULL,
-  `AVG_TIMER_WRITE_LOW_PRIORITY` bigint(20) unsigned NOT NULL,
-  `MAX_TIMER_WRITE_LOW_PRIORITY` bigint(20) unsigned NOT NULL,
-  `COUNT_WRITE_NORMAL` bigint(20) unsigned NOT NULL,
-  `SUM_TIMER_WRITE_NORMAL` bigint(20) unsigned NOT NULL,
-  `MIN_TIMER_WRITE_NORMAL` bigint(20) unsigned NOT NULL,
-  `AVG_TIMER_WRITE_NORMAL` bigint(20) unsigned NOT NULL,
-  `MAX_TIMER_WRITE_NORMAL` bigint(20) unsigned NOT NULL,
-  `COUNT_WRITE_EXTERNAL` bigint(20) unsigned NOT NULL,
-  `SUM_TIMER_WRITE_EXTERNAL` bigint(20) unsigned NOT NULL,
-  `MIN_TIMER_WRITE_EXTERNAL` bigint(20) unsigned NOT NULL,
-  `AVG_TIMER_WRITE_EXTERNAL` bigint(20) unsigned NOT NULL,
-  `MAX_TIMER_WRITE_EXTERNAL` bigint(20) unsigned NOT NULL
-) ENGINE=PERFORMANCE_SCHEMA DEFAULT CHARSET=utf8
-show create table threads;
-Table	Create Table
-threads	CREATE TABLE `threads` (
-  `THREAD_ID` int(11) NOT NULL,
-  `NAME` varchar(128) NOT NULL,
-  `TYPE` varchar(10) NOT NULL,
-  `PROCESSLIST_ID` int(11) DEFAULT NULL,
-  `PROCESSLIST_USER` varchar(16) DEFAULT NULL,
-  `PROCESSLIST_HOST` varchar(60) DEFAULT NULL,
-  `PROCESSLIST_DB` varchar(64) DEFAULT NULL,
-  `PROCESSLIST_COMMAND` varchar(16) DEFAULT NULL,
-  `PROCESSLIST_TIME` bigint(20) DEFAULT NULL,
-  `PROCESSLIST_STATE` varchar(64) DEFAULT NULL,
-  `PROCESSLIST_INFO` longtext,
-  `PARENT_THREAD_ID` int(11) DEFAULT NULL,
-  `ROLE` varchar(64) DEFAULT NULL,
-  `INSTRUMENTED` enum('YES','NO') NOT NULL
-) ENGINE=PERFORMANCE_SCHEMA DEFAULT CHARSET=utf8

=== removed file 'mysql-test/suite/perfschema/r/schema_lc1.result'
--- a/mysql-test/suite/perfschema/r/schema_lc1.result	2011-02-15 17:14:15 +0000
+++ b/mysql-test/suite/perfschema/r/schema_lc1.result	1970-01-01 00:00:00 +0000
@@ -1,663 +0,0 @@
-show databases like 'performance_schema';
-Database (performance_schema)
-performance_schema
-show create database performance_schema;
-Database	Create Database
-performance_schema	CREATE DATABASE `performance_schema` /*!40100 DEFAULT CHARACTER SET utf8 */
-use performance_schema;
-show tables;
-Tables_in_performance_schema
-cond_instances
-events_stages_current
-events_stages_history
-events_stages_history_long
-events_stages_summary_by_thread_by_event_name
-events_stages_summary_global_by_event_name
-events_statements_current
-events_statements_history
-events_statements_history_long
-events_statements_summary_by_thread_by_event_name
-events_statements_summary_global_by_event_name
-events_waits_current
-events_waits_history
-events_waits_history_long
-events_waits_summary_by_instance
-events_waits_summary_by_thread_by_event_name
-events_waits_summary_global_by_event_name
-file_instances
-file_summary_by_event_name
-file_summary_by_instance
-mutex_instances
-objects_summary_global_by_type
-performance_timers
-rwlock_instances
-setup_actors
-setup_consumers
-setup_instruments
-setup_objects
-setup_timers
-table_io_waits_summary_by_index_usage
-table_io_waits_summary_by_table
-table_lock_waits_summary_by_table
-threads
-show create table cond_instances;
-Table	Create Table
-cond_instances	CREATE TABLE `cond_instances` (
-  `NAME` varchar(128) NOT NULL,
-  `OBJECT_INSTANCE_BEGIN` bigint(20) NOT NULL
-) ENGINE=PERFORMANCE_SCHEMA DEFAULT CHARSET=utf8
-show create table events_stages_current;
-Table	Create Table
-events_stages_current	CREATE TABLE `events_stages_current` (
-  `THREAD_ID` int(11) NOT NULL,
-  `EVENT_ID` bigint(20) unsigned NOT NULL,
-  `EVENT_NAME` varchar(128) NOT NULL,
-  `SOURCE` varchar(64) DEFAULT NULL,
-  `TIMER_START` bigint(20) unsigned DEFAULT NULL,
-  `TIMER_END` bigint(20) unsigned DEFAULT NULL,
-  `TIMER_WAIT` bigint(20) unsigned DEFAULT NULL,
-  `NESTING_EVENT_ID` bigint(20) unsigned DEFAULT NULL,
-  `NESTING_EVENT_TYPE` enum('STATEMENT','STAGE','WAIT') DEFAULT NULL
-) ENGINE=PERFORMANCE_SCHEMA DEFAULT CHARSET=utf8
-show create table events_stages_history;
-Table	Create Table
-events_stages_history	CREATE TABLE `events_stages_history` (
-  `THREAD_ID` int(11) NOT NULL,
-  `EVENT_ID` bigint(20) unsigned NOT NULL,
-  `EVENT_NAME` varchar(128) NOT NULL,
-  `SOURCE` varchar(64) DEFAULT NULL,
-  `TIMER_START` bigint(20) unsigned DEFAULT NULL,
-  `TIMER_END` bigint(20) unsigned DEFAULT NULL,
-  `TIMER_WAIT` bigint(20) unsigned DEFAULT NULL,
-  `NESTING_EVENT_ID` bigint(20) unsigned DEFAULT NULL,
-  `NESTING_EVENT_TYPE` enum('STATEMENT','STAGE','WAIT') DEFAULT NULL
-) ENGINE=PERFORMANCE_SCHEMA DEFAULT CHARSET=utf8
-show create table events_stages_history_long;
-Table	Create Table
-events_stages_history_long	CREATE TABLE `events_stages_history_long` (
-  `THREAD_ID` int(11) NOT NULL,
-  `EVENT_ID` bigint(20) unsigned NOT NULL,
-  `EVENT_NAME` varchar(128) NOT NULL,
-  `SOURCE` varchar(64) DEFAULT NULL,
-  `TIMER_START` bigint(20) unsigned DEFAULT NULL,
-  `TIMER_END` bigint(20) unsigned DEFAULT NULL,
-  `TIMER_WAIT` bigint(20) unsigned DEFAULT NULL,
-  `NESTING_EVENT_ID` bigint(20) unsigned DEFAULT NULL,
-  `NESTING_EVENT_TYPE` enum('STATEMENT','STAGE','WAIT') DEFAULT NULL
-) ENGINE=PERFORMANCE_SCHEMA DEFAULT CHARSET=utf8
-show create table events_stages_summary_by_thread_by_event_name;
-Table	Create Table
-events_stages_summary_by_thread_by_event_name	CREATE TABLE `events_stages_summary_by_thread_by_event_name` (
-  `THREAD_ID` int(11) NOT NULL,
-  `EVENT_NAME` varchar(128) NOT NULL,
-  `COUNT_STAR` bigint(20) unsigned NOT NULL,
-  `SUM_TIMER_WAIT` bigint(20) unsigned NOT NULL,
-  `MIN_TIMER_WAIT` bigint(20) unsigned NOT NULL,
-  `AVG_TIMER_WAIT` bigint(20) unsigned NOT NULL,
-  `MAX_TIMER_WAIT` bigint(20) unsigned NOT NULL
-) ENGINE=PERFORMANCE_SCHEMA DEFAULT CHARSET=utf8
-show create table events_stages_summary_global_by_event_name;
-Table	Create Table
-events_stages_summary_global_by_event_name	CREATE TABLE `events_stages_summary_global_by_event_name` (
-  `EVENT_NAME` varchar(128) NOT NULL,
-  `COUNT_STAR` bigint(20) unsigned NOT NULL,
-  `SUM_TIMER_WAIT` bigint(20) unsigned NOT NULL,
-  `MIN_TIMER_WAIT` bigint(20) unsigned NOT NULL,
-  `AVG_TIMER_WAIT` bigint(20) unsigned NOT NULL,
-  `MAX_TIMER_WAIT` bigint(20) unsigned NOT NULL
-) ENGINE=PERFORMANCE_SCHEMA DEFAULT CHARSET=utf8
-show create table events_statements_current;
-Table	Create Table
-events_statements_current	CREATE TABLE `events_statements_current` (
-  `THREAD_ID` int(11) NOT NULL,
-  `EVENT_ID` bigint(20) unsigned NOT NULL,
-  `EVENT_NAME` varchar(128) NOT NULL,
-  `SOURCE` varchar(64) DEFAULT NULL,
-  `TIMER_START` bigint(20) unsigned DEFAULT NULL,
-  `TIMER_END` bigint(20) unsigned DEFAULT NULL,
-  `TIMER_WAIT` bigint(20) unsigned DEFAULT NULL,
-  `LOCK_TIME` bigint(20) unsigned NOT NULL,
-  `SQL_TEXT` longtext,
-  `CURRENT_SCHEMA` varchar(64) DEFAULT NULL,
-  `OBJECT_TYPE` varchar(64) DEFAULT NULL,
-  `OBJECT_SCHEMA` varchar(64) DEFAULT NULL,
-  `OBJECT_NAME` varchar(64) DEFAULT NULL,
-  `OBJECT_INSTANCE_BEGIN` bigint(20) DEFAULT NULL,
-  `MYSQL_ERRNO` int(11) DEFAULT NULL,
-  `RETURNED_SQLSTATE` varchar(5) DEFAULT NULL,
-  `MESSAGE_TEXT` varchar(128) DEFAULT NULL,
-  `ERRORS` bigint(20) unsigned NOT NULL,
-  `WARNINGS` bigint(20) unsigned NOT NULL,
-  `ROWS_AFFECTED` bigint(20) unsigned NOT NULL,
-  `ROWS_SENT` bigint(20) unsigned NOT NULL,
-  `ROWS_EXAMINED` bigint(20) unsigned NOT NULL,
-  `CREATED_TMP_DISK_TABLES` bigint(20) unsigned NOT NULL,
-  `CREATED_TMP_TABLES` bigint(20) unsigned NOT NULL,
-  `SELECT_FULL_JOIN` bigint(20) unsigned NOT NULL,
-  `SELECT_FULL_RANGE_JOIN` bigint(20) unsigned NOT NULL,
-  `SELECT_RANGE` bigint(20) unsigned NOT NULL,
-  `SELECT_RANGE_CHECK` bigint(20) unsigned NOT NULL,
-  `SELECT_SCAN` bigint(20) unsigned NOT NULL,
-  `SORT_MERGE_PASSES` bigint(20) unsigned NOT NULL,
-  `SORT_RANGE` bigint(20) unsigned NOT NULL,
-  `SORT_ROWS` bigint(20) unsigned NOT NULL,
-  `SORT_SCAN` bigint(20) unsigned NOT NULL,
-  `NO_INDEX_USED` bigint(20) unsigned NOT NULL,
-  `NO_GOOD_INDEX_USED` bigint(20) unsigned NOT NULL,
-  `NESTING_EVENT_ID` bigint(20) unsigned DEFAULT NULL,
-  `NESTING_EVENT_TYPE` enum('STATEMENT','STAGE','WAIT') DEFAULT NULL
-) ENGINE=PERFORMANCE_SCHEMA DEFAULT CHARSET=utf8
-show create table events_statements_history;
-Table	Create Table
-events_statements_history	CREATE TABLE `events_statements_history` (
-  `THREAD_ID` int(11) NOT NULL,
-  `EVENT_ID` bigint(20) unsigned NOT NULL,
-  `EVENT_NAME` varchar(128) NOT NULL,
-  `SOURCE` varchar(64) DEFAULT NULL,
-  `TIMER_START` bigint(20) unsigned DEFAULT NULL,
-  `TIMER_END` bigint(20) unsigned DEFAULT NULL,
-  `TIMER_WAIT` bigint(20) unsigned DEFAULT NULL,
-  `LOCK_TIME` bigint(20) unsigned NOT NULL,
-  `SQL_TEXT` longtext,
-  `CURRENT_SCHEMA` varchar(64) DEFAULT NULL,
-  `OBJECT_TYPE` varchar(64) DEFAULT NULL,
-  `OBJECT_SCHEMA` varchar(64) DEFAULT NULL,
-  `OBJECT_NAME` varchar(64) DEFAULT NULL,
-  `OBJECT_INSTANCE_BEGIN` bigint(20) DEFAULT NULL,
-  `MYSQL_ERRNO` int(11) DEFAULT NULL,
-  `RETURNED_SQLSTATE` varchar(5) DEFAULT NULL,
-  `MESSAGE_TEXT` varchar(128) DEFAULT NULL,
-  `ERRORS` bigint(20) unsigned NOT NULL,
-  `WARNINGS` bigint(20) unsigned NOT NULL,
-  `ROWS_AFFECTED` bigint(20) unsigned NOT NULL,
-  `ROWS_SENT` bigint(20) unsigned NOT NULL,
-  `ROWS_EXAMINED` bigint(20) unsigned NOT NULL,
-  `CREATED_TMP_DISK_TABLES` bigint(20) unsigned NOT NULL,
-  `CREATED_TMP_TABLES` bigint(20) unsigned NOT NULL,
-  `SELECT_FULL_JOIN` bigint(20) unsigned NOT NULL,
-  `SELECT_FULL_RANGE_JOIN` bigint(20) unsigned NOT NULL,
-  `SELECT_RANGE` bigint(20) unsigned NOT NULL,
-  `SELECT_RANGE_CHECK` bigint(20) unsigned NOT NULL,
-  `SELECT_SCAN` bigint(20) unsigned NOT NULL,
-  `SORT_MERGE_PASSES` bigint(20) unsigned NOT NULL,
-  `SORT_RANGE` bigint(20) unsigned NOT NULL,
-  `SORT_ROWS` bigint(20) unsigned NOT NULL,
-  `SORT_SCAN` bigint(20) unsigned NOT NULL,
-  `NO_INDEX_USED` bigint(20) unsigned NOT NULL,
-  `NO_GOOD_INDEX_USED` bigint(20) unsigned NOT NULL,
-  `NESTING_EVENT_ID` bigint(20) unsigned DEFAULT NULL,
-  `NESTING_EVENT_TYPE` enum('STATEMENT','STAGE','WAIT') DEFAULT NULL
-) ENGINE=PERFORMANCE_SCHEMA DEFAULT CHARSET=utf8
-show create table events_statements_history_long;
-Table	Create Table
-events_statements_history_long	CREATE TABLE `events_statements_history_long` (
-  `THREAD_ID` int(11) NOT NULL,
-  `EVENT_ID` bigint(20) unsigned NOT NULL,
-  `EVENT_NAME` varchar(128) NOT NULL,
-  `SOURCE` varchar(64) DEFAULT NULL,
-  `TIMER_START` bigint(20) unsigned DEFAULT NULL,
-  `TIMER_END` bigint(20) unsigned DEFAULT NULL,
-  `TIMER_WAIT` bigint(20) unsigned DEFAULT NULL,
-  `LOCK_TIME` bigint(20) unsigned NOT NULL,
-  `SQL_TEXT` longtext,
-  `CURRENT_SCHEMA` varchar(64) DEFAULT NULL,
-  `OBJECT_TYPE` varchar(64) DEFAULT NULL,
-  `OBJECT_SCHEMA` varchar(64) DEFAULT NULL,
-  `OBJECT_NAME` varchar(64) DEFAULT NULL,
-  `OBJECT_INSTANCE_BEGIN` bigint(20) DEFAULT NULL,
-  `MYSQL_ERRNO` int(11) DEFAULT NULL,
-  `RETURNED_SQLSTATE` varchar(5) DEFAULT NULL,
-  `MESSAGE_TEXT` varchar(128) DEFAULT NULL,
-  `ERRORS` bigint(20) unsigned NOT NULL,
-  `WARNINGS` bigint(20) unsigned NOT NULL,
-  `ROWS_AFFECTED` bigint(20) unsigned NOT NULL,
-  `ROWS_SENT` bigint(20) unsigned NOT NULL,
-  `ROWS_EXAMINED` bigint(20) unsigned NOT NULL,
-  `CREATED_TMP_DISK_TABLES` bigint(20) unsigned NOT NULL,
-  `CREATED_TMP_TABLES` bigint(20) unsigned NOT NULL,
-  `SELECT_FULL_JOIN` bigint(20) unsigned NOT NULL,
-  `SELECT_FULL_RANGE_JOIN` bigint(20) unsigned NOT NULL,
-  `SELECT_RANGE` bigint(20) unsigned NOT NULL,
-  `SELECT_RANGE_CHECK` bigint(20) unsigned NOT NULL,
-  `SELECT_SCAN` bigint(20) unsigned NOT NULL,
-  `SORT_MERGE_PASSES` bigint(20) unsigned NOT NULL,
-  `SORT_RANGE` bigint(20) unsigned NOT NULL,
-  `SORT_ROWS` bigint(20) unsigned NOT NULL,
-  `SORT_SCAN` bigint(20) unsigned NOT NULL,
-  `NO_INDEX_USED` bigint(20) unsigned NOT NULL,
-  `NO_GOOD_INDEX_USED` bigint(20) unsigned NOT NULL,
-  `NESTING_EVENT_ID` bigint(20) unsigned DEFAULT NULL,
-  `NESTING_EVENT_TYPE` enum('STATEMENT','STAGE','WAIT') DEFAULT NULL
-) ENGINE=PERFORMANCE_SCHEMA DEFAULT CHARSET=utf8
-show create table events_statements_summary_by_thread_by_event_name;
-Table	Create Table
-events_statements_summary_by_thread_by_event_name	CREATE TABLE `events_statements_summary_by_thread_by_event_name` (
-  `THREAD_ID` int(11) NOT NULL,
-  `EVENT_NAME` varchar(128) NOT NULL,
-  `COUNT_STAR` bigint(20) unsigned NOT NULL,
-  `SUM_TIMER_WAIT` bigint(20) unsigned NOT NULL,
-  `MIN_TIMER_WAIT` bigint(20) unsigned NOT NULL,
-  `AVG_TIMER_WAIT` bigint(20) unsigned NOT NULL,
-  `MAX_TIMER_WAIT` bigint(20) unsigned NOT NULL,
-  `SUM_LOCK_TIME` bigint(20) unsigned NOT NULL,
-  `SUM_ERRORS` bigint(20) unsigned NOT NULL,
-  `SUM_WARNINGS` bigint(20) unsigned NOT NULL,
-  `SUM_ROWS_AFFECTED` bigint(20) unsigned NOT NULL,
-  `SUM_ROWS_SENT` bigint(20) unsigned NOT NULL,
-  `SUM_ROWS_EXAMINED` bigint(20) unsigned NOT NULL,
-  `SUM_CREATED_TMP_DISK_TABLES` bigint(20) unsigned NOT NULL,
-  `SUM_CREATED_TMP_TABLES` bigint(20) unsigned NOT NULL,
-  `SUM_SELECT_FULL_JOIN` bigint(20) unsigned NOT NULL,
-  `SUM_SELECT_FULL_RANGE_JOIN` bigint(20) unsigned NOT NULL,
-  `SUM_SELECT_RANGE` bigint(20) unsigned NOT NULL,
-  `SUM_SELECT_RANGE_CHECK` bigint(20) unsigned NOT NULL,
-  `SUM_SELECT_SCAN` bigint(20) unsigned NOT NULL,
-  `SUM_SORT_MERGE_PASSES` bigint(20) unsigned NOT NULL,
-  `SUM_SORT_RANGE` bigint(20) unsigned NOT NULL,
-  `SUM_SORT_ROWS` bigint(20) unsigned NOT NULL,
-  `SUM_SORT_SCAN` bigint(20) unsigned NOT NULL,
-  `SUM_NO_INDEX_USED` bigint(20) unsigned NOT NULL,
-  `SUM_NO_GOOD_INDEX_USED` bigint(20) unsigned NOT NULL
-) ENGINE=PERFORMANCE_SCHEMA DEFAULT CHARSET=utf8
-show create table events_statements_summary_global_by_event_name;
-Table	Create Table
-events_statements_summary_global_by_event_name	CREATE TABLE `events_statements_summary_global_by_event_name` (
-  `EVENT_NAME` varchar(128) NOT NULL,
-  `COUNT_STAR` bigint(20) unsigned NOT NULL,
-  `SUM_TIMER_WAIT` bigint(20) unsigned NOT NULL,
-  `MIN_TIMER_WAIT` bigint(20) unsigned NOT NULL,
-  `AVG_TIMER_WAIT` bigint(20) unsigned NOT NULL,
-  `MAX_TIMER_WAIT` bigint(20) unsigned NOT NULL,
-  `SUM_LOCK_TIME` bigint(20) unsigned NOT NULL,
-  `SUM_ERRORS` bigint(20) unsigned NOT NULL,
-  `SUM_WARNINGS` bigint(20) unsigned NOT NULL,
-  `SUM_ROWS_AFFECTED` bigint(20) unsigned NOT NULL,
-  `SUM_ROWS_SENT` bigint(20) unsigned NOT NULL,
-  `SUM_ROWS_EXAMINED` bigint(20) unsigned NOT NULL,
-  `SUM_CREATED_TMP_DISK_TABLES` bigint(20) unsigned NOT NULL,
-  `SUM_CREATED_TMP_TABLES` bigint(20) unsigned NOT NULL,
-  `SUM_SELECT_FULL_JOIN` bigint(20) unsigned NOT NULL,
-  `SUM_SELECT_FULL_RANGE_JOIN` bigint(20) unsigned NOT NULL,
-  `SUM_SELECT_RANGE` bigint(20) unsigned NOT NULL,
-  `SUM_SELECT_RANGE_CHECK` bigint(20) unsigned NOT NULL,
-  `SUM_SELECT_SCAN` bigint(20) unsigned NOT NULL,
-  `SUM_SORT_MERGE_PASSES` bigint(20) unsigned NOT NULL,
-  `SUM_SORT_RANGE` bigint(20) unsigned NOT NULL,
-  `SUM_SORT_ROWS` bigint(20) unsigned NOT NULL,
-  `SUM_SORT_SCAN` bigint(20) unsigned NOT NULL,
-  `SUM_NO_INDEX_USED` bigint(20) unsigned NOT NULL,
-  `SUM_NO_GOOD_INDEX_USED` bigint(20) unsigned NOT NULL
-) ENGINE=PERFORMANCE_SCHEMA DEFAULT CHARSET=utf8
-show create table events_waits_current;
-Table	Create Table
-events_waits_current	CREATE TABLE `events_waits_current` (
-  `THREAD_ID` int(11) NOT NULL,
-  `EVENT_ID` bigint(20) unsigned NOT NULL,
-  `EVENT_NAME` varchar(128) NOT NULL,
-  `SOURCE` varchar(64) DEFAULT NULL,
-  `TIMER_START` bigint(20) unsigned DEFAULT NULL,
-  `TIMER_END` bigint(20) unsigned DEFAULT NULL,
-  `TIMER_WAIT` bigint(20) unsigned DEFAULT NULL,
-  `SPINS` int(10) unsigned DEFAULT NULL,
-  `OBJECT_SCHEMA` varchar(64) DEFAULT NULL,
-  `OBJECT_NAME` varchar(512) DEFAULT NULL,
-  `INDEX_NAME` varchar(64) DEFAULT NULL,
-  `OBJECT_TYPE` varchar(64) DEFAULT NULL,
-  `OBJECT_INSTANCE_BEGIN` bigint(20) NOT NULL,
-  `NESTING_EVENT_ID` bigint(20) unsigned DEFAULT NULL,
-  `NESTING_EVENT_TYPE` enum('STATEMENT','STAGE','WAIT') DEFAULT NULL,
-  `OPERATION` varchar(32) NOT NULL,
-  `NUMBER_OF_BYTES` bigint(20) unsigned DEFAULT NULL,
-  `FLAGS` int(10) unsigned DEFAULT NULL
-) ENGINE=PERFORMANCE_SCHEMA DEFAULT CHARSET=utf8
-show create table events_waits_history;
-Table	Create Table
-events_waits_history	CREATE TABLE `events_waits_history` (
-  `THREAD_ID` int(11) NOT NULL,
-  `EVENT_ID` bigint(20) unsigned NOT NULL,
-  `EVENT_NAME` varchar(128) NOT NULL,
-  `SOURCE` varchar(64) DEFAULT NULL,
-  `TIMER_START` bigint(20) unsigned DEFAULT NULL,
-  `TIMER_END` bigint(20) unsigned DEFAULT NULL,
-  `TIMER_WAIT` bigint(20) unsigned DEFAULT NULL,
-  `SPINS` int(10) unsigned DEFAULT NULL,
-  `OBJECT_SCHEMA` varchar(64) DEFAULT NULL,
-  `OBJECT_NAME` varchar(512) DEFAULT NULL,
-  `INDEX_NAME` varchar(64) DEFAULT NULL,
-  `OBJECT_TYPE` varchar(64) DEFAULT NULL,
-  `OBJECT_INSTANCE_BEGIN` bigint(20) NOT NULL,
-  `NESTING_EVENT_ID` bigint(20) unsigned DEFAULT NULL,
-  `NESTING_EVENT_TYPE` enum('STATEMENT','STAGE','WAIT') DEFAULT NULL,
-  `OPERATION` varchar(32) NOT NULL,
-  `NUMBER_OF_BYTES` bigint(20) unsigned DEFAULT NULL,
-  `FLAGS` int(10) unsigned DEFAULT NULL
-) ENGINE=PERFORMANCE_SCHEMA DEFAULT CHARSET=utf8
-show create table events_waits_history_long;
-Table	Create Table
-events_waits_history_long	CREATE TABLE `events_waits_history_long` (
-  `THREAD_ID` int(11) NOT NULL,
-  `EVENT_ID` bigint(20) unsigned NOT NULL,
-  `EVENT_NAME` varchar(128) NOT NULL,
-  `SOURCE` varchar(64) DEFAULT NULL,
-  `TIMER_START` bigint(20) unsigned DEFAULT NULL,
-  `TIMER_END` bigint(20) unsigned DEFAULT NULL,
-  `TIMER_WAIT` bigint(20) unsigned DEFAULT NULL,
-  `SPINS` int(10) unsigned DEFAULT NULL,
-  `OBJECT_SCHEMA` varchar(64) DEFAULT NULL,
-  `OBJECT_NAME` varchar(512) DEFAULT NULL,
-  `INDEX_NAME` varchar(64) DEFAULT NULL,
-  `OBJECT_TYPE` varchar(64) DEFAULT NULL,
-  `OBJECT_INSTANCE_BEGIN` bigint(20) NOT NULL,
-  `NESTING_EVENT_ID` bigint(20) unsigned DEFAULT NULL,
-  `NESTING_EVENT_TYPE` enum('STATEMENT','STAGE','WAIT') DEFAULT NULL,
-  `OPERATION` varchar(32) NOT NULL,
-  `NUMBER_OF_BYTES` bigint(20) unsigned DEFAULT NULL,
-  `FLAGS` int(10) unsigned DEFAULT NULL
-) ENGINE=PERFORMANCE_SCHEMA DEFAULT CHARSET=utf8
-show create table events_waits_summary_by_instance;
-Table	Create Table
-events_waits_summary_by_instance	CREATE TABLE `events_waits_summary_by_instance` (
-  `EVENT_NAME` varchar(128) NOT NULL,
-  `OBJECT_INSTANCE_BEGIN` bigint(20) NOT NULL,
-  `COUNT_STAR` bigint(20) unsigned NOT NULL,
-  `SUM_TIMER_WAIT` bigint(20) unsigned NOT NULL,
-  `MIN_TIMER_WAIT` bigint(20) unsigned NOT NULL,
-  `AVG_TIMER_WAIT` bigint(20) unsigned NOT NULL,
-  `MAX_TIMER_WAIT` bigint(20) unsigned NOT NULL
-) ENGINE=PERFORMANCE_SCHEMA DEFAULT CHARSET=utf8
-show create table events_waits_summary_by_thread_by_event_name;
-Table	Create Table
-events_waits_summary_by_thread_by_event_name	CREATE TABLE `events_waits_summary_by_thread_by_event_name` (
-  `THREAD_ID` int(11) NOT NULL,
-  `EVENT_NAME` varchar(128) NOT NULL,
-  `COUNT_STAR` bigint(20) unsigned NOT NULL,
-  `SUM_TIMER_WAIT` bigint(20) unsigned NOT NULL,
-  `MIN_TIMER_WAIT` bigint(20) unsigned NOT NULL,
-  `AVG_TIMER_WAIT` bigint(20) unsigned NOT NULL,
-  `MAX_TIMER_WAIT` bigint(20) unsigned NOT NULL
-) ENGINE=PERFORMANCE_SCHEMA DEFAULT CHARSET=utf8
-show create table events_waits_summary_global_by_event_name;
-Table	Create Table
-events_waits_summary_global_by_event_name	CREATE TABLE `events_waits_summary_global_by_event_name` (
-  `EVENT_NAME` varchar(128) NOT NULL,
-  `COUNT_STAR` bigint(20) unsigned NOT NULL,
-  `SUM_TIMER_WAIT` bigint(20) unsigned NOT NULL,
-  `MIN_TIMER_WAIT` bigint(20) unsigned NOT NULL,
-  `AVG_TIMER_WAIT` bigint(20) unsigned NOT NULL,
-  `MAX_TIMER_WAIT` bigint(20) unsigned NOT NULL
-) ENGINE=PERFORMANCE_SCHEMA DEFAULT CHARSET=utf8
-show create table file_instances;
-Table	Create Table
-file_instances	CREATE TABLE `file_instances` (
-  `FILE_NAME` varchar(512) NOT NULL,
-  `EVENT_NAME` varchar(128) NOT NULL,
-  `OPEN_COUNT` int(10) unsigned NOT NULL
-) ENGINE=PERFORMANCE_SCHEMA DEFAULT CHARSET=utf8
-show create table file_summary_by_event_name;
-Table	Create Table
-file_summary_by_event_name	CREATE TABLE `file_summary_by_event_name` (
-  `EVENT_NAME` varchar(128) NOT NULL,
-  `COUNT_READ` bigint(20) unsigned NOT NULL,
-  `COUNT_WRITE` bigint(20) unsigned NOT NULL,
-  `SUM_NUMBER_OF_BYTES_READ` bigint(20) unsigned NOT NULL,
-  `SUM_NUMBER_OF_BYTES_WRITE` bigint(20) unsigned NOT NULL
-) ENGINE=PERFORMANCE_SCHEMA DEFAULT CHARSET=utf8
-show create table file_summary_by_instance;
-Table	Create Table
-file_summary_by_instance	CREATE TABLE `file_summary_by_instance` (
-  `FILE_NAME` varchar(512) NOT NULL,
-  `EVENT_NAME` varchar(128) NOT NULL,
-  `COUNT_READ` bigint(20) unsigned NOT NULL,
-  `COUNT_WRITE` bigint(20) unsigned NOT NULL,
-  `SUM_NUMBER_OF_BYTES_READ` bigint(20) unsigned NOT NULL,
-  `SUM_NUMBER_OF_BYTES_WRITE` bigint(20) unsigned NOT NULL
-) ENGINE=PERFORMANCE_SCHEMA DEFAULT CHARSET=utf8
-show create table mutex_instances;
-Table	Create Table
-mutex_instances	CREATE TABLE `mutex_instances` (
-  `NAME` varchar(128) NOT NULL,
-  `OBJECT_INSTANCE_BEGIN` bigint(20) NOT NULL,
-  `LOCKED_BY_THREAD_ID` int(11) DEFAULT NULL
-) ENGINE=PERFORMANCE_SCHEMA DEFAULT CHARSET=utf8
-show create table objects_summary_global_by_type;
-Table	Create Table
-objects_summary_global_by_type	CREATE TABLE `objects_summary_global_by_type` (
-  `OBJECT_TYPE` varchar(64) DEFAULT NULL,
-  `OBJECT_SCHEMA` varchar(64) DEFAULT NULL,
-  `OBJECT_NAME` varchar(64) DEFAULT NULL,
-  `COUNT_STAR` bigint(20) unsigned NOT NULL,
-  `SUM_TIMER_WAIT` bigint(20) unsigned NOT NULL,
-  `MIN_TIMER_WAIT` bigint(20) unsigned NOT NULL,
-  `AVG_TIMER_WAIT` bigint(20) unsigned NOT NULL,
-  `MAX_TIMER_WAIT` bigint(20) unsigned NOT NULL
-) ENGINE=PERFORMANCE_SCHEMA DEFAULT CHARSET=utf8
-show create table performance_timers;
-Table	Create Table
-performance_timers	CREATE TABLE `performance_timers` (
-  `TIMER_NAME` enum('CYCLE','NANOSECOND','MICROSECOND','MILLISECOND','TICK') NOT NULL,
-  `TIMER_FREQUENCY` bigint(20) DEFAULT NULL,
-  `TIMER_RESOLUTION` bigint(20) DEFAULT NULL,
-  `TIMER_OVERHEAD` bigint(20) DEFAULT NULL
-) ENGINE=PERFORMANCE_SCHEMA DEFAULT CHARSET=utf8
-show create table rwlock_instances;
-Table	Create Table
-rwlock_instances	CREATE TABLE `rwlock_instances` (
-  `NAME` varchar(128) NOT NULL,
-  `OBJECT_INSTANCE_BEGIN` bigint(20) NOT NULL,
-  `WRITE_LOCKED_BY_THREAD_ID` int(11) DEFAULT NULL,
-  `READ_LOCKED_BY_COUNT` int(10) unsigned NOT NULL
-) ENGINE=PERFORMANCE_SCHEMA DEFAULT CHARSET=utf8
-show create table setup_actors;
-Table	Create Table
-setup_actors	CREATE TABLE `setup_actors` (
-  `HOST` char(60) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT '%',
-  `USER` char(16) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT '%',
-  `ROLE` char(16) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT '%'
-) ENGINE=PERFORMANCE_SCHEMA DEFAULT CHARSET=utf8
-show create table setup_consumers;
-Table	Create Table
-setup_consumers	CREATE TABLE `setup_consumers` (
-  `NAME` varchar(64) NOT NULL,
-  `ENABLED` enum('YES','NO') NOT NULL
-) ENGINE=PERFORMANCE_SCHEMA DEFAULT CHARSET=utf8
-show create table setup_instruments;
-Table	Create Table
-setup_instruments	CREATE TABLE `setup_instruments` (
-  `NAME` varchar(128) NOT NULL,
-  `ENABLED` enum('YES','NO') NOT NULL,
-  `TIMED` enum('YES','NO') NOT NULL
-) ENGINE=PERFORMANCE_SCHEMA DEFAULT CHARSET=utf8
-show create table setup_objects;
-Table	Create Table
-setup_objects	CREATE TABLE `setup_objects` (
-  `OBJECT_TYPE` enum('TABLE') NOT NULL DEFAULT 'TABLE',
-  `OBJECT_SCHEMA` varchar(64) DEFAULT '%',
-  `OBJECT_NAME` varchar(64) NOT NULL DEFAULT '%',
-  `TIMED` enum('YES','NO') NOT NULL DEFAULT 'YES'
-) ENGINE=PERFORMANCE_SCHEMA DEFAULT CHARSET=utf8
-show create table setup_timers;
-Table	Create Table
-setup_timers	CREATE TABLE `setup_timers` (
-  `NAME` varchar(64) NOT NULL,
-  `TIMER_NAME` enum('CYCLE','NANOSECOND','MICROSECOND','MILLISECOND','TICK') NOT NULL
-) ENGINE=PERFORMANCE_SCHEMA DEFAULT CHARSET=utf8
-show create table table_io_waits_summary_by_index_usage;
-Table	Create Table
-table_io_waits_summary_by_index_usage	CREATE TABLE `table_io_waits_summary_by_index_usage` (
-  `OBJECT_TYPE` varchar(64) DEFAULT NULL,
-  `OBJECT_SCHEMA` varchar(64) DEFAULT NULL,
-  `OBJECT_NAME` varchar(64) DEFAULT NULL,
-  `INDEX_NAME` varchar(64) DEFAULT NULL,
-  `COUNT_STAR` bigint(20) unsigned NOT NULL,
-  `SUM_TIMER_WAIT` bigint(20) unsigned NOT NULL,
-  `MIN_TIMER_WAIT` bigint(20) unsigned NOT NULL,
-  `AVG_TIMER_WAIT` bigint(20) unsigned NOT NULL,
-  `MAX_TIMER_WAIT` bigint(20) unsigned NOT NULL,
-  `COUNT_READ` bigint(20) unsigned NOT NULL,
-  `SUM_TIMER_READ` bigint(20) unsigned NOT NULL,
-  `MIN_TIMER_READ` bigint(20) unsigned NOT NULL,
-  `AVG_TIMER_READ` bigint(20) unsigned NOT NULL,
-  `MAX_TIMER_READ` bigint(20) unsigned NOT NULL,
-  `COUNT_WRITE` bigint(20) unsigned NOT NULL,
-  `SUM_TIMER_WRITE` bigint(20) unsigned NOT NULL,
-  `MIN_TIMER_WRITE` bigint(20) unsigned NOT NULL,
-  `AVG_TIMER_WRITE` bigint(20) unsigned NOT NULL,
-  `MAX_TIMER_WRITE` bigint(20) unsigned NOT NULL,
-  `COUNT_FETCH` bigint(20) unsigned NOT NULL,
-  `SUM_TIMER_FETCH` bigint(20) unsigned NOT NULL,
-  `MIN_TIMER_FETCH` bigint(20) unsigned NOT NULL,
-  `AVG_TIMER_FETCH` bigint(20) unsigned NOT NULL,
-  `MAX_TIMER_FETCH` bigint(20) unsigned NOT NULL,
-  `COUNT_INSERT` bigint(20) unsigned NOT NULL,
-  `SUM_TIMER_INSERT` bigint(20) unsigned NOT NULL,
-  `MIN_TIMER_INSERT` bigint(20) unsigned NOT NULL,
-  `AVG_TIMER_INSERT` bigint(20) unsigned NOT NULL,
-  `MAX_TIMER_INSERT` bigint(20) unsigned NOT NULL,
-  `COUNT_UPDATE` bigint(20) unsigned NOT NULL,
-  `SUM_TIMER_UPDATE` bigint(20) unsigned NOT NULL,
-  `MIN_TIMER_UPDATE` bigint(20) unsigned NOT NULL,
-  `AVG_TIMER_UPDATE` bigint(20) unsigned NOT NULL,
-  `MAX_TIMER_UPDATE` bigint(20) unsigned NOT NULL,
-  `COUNT_DELETE` bigint(20) unsigned NOT NULL,
-  `SUM_TIMER_DELETE` bigint(20) unsigned NOT NULL,
-  `MIN_TIMER_DELETE` bigint(20) unsigned NOT NULL,
-  `AVG_TIMER_DELETE` bigint(20) unsigned NOT NULL,
-  `MAX_TIMER_DELETE` bigint(20) unsigned NOT NULL
-) ENGINE=PERFORMANCE_SCHEMA DEFAULT CHARSET=utf8
-show create table table_io_waits_summary_by_table;
-Table	Create Table
-table_io_waits_summary_by_table	CREATE TABLE `table_io_waits_summary_by_table` (
-  `OBJECT_TYPE` varchar(64) DEFAULT NULL,
-  `OBJECT_SCHEMA` varchar(64) DEFAULT NULL,
-  `OBJECT_NAME` varchar(64) DEFAULT NULL,
-  `COUNT_STAR` bigint(20) unsigned NOT NULL,
-  `SUM_TIMER_WAIT` bigint(20) unsigned NOT NULL,
-  `MIN_TIMER_WAIT` bigint(20) unsigned NOT NULL,
-  `AVG_TIMER_WAIT` bigint(20) unsigned NOT NULL,
-  `MAX_TIMER_WAIT` bigint(20) unsigned NOT NULL,
-  `COUNT_READ` bigint(20) unsigned NOT NULL,
-  `SUM_TIMER_READ` bigint(20) unsigned NOT NULL,
-  `MIN_TIMER_READ` bigint(20) unsigned NOT NULL,
-  `AVG_TIMER_READ` bigint(20) unsigned NOT NULL,
-  `MAX_TIMER_READ` bigint(20) unsigned NOT NULL,
-  `COUNT_WRITE` bigint(20) unsigned NOT NULL,
-  `SUM_TIMER_WRITE` bigint(20) unsigned NOT NULL,
-  `MIN_TIMER_WRITE` bigint(20) unsigned NOT NULL,
-  `AVG_TIMER_WRITE` bigint(20) unsigned NOT NULL,
-  `MAX_TIMER_WRITE` bigint(20) unsigned NOT NULL,
-  `COUNT_FETCH` bigint(20) unsigned NOT NULL,
-  `SUM_TIMER_FETCH` bigint(20) unsigned NOT NULL,
-  `MIN_TIMER_FETCH` bigint(20) unsigned NOT NULL,
-  `AVG_TIMER_FETCH` bigint(20) unsigned NOT NULL,
-  `MAX_TIMER_FETCH` bigint(20) unsigned NOT NULL,
-  `COUNT_INSERT` bigint(20) unsigned NOT NULL,
-  `SUM_TIMER_INSERT` bigint(20) unsigned NOT NULL,
-  `MIN_TIMER_INSERT` bigint(20) unsigned NOT NULL,
-  `AVG_TIMER_INSERT` bigint(20) unsigned NOT NULL,
-  `MAX_TIMER_INSERT` bigint(20) unsigned NOT NULL,
-  `COUNT_UPDATE` bigint(20) unsigned NOT NULL,
-  `SUM_TIMER_UPDATE` bigint(20) unsigned NOT NULL,
-  `MIN_TIMER_UPDATE` bigint(20) unsigned NOT NULL,
-  `AVG_TIMER_UPDATE` bigint(20) unsigned NOT NULL,
-  `MAX_TIMER_UPDATE` bigint(20) unsigned NOT NULL,
-  `COUNT_DELETE` bigint(20) unsigned NOT NULL,
-  `SUM_TIMER_DELETE` bigint(20) unsigned NOT NULL,
-  `MIN_TIMER_DELETE` bigint(20) unsigned NOT NULL,
-  `AVG_TIMER_DELETE` bigint(20) unsigned NOT NULL,
-  `MAX_TIMER_DELETE` bigint(20) unsigned NOT NULL
-) ENGINE=PERFORMANCE_SCHEMA DEFAULT CHARSET=utf8
-show create table table_lock_waits_summary_by_table;
-Table	Create Table
-table_lock_waits_summary_by_table	CREATE TABLE `table_lock_waits_summary_by_table` (
-  `OBJECT_TYPE` varchar(64) DEFAULT NULL,
-  `OBJECT_SCHEMA` varchar(64) DEFAULT NULL,
-  `OBJECT_NAME` varchar(64) DEFAULT NULL,
-  `COUNT_STAR` bigint(20) unsigned NOT NULL,
-  `SUM_TIMER_WAIT` bigint(20) unsigned NOT NULL,
-  `MIN_TIMER_WAIT` bigint(20) unsigned NOT NULL,
-  `AVG_TIMER_WAIT` bigint(20) unsigned NOT NULL,
-  `MAX_TIMER_WAIT` bigint(20) unsigned NOT NULL,
-  `COUNT_READ` bigint(20) unsigned NOT NULL,
-  `SUM_TIMER_READ` bigint(20) unsigned NOT NULL,
-  `MIN_TIMER_READ` bigint(20) unsigned NOT NULL,
-  `AVG_TIMER_READ` bigint(20) unsigned NOT NULL,
-  `MAX_TIMER_READ` bigint(20) unsigned NOT NULL,
-  `COUNT_WRITE` bigint(20) unsigned NOT NULL,
-  `SUM_TIMER_WRITE` bigint(20) unsigned NOT NULL,
-  `MIN_TIMER_WRITE` bigint(20) unsigned NOT NULL,
-  `AVG_TIMER_WRITE` bigint(20) unsigned NOT NULL,
-  `MAX_TIMER_WRITE` bigint(20) unsigned NOT NULL,
-  `COUNT_READ_NORMAL` bigint(20) unsigned NOT NULL,
-  `SUM_TIMER_READ_NORMAL` bigint(20) unsigned NOT NULL,
-  `MIN_TIMER_READ_NORMAL` bigint(20) unsigned NOT NULL,
-  `AVG_TIMER_READ_NORMAL` bigint(20) unsigned NOT NULL,
-  `MAX_TIMER_READ_NORMAL` bigint(20) unsigned NOT NULL,
-  `COUNT_READ_WITH_SHARED_LOCKS` bigint(20) unsigned NOT NULL,
-  `SUM_TIMER_READ_WITH_SHARED_LOCKS` bigint(20) unsigned NOT NULL,
-  `MIN_TIMER_READ_WITH_SHARED_LOCKS` bigint(20) unsigned NOT NULL,
-  `AVG_TIMER_READ_WITH_SHARED_LOCKS` bigint(20) unsigned NOT NULL,
-  `MAX_TIMER_READ_WITH_SHARED_LOCKS` bigint(20) unsigned NOT NULL,
-  `COUNT_READ_HIGH_PRIORITY` bigint(20) unsigned NOT NULL,
-  `SUM_TIMER_READ_HIGH_PRIORITY` bigint(20) unsigned NOT NULL,
-  `MIN_TIMER_READ_HIGH_PRIORITY` bigint(20) unsigned NOT NULL,
-  `AVG_TIMER_READ_HIGH_PRIORITY` bigint(20) unsigned NOT NULL,
-  `MAX_TIMER_READ_HIGH_PRIORITY` bigint(20) unsigned NOT NULL,
-  `COUNT_READ_NO_INSERT` bigint(20) unsigned NOT NULL,
-  `SUM_TIMER_READ_NO_INSERT` bigint(20) unsigned NOT NULL,
-  `MIN_TIMER_READ_NO_INSERT` bigint(20) unsigned NOT NULL,
-  `AVG_TIMER_READ_NO_INSERT` bigint(20) unsigned NOT NULL,
-  `MAX_TIMER_READ_NO_INSERT` bigint(20) unsigned NOT NULL,
-  `COUNT_READ_EXTERNAL` bigint(20) unsigned NOT NULL,
-  `SUM_TIMER_READ_EXTERNAL` bigint(20) unsigned NOT NULL,
-  `MIN_TIMER_READ_EXTERNAL` bigint(20) unsigned NOT NULL,
-  `AVG_TIMER_READ_EXTERNAL` bigint(20) unsigned NOT NULL,
-  `MAX_TIMER_READ_EXTERNAL` bigint(20) unsigned NOT NULL,
-  `COUNT_WRITE_ALLOW_WRITE` bigint(20) unsigned NOT NULL,
-  `SUM_TIMER_WRITE_ALLOW_WRITE` bigint(20) unsigned NOT NULL,
-  `MIN_TIMER_WRITE_ALLOW_WRITE` bigint(20) unsigned NOT NULL,
-  `AVG_TIMER_WRITE_ALLOW_WRITE` bigint(20) unsigned NOT NULL,
-  `MAX_TIMER_WRITE_ALLOW_WRITE` bigint(20) unsigned NOT NULL,
-  `COUNT_WRITE_CONCURRENT_INSERT` bigint(20) unsigned NOT NULL,
-  `SUM_TIMER_WRITE_CONCURRENT_INSERT` bigint(20) unsigned NOT NULL,
-  `MIN_TIMER_WRITE_CONCURRENT_INSERT` bigint(20) unsigned NOT NULL,
-  `AVG_TIMER_WRITE_CONCURRENT_INSERT` bigint(20) unsigned NOT NULL,
-  `MAX_TIMER_WRITE_CONCURRENT_INSERT` bigint(20) unsigned NOT NULL,
-  `COUNT_WRITE_DELAYED` bigint(20) unsigned NOT NULL,
-  `SUM_TIMER_WRITE_DELAYED` bigint(20) unsigned NOT NULL,
-  `MIN_TIMER_WRITE_DELAYED` bigint(20) unsigned NOT NULL,
-  `AVG_TIMER_WRITE_DELAYED` bigint(20) unsigned NOT NULL,
-  `MAX_TIMER_WRITE_DELAYED` bigint(20) unsigned NOT NULL,
-  `COUNT_WRITE_LOW_PRIORITY` bigint(20) unsigned NOT NULL,
-  `SUM_TIMER_WRITE_LOW_PRIORITY` bigint(20) unsigned NOT NULL,
-  `MIN_TIMER_WRITE_LOW_PRIORITY` bigint(20) unsigned NOT NULL,
-  `AVG_TIMER_WRITE_LOW_PRIORITY` bigint(20) unsigned NOT NULL,
-  `MAX_TIMER_WRITE_LOW_PRIORITY` bigint(20) unsigned NOT NULL,
-  `COUNT_WRITE_NORMAL` bigint(20) unsigned NOT NULL,
-  `SUM_TIMER_WRITE_NORMAL` bigint(20) unsigned NOT NULL,
-  `MIN_TIMER_WRITE_NORMAL` bigint(20) unsigned NOT NULL,
-  `AVG_TIMER_WRITE_NORMAL` bigint(20) unsigned NOT NULL,
-  `MAX_TIMER_WRITE_NORMAL` bigint(20) unsigned NOT NULL,
-  `COUNT_WRITE_EXTERNAL` bigint(20) unsigned NOT NULL,
-  `SUM_TIMER_WRITE_EXTERNAL` bigint(20) unsigned NOT NULL,
-  `MIN_TIMER_WRITE_EXTERNAL` bigint(20) unsigned NOT NULL,
-  `AVG_TIMER_WRITE_EXTERNAL` bigint(20) unsigned NOT NULL,
-  `MAX_TIMER_WRITE_EXTERNAL` bigint(20) unsigned NOT NULL
-) ENGINE=PERFORMANCE_SCHEMA DEFAULT CHARSET=utf8
-show create table threads;
-Table	Create Table
-threads	CREATE TABLE `threads` (
-  `THREAD_ID` int(11) NOT NULL,
-  `NAME` varchar(128) NOT NULL,
-  `TYPE` varchar(10) NOT NULL,
-  `PROCESSLIST_ID` int(11) DEFAULT NULL,
-  `PROCESSLIST_USER` varchar(16) DEFAULT NULL,
-  `PROCESSLIST_HOST` varchar(60) DEFAULT NULL,
-  `PROCESSLIST_DB` varchar(64) DEFAULT NULL,
-  `PROCESSLIST_COMMAND` varchar(16) DEFAULT NULL,
-  `PROCESSLIST_TIME` bigint(20) DEFAULT NULL,
-  `PROCESSLIST_STATE` varchar(64) DEFAULT NULL,
-  `PROCESSLIST_INFO` longtext,
-  `PARENT_THREAD_ID` int(11) DEFAULT NULL,
-  `ROLE` varchar(64) DEFAULT NULL,
-  `INSTRUMENTED` enum('YES','NO') NOT NULL
-) ENGINE=PERFORMANCE_SCHEMA DEFAULT CHARSET=utf8

=== removed file 'mysql-test/suite/perfschema/r/schema_lc2.result'
--- a/mysql-test/suite/perfschema/r/schema_lc2.result	2011-02-14 14:23:55 +0000
+++ b/mysql-test/suite/perfschema/r/schema_lc2.result	1970-01-01 00:00:00 +0000
@@ -1,663 +0,0 @@
-show databases like 'performance_schema';
-Database (performance_schema)
-performance_schema
-show create database performance_schema;
-Database	Create Database
-performance_schema	CREATE DATABASE `performance_schema` /*!40100 DEFAULT CHARACTER SET utf8 */
-use performance_schema;
-show tables;
-Tables_in_performance_schema
-cond_instances
-events_stages_current
-events_stages_history
-events_stages_history_long
-events_stages_summary_by_thread_by_event_name
-events_stages_summary_global_by_event_name
-events_statements_current
-events_statements_history
-events_statements_history_long
-events_statements_summary_by_thread_by_event_name
-events_statements_summary_global_by_event_name
-events_waits_current
-events_waits_history
-events_waits_history_long
-events_waits_summary_by_instance
-events_waits_summary_by_thread_by_event_name
-events_waits_summary_global_by_event_name
-file_instances
-file_summary_by_event_name
-file_summary_by_instance
-mutex_instances
-objects_summary_global_by_type
-performance_timers
-rwlock_instances
-setup_actors
-setup_consumers
-setup_instruments
-setup_objects
-setup_timers
-table_io_waits_summary_by_index_usage
-table_io_waits_summary_by_table
-table_lock_waits_summary_by_table
-threads
-show create table cond_instances;
-Table	Create Table
-cond_instances	CREATE TABLE `cond_instances` (
-  `NAME` varchar(128) NOT NULL,
-  `OBJECT_INSTANCE_BEGIN` bigint(20) NOT NULL
-) ENGINE=PERFORMANCE_SCHEMA DEFAULT CHARSET=utf8
-show create table events_stages_current;
-Table	Create Table
-events_stages_current	CREATE TABLE `events_stages_current` (
-  `THREAD_ID` int(11) NOT NULL,
-  `EVENT_ID` bigint(20) unsigned NOT NULL,
-  `EVENT_NAME` varchar(128) NOT NULL,
-  `SOURCE` varchar(64) DEFAULT NULL,
-  `TIMER_START` bigint(20) unsigned DEFAULT NULL,
-  `TIMER_END` bigint(20) unsigned DEFAULT NULL,
-  `TIMER_WAIT` bigint(20) unsigned DEFAULT NULL,
-  `NESTING_EVENT_ID` bigint(20) unsigned DEFAULT NULL,
-  `NESTING_EVENT_TYPE` enum('STATEMENT','STAGE','WAIT') DEFAULT NULL
-) ENGINE=PERFORMANCE_SCHEMA DEFAULT CHARSET=utf8
-show create table events_stages_history;
-Table	Create Table
-events_stages_history	CREATE TABLE `events_stages_history` (
-  `THREAD_ID` int(11) NOT NULL,
-  `EVENT_ID` bigint(20) unsigned NOT NULL,
-  `EVENT_NAME` varchar(128) NOT NULL,
-  `SOURCE` varchar(64) DEFAULT NULL,
-  `TIMER_START` bigint(20) unsigned DEFAULT NULL,
-  `TIMER_END` bigint(20) unsigned DEFAULT NULL,
-  `TIMER_WAIT` bigint(20) unsigned DEFAULT NULL,
-  `NESTING_EVENT_ID` bigint(20) unsigned DEFAULT NULL,
-  `NESTING_EVENT_TYPE` enum('STATEMENT','STAGE','WAIT') DEFAULT NULL
-) ENGINE=PERFORMANCE_SCHEMA DEFAULT CHARSET=utf8
-show create table events_stages_history_long;
-Table	Create Table
-events_stages_history_long	CREATE TABLE `events_stages_history_long` (
-  `THREAD_ID` int(11) NOT NULL,
-  `EVENT_ID` bigint(20) unsigned NOT NULL,
-  `EVENT_NAME` varchar(128) NOT NULL,
-  `SOURCE` varchar(64) DEFAULT NULL,
-  `TIMER_START` bigint(20) unsigned DEFAULT NULL,
-  `TIMER_END` bigint(20) unsigned DEFAULT NULL,
-  `TIMER_WAIT` bigint(20) unsigned DEFAULT NULL,
-  `NESTING_EVENT_ID` bigint(20) unsigned DEFAULT NULL,
-  `NESTING_EVENT_TYPE` enum('STATEMENT','STAGE','WAIT') DEFAULT NULL
-) ENGINE=PERFORMANCE_SCHEMA DEFAULT CHARSET=utf8
-show create table events_stages_summary_by_thread_by_event_name;
-Table	Create Table
-events_stages_summary_by_thread_by_event_name	CREATE TABLE `events_stages_summary_by_thread_by_event_name` (
-  `THREAD_ID` int(11) NOT NULL,
-  `EVENT_NAME` varchar(128) NOT NULL,
-  `COUNT_STAR` bigint(20) unsigned NOT NULL,
-  `SUM_TIMER_WAIT` bigint(20) unsigned NOT NULL,
-  `MIN_TIMER_WAIT` bigint(20) unsigned NOT NULL,
-  `AVG_TIMER_WAIT` bigint(20) unsigned NOT NULL,
-  `MAX_TIMER_WAIT` bigint(20) unsigned NOT NULL
-) ENGINE=PERFORMANCE_SCHEMA DEFAULT CHARSET=utf8
-show create table events_stages_summary_global_by_event_name;
-Table	Create Table
-events_stages_summary_global_by_event_name	CREATE TABLE `events_stages_summary_global_by_event_name` (
-  `EVENT_NAME` varchar(128) NOT NULL,
-  `COUNT_STAR` bigint(20) unsigned NOT NULL,
-  `SUM_TIMER_WAIT` bigint(20) unsigned NOT NULL,
-  `MIN_TIMER_WAIT` bigint(20) unsigned NOT NULL,
-  `AVG_TIMER_WAIT` bigint(20) unsigned NOT NULL,
-  `MAX_TIMER_WAIT` bigint(20) unsigned NOT NULL
-) ENGINE=PERFORMANCE_SCHEMA DEFAULT CHARSET=utf8
-show create table events_statements_current;
-Table	Create Table
-events_statements_current	CREATE TABLE `events_statements_current` (
-  `THREAD_ID` int(11) NOT NULL,
-  `EVENT_ID` bigint(20) unsigned NOT NULL,
-  `EVENT_NAME` varchar(128) NOT NULL,
-  `SOURCE` varchar(64) DEFAULT NULL,
-  `TIMER_START` bigint(20) unsigned DEFAULT NULL,
-  `TIMER_END` bigint(20) unsigned DEFAULT NULL,
-  `TIMER_WAIT` bigint(20) unsigned DEFAULT NULL,
-  `LOCK_TIME` bigint(20) unsigned NOT NULL,
-  `SQL_TEXT` longtext,
-  `CURRENT_SCHEMA` varchar(64) DEFAULT NULL,
-  `OBJECT_TYPE` varchar(64) DEFAULT NULL,
-  `OBJECT_SCHEMA` varchar(64) DEFAULT NULL,
-  `OBJECT_NAME` varchar(64) DEFAULT NULL,
-  `OBJECT_INSTANCE_BEGIN` bigint(20) DEFAULT NULL,
-  `MYSQL_ERRNO` int(11) DEFAULT NULL,
-  `RETURNED_SQLSTATE` varchar(5) DEFAULT NULL,
-  `MESSAGE_TEXT` varchar(128) DEFAULT NULL,
-  `ERRORS` bigint(20) unsigned NOT NULL,
-  `WARNINGS` bigint(20) unsigned NOT NULL,
-  `ROWS_AFFECTED` bigint(20) unsigned NOT NULL,
-  `ROWS_SENT` bigint(20) unsigned NOT NULL,
-  `ROWS_EXAMINED` bigint(20) unsigned NOT NULL,
-  `CREATED_TMP_DISK_TABLES` bigint(20) unsigned NOT NULL,
-  `CREATED_TMP_TABLES` bigint(20) unsigned NOT NULL,
-  `SELECT_FULL_JOIN` bigint(20) unsigned NOT NULL,
-  `SELECT_FULL_RANGE_JOIN` bigint(20) unsigned NOT NULL,
-  `SELECT_RANGE` bigint(20) unsigned NOT NULL,
-  `SELECT_RANGE_CHECK` bigint(20) unsigned NOT NULL,
-  `SELECT_SCAN` bigint(20) unsigned NOT NULL,
-  `SORT_MERGE_PASSES` bigint(20) unsigned NOT NULL,
-  `SORT_RANGE` bigint(20) unsigned NOT NULL,
-  `SORT_ROWS` bigint(20) unsigned NOT NULL,
-  `SORT_SCAN` bigint(20) unsigned NOT NULL,
-  `NO_INDEX_USED` bigint(20) unsigned NOT NULL,
-  `NO_GOOD_INDEX_USED` bigint(20) unsigned NOT NULL,
-  `NESTING_EVENT_ID` bigint(20) unsigned DEFAULT NULL,
-  `NESTING_EVENT_TYPE` enum('STATEMENT','STAGE','WAIT') DEFAULT NULL
-) ENGINE=PERFORMANCE_SCHEMA DEFAULT CHARSET=utf8
-show create table events_statements_history;
-Table	Create Table
-events_statements_history	CREATE TABLE `events_statements_history` (
-  `THREAD_ID` int(11) NOT NULL,
-  `EVENT_ID` bigint(20) unsigned NOT NULL,
-  `EVENT_NAME` varchar(128) NOT NULL,
-  `SOURCE` varchar(64) DEFAULT NULL,
-  `TIMER_START` bigint(20) unsigned DEFAULT NULL,
-  `TIMER_END` bigint(20) unsigned DEFAULT NULL,
-  `TIMER_WAIT` bigint(20) unsigned DEFAULT NULL,
-  `LOCK_TIME` bigint(20) unsigned NOT NULL,
-  `SQL_TEXT` longtext,
-  `CURRENT_SCHEMA` varchar(64) DEFAULT NULL,
-  `OBJECT_TYPE` varchar(64) DEFAULT NULL,
-  `OBJECT_SCHEMA` varchar(64) DEFAULT NULL,
-  `OBJECT_NAME` varchar(64) DEFAULT NULL,
-  `OBJECT_INSTANCE_BEGIN` bigint(20) DEFAULT NULL,
-  `MYSQL_ERRNO` int(11) DEFAULT NULL,
-  `RETURNED_SQLSTATE` varchar(5) DEFAULT NULL,
-  `MESSAGE_TEXT` varchar(128) DEFAULT NULL,
-  `ERRORS` bigint(20) unsigned NOT NULL,
-  `WARNINGS` bigint(20) unsigned NOT NULL,
-  `ROWS_AFFECTED` bigint(20) unsigned NOT NULL,
-  `ROWS_SENT` bigint(20) unsigned NOT NULL,
-  `ROWS_EXAMINED` bigint(20) unsigned NOT NULL,
-  `CREATED_TMP_DISK_TABLES` bigint(20) unsigned NOT NULL,
-  `CREATED_TMP_TABLES` bigint(20) unsigned NOT NULL,
-  `SELECT_FULL_JOIN` bigint(20) unsigned NOT NULL,
-  `SELECT_FULL_RANGE_JOIN` bigint(20) unsigned NOT NULL,
-  `SELECT_RANGE` bigint(20) unsigned NOT NULL,
-  `SELECT_RANGE_CHECK` bigint(20) unsigned NOT NULL,
-  `SELECT_SCAN` bigint(20) unsigned NOT NULL,
-  `SORT_MERGE_PASSES` bigint(20) unsigned NOT NULL,
-  `SORT_RANGE` bigint(20) unsigned NOT NULL,
-  `SORT_ROWS` bigint(20) unsigned NOT NULL,
-  `SORT_SCAN` bigint(20) unsigned NOT NULL,
-  `NO_INDEX_USED` bigint(20) unsigned NOT NULL,
-  `NO_GOOD_INDEX_USED` bigint(20) unsigned NOT NULL,
-  `NESTING_EVENT_ID` bigint(20) unsigned DEFAULT NULL,
-  `NESTING_EVENT_TYPE` enum('STATEMENT','STAGE','WAIT') DEFAULT NULL
-) ENGINE=PERFORMANCE_SCHEMA DEFAULT CHARSET=utf8
-show create table events_statements_history_long;
-Table	Create Table
-events_statements_history_long	CREATE TABLE `events_statements_history_long` (
-  `THREAD_ID` int(11) NOT NULL,
-  `EVENT_ID` bigint(20) unsigned NOT NULL,
-  `EVENT_NAME` varchar(128) NOT NULL,
-  `SOURCE` varchar(64) DEFAULT NULL,
-  `TIMER_START` bigint(20) unsigned DEFAULT NULL,
-  `TIMER_END` bigint(20) unsigned DEFAULT NULL,
-  `TIMER_WAIT` bigint(20) unsigned DEFAULT NULL,
-  `LOCK_TIME` bigint(20) unsigned NOT NULL,
-  `SQL_TEXT` longtext,
-  `CURRENT_SCHEMA` varchar(64) DEFAULT NULL,
-  `OBJECT_TYPE` varchar(64) DEFAULT NULL,
-  `OBJECT_SCHEMA` varchar(64) DEFAULT NULL,
-  `OBJECT_NAME` varchar(64) DEFAULT NULL,
-  `OBJECT_INSTANCE_BEGIN` bigint(20) DEFAULT NULL,
-  `MYSQL_ERRNO` int(11) DEFAULT NULL,
-  `RETURNED_SQLSTATE` varchar(5) DEFAULT NULL,
-  `MESSAGE_TEXT` varchar(128) DEFAULT NULL,
-  `ERRORS` bigint(20) unsigned NOT NULL,
-  `WARNINGS` bigint(20) unsigned NOT NULL,
-  `ROWS_AFFECTED` bigint(20) unsigned NOT NULL,
-  `ROWS_SENT` bigint(20) unsigned NOT NULL,
-  `ROWS_EXAMINED` bigint(20) unsigned NOT NULL,
-  `CREATED_TMP_DISK_TABLES` bigint(20) unsigned NOT NULL,
-  `CREATED_TMP_TABLES` bigint(20) unsigned NOT NULL,
-  `SELECT_FULL_JOIN` bigint(20) unsigned NOT NULL,
-  `SELECT_FULL_RANGE_JOIN` bigint(20) unsigned NOT NULL,
-  `SELECT_RANGE` bigint(20) unsigned NOT NULL,
-  `SELECT_RANGE_CHECK` bigint(20) unsigned NOT NULL,
-  `SELECT_SCAN` bigint(20) unsigned NOT NULL,
-  `SORT_MERGE_PASSES` bigint(20) unsigned NOT NULL,
-  `SORT_RANGE` bigint(20) unsigned NOT NULL,
-  `SORT_ROWS` bigint(20) unsigned NOT NULL,
-  `SORT_SCAN` bigint(20) unsigned NOT NULL,
-  `NO_INDEX_USED` bigint(20) unsigned NOT NULL,
-  `NO_GOOD_INDEX_USED` bigint(20) unsigned NOT NULL,
-  `NESTING_EVENT_ID` bigint(20) unsigned DEFAULT NULL,
-  `NESTING_EVENT_TYPE` enum('STATEMENT','STAGE','WAIT') DEFAULT NULL
-) ENGINE=PERFORMANCE_SCHEMA DEFAULT CHARSET=utf8
-show create table events_statements_summary_by_thread_by_event_name;
-Table	Create Table
-events_statements_summary_by_thread_by_event_name	CREATE TABLE `events_statements_summary_by_thread_by_event_name` (
-  `THREAD_ID` int(11) NOT NULL,
-  `EVENT_NAME` varchar(128) NOT NULL,
-  `COUNT_STAR` bigint(20) unsigned NOT NULL,
-  `SUM_TIMER_WAIT` bigint(20) unsigned NOT NULL,
-  `MIN_TIMER_WAIT` bigint(20) unsigned NOT NULL,
-  `AVG_TIMER_WAIT` bigint(20) unsigned NOT NULL,
-  `MAX_TIMER_WAIT` bigint(20) unsigned NOT NULL,
-  `SUM_LOCK_TIME` bigint(20) unsigned NOT NULL,
-  `SUM_ERRORS` bigint(20) unsigned NOT NULL,
-  `SUM_WARNINGS` bigint(20) unsigned NOT NULL,
-  `SUM_ROWS_AFFECTED` bigint(20) unsigned NOT NULL,
-  `SUM_ROWS_SENT` bigint(20) unsigned NOT NULL,
-  `SUM_ROWS_EXAMINED` bigint(20) unsigned NOT NULL,
-  `SUM_CREATED_TMP_DISK_TABLES` bigint(20) unsigned NOT NULL,
-  `SUM_CREATED_TMP_TABLES` bigint(20) unsigned NOT NULL,
-  `SUM_SELECT_FULL_JOIN` bigint(20) unsigned NOT NULL,
-  `SUM_SELECT_FULL_RANGE_JOIN` bigint(20) unsigned NOT NULL,
-  `SUM_SELECT_RANGE` bigint(20) unsigned NOT NULL,
-  `SUM_SELECT_RANGE_CHECK` bigint(20) unsigned NOT NULL,
-  `SUM_SELECT_SCAN` bigint(20) unsigned NOT NULL,
-  `SUM_SORT_MERGE_PASSES` bigint(20) unsigned NOT NULL,
-  `SUM_SORT_RANGE` bigint(20) unsigned NOT NULL,
-  `SUM_SORT_ROWS` bigint(20) unsigned NOT NULL,
-  `SUM_SORT_SCAN` bigint(20) unsigned NOT NULL,
-  `SUM_NO_INDEX_USED` bigint(20) unsigned NOT NULL,
-  `SUM_NO_GOOD_INDEX_USED` bigint(20) unsigned NOT NULL
-) ENGINE=PERFORMANCE_SCHEMA DEFAULT CHARSET=utf8
-show create table events_statements_summary_global_by_event_name;
-Table	Create Table
-events_statements_summary_global_by_event_name	CREATE TABLE `events_statements_summary_global_by_event_name` (
-  `EVENT_NAME` varchar(128) NOT NULL,
-  `COUNT_STAR` bigint(20) unsigned NOT NULL,
-  `SUM_TIMER_WAIT` bigint(20) unsigned NOT NULL,
-  `MIN_TIMER_WAIT` bigint(20) unsigned NOT NULL,
-  `AVG_TIMER_WAIT` bigint(20) unsigned NOT NULL,
-  `MAX_TIMER_WAIT` bigint(20) unsigned NOT NULL,
-  `SUM_LOCK_TIME` bigint(20) unsigned NOT NULL,
-  `SUM_ERRORS` bigint(20) unsigned NOT NULL,
-  `SUM_WARNINGS` bigint(20) unsigned NOT NULL,
-  `SUM_ROWS_AFFECTED` bigint(20) unsigned NOT NULL,
-  `SUM_ROWS_SENT` bigint(20) unsigned NOT NULL,
-  `SUM_ROWS_EXAMINED` bigint(20) unsigned NOT NULL,
-  `SUM_CREATED_TMP_DISK_TABLES` bigint(20) unsigned NOT NULL,
-  `SUM_CREATED_TMP_TABLES` bigint(20) unsigned NOT NULL,
-  `SUM_SELECT_FULL_JOIN` bigint(20) unsigned NOT NULL,
-  `SUM_SELECT_FULL_RANGE_JOIN` bigint(20) unsigned NOT NULL,
-  `SUM_SELECT_RANGE` bigint(20) unsigned NOT NULL,
-  `SUM_SELECT_RANGE_CHECK` bigint(20) unsigned NOT NULL,
-  `SUM_SELECT_SCAN` bigint(20) unsigned NOT NULL,
-  `SUM_SORT_MERGE_PASSES` bigint(20) unsigned NOT NULL,
-  `SUM_SORT_RANGE` bigint(20) unsigned NOT NULL,
-  `SUM_SORT_ROWS` bigint(20) unsigned NOT NULL,
-  `SUM_SORT_SCAN` bigint(20) unsigned NOT NULL,
-  `SUM_NO_INDEX_USED` bigint(20) unsigned NOT NULL,
-  `SUM_NO_GOOD_INDEX_USED` bigint(20) unsigned NOT NULL
-) ENGINE=PERFORMANCE_SCHEMA DEFAULT CHARSET=utf8
-show create table events_waits_current;
-Table	Create Table
-events_waits_current	CREATE TABLE `events_waits_current` (
-  `THREAD_ID` int(11) NOT NULL,
-  `EVENT_ID` bigint(20) unsigned NOT NULL,
-  `EVENT_NAME` varchar(128) NOT NULL,
-  `SOURCE` varchar(64) DEFAULT NULL,
-  `TIMER_START` bigint(20) unsigned DEFAULT NULL,
-  `TIMER_END` bigint(20) unsigned DEFAULT NULL,
-  `TIMER_WAIT` bigint(20) unsigned DEFAULT NULL,
-  `SPINS` int(10) unsigned DEFAULT NULL,
-  `OBJECT_SCHEMA` varchar(64) DEFAULT NULL,
-  `OBJECT_NAME` varchar(512) DEFAULT NULL,
-  `INDEX_NAME` varchar(64) DEFAULT NULL,
-  `OBJECT_TYPE` varchar(64) DEFAULT NULL,
-  `OBJECT_INSTANCE_BEGIN` bigint(20) NOT NULL,
-  `NESTING_EVENT_ID` bigint(20) unsigned DEFAULT NULL,
-  `NESTING_EVENT_TYPE` enum('STATEMENT','STAGE','WAIT') DEFAULT NULL,
-  `OPERATION` varchar(32) NOT NULL,
-  `NUMBER_OF_BYTES` bigint(20) unsigned DEFAULT NULL,
-  `FLAGS` int(10) unsigned DEFAULT NULL
-) ENGINE=PERFORMANCE_SCHEMA DEFAULT CHARSET=utf8
-show create table events_waits_history;
-Table	Create Table
-events_waits_history	CREATE TABLE `events_waits_history` (
-  `THREAD_ID` int(11) NOT NULL,
-  `EVENT_ID` bigint(20) unsigned NOT NULL,
-  `EVENT_NAME` varchar(128) NOT NULL,
-  `SOURCE` varchar(64) DEFAULT NULL,
-  `TIMER_START` bigint(20) unsigned DEFAULT NULL,
-  `TIMER_END` bigint(20) unsigned DEFAULT NULL,
-  `TIMER_WAIT` bigint(20) unsigned DEFAULT NULL,
-  `SPINS` int(10) unsigned DEFAULT NULL,
-  `OBJECT_SCHEMA` varchar(64) DEFAULT NULL,
-  `OBJECT_NAME` varchar(512) DEFAULT NULL,
-  `INDEX_NAME` varchar(64) DEFAULT NULL,
-  `OBJECT_TYPE` varchar(64) DEFAULT NULL,
-  `OBJECT_INSTANCE_BEGIN` bigint(20) NOT NULL,
-  `NESTING_EVENT_ID` bigint(20) unsigned DEFAULT NULL,
-  `NESTING_EVENT_TYPE` enum('STATEMENT','STAGE','WAIT') DEFAULT NULL,
-  `OPERATION` varchar(32) NOT NULL,
-  `NUMBER_OF_BYTES` bigint(20) unsigned DEFAULT NULL,
-  `FLAGS` int(10) unsigned DEFAULT NULL
-) ENGINE=PERFORMANCE_SCHEMA DEFAULT CHARSET=utf8
-show create table events_waits_history_long;
-Table	Create Table
-events_waits_history_long	CREATE TABLE `events_waits_history_long` (
-  `THREAD_ID` int(11) NOT NULL,
-  `EVENT_ID` bigint(20) unsigned NOT NULL,
-  `EVENT_NAME` varchar(128) NOT NULL,
-  `SOURCE` varchar(64) DEFAULT NULL,
-  `TIMER_START` bigint(20) unsigned DEFAULT NULL,
-  `TIMER_END` bigint(20) unsigned DEFAULT NULL,
-  `TIMER_WAIT` bigint(20) unsigned DEFAULT NULL,
-  `SPINS` int(10) unsigned DEFAULT NULL,
-  `OBJECT_SCHEMA` varchar(64) DEFAULT NULL,
-  `OBJECT_NAME` varchar(512) DEFAULT NULL,
-  `INDEX_NAME` varchar(64) DEFAULT NULL,
-  `OBJECT_TYPE` varchar(64) DEFAULT NULL,
-  `OBJECT_INSTANCE_BEGIN` bigint(20) NOT NULL,
-  `NESTING_EVENT_ID` bigint(20) unsigned DEFAULT NULL,
-  `NESTING_EVENT_TYPE` enum('STATEMENT','STAGE','WAIT') DEFAULT NULL,
-  `OPERATION` varchar(32) NOT NULL,
-  `NUMBER_OF_BYTES` bigint(20) unsigned DEFAULT NULL,
-  `FLAGS` int(10) unsigned DEFAULT NULL
-) ENGINE=PERFORMANCE_SCHEMA DEFAULT CHARSET=utf8
-show create table events_waits_summary_by_instance;
-Table	Create Table
-events_waits_summary_by_instance	CREATE TABLE `events_waits_summary_by_instance` (
-  `EVENT_NAME` varchar(128) NOT NULL,
-  `OBJECT_INSTANCE_BEGIN` bigint(20) NOT NULL,
-  `COUNT_STAR` bigint(20) unsigned NOT NULL,
-  `SUM_TIMER_WAIT` bigint(20) unsigned NOT NULL,
-  `MIN_TIMER_WAIT` bigint(20) unsigned NOT NULL,
-  `AVG_TIMER_WAIT` bigint(20) unsigned NOT NULL,
-  `MAX_TIMER_WAIT` bigint(20) unsigned NOT NULL
-) ENGINE=PERFORMANCE_SCHEMA DEFAULT CHARSET=utf8
-show create table events_waits_summary_by_thread_by_event_name;
-Table	Create Table
-events_waits_summary_by_thread_by_event_name	CREATE TABLE `events_waits_summary_by_thread_by_event_name` (
-  `THREAD_ID` int(11) NOT NULL,
-  `EVENT_NAME` varchar(128) NOT NULL,
-  `COUNT_STAR` bigint(20) unsigned NOT NULL,
-  `SUM_TIMER_WAIT` bigint(20) unsigned NOT NULL,
-  `MIN_TIMER_WAIT` bigint(20) unsigned NOT NULL,
-  `AVG_TIMER_WAIT` bigint(20) unsigned NOT NULL,
-  `MAX_TIMER_WAIT` bigint(20) unsigned NOT NULL
-) ENGINE=PERFORMANCE_SCHEMA DEFAULT CHARSET=utf8
-show create table events_waits_summary_global_by_event_name;
-Table	Create Table
-events_waits_summary_global_by_event_name	CREATE TABLE `events_waits_summary_global_by_event_name` (
-  `EVENT_NAME` varchar(128) NOT NULL,
-  `COUNT_STAR` bigint(20) unsigned NOT NULL,
-  `SUM_TIMER_WAIT` bigint(20) unsigned NOT NULL,
-  `MIN_TIMER_WAIT` bigint(20) unsigned NOT NULL,
-  `AVG_TIMER_WAIT` bigint(20) unsigned NOT NULL,
-  `MAX_TIMER_WAIT` bigint(20) unsigned NOT NULL
-) ENGINE=PERFORMANCE_SCHEMA DEFAULT CHARSET=utf8
-show create table file_instances;
-Table	Create Table
-file_instances	CREATE TABLE `file_instances` (
-  `FILE_NAME` varchar(512) NOT NULL,
-  `EVENT_NAME` varchar(128) NOT NULL,
-  `OPEN_COUNT` int(10) unsigned NOT NULL
-) ENGINE=PERFORMANCE_SCHEMA DEFAULT CHARSET=utf8
-show create table file_summary_by_event_name;
-Table	Create Table
-file_summary_by_event_name	CREATE TABLE `file_summary_by_event_name` (
-  `EVENT_NAME` varchar(128) NOT NULL,
-  `COUNT_READ` bigint(20) unsigned NOT NULL,
-  `COUNT_WRITE` bigint(20) unsigned NOT NULL,
-  `SUM_NUMBER_OF_BYTES_READ` bigint(20) unsigned NOT NULL,
-  `SUM_NUMBER_OF_BYTES_WRITE` bigint(20) unsigned NOT NULL
-) ENGINE=PERFORMANCE_SCHEMA DEFAULT CHARSET=utf8
-show create table file_summary_by_instance;
-Table	Create Table
-file_summary_by_instance	CREATE TABLE `file_summary_by_instance` (
-  `FILE_NAME` varchar(512) NOT NULL,
-  `EVENT_NAME` varchar(128) NOT NULL,
-  `COUNT_READ` bigint(20) unsigned NOT NULL,
-  `COUNT_WRITE` bigint(20) unsigned NOT NULL,
-  `SUM_NUMBER_OF_BYTES_READ` bigint(20) unsigned NOT NULL,
-  `SUM_NUMBER_OF_BYTES_WRITE` bigint(20) unsigned NOT NULL
-) ENGINE=PERFORMANCE_SCHEMA DEFAULT CHARSET=utf8
-show create table mutex_instances;
-Table	Create Table
-mutex_instances	CREATE TABLE `mutex_instances` (
-  `NAME` varchar(128) NOT NULL,
-  `OBJECT_INSTANCE_BEGIN` bigint(20) NOT NULL,
-  `LOCKED_BY_THREAD_ID` int(11) DEFAULT NULL
-) ENGINE=PERFORMANCE_SCHEMA DEFAULT CHARSET=utf8
-show create table objects_summary_global_by_type;
-Table	Create Table
-objects_summary_global_by_type	CREATE TABLE `objects_summary_global_by_type` (
-  `OBJECT_TYPE` varchar(64) DEFAULT NULL,
-  `OBJECT_SCHEMA` varchar(64) DEFAULT NULL,
-  `OBJECT_NAME` varchar(64) DEFAULT NULL,
-  `COUNT_STAR` bigint(20) unsigned NOT NULL,
-  `SUM_TIMER_WAIT` bigint(20) unsigned NOT NULL,
-  `MIN_TIMER_WAIT` bigint(20) unsigned NOT NULL,
-  `AVG_TIMER_WAIT` bigint(20) unsigned NOT NULL,
-  `MAX_TIMER_WAIT` bigint(20) unsigned NOT NULL
-) ENGINE=PERFORMANCE_SCHEMA DEFAULT CHARSET=utf8
-show create table performance_timers;
-Table	Create Table
-performance_timers	CREATE TABLE `performance_timers` (
-  `TIMER_NAME` enum('CYCLE','NANOSECOND','MICROSECOND','MILLISECOND','TICK') NOT NULL,
-  `TIMER_FREQUENCY` bigint(20) DEFAULT NULL,
-  `TIMER_RESOLUTION` bigint(20) DEFAULT NULL,
-  `TIMER_OVERHEAD` bigint(20) DEFAULT NULL
-) ENGINE=PERFORMANCE_SCHEMA DEFAULT CHARSET=utf8
-show create table rwlock_instances;
-Table	Create Table
-rwlock_instances	CREATE TABLE `rwlock_instances` (
-  `NAME` varchar(128) NOT NULL,
-  `OBJECT_INSTANCE_BEGIN` bigint(20) NOT NULL,
-  `WRITE_LOCKED_BY_THREAD_ID` int(11) DEFAULT NULL,
-  `READ_LOCKED_BY_COUNT` int(10) unsigned NOT NULL
-) ENGINE=PERFORMANCE_SCHEMA DEFAULT CHARSET=utf8
-show create table setup_actors;
-Table	Create Table
-setup_actors	CREATE TABLE `setup_actors` (
-  `HOST` char(60) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT '%',
-  `USER` char(16) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT '%',
-  `ROLE` char(16) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT '%'
-) ENGINE=PERFORMANCE_SCHEMA DEFAULT CHARSET=utf8
-show create table setup_consumers;
-Table	Create Table
-setup_consumers	CREATE TABLE `setup_consumers` (
-  `NAME` varchar(64) NOT NULL,
-  `ENABLED` enum('YES','NO') NOT NULL
-) ENGINE=PERFORMANCE_SCHEMA DEFAULT CHARSET=utf8
-show create table setup_instruments;
-Table	Create Table
-setup_instruments	CREATE TABLE `setup_instruments` (
-  `NAME` varchar(128) NOT NULL,
-  `ENABLED` enum('YES','NO') NOT NULL,
-  `TIMED` enum('YES','NO') NOT NULL
-) ENGINE=PERFORMANCE_SCHEMA DEFAULT CHARSET=utf8
-show create table setup_objects;
-Table	Create Table
-setup_objects	CREATE TABLE `setup_objects` (
-  `OBJECT_TYPE` enum('TABLE') NOT NULL DEFAULT 'TABLE',
-  `OBJECT_SCHEMA` varchar(64) DEFAULT '%',
-  `OBJECT_NAME` varchar(64) NOT NULL DEFAULT '%',
-  `TIMED` enum('YES','NO') NOT NULL DEFAULT 'YES'
-) ENGINE=PERFORMANCE_SCHEMA DEFAULT CHARSET=utf8
-show create table setup_timers;
-Table	Create Table
-setup_timers	CREATE TABLE `setup_timers` (
-  `NAME` varchar(64) NOT NULL,
-  `TIMER_NAME` enum('CYCLE','NANOSECOND','MICROSECOND','MILLISECOND','TICK') NOT NULL
-) ENGINE=PERFORMANCE_SCHEMA DEFAULT CHARSET=utf8
-show create table table_io_waits_summary_by_index_usage;
-Table	Create Table
-table_io_waits_summary_by_index_usage	CREATE TABLE `table_io_waits_summary_by_index_usage` (
-  `OBJECT_TYPE` varchar(64) DEFAULT NULL,
-  `OBJECT_SCHEMA` varchar(64) DEFAULT NULL,
-  `OBJECT_NAME` varchar(64) DEFAULT NULL,
-  `INDEX_NAME` varchar(64) DEFAULT NULL,
-  `COUNT_STAR` bigint(20) unsigned NOT NULL,
-  `SUM_TIMER_WAIT` bigint(20) unsigned NOT NULL,
-  `MIN_TIMER_WAIT` bigint(20) unsigned NOT NULL,
-  `AVG_TIMER_WAIT` bigint(20) unsigned NOT NULL,
-  `MAX_TIMER_WAIT` bigint(20) unsigned NOT NULL,
-  `COUNT_READ` bigint(20) unsigned NOT NULL,
-  `SUM_TIMER_READ` bigint(20) unsigned NOT NULL,
-  `MIN_TIMER_READ` bigint(20) unsigned NOT NULL,
-  `AVG_TIMER_READ` bigint(20) unsigned NOT NULL,
-  `MAX_TIMER_READ` bigint(20) unsigned NOT NULL,
-  `COUNT_WRITE` bigint(20) unsigned NOT NULL,
-  `SUM_TIMER_WRITE` bigint(20) unsigned NOT NULL,
-  `MIN_TIMER_WRITE` bigint(20) unsigned NOT NULL,
-  `AVG_TIMER_WRITE` bigint(20) unsigned NOT NULL,
-  `MAX_TIMER_WRITE` bigint(20) unsigned NOT NULL,
-  `COUNT_FETCH` bigint(20) unsigned NOT NULL,
-  `SUM_TIMER_FETCH` bigint(20) unsigned NOT NULL,
-  `MIN_TIMER_FETCH` bigint(20) unsigned NOT NULL,
-  `AVG_TIMER_FETCH` bigint(20) unsigned NOT NULL,
-  `MAX_TIMER_FETCH` bigint(20) unsigned NOT NULL,
-  `COUNT_INSERT` bigint(20) unsigned NOT NULL,
-  `SUM_TIMER_INSERT` bigint(20) unsigned NOT NULL,
-  `MIN_TIMER_INSERT` bigint(20) unsigned NOT NULL,
-  `AVG_TIMER_INSERT` bigint(20) unsigned NOT NULL,
-  `MAX_TIMER_INSERT` bigint(20) unsigned NOT NULL,
-  `COUNT_UPDATE` bigint(20) unsigned NOT NULL,
-  `SUM_TIMER_UPDATE` bigint(20) unsigned NOT NULL,
-  `MIN_TIMER_UPDATE` bigint(20) unsigned NOT NULL,
-  `AVG_TIMER_UPDATE` bigint(20) unsigned NOT NULL,
-  `MAX_TIMER_UPDATE` bigint(20) unsigned NOT NULL,
-  `COUNT_DELETE` bigint(20) unsigned NOT NULL,
-  `SUM_TIMER_DELETE` bigint(20) unsigned NOT NULL,
-  `MIN_TIMER_DELETE` bigint(20) unsigned NOT NULL,
-  `AVG_TIMER_DELETE` bigint(20) unsigned NOT NULL,
-  `MAX_TIMER_DELETE` bigint(20) unsigned NOT NULL
-) ENGINE=PERFORMANCE_SCHEMA DEFAULT CHARSET=utf8
-show create table table_io_waits_summary_by_table;
-Table	Create Table
-table_io_waits_summary_by_table	CREATE TABLE `table_io_waits_summary_by_table` (
-  `OBJECT_TYPE` varchar(64) DEFAULT NULL,
-  `OBJECT_SCHEMA` varchar(64) DEFAULT NULL,
-  `OBJECT_NAME` varchar(64) DEFAULT NULL,
-  `COUNT_STAR` bigint(20) unsigned NOT NULL,
-  `SUM_TIMER_WAIT` bigint(20) unsigned NOT NULL,
-  `MIN_TIMER_WAIT` bigint(20) unsigned NOT NULL,
-  `AVG_TIMER_WAIT` bigint(20) unsigned NOT NULL,
-  `MAX_TIMER_WAIT` bigint(20) unsigned NOT NULL,
-  `COUNT_READ` bigint(20) unsigned NOT NULL,
-  `SUM_TIMER_READ` bigint(20) unsigned NOT NULL,
-  `MIN_TIMER_READ` bigint(20) unsigned NOT NULL,
-  `AVG_TIMER_READ` bigint(20) unsigned NOT NULL,
-  `MAX_TIMER_READ` bigint(20) unsigned NOT NULL,
-  `COUNT_WRITE` bigint(20) unsigned NOT NULL,
-  `SUM_TIMER_WRITE` bigint(20) unsigned NOT NULL,
-  `MIN_TIMER_WRITE` bigint(20) unsigned NOT NULL,
-  `AVG_TIMER_WRITE` bigint(20) unsigned NOT NULL,
-  `MAX_TIMER_WRITE` bigint(20) unsigned NOT NULL,
-  `COUNT_FETCH` bigint(20) unsigned NOT NULL,
-  `SUM_TIMER_FETCH` bigint(20) unsigned NOT NULL,
-  `MIN_TIMER_FETCH` bigint(20) unsigned NOT NULL,
-  `AVG_TIMER_FETCH` bigint(20) unsigned NOT NULL,
-  `MAX_TIMER_FETCH` bigint(20) unsigned NOT NULL,
-  `COUNT_INSERT` bigint(20) unsigned NOT NULL,
-  `SUM_TIMER_INSERT` bigint(20) unsigned NOT NULL,
-  `MIN_TIMER_INSERT` bigint(20) unsigned NOT NULL,
-  `AVG_TIMER_INSERT` bigint(20) unsigned NOT NULL,
-  `MAX_TIMER_INSERT` bigint(20) unsigned NOT NULL,
-  `COUNT_UPDATE` bigint(20) unsigned NOT NULL,
-  `SUM_TIMER_UPDATE` bigint(20) unsigned NOT NULL,
-  `MIN_TIMER_UPDATE` bigint(20) unsigned NOT NULL,
-  `AVG_TIMER_UPDATE` bigint(20) unsigned NOT NULL,
-  `MAX_TIMER_UPDATE` bigint(20) unsigned NOT NULL,
-  `COUNT_DELETE` bigint(20) unsigned NOT NULL,
-  `SUM_TIMER_DELETE` bigint(20) unsigned NOT NULL,
-  `MIN_TIMER_DELETE` bigint(20) unsigned NOT NULL,
-  `AVG_TIMER_DELETE` bigint(20) unsigned NOT NULL,
-  `MAX_TIMER_DELETE` bigint(20) unsigned NOT NULL
-) ENGINE=PERFORMANCE_SCHEMA DEFAULT CHARSET=utf8
-show create table table_lock_waits_summary_by_table;
-Table	Create Table
-table_lock_waits_summary_by_table	CREATE TABLE `table_lock_waits_summary_by_table` (
-  `OBJECT_TYPE` varchar(64) DEFAULT NULL,
-  `OBJECT_SCHEMA` varchar(64) DEFAULT NULL,
-  `OBJECT_NAME` varchar(64) DEFAULT NULL,
-  `COUNT_STAR` bigint(20) unsigned NOT NULL,
-  `SUM_TIMER_WAIT` bigint(20) unsigned NOT NULL,
-  `MIN_TIMER_WAIT` bigint(20) unsigned NOT NULL,
-  `AVG_TIMER_WAIT` bigint(20) unsigned NOT NULL,
-  `MAX_TIMER_WAIT` bigint(20) unsigned NOT NULL,
-  `COUNT_READ` bigint(20) unsigned NOT NULL,
-  `SUM_TIMER_READ` bigint(20) unsigned NOT NULL,
-  `MIN_TIMER_READ` bigint(20) unsigned NOT NULL,
-  `AVG_TIMER_READ` bigint(20) unsigned NOT NULL,
-  `MAX_TIMER_READ` bigint(20) unsigned NOT NULL,
-  `COUNT_WRITE` bigint(20) unsigned NOT NULL,
-  `SUM_TIMER_WRITE` bigint(20) unsigned NOT NULL,
-  `MIN_TIMER_WRITE` bigint(20) unsigned NOT NULL,
-  `AVG_TIMER_WRITE` bigint(20) unsigned NOT NULL,
-  `MAX_TIMER_WRITE` bigint(20) unsigned NOT NULL,
-  `COUNT_READ_NORMAL` bigint(20) unsigned NOT NULL,
-  `SUM_TIMER_READ_NORMAL` bigint(20) unsigned NOT NULL,
-  `MIN_TIMER_READ_NORMAL` bigint(20) unsigned NOT NULL,
-  `AVG_TIMER_READ_NORMAL` bigint(20) unsigned NOT NULL,
-  `MAX_TIMER_READ_NORMAL` bigint(20) unsigned NOT NULL,
-  `COUNT_READ_WITH_SHARED_LOCKS` bigint(20) unsigned NOT NULL,
-  `SUM_TIMER_READ_WITH_SHARED_LOCKS` bigint(20) unsigned NOT NULL,
-  `MIN_TIMER_READ_WITH_SHARED_LOCKS` bigint(20) unsigned NOT NULL,
-  `AVG_TIMER_READ_WITH_SHARED_LOCKS` bigint(20) unsigned NOT NULL,
-  `MAX_TIMER_READ_WITH_SHARED_LOCKS` bigint(20) unsigned NOT NULL,
-  `COUNT_READ_HIGH_PRIORITY` bigint(20) unsigned NOT NULL,
-  `SUM_TIMER_READ_HIGH_PRIORITY` bigint(20) unsigned NOT NULL,
-  `MIN_TIMER_READ_HIGH_PRIORITY` bigint(20) unsigned NOT NULL,
-  `AVG_TIMER_READ_HIGH_PRIORITY` bigint(20) unsigned NOT NULL,
-  `MAX_TIMER_READ_HIGH_PRIORITY` bigint(20) unsigned NOT NULL,
-  `COUNT_READ_NO_INSERT` bigint(20) unsigned NOT NULL,
-  `SUM_TIMER_READ_NO_INSERT` bigint(20) unsigned NOT NULL,
-  `MIN_TIMER_READ_NO_INSERT` bigint(20) unsigned NOT NULL,
-  `AVG_TIMER_READ_NO_INSERT` bigint(20) unsigned NOT NULL,
-  `MAX_TIMER_READ_NO_INSERT` bigint(20) unsigned NOT NULL,
-  `COUNT_READ_EXTERNAL` bigint(20) unsigned NOT NULL,
-  `SUM_TIMER_READ_EXTERNAL` bigint(20) unsigned NOT NULL,
-  `MIN_TIMER_READ_EXTERNAL` bigint(20) unsigned NOT NULL,
-  `AVG_TIMER_READ_EXTERNAL` bigint(20) unsigned NOT NULL,
-  `MAX_TIMER_READ_EXTERNAL` bigint(20) unsigned NOT NULL,
-  `COUNT_WRITE_ALLOW_WRITE` bigint(20) unsigned NOT NULL,
-  `SUM_TIMER_WRITE_ALLOW_WRITE` bigint(20) unsigned NOT NULL,
-  `MIN_TIMER_WRITE_ALLOW_WRITE` bigint(20) unsigned NOT NULL,
-  `AVG_TIMER_WRITE_ALLOW_WRITE` bigint(20) unsigned NOT NULL,
-  `MAX_TIMER_WRITE_ALLOW_WRITE` bigint(20) unsigned NOT NULL,
-  `COUNT_WRITE_CONCURRENT_INSERT` bigint(20) unsigned NOT NULL,
-  `SUM_TIMER_WRITE_CONCURRENT_INSERT` bigint(20) unsigned NOT NULL,
-  `MIN_TIMER_WRITE_CONCURRENT_INSERT` bigint(20) unsigned NOT NULL,
-  `AVG_TIMER_WRITE_CONCURRENT_INSERT` bigint(20) unsigned NOT NULL,
-  `MAX_TIMER_WRITE_CONCURRENT_INSERT` bigint(20) unsigned NOT NULL,
-  `COUNT_WRITE_DELAYED` bigint(20) unsigned NOT NULL,
-  `SUM_TIMER_WRITE_DELAYED` bigint(20) unsigned NOT NULL,
-  `MIN_TIMER_WRITE_DELAYED` bigint(20) unsigned NOT NULL,
-  `AVG_TIMER_WRITE_DELAYED` bigint(20) unsigned NOT NULL,
-  `MAX_TIMER_WRITE_DELAYED` bigint(20) unsigned NOT NULL,
-  `COUNT_WRITE_LOW_PRIORITY` bigint(20) unsigned NOT NULL,
-  `SUM_TIMER_WRITE_LOW_PRIORITY` bigint(20) unsigned NOT NULL,
-  `MIN_TIMER_WRITE_LOW_PRIORITY` bigint(20) unsigned NOT NULL,
-  `AVG_TIMER_WRITE_LOW_PRIORITY` bigint(20) unsigned NOT NULL,
-  `MAX_TIMER_WRITE_LOW_PRIORITY` bigint(20) unsigned NOT NULL,
-  `COUNT_WRITE_NORMAL` bigint(20) unsigned NOT NULL,
-  `SUM_TIMER_WRITE_NORMAL` bigint(20) unsigned NOT NULL,
-  `MIN_TIMER_WRITE_NORMAL` bigint(20) unsigned NOT NULL,
-  `AVG_TIMER_WRITE_NORMAL` bigint(20) unsigned NOT NULL,
-  `MAX_TIMER_WRITE_NORMAL` bigint(20) unsigned NOT NULL,
-  `COUNT_WRITE_EXTERNAL` bigint(20) unsigned NOT NULL,
-  `SUM_TIMER_WRITE_EXTERNAL` bigint(20) unsigned NOT NULL,
-  `MIN_TIMER_WRITE_EXTERNAL` bigint(20) unsigned NOT NULL,
-  `AVG_TIMER_WRITE_EXTERNAL` bigint(20) unsigned NOT NULL,
-  `MAX_TIMER_WRITE_EXTERNAL` bigint(20) unsigned NOT NULL
-) ENGINE=PERFORMANCE_SCHEMA DEFAULT CHARSET=utf8
-show create table threads;
-Table	Create Table
-threads	CREATE TABLE `threads` (
-  `THREAD_ID` int(11) NOT NULL,
-  `NAME` varchar(128) NOT NULL,
-  `TYPE` varchar(10) NOT NULL,
-  `PROCESSLIST_ID` int(11) DEFAULT NULL,
-  `PROCESSLIST_USER` varchar(16) DEFAULT NULL,
-  `PROCESSLIST_HOST` varchar(60) DEFAULT NULL,
-  `PROCESSLIST_DB` varchar(64) DEFAULT NULL,
-  `PROCESSLIST_COMMAND` varchar(16) DEFAULT NULL,
-  `PROCESSLIST_TIME` bigint(20) DEFAULT NULL,
-  `PROCESSLIST_STATE` varchar(64) DEFAULT NULL,
-  `PROCESSLIST_INFO` longtext,
-  `PARENT_THREAD_ID` int(11) DEFAULT NULL,
-  `ROLE` varchar(64) DEFAULT NULL,
-  `INSTRUMENTED` enum('YES','NO') NOT NULL
-) ENGINE=PERFORMANCE_SCHEMA DEFAULT CHARSET=utf8

=== added file 'mysql-test/suite/perfschema/t/pfs_upgrade.test'
--- a/mysql-test/suite/perfschema/t/pfs_upgrade.test	1970-01-01 00:00:00 +0000
+++ b/mysql-test/suite/perfschema/t/pfs_upgrade.test	2011-05-17 09:15:47 +0000
@@ -0,0 +1,24 @@
+# Copyright (c) 2010, 2011, 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,
+# 51 Franklin Street, Suite 500, Boston, MA 02110-1335 USA
+
+# Tests for PERFORMANCE_SCHEMA
+# Make sure mysql_upgrade does not destroy data in a 'performance_schema'
+# database.
+# 
+
+--source include/not_embedded.inc
+--source include/have_perfschema.inc
+--source ../include/pfs_upgrade.inc
+

=== removed file 'mysql-test/suite/perfschema/t/pfs_upgrade_lc0.test'
--- a/mysql-test/suite/perfschema/t/pfs_upgrade_lc0.test	2010-06-30 14:05:18 +0000
+++ b/mysql-test/suite/perfschema/t/pfs_upgrade_lc0.test	1970-01-01 00:00:00 +0000
@@ -1,26 +0,0 @@
-# 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,
-# 51 Franklin Street, Suite 500, Boston, MA 02110-1335 USA
-
-# Tests for PERFORMANCE_SCHEMA
-# Make sure mysql_upgrade does not destroy data in a 'performance_schema'
-# database.
-# 
-
---source include/not_embedded.inc
---source include/have_perfschema.inc
---source include/have_lowercase0.inc
---source ../include/pfs_upgrade.inc
-
-

=== removed file 'mysql-test/suite/perfschema/t/pfs_upgrade_lc1.test'
--- a/mysql-test/suite/perfschema/t/pfs_upgrade_lc1.test	2010-06-30 14:05:18 +0000
+++ b/mysql-test/suite/perfschema/t/pfs_upgrade_lc1.test	1970-01-01 00:00:00 +0000
@@ -1,26 +0,0 @@
-# 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,
-# 51 Franklin Street, Suite 500, Boston, MA 02110-1335 USA
-
-# Tests for PERFORMANCE_SCHEMA
-# Make sure mysql_upgrade does not destroy data in a 'performance_schema'
-# database.
-# 
-
---source include/not_embedded.inc
---source include/have_perfschema.inc
---source include/have_lowercase1.inc
---source ../include/pfs_upgrade.inc
-
-

=== removed file 'mysql-test/suite/perfschema/t/pfs_upgrade_lc2.test'
--- a/mysql-test/suite/perfschema/t/pfs_upgrade_lc2.test	2010-06-30 14:05:18 +0000
+++ b/mysql-test/suite/perfschema/t/pfs_upgrade_lc2.test	1970-01-01 00:00:00 +0000
@@ -1,26 +0,0 @@
-# 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,
-# 51 Franklin Street, Suite 500, Boston, MA 02110-1335 USA
-
-# Tests for PERFORMANCE_SCHEMA
-# Make sure mysql_upgrade does not destroy data in a 'performance_schema'
-# database.
-# 
-
---source include/not_embedded.inc
---source include/have_perfschema.inc
---source include/have_lowercase2.inc
---source ../include/pfs_upgrade.inc
-
-

=== added file 'mysql-test/suite/perfschema/t/schema.test'
--- a/mysql-test/suite/perfschema/t/schema.test	1970-01-01 00:00:00 +0000
+++ b/mysql-test/suite/perfschema/t/schema.test	2011-05-17 09:15:47 +0000
@@ -0,0 +1,22 @@
+# Copyright (c) 2008, 2011, 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,
+# 51 Franklin Street, Suite 500, Boston, MA 02110-1335 USA
+
+# Tests for PERFORMANCE_SCHEMA
+#    Show existing objects and information about their structure
+
+--source include/not_embedded.inc
+--source include/have_perfschema.inc
+--source ../include/schema.inc
+

=== removed file 'mysql-test/suite/perfschema/t/schema_lc0.test'
--- a/mysql-test/suite/perfschema/t/schema_lc0.test	2010-07-29 18:00:27 +0000
+++ b/mysql-test/suite/perfschema/t/schema_lc0.test	1970-01-01 00:00:00 +0000
@@ -1,23 +0,0 @@
-# Copyright (c) 2008, 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,
-# 51 Franklin Street, Suite 500, Boston, MA 02110-1335 USA
-
-# Tests for PERFORMANCE_SCHEMA
-#    Show existing objects and information about their structure
-
---source include/not_embedded.inc
---source include/have_perfschema.inc
---source include/have_lowercase0.inc
---source ../include/schema.inc
-

=== removed file 'mysql-test/suite/perfschema/t/schema_lc1.test'
--- a/mysql-test/suite/perfschema/t/schema_lc1.test	2010-07-29 18:00:27 +0000
+++ b/mysql-test/suite/perfschema/t/schema_lc1.test	1970-01-01 00:00:00 +0000
@@ -1,23 +0,0 @@
-# Copyright (c) 2008, 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,
-# 51 Franklin Street, Suite 500, Boston, MA 02110-1335 USA
-
-# Tests for PERFORMANCE_SCHEMA
-#    Show existing objects and information about their structure
-
---source include/not_embedded.inc
---source include/have_perfschema.inc
---source include/have_lowercase1.inc
---source ../include/schema.inc
-

=== removed file 'mysql-test/suite/perfschema/t/schema_lc2.test'
--- a/mysql-test/suite/perfschema/t/schema_lc2.test	2010-07-29 18:00:27 +0000
+++ b/mysql-test/suite/perfschema/t/schema_lc2.test	1970-01-01 00:00:00 +0000
@@ -1,23 +0,0 @@
-# Copyright (c) 2008, 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,
-# 51 Franklin Street, Suite 500, Boston, MA 02110-1335 USA
-
-# Tests for PERFORMANCE_SCHEMA
-#    Show existing objects and information about their structure
-
---source include/not_embedded.inc
---source include/have_perfschema.inc
---source include/have_lowercase2.inc
---source ../include/schema.inc
-

=== modified file 'mysql-test/suite/rpl/r/rpl_begin_commit_rollback.result'
--- a/mysql-test/suite/rpl/r/rpl_begin_commit_rollback.result	2011-05-12 17:29:19 +0000
+++ b/mysql-test/suite/rpl/r/rpl_begin_commit_rollback.result	2011-05-13 13:35:12 +0000
@@ -350,8 +350,8 @@ BEGIN
 UPDATE t2 SET c1=3;
 RETURN 2;
 END |
-CREATE TABLE t4 (c1 INT);
-INSERT INTO t4 VAlUES(1),(2);
+CREATE TABLE t4 (c1 INT) |
+INSERT INTO t4 VAlUES(1),(2) |
 CREATE FUNCTION f_multi_update()
 RETURNS INT
 BEGIN

=== modified file 'mysql-test/suite/rpl/t/rpl_begin_commit_rollback.test'
--- a/mysql-test/suite/rpl/t/rpl_begin_commit_rollback.test	2011-05-12 17:29:19 +0000
+++ b/mysql-test/suite/rpl/t/rpl_begin_commit_rollback.test	2011-05-13 13:35:12 +0000
@@ -273,8 +273,8 @@ BEGIN
   RETURN 2;
 END |
 
-CREATE TABLE t4 (c1 INT);
-INSERT INTO t4 VAlUES(1),(2);
+CREATE TABLE t4 (c1 INT) |
+INSERT INTO t4 VAlUES(1),(2) |
 CREATE FUNCTION f_multi_update()
 RETURNS INT
 BEGIN

=== modified file 'mysql-test/t/having.test'
--- a/mysql-test/t/having.test	2011-04-22 08:05:02 +0000
+++ b/mysql-test/t/having.test	2011-05-16 11:01:28 +0000
@@ -615,3 +615,31 @@ drop table `t1`;
 
 --echo End of 5.5 tests
 
+--echo #
+--echo # Bug#12402590 ASSERT AT PROTOCOL::END_STATEMENT ON MYSQL-TRUNK
+--echo #              RUNNING RQG_OPT_SUBQUERY TEST
+--echo #
+
+CREATE TABLE t2 (
+  f1 INT,
+  PRIMARY KEY (f1)
+);
+INSERT INTO t2 VALUES (1), (2);
+
+CREATE TABLE t1 (
+  f1 INT,
+  f2 VARCHAR(1),
+  f3 VARCHAR(1),
+  PRIMARY KEY (f1),
+  KEY (f2, f1)
+);
+INSERT INTO t1 VALUES (8, 'g', 'g'), (11, 'a', 'a');
+
+SELECT t1.f1 FROM t1 JOIN t2 ON t2.f1 = t1.f1
+WHERE t1.f3 AND t1.f2 IN ('f')
+HAVING (1 ,6) IN (SELECT 3, 6)
+ORDER BY t1.f1;
+
+DROP TABLE t1, t2;
+
+--echo End of 5.6 tests

=== added file 'mysql-test/t/implicit_char_to_num_conversion.test'
--- a/mysql-test/t/implicit_char_to_num_conversion.test	1970-01-01 00:00:00 +0000
+++ b/mysql-test/t/implicit_char_to_num_conversion.test	2011-05-14 16:26:49 +0000
@@ -0,0 +1,174 @@
+########### implicit_char_to_num_conversion.test #######################
+#                                                                      #
+# This test aims at using string/char literal in comparison operators  #
+# without explicit type-cast. This is a bug test for Bug#11766521      #
+# - Incorrect result is returned if string/char literal is used with   #
+# comparision operator and bit data type column. Test is extended to   #
+# include numeric data type comparison with string/char literal        #
+#                                                                      #
+#                                                                      #
+# Creation:                                                            #
+# 2011-05-10 vfisrekar Implement this test as part of Bug#11766521     #
+#                                                                      #
+########################################################################
+
+--disable_warnings
+DROP TABLE IF EXISTS t5;
+--enable_warnings
+
+let $default_engine = `select @@SESSION.default_storage_engine`;
+
+# Bug#11766521 - BIT Datatype comparison in where clause return incorrect
+# result for '=' , '<=>' operators
+--replace_result $default_engine <default_engine>
+eval CREATE TABLE t5(c1  BIT(2) PRIMARY KEY) ENGINE = $default_engine;
+INSERT INTO t5 VALUES (0), (1), (2);
+SELECT HEX(c1) FROM t5 ORDER BY c1;
+# Enable Following two select after Bug#11766521 fix
+# SELECT HEX(c1) FROM t5 WHERE c1 = '1' ORDER BY c1;
+# SELECT HEX(c1) FROM t5 WHERE c1 <=> '1' ORDER BY c1;
+SELECT HEX(c1) FROM t5 WHERE c1 = b'1' ORDER BY c1;
+SELECT HEX(c1) FROM t5 WHERE c1 <=> b'1' ORDER BY c1;
+SELECT HEX(c1) FROM t5 WHERE c1 != b'1' ORDER BY c1;
+SELECT HEX(c1) FROM t5 WHERE c1 >= '1' ORDER BY c1;
+SELECT HEX(c1) FROM t5 WHERE c1 <= '1' ORDER BY c1;
+SELECT HEX(c1) FROM t5 WHERE c1 < '1' ORDER BY c1;
+SELECT HEX(c1) FROM t5 WHERE c1 > '0' ORDER BY c1;
+DROP TABLE t5;
+
+# FLOAT Data-type
+--replace_result $default_engine <default_engine>
+eval CREATE TABLE t5(c1 FLOAT(5,2) PRIMARY KEY) ENGINE = $default_engine;
+INSERT INTO t5 VALUES (95.95), (-10.10), (1), (0);
+SELECT c1 FROM t5 ORDER BY c1;
+# Compare with string literal
+# Following two queries does not return result may be due to Bug#11766521. 
+# Enable them after Bug#11766521 fix.
+# SELECT c1 FROM t5 WHERE c1 = '10.10' ORDER BY c1;
+# SELECT c1 FROM t5 WHERE c2 <=> '11.11' ORDER BY c1;
+SELECT c1 FROM t5 WHERE c1 >= '95' ORDER BY c1;
+SELECT c1 FROM t5 WHERE c1 <= '10.10' ORDER BY c1;
+SELECT c1 FROM t5 WHERE c1 != '1' ORDER BY c1;
+SELECT c1 FROM t5 WHERE c1 < '1' ORDER BY c1;
+SELECT c1 FROM t5 WHERE c1 > '0' ORDER BY c1;
+DROP TABLE t5;
+
+# TINYINT Datatype
+--replace_result $default_engine <default_engine>
+eval CREATE TABLE t5(c1 TINYINT PRIMARY KEY) ENGINE = $default_engine;
+INSERT INTO t5 VALUES (95), (10),(11),(-8);
+SELECT c1 FROM t5 ORDER BY c1;
+# Compare with string literal
+SELECT c1 FROM t5 WHERE c1 = '10' ORDER BY c1;
+SELECT c1 FROM t5 WHERE c1 <=> '10' ORDER BY c1;
+SELECT c1 FROM t5 WHERE c1 >= '95' ORDER BY c1;
+SELECT c1 FROM t5 WHERE c1 <= '11' ORDER BY c1;
+SELECT c1 FROM t5 WHERE c1 != '-8' ORDER BY c1;
+SELECT c1 FROM t5 WHERE c1 < '11' ORDER BY c1;
+SELECT c1 FROM t5 WHERE c1 > '10' ORDER BY c1;
+DROP TABLE t5;
+
+# SMALLINT Datatype
+--replace_result $default_engine <default_engine>
+eval CREATE TABLE t5(c1 SMALLINT PRIMARY KEY) ENGINE = $default_engine;
+INSERT INTO t5 VALUES (395), (-200), (100), (111);
+SELECT c1 FROM t5 ORDER BY c1;
+# Compare with string literal
+SELECT c1 FROM t5 WHERE c1 = '100' ORDER BY c1;
+SELECT c1 FROM t5 WHERE c1 <=> '100' ORDER BY c1;
+SELECT c1 FROM t5 WHERE c1 >= '395' ORDER BY c1;
+SELECT c1 FROM t5 WHERE c1 <= '-200' ORDER BY c1;
+SELECT c1 FROM t5 WHERE c1 != '100' ORDER BY c1;
+SELECT c1 FROM t5 WHERE c1 < '111' ORDER BY c1;
+SELECT c1 FROM t5 WHERE c1 > '111' ORDER BY c1;
+DROP TABLE t5;
+
+# MEDIUMINT Datatype
+--replace_result $default_engine <default_engine>
+eval CREATE TABLE t5(c1 MEDIUMINT PRIMARY KEY) ENGINE = $default_engine;
+INSERT INTO t5 VALUES (-8388607), (311),(215),(88608);
+SELECT c1 FROM t5 ORDER BY c1;
+# Compare with string literal
+SELECT c1 FROM t5 WHERE c1 = '311' ORDER BY c1;
+SELECT c1 FROM t5 WHERE c1 <=> '311' ORDER BY c1;
+SELECT c1 FROM t5 WHERE c1 >= '215' ORDER BY c1;
+SELECT c1 FROM t5 WHERE c1 <= '88608' ORDER BY c1;
+SELECT c1 FROM t5 WHERE c1 != '-8388607' ORDER BY c1;
+SELECT c1 FROM t5 WHERE c1 < '215' ORDER BY c1;
+SELECT c1 FROM t5 WHERE c1 > '215' ORDER BY c1;
+DROP TABLE t5;
+
+# INT Datatype
+--replace_result $default_engine <default_engine>
+eval CREATE TABLE t5(c1 INT PRIMARY KEY) ENGINE = $default_engine;
+INSERT INTO t5 VALUES (-2147483647), (1011),(15),(9388607);
+SELECT c1 FROM t5 ORDER BY c1;
+# Compare with string literal
+SELECT c1 FROM t5 WHERE c1 = '9388607' ORDER BY c1;
+SELECT c1 FROM t5 WHERE c1 <=> '9388607' ORDER BY c1;
+SELECT c1 FROM t5 WHERE c1 >= '15' ORDER BY c1;
+SELECT c1 FROM t5 WHERE c1 <= '1011' ORDER BY c1;
+SELECT c1 FROM t5 WHERE c1 != '-2147483647' ORDER BY c1;
+SELECT c1 FROM t5 WHERE c1 < '15' ORDER BY c1;
+SELECT c1 FROM t5 WHERE c1 > '15' ORDER BY c1;
+DROP TABLE t5;
+
+# BIGINT Data-type
+--replace_result $default_engine <default_engine>
+eval CREATE TABLE t5(c1 BIGINT PRIMARY KEY) ENGINE = $default_engine;
+INSERT INTO t5 VALUES (-9223372036854775807), (12011),(500),(3372036854775808);
+SELECT c1 FROM t5 ORDER BY c1;
+# Compare with string literal
+SELECT c1 FROM t5 WHERE c1 = '-9223372036854775807' ORDER BY c1;
+SELECT c1 FROM t5 WHERE c1 <=> '-9223372036854775807' ORDER BY c1;
+SELECT c1 FROM t5 WHERE c1 >= '12011' ORDER BY c1;
+SELECT c1 FROM t5 WHERE c1 <= '500' ORDER BY c1;
+SELECT c1 FROM t5 WHERE c1 != '3372036854775808' ORDER BY c1;
+SELECT c1 FROM t5 WHERE c1 < '12011' ORDER BY c1;
+SELECT c1 FROM t5 WHERE c1 > '12011' ORDER BY c1;
+DROP TABLE t5;
+
+# DOUBLE Datatype
+--replace_result $default_engine <default_engine>
+eval CREATE TABLE t5(c1 DOUBLE(5,2) PRIMARY KEY) ENGINE = $default_engine;
+INSERT INTO t5 VALUES (95.95), (11.11),(5),(-908.92);
+SELECT c1 FROM t5 ORDER BY c1;
+# Compare with string literal
+SELECT c1 FROM t5 WHERE c1 = '11.11' ORDER BY c1;
+SELECT c1 FROM t5 WHERE c1 <=> '11.11' ORDER BY c1;
+SELECT c1 FROM t5 WHERE c1 >= '5' ORDER BY c1;
+SELECT c1 FROM t5 WHERE c1 <= '95.95' ORDER BY c1;
+SELECT c1 FROM t5 WHERE c1 != '-908.92' ORDER BY c1;
+SELECT c1 FROM t5 WHERE c1 < '95.95' ORDER BY c1;
+SELECT c1 FROM t5 WHERE c1 > '-908.92' ORDER BY c1;
+DROP TABLE t5;
+
+# NUMERIC Datatype
+--replace_result $default_engine <default_engine>
+eval CREATE TABLE t5(c1 NUMERIC(5,2) PRIMARY KEY) ENGINE = $default_engine;
+INSERT INTO t5 VALUES (95.95), (11.11),(5),(-908.92);
+SELECT c1 FROM t5 ORDER BY c1;
+# Compare with string literal
+SELECT c1 FROM t5 WHERE c1 = '11.11' ORDER BY c1;
+SELECT c1 FROM t5 WHERE c1 <=> '11.11' ORDER BY c1;
+SELECT c1 FROM t5 WHERE c1 >= '5' ORDER BY c1;
+SELECT c1 FROM t5 WHERE c1 <= '95.95' ORDER BY c1;
+SELECT c1 FROM t5 WHERE c1 != '-908.92' ORDER BY c1;
+SELECT c1 FROM t5 WHERE c1 < '95.95' ORDER BY c1;
+SELECT c1 FROM t5 WHERE c1 > '-908.92' ORDER BY c1;
+DROP TABLE t5;
+
+# DECIMAL Datatype
+--replace_result $default_engine <default_engine>
+eval CREATE TABLE t5(c1 DECIMAL(5,2)  PRIMARY KEY) ENGINE = $default_engine;
+INSERT INTO t5 VALUES (95.95), (11.11),(5),(-908.92);
+SELECT c1 FROM t5 ORDER BY c1;
+# Compare with string literal
+SELECT c1 FROM t5 WHERE c1 = '11.11' ORDER BY c1;
+SELECT c1 FROM t5 WHERE c1 <=> '11.11' ORDER BY c1;
+SELECT c1 FROM t5 WHERE c1 >= '5' ORDER BY c1;
+SELECT c1 FROM t5 WHERE c1 <= '95.95' ORDER BY c1;
+SELECT c1 FROM t5 WHERE c1 != '-908.92' ORDER BY c1;
+SELECT c1 FROM t5 WHERE c1 < '95.95' ORDER BY c1;
+SELECT c1 FROM t5 WHERE c1 > '-908.92' ORDER BY c1;
+DROP TABLE t5;

=== modified file 'mysys/lf_alloc-pin.c'
--- a/mysys/lf_alloc-pin.c	2010-07-23 20:59:42 +0000
+++ b/mysys/lf_alloc-pin.c	2011-05-16 21:07:38 +0000
@@ -146,6 +146,7 @@ void lf_pinbox_destroy(LF_PINBOX *pinbox
 */
 LF_PINS *_lf_pinbox_get_pins(LF_PINBOX *pinbox)
 {
+  struct st_my_thread_var *var;
   uint32 pins, next, top_ver;
   LF_PINS *el;
   /*
@@ -188,7 +189,12 @@ LF_PINS *_lf_pinbox_get_pins(LF_PINBOX *
   el->link= pins;
   el->purgatory_count= 0;
   el->pinbox= pinbox;
-  el->stack_ends_here= & my_thread_var->stack_ends_here;
+  var= my_thread_var;
+  /*
+    Threads that do not call my_thread_init() should still be
+    able to use the LF_HASH.
+  */
+  el->stack_ends_here= (var ? & var->stack_ends_here : NULL);
   return el;
 }
 
@@ -327,34 +333,36 @@ static int match_pins(LF_PINS *el, void
 */
 static void _lf_pinbox_real_free(LF_PINS *pins)
 {
-  int npins, alloca_size;
-  void *list, **addr;
+  int npins;
+  void *list;
+  void **addr= NULL;
   void *first= NULL, *last= NULL;
   LF_PINBOX *pinbox= pins->pinbox;
 
   npins= pinbox->pins_in_array+1;
 
 #ifdef HAVE_ALLOCA
-  alloca_size= sizeof(void *)*LF_PINBOX_PINS*npins;
-  /* create a sorted list of pinned addresses, to speed up searches */
-  if (available_stack_size(&pinbox, *pins->stack_ends_here) > alloca_size)
-  {
-    struct st_harvester hv;
-    addr= (void **) alloca(alloca_size);
-    hv.granary= addr;
-    hv.npins= npins;
-    /* scan the dynarray and accumulate all pinned addresses */
-    _lf_dynarray_iterate(&pinbox->pinarray,
-                         (lf_dynarray_func)harvest_pins, &hv);
-
-    npins= hv.granary-addr;
-    /* and sort them */
-    if (npins)
-      qsort(addr, npins, sizeof(void *), (qsort_cmp)ptr_cmp);
+  if (pins->stack_ends_here != NULL)
+  {
+    int alloca_size= sizeof(void *)*LF_PINBOX_PINS*npins;
+    /* create a sorted list of pinned addresses, to speed up searches */
+    if (available_stack_size(&pinbox, *pins->stack_ends_here) > alloca_size)
+    {
+      struct st_harvester hv;
+      addr= (void **) alloca(alloca_size);
+      hv.granary= addr;
+      hv.npins= npins;
+      /* scan the dynarray and accumulate all pinned addresses */
+      _lf_dynarray_iterate(&pinbox->pinarray,
+                           (lf_dynarray_func)harvest_pins, &hv);
+
+      npins= hv.granary-addr;
+      /* and sort them */
+      if (npins)
+        qsort(addr, npins, sizeof(void *), (qsort_cmp)ptr_cmp);
+    }
   }
-  else
 #endif
-    addr= 0;
 
   list= pins->purgatory;
   pins->purgatory= 0;

=== modified file 'mysys/thr_alarm.c'
--- a/mysys/thr_alarm.c	2011-01-11 09:09:21 +0000
+++ b/mysys/thr_alarm.c	2011-05-16 14:30:54 +0000
@@ -1,4 +1,4 @@
-/* Copyright (C) 2000 MySQL AB, 2008-2009 Sun Microsystems, Inc
+/* Copyright (c) 2000, 2011, 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
@@ -260,7 +260,7 @@ void thr_end_alarm(thr_alarm_t *alarmed)
   {
     if ((ALARM*) queue_element(&alarm_queue,i) == alarm_data)
     {
-      queue_remove(&alarm_queue,i),MYF(0);
+      queue_remove(&alarm_queue,i);
       if (alarm_data->malloced)
 	my_free(alarm_data);
       found++;

=== modified file 'packaging/WiX/ca/CMakeLists.txt'
--- a/packaging/WiX/ca/CMakeLists.txt	2010-11-24 21:05:50 +0000
+++ b/packaging/WiX/ca/CMakeLists.txt	2011-05-16 18:38:47 +0000
@@ -13,12 +13,43 @@
 # along with this program; if not, write to the Free Software
 # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 
-INCLUDE_DIRECTORIES(${WIX_DIR}/../SDK/inc)
-LINK_DIRECTORIES(${WIX_DIR}/../SDK/lib)
+INCLUDE_DIRECTORIES(${WIX_DIR}/../SDK/inc ${WIX_DIR}/SDK/inc)
+LINK_DIRECTORIES(${WIX_DIR}/../SDK/lib ${WIX_DIR}/SDK/lib)
+
 SET(WIXCA_SOURCES CustomAction.cpp CustomAction.def)
-ADD_LIBRARY(wixca SHARED EXCLUDE_FROM_ALL  ${WIXCA_SOURCES})
+
 IF(CMAKE_SIZEOF_VOID_P EQUAL 8)
-  TARGET_LINK_LIBRARIES(wixca wcautil_x64 dutil_x64 msi version)
+  SET(WIX_ARCH_SUFFIX "_x64")
+ELSE()
+  SET(WIX_ARCH_SUFFIX)
+ENDIF()
+
+IF(MSVC_VERSION EQUAL 1400)
+  SET(WIX35_MSVC_SUFFIX "_2005")
+ELSEIF(MSVC_VERSION EQUAL 1500)
+  SET(WIX35_MSVC_SUFFIX "_2008")
+ELSEIF(MSVC_VERSION EQUAL 1600)
+  SET(WIX35_MSVC_SUFFIX "_2010")
 ELSE()
-  TARGET_LINK_LIBRARIES(wixca wcautil dutil msi version)
+  # When next VS is out, add the correct version here
+  MESSAGE(FATAL_ERROR "Unknown VS version")
 ENDIF()
+
+MESSAGE(STATUS "Searching for wcautil${WIX_ARCH_SUFFIX} or wcautil${WIX35_MSVC_SUFFIX}${WIX_ARCH_SUFFIX} in ${WIX_DIR}/../SDK/lib ${WIX_DIR}/SDK/lib")
+MESSAGE(STATUS "Searching for dutil${WIX_ARCH_SUFFIX} or dutil${WIX35_MSVC_SUFFIX}${WIX_ARCH_SUFFIX} in ${WIX_DIR}/../SDK/lib ${WIX_DIR}/SDK/lib")
+
+FIND_LIBRARY(WIX_WCAUTIL_LIBRARY 
+  NAMES wcautil${WIX_ARCH_SUFFIX}  wcautil${WIX35_MSVC_SUFFIX}${WIX_ARCH_SUFFIX}
+  HINTS ${WIX_DIR}/../SDK/lib ${WIX_DIR}/SDK/lib)
+
+FIND_LIBRARY(WIX_DUTIL_LIBRARY 
+  NAMES dutil${WIX_ARCH_SUFFIX}  dutil${WIX35_MSVC_SUFFIX}${WIX_ARCH_SUFFIX}
+  PATHS ${WIX_DIR}/../SDK/lib ${WIX_DIR}/SDK/lib)
+
+MESSAGE(STATUS "Found: ${WIX_WCAUTIL_LIBRARY}")
+MESSAGE(STATUS "Found: ${WIX_DUTIL_LIBRARY}")
+
+ADD_VERSION_INFO(wixca SHARED WIXCA_SOURCES)
+ADD_LIBRARY(wixca SHARED EXCLUDE_FROM_ALL ${WIXCA_SOURCES})
+TARGET_LINK_LIBRARIES(wixca ${WIX_WCAUTIL_LIBRARY} ${WIX_DUTIL_LIBRARY} 
+  msi version )

=== modified file 'packaging/WiX/create_msi.cmake.in'
--- a/packaging/WiX/create_msi.cmake.in	2010-11-21 13:48:44 +0000
+++ b/packaging/WiX/create_msi.cmake.in	2011-05-16 18:38:47 +0000
@@ -15,6 +15,28 @@ SET(COPYING_RTF "@COPYING_RTF@")
 SET(CPACK_WIX_CONFIG "@CPACK_WIX_CONFIG@")
 SET(CPACK_WIX_INCLUDE "@CPACK_WIX_INCLUDE@")
 
+LIST(APPEND EXCLUDE_DIRS
+     bin/debug
+     data/test
+     lib/plugin/debug
+     mysql-test
+     scripts
+     sql-bench
+)
+
+LIST(APPEND EXCLUDE_FILES
+     bin/echo.exe
+     bin/mysql_client_test_embedded.exe
+     bin/mysqld-debug.exe
+     bin/mysqltest_embedded.exe
+     bin/replace.exe
+     lib/debug/mysqlserver.lib
+     lib/libmysqld.dll
+     lib/libmysqld.lib
+     lib/mysqlserver.lib
+     lib/mysqlservices.lib
+)
+
 IF(CMAKE_SIZEOF_VOID_P EQUAL 8)
   SET(Win64 " Win64='yes'")
   SET(Platform x64)
@@ -197,11 +219,18 @@ ENDMACRO()
 
 
 FUNCTION(TRAVERSE_FILES dir topdir file file_comp  dir_root)
+  FILE(RELATIVE_PATH dir_rel ${topdir} ${dir})
+  IF(dir_rel)
+    LIST(FIND EXCLUDE_DIRS ${dir_rel} TO_EXCLUDE)
+    IF(NOT TO_EXCLUDE EQUAL -1)
+      MESSAGE(STATUS "excluding directory: ${dir_rel}")
+      RETURN()
+    ENDIF()
+  ENDIF()
   FILE(GLOB all_files ${dir}/*)
   IF(NOT all_files)
     RETURN()
   ENDIF()
-  FILE(RELATIVE_PATH dir_rel ${topdir} ${dir})
   IF(dir_rel)
    MAKE_DIRECTORY(${dir_root}/${dir_rel})
    MAKE_WIX_IDENTIFIER("${dir_rel}" id)
@@ -215,18 +244,31 @@ FUNCTION(TRAVERSE_FILES dir topdir file
   FOREACH(f ${all_files})
     IF(NOT IS_DIRECTORY ${f})
       FILE(RELATIVE_PATH rel ${topdir} ${f})
-      MAKE_WIX_IDENTIFIER("${rel}" id)
-      FILE(TO_NATIVE_PATH ${f} f_native)
-      GET_FILENAME_COMPONENT(f_ext "${f}" EXT)
-      # According to MSDN each DLL or EXE should be in the own component
-      IF(f_ext MATCHES ".exe" OR f_ext MATCHES ".dll")
-
-        FILE(APPEND ${file} "  <Component Id='C.${id}' Guid='*' ${Win64}>\n")
-        FILE(APPEND ${file} "    <File Id='F.${id}' KeyPath='yes' Source='${f_native}'/>\n")
-        FILE(APPEND ${file} "  </Component>\n")
-        FILE(APPEND ${file_comp} "  <ComponentRef Id='C.${id}'/>\n")
-     ELSE()
-      SET(NONEXEFILES  "${NONEXEFILES}\n<File Id='F.${id}' Source='${f_native}'/>" )
+      SET(TO_EXCLUDE)
+      IF(rel MATCHES "\\.pdb$")
+        SET(TO_EXCLUDE TRUE)
+      ELSE()
+        LIST(FIND EXCLUDE_FILES ${rel} RES)
+        IF(NOT RES EQUAL -1)
+          SET(TO_EXCLUDE TRUE)
+        ENDIF()
+      ENDIF()
+      IF(TO_EXCLUDE)
+        MESSAGE(STATUS "excluding file: ${rel}")
+      ELSE()
+	MAKE_WIX_IDENTIFIER("${rel}" id)
+	FILE(TO_NATIVE_PATH ${f} f_native)
+	GET_FILENAME_COMPONENT(f_ext "${f}" EXT)
+	# According to MSDN each DLL or EXE should be in the own component
+	IF(f_ext MATCHES ".exe" OR f_ext MATCHES ".dll")
+
+	  FILE(APPEND ${file} "  <Component Id='C.${id}' Guid='*' ${Win64}>\n")
+	  FILE(APPEND ${file} "    <File Id='F.${id}' KeyPath='yes' Source='${f_native}'/>\n")
+	  FILE(APPEND ${file} "  </Component>\n")
+	  FILE(APPEND ${file_comp} "  <ComponentRef Id='C.${id}'/>\n")
+       ELSE()
+	SET(NONEXEFILES  "${NONEXEFILES}\n<File Id='F.${id}' Source='${f_native}'/>" )
+	ENDIF()
       ENDIF()
     ENDIF()
   ENDFOREACH()
@@ -247,18 +289,18 @@ ENDFUNCTION()
 
 FUNCTION(TRAVERSE_DIRECTORIES dir topdir file prefix)
   FILE(RELATIVE_PATH rel ${topdir} ${dir})
-  IF(rel AND IS_DIRECTORY "${f}")
+  IF(rel)
     MAKE_WIX_IDENTIFIER("${rel}" id)
     GET_FILENAME_COMPONENT(name ${dir} NAME)
     FILE(APPEND ${file} "${prefix}<Directory Id='D.${id}' Name='${name}'>\n")
   ENDIF()
   FILE(GLOB all_files ${dir}/*)
-    FOREACH(f ${all_files})
+  FOREACH(f ${all_files})
     IF(IS_DIRECTORY ${f})
       TRAVERSE_DIRECTORIES(${f} ${topdir} ${file} "${prefix}  ")
     ENDIF()
   ENDFOREACH()
-  IF(rel AND IS_DIRECTORY "${f}")
+  IF(rel)
     FILE(APPEND ${file} "${prefix}</Directory>\n")
   ENDIF()
 ENDFUNCTION()
@@ -317,16 +359,25 @@ ENDIF()
 FILE(REMOVE mysql_server.wixobj)
 EXECUTE_PROCESS(
  COMMAND ${CANDLE_EXECUTABLE} -ext WixUtilExtension  mysql_server.wxs ${EXTRA_CANDLE_ARGS}
+ RESULT_VARIABLE CANDLE_RESULT
 )
+
+IF(CANDLE_RESULT)
+  MESSAGE(FATAL_ERROR "ERROR: can't run candle")
+ENDIF()
+
 EXECUTE_PROCESS(
  COMMAND ${LIGHT_EXECUTABLE} -ext WixUIExtension -ext WixUtilExtension
   mysql_server.wixobj  -out  ${CPACK_PACKAGE_FILE_NAME}.msi
   ${EXTRA_LIGHT_ARGS}
+ RESULT_VARIABLE LIGHT_RESULT
 )
 
+IF(LIGHT_RESULT)
+  MESSAGE(FATAL_ERROR "ERROR: can't run light")
+ENDIF()
+
 # Switch monolithic install on again
 EXECUTE_PROCESS(
   COMMAND ${CMAKE_COMMAND} -DCPACK_MONOLITHIC_INSTALL=1 ${CMAKE_BINARY_DIR}
-  OUTPUT_QUIET
 )
-

=== modified file 'packaging/WiX/custom_ui.wxs'
--- a/packaging/WiX/custom_ui.wxs	2010-07-24 15:26:45 +0000
+++ b/packaging/WiX/custom_ui.wxs	2011-05-16 18:26:55 +0000
@@ -1,7 +1,22 @@
 <Include xmlns="http://schemas.microsoft.com/wix/2006/wi"
          xmlns:util="http://schemas.microsoft.com/wix/UtilExtension">
-  <WixVariable Id="WixUICostingPopupOptOut" Value="1" Overridable="yes" />
   <UI Id="WixUI_Mondo_Custom">
+    <Dialog Id="CustomWelcomeDlg" Width="370" Height="270" Title="[ProductName] Setup" NoMinimize="yes">
+      <Control Id="Cancel" Type="PushButton" X="304" Y="243" Width="56" Height="17" Cancel="yes" Text="!(loc.WixUICancel)">
+        <Publish Event="SpawnDialog" Value="CancelDlg">1</Publish>
+      </Control>
+      <Control Id="Next" Type="PushButton" X="220" Y="243" Width="56" Height="17" Default="yes" Text="!(loc.WixUINext)">
+        <Publish Event="NewDialog" Value="LicenseAgreementDlg">NOT OLDERVERSIONBEINGUPGRADED</Publish>
+        <Publish Event="NewDialog" Value="UpgradeDlg">OLDERVERSIONBEINGUPGRADED</Publish>
+	  </Control>	  
+      <Control Id="Back" Type="PushButton" X="156" Y="243" Width="56" Height="17" Text="!(loc.WixUIBack)" Disabled="yes" />
+      <Control Id="Description" Type="Text" X="135" Y="80" Width="220" Height="60" Transparent="yes" NoPrefix="yes" Text="!(loc.WelcomeDlgDescription)" />
+      <Control Id="Title" Type="Text" X="135" Y="20" Width="220" Height="60" Transparent="yes" NoPrefix="yes" Text="!(loc.WelcomeDlgTitle)" />
+      <Control Id="CopyrightText" Type="Text" X="135" Y="200" Width="220" Height="40" Transparent="yes" Text="Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved." />
+      <Control Id="Bitmap" Type="Bitmap" X="0" Y="0" Width="370" Height="234" TabSkip="no" Text="!(loc.WelcomeDlgBitmap)" />
+      <Control Id="BottomLine" Type="Line" X="0" Y="234" Width="370" Height="0" />
+    </Dialog>
+
     <Dialog Id="UpgradeDlg" Width="370" Height="270" Title="[ProductName] Setup" NoMinimize="yes">
       <Control Id="Install" Type="PushButton" ElevationShield="yes" X="212" Y="243" Width="80" Height="17" Default="yes"  Text="Upgrade">
         <Publish Event="EndDialog" Value="Return"><![CDATA[OutOfDiskSpace <> 1]]></Publish>
@@ -47,10 +62,7 @@
 
     <Publish Dialog="ExitDialog" Control="Finish" Event="EndDialog" Value="Return" Order="999">1</Publish>
 
-    <Publish Dialog="WelcomeDlg" Control="Next" Event="NewDialog" Value="LicenseAgreementDlg" Order="1">NOT OLDERVERSIONBEINGUPGRADED</Publish>
-    <Publish Dialog="WelcomeDlg" Control="Next" Event="NewDialog" Value="UpgradeDlg" Order="2">OLDERVERSIONBEINGUPGRADED</Publish>
-
-    <Publish Dialog="LicenseAgreementDlg" Control="Back" Event="NewDialog" Value="WelcomeDlg">1</Publish>
+    <Publish Dialog="LicenseAgreementDlg" Control="Back" Event="NewDialog" Value="CustomWelcomeDlg">1</Publish>
     <Publish Dialog="LicenseAgreementDlg" Control="Next" Event="NewDialog" Value="SetupTypeDlg" Order="2">LicenseAccepted = "1"</Publish>
 
     <Publish Dialog="SetupTypeDlg" Control="Back" Event="NewDialog" Value="LicenseAgreementDlg">1</Publish>
@@ -74,7 +86,11 @@
     <Publish Dialog="MaintenanceTypeDlg" Control="RemoveButton" Event="NewDialog" Value="VerifyReadyDlg">1</Publish>
     <Publish Dialog="MaintenanceTypeDlg" Control="Back" Event="NewDialog" Value="MaintenanceWelcomeDlg">1</Publish>
 
-    <Publish Dialog="UpgradeDlg" Control="Back" Event="NewDialog" Value="WelcomeDlg">1</Publish>
+    <Publish Dialog="UpgradeDlg" Control="Back" Event="NewDialog" Value="CustomWelcomeDlg">1</Publish>
+	
+    <InstallUISequence>
+      <Show Dialog="CustomWelcomeDlg" Before="ProgressDlg">NOT Installed</Show>
+    </InstallUISequence>
   </UI>
 
   <UIRef Id="WixUI_Common" />

=== modified file 'sql/binlog.cc'
--- a/sql/binlog.cc	2011-05-12 21:51:20 +0000
+++ b/sql/binlog.cc	2011-05-17 20:04:06 +0000
@@ -4615,12 +4615,11 @@ int MYSQL_BIN_LOG::recover(IO_CACHE *log
   Log_event  *ev;
   HASH xids;
   MEM_ROOT mem_root;
-  my_off_t last_valid_pos= *valid_pos;
   /*
     The flag is used for handling the case that a transaction
     is partially written to the binlog.
   */
-  bool in_transaction= TRUE;
+  bool in_transaction= FALSE;
 
   if (! fdle->is_valid() ||
       my_hash_init(&xids, &my_charset_bin, TC_LOG_PAGE_SIZE/3, 0,
@@ -4638,11 +4637,7 @@ int MYSQL_BIN_LOG::recover(IO_CACHE *log
     */
     if (ev->get_type_code() == QUERY_EVENT &&
         !strcmp(((Query_log_event*)ev)->query, "BEGIN"))
-    {
       in_transaction= TRUE;
-      *valid_pos= last_valid_pos;
-    }
-    last_valid_pos= my_b_tell(log);
 
     if (ev->get_type_code() == QUERY_EVENT &&
         !strcmp(((Query_log_event*)ev)->query, "COMMIT"))
@@ -4660,16 +4655,17 @@ int MYSQL_BIN_LOG::recover(IO_CACHE *log
       if (!x || my_hash_insert(&xids, x))
         goto err2;
     }
+
+    /*
+      Recorded valid position for the crashed binlog file
+      which did not contain incorrect events.
+    */
+    if (!log->error && !in_transaction)
+      *valid_pos= my_b_tell(log);
+
     delete ev;
   }
 
-  /*
-    Recorded valid position for the crashed binlog file
-    which did not contain incorrect events.
-  */
-  if (!log->error && !in_transaction)
-    *valid_pos= last_valid_pos;
-
   if (ha_recover(&xids))
     goto err2;
 

=== modified file 'sql/binlog.h'
--- a/sql/binlog.h	2011-05-12 21:51:20 +0000
+++ b/sql/binlog.h	2011-05-17 20:08:26 +0000
@@ -1,5 +1,5 @@
 #ifndef BINLOG_H_INCLUDED
-/* Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
+/* Copyright (c) 2010, 2011, 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
@@ -106,8 +106,8 @@ class MYSQL_BIN_LOG: public TC_LOG, priv
   int new_file_impl(bool need_lock);
 
 public:
-  MYSQL_LOG::generate_name;
-  MYSQL_LOG::is_open;
+  using MYSQL_LOG::generate_name;
+  using MYSQL_LOG::is_open;
 
   /* This is relay log */
   bool is_relay_log;

=== modified file 'sql/ha_partition.cc'
--- a/sql/ha_partition.cc	2011-05-10 13:41:34 +0000
+++ b/sql/ha_partition.cc	2011-05-16 11:32:07 +0000
@@ -47,10 +47,6 @@
   if this file.
 */
 
-#ifdef __GNUC__
-#pragma implementation				// gcc: Class implementation
-#endif
-
 #include "sql_priv.h"
 #include "sql_parse.h"                          // append_file_to_dir
 #include "binlog.h"                             // mysql_bin_log

=== modified file 'sql/ha_partition.h'
--- a/sql/ha_partition.h	2011-04-23 20:44:45 +0000
+++ b/sql/ha_partition.h	2011-05-16 11:32:07 +0000
@@ -16,15 +16,11 @@
    along with this program; if not, write to the Free Software
    Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301  USA */
 
-#ifdef __GNUC__
-#pragma interface				/* gcc class implementation */
-#endif
-
 #include "sql_partition.h"      /* part_id_range, partition_element */
 #include "queues.h"             /* QUEUE */
 
 enum partition_keywords
-{ 
+{
   PKW_HASH= 0, PKW_RANGE, PKW_LIST, PKW_KEY, PKW_MAXVALUE, PKW_LINEAR,
   PKW_COLUMNS
 };

=== modified file 'sql/handler.cc'
--- a/sql/handler.cc	2011-05-12 17:29:19 +0000
+++ b/sql/handler.cc	2011-05-16 14:30:54 +0000
@@ -235,7 +235,7 @@ handlerton *ha_checktype(THD *thd, enum
     return NULL;
   }
 
-  RUN_HOOK(transaction, after_rollback, (thd, FALSE));
+  (void) RUN_HOOK(transaction, after_rollback, (thd, FALSE));
 
   switch (database_type) {
   case DB_TYPE_MRG_ISAM:
@@ -1252,7 +1252,7 @@ int ha_commit_trans(THD *thd, bool all)
         goto end;
       }
     DBUG_EXECUTE_IF("crash_commit_after", DBUG_SUICIDE(););
-    RUN_HOOK(transaction, after_commit, (thd, FALSE));
+    (void) RUN_HOOK(transaction, after_commit, (thd, FALSE));
 end:
     if (rw_trans && mdl_request.ticket)
     {
@@ -1421,7 +1421,7 @@ int ha_rollback_trans(THD *thd, bool all
   if (is_real_trans && thd->transaction.all.cannot_safely_rollback() &&
       !thd->slave_thread && thd->killed != THD::KILL_CONNECTION)
     thd->transaction.push_unsafe_rollback_warnings(thd);
-  RUN_HOOK(transaction, after_rollback, (thd, FALSE));
+  (void) RUN_HOOK(transaction, after_rollback, (thd, FALSE));
   DBUG_RETURN(error);
 }
 

=== modified file 'sql/item_xmlfunc.cc'
--- a/sql/item_xmlfunc.cc	2011-03-09 20:54:55 +0000
+++ b/sql/item_xmlfunc.cc	2011-05-16 11:32:07 +0000
@@ -13,10 +13,6 @@
    along with this program; if not, write to the Free Software
    Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301  USA */
 
-#ifdef __GNUC__
-#pragma implementation
-#endif
-
 #include "sql_priv.h"
 /*
   It is necessary to include set_var.h instead of item.h because there

=== modified file 'sql/item_xmlfunc.h'
--- a/sql/item_xmlfunc.h	2010-07-02 18:15:21 +0000
+++ b/sql/item_xmlfunc.h	2011-05-16 11:32:07 +0000
@@ -19,12 +19,6 @@
 
 /* This file defines all XML functions */
 
-
-#ifdef __GNUC__
-#pragma interface			/* gcc class implementation */
-#endif
-
-
 class Item_xml_str_func: public Item_str_func
 {
 protected:

=== modified file 'sql/log_event.cc'
--- a/sql/log_event.cc	2011-05-12 21:51:20 +0000
+++ b/sql/log_event.cc	2011-05-17 20:08:26 +0000
@@ -6849,16 +6849,15 @@ void Create_file_log_event::pack_info(Pr
 #if defined(HAVE_REPLICATION) && !defined(MYSQL_CLIENT)
 int Create_file_log_event::do_apply_event(Relay_log_info const *rli)
 {
-  char proc_info[17+FN_REFLEN+10], *fname_buf;
+  char fname_buf[FN_REFLEN+10];
   char *ext;
   int fd = -1;
   IO_CACHE file;
   int error = 1;
 
+  THD_STAGE_INFO(thd, stage_making_temp_file_create_before_load_data);
   bzero((char*)&file, sizeof(file));
-  fname_buf= strmov(proc_info, "Making temp file ");
   ext= slave_load_file_stem(fname_buf, file_id, server_id, ".info");
-  thd_proc_info(thd, proc_info);
   /* old copy may exist already */
   mysql_file_delete(key_file_log_event_info, fname_buf, MYF(0));
   if ((fd= mysql_file_create(key_file_log_event_info,
@@ -7032,14 +7031,13 @@ int Append_block_log_event::get_create_o
 
 int Append_block_log_event::do_apply_event(Relay_log_info const *rli)
 {
-  char proc_info[17+FN_REFLEN+10], *fname= proc_info+17;
+  char fname[FN_REFLEN+10];
   int fd;
   int error = 1;
   DBUG_ENTER("Append_block_log_event::do_apply_event");
 
-  fname= strmov(proc_info, "Making temp file ");
+  THD_STAGE_INFO(thd, stage_making_temp_file_append_before_load_data);
   slave_load_file_stem(fname, file_id, server_id, ".data");
-  thd_proc_info(thd, proc_info);
   if (get_create_or_append())
   {
     /*

=== modified file 'sql/mysqld.cc'
--- a/sql/mysqld.cc	2011-04-28 16:50:10 +0000
+++ b/sql/mysqld.cc	2011-05-13 13:59:55 +0000
@@ -8363,7 +8363,7 @@ PSI_stage_info stage_end= { 0, "end", 0}
 PSI_stage_info stage_executing= { 0, "executing", 0};
 PSI_stage_info stage_execution_of_init_command= { 0, "Execution of init_command", 0};
 PSI_stage_info stage_finished_reading_one_binlog_switching_to_next_binlog= { 0, "Finished reading one binlog; switching to next binlog", 0};
-PSI_stage_info stage_flushing_relay_log_and_master_info_files= { 0, "Flushing relay log and master info files.", 0};
+PSI_stage_info stage_flushing_relay_log_and_master_info_repository= { 0, "Flushing relay log and master info repository.", 0};
 PSI_stage_info stage_flushing_relay_log_info_file= { 0, "Flushing relay-log info file.", 0};
 PSI_stage_info stage_freeing_items= { 0, "freeing items", 0};
 PSI_stage_info stage_fulltext_initialization= { 0, "FULLTEXT initialization", 0};
@@ -8375,6 +8375,8 @@ PSI_stage_info stage_invalidating_query_
 PSI_stage_info stage_invalidating_query_cache_entries_table_list= { 0, "invalidating query cache entries (table list)", 0};
 PSI_stage_info stage_killing_slave= { 0, "Killing slave", 0};
 PSI_stage_info stage_logging_slow_query= { 0, "logging slow query", 0};
+PSI_stage_info stage_making_temp_file_append_before_load_data= { 0, "Making temporary file (append) before replaying LOAD DATA INFILE.", 0};
+PSI_stage_info stage_making_temp_file_create_before_load_data= { 0, "Making temporary file (create) before replaying LOAD DATA INFILE.", 0};
 PSI_stage_info stage_manage_keys= { 0, "manage keys", 0};
 PSI_stage_info stage_opening_tables= { 0, "Opening tables", 0};
 PSI_stage_info stage_optimizing= { 0, "optimizing", 0};
@@ -8399,6 +8401,7 @@ PSI_stage_info stage_sorting_for_group=
 PSI_stage_info stage_sorting_for_order= { 0, "Sorting for order", 0};
 PSI_stage_info stage_sorting_result= { 0, "Sorting result", 0};
 PSI_stage_info stage_statistics= { 0, "statistics", 0};
+PSI_stage_info stage_sql_thd_waiting_until_delay= { 0, "Waiting until MASTER_DELAY seconds after master executed event", 0 };
 PSI_stage_info stage_storing_result_in_query_cache= { 0, "storing result in query cache", 0};
 PSI_stage_info stage_storing_row_into_queue= { 0, "storing row into queue", 0};
 PSI_stage_info stage_system_lock= { 0, "System lock", 0};
@@ -8452,7 +8455,7 @@ PSI_stage_info *all_server_stages[]=
   & stage_executing,
   & stage_execution_of_init_command,
   & stage_finished_reading_one_binlog_switching_to_next_binlog,
-  & stage_flushing_relay_log_and_master_info_files,
+  & stage_flushing_relay_log_and_master_info_repository,
   & stage_flushing_relay_log_info_file,
   & stage_freeing_items,
   & stage_fulltext_initialization,
@@ -8464,6 +8467,8 @@ PSI_stage_info *all_server_stages[]=
   & stage_invalidating_query_cache_entries_table_list,
   & stage_killing_slave,
   & stage_logging_slow_query,
+  & stage_making_temp_file_append_before_load_data,
+  & stage_making_temp_file_create_before_load_data,
   & stage_manage_keys,
   & stage_opening_tables,
   & stage_optimizing,
@@ -8487,6 +8492,7 @@ PSI_stage_info *all_server_stages[]=
   & stage_sorting_for_group,
   & stage_sorting_for_order,
   & stage_sorting_result,
+  & stage_sql_thd_waiting_until_delay,
   & stage_statistics,
   & stage_storing_result_in_query_cache,
   & stage_storing_row_into_queue,

=== modified file 'sql/mysqld.h'
--- a/sql/mysqld.h	2011-04-28 16:50:10 +0000
+++ b/sql/mysqld.h	2011-05-13 13:59:55 +0000
@@ -334,7 +334,7 @@ extern PSI_stage_info stage_end;
 extern PSI_stage_info stage_executing;
 extern PSI_stage_info stage_execution_of_init_command;
 extern PSI_stage_info stage_finished_reading_one_binlog_switching_to_next_binlog;
-extern PSI_stage_info stage_flushing_relay_log_and_master_info_files;
+extern PSI_stage_info stage_flushing_relay_log_and_master_info_repository;
 extern PSI_stage_info stage_flushing_relay_log_info_file;
 extern PSI_stage_info stage_freeing_items;
 extern PSI_stage_info stage_fulltext_initialization;
@@ -346,6 +346,8 @@ extern PSI_stage_info stage_invalidating
 extern PSI_stage_info stage_invalidating_query_cache_entries_table_list;
 extern PSI_stage_info stage_killing_slave;
 extern PSI_stage_info stage_logging_slow_query;
+extern PSI_stage_info stage_making_temp_file_append_before_load_data;
+extern PSI_stage_info stage_making_temp_file_create_before_load_data;
 extern PSI_stage_info stage_manage_keys;
 extern PSI_stage_info stage_opening_tables;
 extern PSI_stage_info stage_optimizing;
@@ -369,6 +371,7 @@ extern PSI_stage_info stage_setup;
 extern PSI_stage_info stage_sorting_for_group;
 extern PSI_stage_info stage_sorting_for_order;
 extern PSI_stage_info stage_sorting_result;
+extern PSI_stage_info stage_sql_thd_waiting_until_delay;
 extern PSI_stage_info stage_statistics;
 extern PSI_stage_info stage_storing_result_in_query_cache;
 extern PSI_stage_info stage_storing_row_into_queue;

=== modified file 'sql/rpl_info_file.cc'
--- a/sql/rpl_info_file.cc	2011-04-05 16:46:24 +0000
+++ b/sql/rpl_info_file.cc	2011-05-16 17:26:11 +0000
@@ -54,7 +54,11 @@ int Rpl_info_file::do_init_info()
       the old descriptor and re-create the old file
     */
     if (info_fd >= 0)
+    {
+      if (my_b_inited(&info_file))
+        end_io_cache(&info_file);
       my_close(info_fd, MYF(MY_WME));
+    }
     if ((info_fd = my_open(info_fname, O_CREAT|O_RDWR|O_BINARY, MYF(MY_WME))) < 0)
     {
       sql_print_error("Failed to create a new info file (\
@@ -170,7 +174,8 @@ void Rpl_info_file::do_end_info()
 
   if (info_fd >= 0)
   {
-    end_io_cache(&info_file);
+    if (my_b_inited(&info_file))
+      end_io_cache(&info_file);
     my_close(info_fd, MYF(MY_WME));
     info_fd = -1;
   }

=== modified file 'sql/rpl_injector.cc'
--- a/sql/rpl_injector.cc	2011-05-12 21:51:20 +0000
+++ b/sql/rpl_injector.cc	2011-05-17 20:08:26 +0000
@@ -1,4 +1,4 @@
-/* Copyright (c) 2006, 2010, Oracle and/or its affiliates. All rights reserved.
+/* Copyright (c) 2006, 2011, 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
@@ -229,17 +229,6 @@ void injector::free_instance()
   }
 }
 
-
-injector::transaction injector::new_trans(THD *thd)
-{
-   DBUG_ENTER("injector::new_trans(THD*)");
-   /*
-     Currently, there is no alternative to using 'mysql_bin_log' since that
-     is hardcoded into the way the handler is using the binary log.
-   */
-   DBUG_RETURN(transaction(&mysql_bin_log, thd));
-}
-
 void injector::new_trans(THD *thd, injector::transaction *ptr)
 {
    DBUG_ENTER("injector::new_trans(THD *, transaction *)");

=== modified file 'sql/rpl_injector.h'
--- a/sql/rpl_injector.h	2011-02-01 08:51:58 +0000
+++ b/sql/rpl_injector.h	2011-05-16 14:30:54 +0000
@@ -1,4 +1,4 @@
-/* Copyright (c) 2006, 2010, Oracle and/or its affiliates. All rights reserved.
+/* Copyright (c) 2006, 2011, 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
@@ -336,21 +336,16 @@ public:
       THD *m_thd;
     };
 
-    /* 
+    /*
        Create a new transaction.  This member function will prepare for a
        sequence of *_row calls by, for example, reserving resources and
-       locking files. There are two overloaded alternatives: one returning a
-       transaction by value and one using placement semantics. The following
-       two calls are equivalent, with the exception that the latter will
-       overwrite the transaction.
-
-         injector::transaction trans1= inj->new_trans(thd);
+       locking files. The call uses placement semantics and will overwrite
+       the transaction.
 
          injector::transaction trans2;
          inj->new_trans(thd, &trans);
      */
-    transaction new_trans(THD *);
-    void        new_trans(THD *, transaction *);
+    void new_trans(THD *, transaction *);
 
     int record_incident(THD*, Incident incident);
     int record_incident(THD*, Incident incident, LEX_STRING const message);

=== modified file 'sql/rpl_master.cc'
--- a/sql/rpl_master.cc	2011-04-19 03:29:06 +0000
+++ b/sql/rpl_master.cc	2011-05-16 14:30:54 +0000
@@ -1252,7 +1252,7 @@ end:
   end_io_cache(&log);
   mysql_file_close(file, MYF(MY_WME));
 
-  RUN_HOOK(binlog_transmit, transmit_stop, (thd, flags));
+  (void) RUN_HOOK(binlog_transmit, transmit_stop, (thd, flags));
   my_eof(thd);
   THD_STAGE_INFO(thd, stage_waiting_to_finalize_termination);
   mysql_mutex_lock(&LOCK_thread_count);
@@ -1264,7 +1264,7 @@ end:
 err:
   THD_STAGE_INFO(thd, stage_waiting_to_finalize_termination);
   end_io_cache(&log);
-  RUN_HOOK(binlog_transmit, transmit_stop, (thd, flags));
+  (void) RUN_HOOK(binlog_transmit, transmit_stop, (thd, flags));
   /*
     Exclude  iteration through thread list
     this is needed for purge_logs() - it will iterate through
@@ -1387,7 +1387,7 @@ int reset_master(THD* thd)
 
   if (mysql_bin_log.reset_logs(thd))
     return 1;
-  RUN_HOOK(binlog_transmit, after_reset_master, (thd, 0 /* flags */));
+  (void) RUN_HOOK(binlog_transmit, after_reset_master, (thd, 0 /* flags */));
   return 0;
 }
 

=== modified file 'sql/rpl_rli.cc'
--- a/sql/rpl_rli.cc	2011-04-28 16:50:10 +0000
+++ b/sql/rpl_rli.cc	2011-05-13 13:59:55 +0000
@@ -43,8 +43,6 @@ const char* info_rli_fields[]=
   "sql_delay"
 };
 
-const char *const Relay_log_info::state_delaying_string = "Waiting until MASTER_DELAY seconds after master executed event";
-
 Relay_log_info::Relay_log_info(bool is_slave_recovery
 #ifdef HAVE_PSI_INTERFACE
                                ,PSI_mutex_key *param_key_info_run_lock,

=== modified file 'sql/rpl_rli.h'
--- a/sql/rpl_rli.h	2011-04-28 16:50:10 +0000
+++ b/sql/rpl_rli.h	2011-05-13 13:59:55 +0000
@@ -551,11 +551,6 @@ public:
   size_t get_number_info_rli_fields();
 
   /**
-    Text used in THD::proc_info when the slave SQL thread is delaying.
-  */
-  static const char *const state_delaying_string;
-
-  /**
     Indicate that a delay starts.
 
     This does not actually sleep; it only sets the state of this
@@ -570,7 +565,7 @@ public:
   {
     mysql_mutex_assert_owner(&data_lock);
     sql_delay_end= delay_end;
-    thd_proc_info(info_thd, state_delaying_string);
+    THD_STAGE_INFO(info_thd, stage_sql_thd_waiting_until_delay);
   }
 
   int32 get_sql_delay() { return sql_delay; }

=== modified file 'sql/rpl_slave.cc'
--- a/sql/rpl_slave.cc	2011-05-12 17:29:19 +0000
+++ b/sql/rpl_slave.cc	2011-05-16 14:30:54 +0000
@@ -634,7 +634,7 @@ int terminate_slave_threads(Master_info*
 
     DBUG_PRINT("info",("Flushing relay-log info file."));
     if (current_thd)
-      thd_proc_info(current_thd, "Flushing relay-log info file.");
+      THD_STAGE_INFO(current_thd, stage_flushing_relay_log_info_file);
 
     /*
       Flushes the relay log info regardles of the sync_relay_log_info option.
@@ -659,7 +659,7 @@ int terminate_slave_threads(Master_info*
 
     DBUG_PRINT("info",("Flushing relay log and master info repository."));
     if (current_thd)
-      thd_proc_info(current_thd, "Flushing relay log and master info repository.");
+      THD_STAGE_INFO(current_thd, stage_flushing_relay_log_and_master_info_repository);
 
     /*
       Flushes the master info regardles of the sync_master_info option.
@@ -2070,6 +2070,10 @@ bool show_master_info(THD* thd, Master_i
     protocol->store(mi->info_thd ? mi->info_thd->proc_info : "", &my_charset_bin);
     mysql_mutex_unlock(&mi->run_lock);
 
+    mysql_mutex_lock(&mi->rli->run_lock);
+    const char *slave_sql_running_state= mi->rli->info_thd ? mi->rli->info_thd->proc_info : "";
+    mysql_mutex_unlock(&mi->rli->run_lock);
+
     mysql_mutex_lock(&mi->data_lock);
     mysql_mutex_lock(&mi->rli->data_lock);
     mysql_mutex_lock(&mi->err_lock);
@@ -2206,10 +2210,7 @@ bool show_master_info(THD* thd, Master_i
     // SQL_Delay
     protocol->store((uint32) mi->rli->get_sql_delay());
     // SQL_Remaining_Delay
-    // THD::proc_info is not protected by any lock, so we read it once
-    // to ensure that we use the same value throughout this function.
-    const char *slave_sql_running_state= mi->rli->info_thd ? mi->rli->info_thd->proc_info : "";
-    if (slave_sql_running_state == Relay_log_info::state_delaying_string)
+    if (slave_sql_running_state == stage_sql_thd_waiting_until_delay.m_name)
     {
       time_t t= my_time(0), sql_delay_end= mi->rli->get_sql_delay_end();
       protocol->store((uint32)(t < sql_delay_end ? sql_delay_end - t : 0));
@@ -3390,7 +3391,7 @@ err:
   // print the current replication position
   sql_print_information("Slave I/O thread exiting, read up to log '%s', position %s",
                   mi->get_io_rpl_log_name(), llstr(mi->get_master_log_pos(), llbuff));
-  RUN_HOOK(binlog_relay_io, thread_stop, (thd, mi));
+  (void) RUN_HOOK(binlog_relay_io, thread_stop, (thd, mi));
   thd->reset_query();
   thd->reset_db(NULL, 0);
   if (mysql)
@@ -3684,7 +3685,7 @@ log '%s' at position %s, relay log '%s'
 
   while (!sql_slave_killed(thd,rli))
   {
-    thd_proc_info(thd, "Reading event from the relay log");
+    THD_STAGE_INFO(thd, stage_reading_event_from_the_relay_log);
     DBUG_ASSERT(rli->info_thd == thd);
     THD_CHECK_SENTRY(thd);
 
@@ -5723,7 +5724,7 @@ int reset_slave(THD *thd, Master_info* m
     goto err;
   }
 
-  RUN_HOOK(binlog_relay_io, after_reset_slave, (thd, mi));
+  (void) RUN_HOOK(binlog_relay_io, after_reset_slave, (thd, mi));
 err:
   unlock_slave_threads(mi);
   if (error)
@@ -5966,7 +5967,7 @@ bool change_master(THD* thd, Master_info
   if (need_relay_log_purge)
   {
     relay_log_purge= 1;
-    thd_proc_info(thd, "Purging old relay logs");
+    THD_STAGE_INFO(thd, stage_purging_old_relay_logs);
     if (mi->rli->purge_relay_logs(thd,
                                   0 /* not only reset, but also reinit */,
                                   &errmsg))

=== modified file 'sql/sql_acl.cc'
--- a/sql/sql_acl.cc	2011-05-10 13:37:37 +0000
+++ b/sql/sql_acl.cc	2011-05-16 08:52:10 +0000
@@ -3645,6 +3645,7 @@ int mysql_table_grant(THD *thd, TABLE_LI
   {						// Should never happen
     /* Restore the state of binlog format */
     DBUG_ASSERT(!thd->is_current_stmt_binlog_format_row());
+    thd->lex->restore_backup_query_tables_list(&backup);
     if (save_binlog_row_based)
       thd->set_current_stmt_binlog_format_row();
     DBUG_RETURN(TRUE);				/* purecov: deadcode */

=== modified file 'sql/sql_partition.h'
--- a/sql/sql_partition.h	2011-03-09 20:54:55 +0000
+++ b/sql/sql_partition.h	2011-05-16 11:32:07 +0000
@@ -16,10 +16,6 @@
    along with this program; if not, write to the Free Software
    Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301  USA */
 
-#ifdef __GNUC__
-#pragma interface				/* gcc class implementation */
-#endif
-
 #include "sql_list.h"                           /* List */
 #include "table.h"                              /* TABLE_LIST */
 

=== modified file 'sql/sql_select.cc'
--- a/sql/sql_select.cc	2011-05-06 12:56:36 +0000
+++ b/sql/sql_select.cc	2011-05-16 11:01:28 +0000
@@ -3342,7 +3342,8 @@ JOIN::exec()
         if (curr_table->pre_idx_push_cond)
         {
           sort_table_cond= make_cond_for_table(curr_join->tmp_having,
-                                               used_tables, used_tables, 0);
+                                               used_tables,
+                                               (table_map) 0, 0);
           if (!sort_table_cond)
             DBUG_VOID_RETURN;
           Item* new_pre_idx_push_cond= 

=== modified file 'sql/transaction.cc'
--- a/sql/transaction.cc	2011-05-12 17:29:19 +0000
+++ b/sql/transaction.cc	2011-05-16 14:30:54 +0000
@@ -175,14 +175,14 @@ bool trans_commit(THD *thd)
 
   thd->server_status&= ~SERVER_STATUS_IN_TRANS;
   res= ha_commit_trans(thd, TRUE);
+  /*
+    if res is non-zero, then ha_commit_trans has rolled back the
+    transaction, so the hooks for rollback will be called.
+  */
   if (res)
-    /*
-      if res is non-zero, then ha_commit_trans has rolled back the
-      transaction, so the hooks for rollback will be called.
-    */
-    RUN_HOOK(transaction, after_rollback, (thd, FALSE));
+    (void) RUN_HOOK(transaction, after_rollback, (thd, FALSE));
   else
-    RUN_HOOK(transaction, after_commit, (thd, FALSE));
+    (void) RUN_HOOK(transaction, after_commit, (thd, FALSE));
   thd->variables.option_bits&= ~OPTION_BEGIN;
   thd->transaction.all.reset_unsafe_rollback_flags();
   thd->lex->start_transaction_opt= 0;
@@ -254,7 +254,7 @@ bool trans_rollback(THD *thd)
 
   thd->server_status&= ~SERVER_STATUS_IN_TRANS;
   res= ha_rollback_trans(thd, TRUE);
-  RUN_HOOK(transaction, after_rollback, (thd, FALSE));
+  (void) RUN_HOOK(transaction, after_rollback, (thd, FALSE));
   thd->variables.option_bits&= ~OPTION_BEGIN;
   thd->transaction.all.reset_unsafe_rollback_flags();
   thd->lex->start_transaction_opt= 0;
@@ -299,14 +299,14 @@ bool trans_commit_stmt(THD *thd)
       thd->tx_isolation= (enum_tx_isolation) thd->variables.tx_isolation;
   }
 
+  /*
+    if res is non-zero, then ha_commit_trans has rolled back the
+    transaction, so the hooks for rollback will be called.
+  */
   if (res)
-    /*
-      if res is non-zero, then ha_commit_trans has rolled back the
-      transaction, so the hooks for rollback will be called.
-    */
-    RUN_HOOK(transaction, after_rollback, (thd, FALSE));
+    (void) RUN_HOOK(transaction, after_rollback, (thd, FALSE));
   else
-    RUN_HOOK(transaction, after_commit, (thd, FALSE));
+    (void) RUN_HOOK(transaction, after_commit, (thd, FALSE));
 
   thd->transaction.stmt.reset();
 
@@ -345,7 +345,7 @@ bool trans_rollback_stmt(THD *thd)
       thd->tx_isolation= (enum_tx_isolation) thd->variables.tx_isolation;
   }
 
-  RUN_HOOK(transaction, after_rollback, (thd, FALSE));
+  (void) RUN_HOOK(transaction, after_rollback, (thd, FALSE));
 
   thd->transaction.stmt.reset();
 

=== modified file 'storage/innobase/handler/i_s.cc'
--- a/storage/innobase/handler/i_s.cc	2011-04-27 21:49:19 +0000
+++ b/storage/innobase/handler/i_s.cc	2011-05-16 14:30:54 +0000
@@ -151,7 +151,8 @@ do {									\
 	}								\
 } while (0)
 
-#if !defined __STRICT_ANSI__ && defined __GNUC__ && (__GNUC__) > 2 && !defined __INTEL_COMPILER
+#if !defined __STRICT_ANSI__ && defined __GNUC__ && (__GNUC__) > 2 &&	\
+	!defined __INTEL_COMPILER && !defined __clang__
 #define STRUCT_FLD(name, value)	name: value
 #else
 #define STRUCT_FLD(name, value)	value

=== modified file 'storage/perfschema/pfs.cc'
--- a/storage/perfschema/pfs.cc	2011-02-14 14:23:55 +0000
+++ b/storage/perfschema/pfs.cc	2011-05-13 13:44:31 +0000
@@ -1402,9 +1402,6 @@ static void destroy_cond_v1(PSI_cond* co
 static PSI_table_share*
 get_table_share_v1(my_bool temporary, TABLE_SHARE *share)
 {
-  /* Do not instrument this table is all table instruments are disabled. */
-  if (! global_table_io_class.m_enabled && ! global_table_lock_class.m_enabled)
-    return NULL;
   /* An instrumented thread is required, for LF_PINS. */
   PFS_thread *pfs_thread= my_pthread_getspecific_ptr(PFS_thread*, THR_PFS);
   if (unlikely(pfs_thread == NULL))
@@ -1454,6 +1451,16 @@ open_table_v1(PSI_table_share *share, co
   PFS_thread *thread= my_pthread_getspecific_ptr(PFS_thread*, THR_PFS);
   if (unlikely(thread == NULL))
     return NULL;
+
+  if (unlikely(setup_objects_version != pfs_table_share->m_setup_objects_version))
+  {
+    pfs_table_share->refresh_setup_object_flags(thread);
+  }
+
+  /* Do not instrument this table is all table instruments are disabled. */
+  if (! pfs_table_share->m_io_enabled && ! pfs_table_share->m_lock_enabled)
+    return NULL;
+
   PFS_table *pfs_table= create_table(pfs_table_share, thread, identity);
   return reinterpret_cast<PSI_table *> (pfs_table);
 }
@@ -2212,27 +2219,8 @@ get_thread_table_io_locker_v1(PSI_table_
   if (! flag_global_instrumentation)
     return NULL;
 
-  if (! global_table_io_class.m_enabled)
-    return NULL;
-
   PFS_table_share *share= pfs_table->m_share;
-  if (unlikely(setup_objects_version != share->m_setup_objects_version))
-  {
-    PFS_thread *pfs_thread= my_pthread_getspecific_ptr(PFS_thread*, THR_PFS);
-    if (unlikely(pfs_thread == NULL))
-      return NULL;
-    /* Refresh the enabled and timed flags from SETUP_OBJECTS */
-    share->m_setup_objects_version= setup_objects_version;
-    lookup_setup_object(pfs_thread,
-                        OBJECT_TYPE_TABLE, /* even for temporary tables */
-                        share->m_schema_name,
-                        share->m_schema_name_length,
-                        share->m_table_name,
-                        share->m_table_name_length,
-                        & share->m_enabled,
-                        & share->m_timed);
-  }
-  if (! share->m_enabled)
+  if (! share->m_io_enabled)
     return NULL;
 
   PFS_instr_class *klass;
@@ -2250,7 +2238,7 @@ get_thread_table_io_locker_v1(PSI_table_
     state->m_thread= reinterpret_cast<PSI_thread *> (pfs_thread);
     flags= STATE_FLAG_THREAD;
 
-    if (klass->m_timed && share->m_timed)
+    if (share->m_io_timed)
       flags|= STATE_FLAG_TIMED;
 
     if (flag_events_waits_current)
@@ -2284,7 +2272,7 @@ get_thread_table_io_locker_v1(PSI_table_
   }
   else
   {
-    if (klass->m_timed && share->m_timed)
+    if (share->m_io_timed)
     {
       flags= STATE_FLAG_TIMED;
     }
@@ -2320,27 +2308,8 @@ get_thread_table_lock_locker_v1(PSI_tabl
   if (! flag_global_instrumentation)
     return NULL;
 
-  if (! global_table_lock_class.m_enabled)
-    return NULL;
-
   PFS_table_share *share= pfs_table->m_share;
-  if (unlikely(setup_objects_version != share->m_setup_objects_version))
-  {
-    PFS_thread *pfs_thread= my_pthread_getspecific_ptr(PFS_thread*, THR_PFS);
-    if (unlikely(pfs_thread == NULL))
-      return NULL;
-    /* Refresh the enabled and timed flags from SETUP_OBJECTS */
-    share->m_setup_objects_version= setup_objects_version;
-    lookup_setup_object(pfs_thread,
-                        OBJECT_TYPE_TABLE, /* even for temporary tables */
-                        share->m_schema_name,
-                        share->m_schema_name_length,
-                        share->m_table_name,
-                        share->m_table_name_length,
-                        & share->m_enabled,
-                        & share->m_timed);
-  }
-  if (! share->m_enabled)
+  if (! share->m_lock_enabled)
     return NULL;
 
   PFS_instr_class *klass;
@@ -2380,7 +2349,7 @@ get_thread_table_lock_locker_v1(PSI_tabl
     state->m_thread= reinterpret_cast<PSI_thread *> (pfs_thread);
     flags= STATE_FLAG_THREAD;
 
-    if (klass->m_timed && share->m_timed)
+    if (share->m_lock_timed)
       flags|= STATE_FLAG_TIMED;
 
     if (flag_events_waits_current)
@@ -2414,7 +2383,7 @@ get_thread_table_lock_locker_v1(PSI_tabl
   }
   else
   {
-    if (klass->m_timed && share->m_timed)
+    if (share->m_lock_timed)
     {
       flags= STATE_FLAG_TIMED;
     }

=== modified file 'storage/perfschema/pfs_instr_class.cc'
--- a/storage/perfschema/pfs_instr_class.cc	2011-02-14 14:23:55 +0000
+++ b/storage/perfschema/pfs_instr_class.cc	2011-05-13 13:44:31 +0000
@@ -118,6 +118,36 @@ PFS_table_share *table_share_array= NULL
 PFS_instr_class global_table_io_class;
 PFS_instr_class global_table_lock_class;
 
+void PFS_instr_class::set_enabled(PFS_instr_class *pfs, bool enabled)
+{
+  pfs->m_enabled= enabled;
+
+  /*
+    When the table instruments are changed,
+    the cache on top of SETUP_OBJECTS is invalidated.
+  */
+  if ((pfs == & global_table_io_class) ||
+      (pfs == & global_table_lock_class))
+  {
+    setup_objects_version++;
+  }
+}
+
+void PFS_instr_class::set_timed(PFS_instr_class *pfs, bool timed)
+{
+  pfs->m_timed= timed;
+
+  /*
+    When the table instruments are changed,
+    the cache on top of SETUP_OBJECTS is invalidated.
+  */
+  if ((pfs == & global_table_io_class) ||
+      (pfs == & global_table_lock_class))
+  {
+    setup_objects_version++;
+  }
+}
+
 /**
   Hash index for instrumented table shares.
   This index is searched by table fully qualified name (@c PFS_table_share_key),
@@ -409,6 +439,24 @@ static void set_table_share_key(PFS_tabl
   }
 }
 
+void PFS_table_share::refresh_setup_object_flags(PFS_thread *thread)
+{
+  bool enabled;
+  bool timed;
+  m_setup_objects_version= setup_objects_version;
+  lookup_setup_object(thread,
+                      OBJECT_TYPE_TABLE,
+                      m_schema_name, m_schema_name_length,
+                      m_table_name, m_table_name_length,
+                      &enabled, &timed);
+
+  m_io_enabled= enabled && global_table_io_class.m_enabled;
+  m_io_timed= timed && global_table_io_class.m_timed;
+
+  m_lock_enabled= enabled && global_table_lock_class.m_enabled;
+  m_lock_timed= timed && global_table_lock_class.m_timed;
+}
+
 /**
   Initialize the file class buffer.
   @param file_class_sizing            max number of file class
@@ -1041,8 +1089,10 @@ PFS_table_share* find_or_create_table_sh
   uint retry_count= 0;
   uint version= 0;
   const uint retry_max= 3;
-  bool enabled= true;
-  bool timed= true;
+  bool io_enabled= true;
+  bool lock_enabled= true;
+  bool io_timed= true;
+  bool lock_timed= true;
 
 search:
   entry= reinterpret_cast<PFS_table_share**>
@@ -1065,6 +1115,8 @@ search:
 
   if (retry_count == 0)
   {
+    bool enabled;
+    bool timed;
     version= setup_objects_version;
     lookup_setup_object(thread,
                         OBJECT_TYPE_TABLE,
@@ -1072,6 +1124,12 @@ search:
                         table_name, table_name_length,
                         &enabled, &timed);
 
+    io_enabled= enabled && global_table_io_class.m_enabled;
+    io_timed= timed && global_table_io_class.m_timed;
+
+    lock_enabled= enabled && global_table_lock_class.m_enabled;
+    lock_timed= timed && global_table_lock_class.m_timed;
+
     /*
       Even when enabled is false, a record is added in the dictionary:
       - It makes enabling a table already in the table cache possible,
@@ -1101,8 +1159,10 @@ search:
           pfs->m_schema_name_length= schema_name_length;
           pfs->m_table_name= &pfs->m_key.m_hash_key[schema_name_length + 2];
           pfs->m_table_name_length= table_name_length;
-          pfs->m_enabled= enabled;
-          pfs->m_timed= timed;
+          pfs->m_io_enabled= io_enabled;
+          pfs->m_lock_enabled= lock_enabled;
+          pfs->m_io_timed= io_timed;
+          pfs->m_lock_timed= lock_timed;
           pfs->init_refcount();
           pfs->m_table_stat.reset();
           set_keys(pfs, share);

=== modified file 'storage/perfschema/pfs_instr_class.h'
--- a/storage/perfschema/pfs_instr_class.h	2011-02-14 14:23:55 +0000
+++ b/storage/perfschema/pfs_instr_class.h	2011-05-13 13:44:31 +0000
@@ -99,6 +99,9 @@ struct PFS_instr_class
   {
     return m_flags & PSI_FLAG_GLOBAL;
   }
+
+  static void set_enabled(PFS_instr_class *pfs, bool enabled);
+  static void set_timed(PFS_instr_class *pfs, bool timed);
 };
 
 struct PFS_mutex;
@@ -231,7 +234,17 @@ public:
     PFS_atomic::add_32(& m_refcount, -1);
   }
 
-  /** Setup object refresh version. */
+  void refresh_setup_object_flags(PFS_thread *thread);
+
+  /**
+    Setup object refresh version.
+    Cache version used when computing the enabled / timed flags.
+    @sa setup_objects_version
+    @sa m_io_enabled
+    @sa m_lock_enabled
+    @sa m_io_timed
+    @sa m_lock_timed
+  */
   uint m_setup_objects_version;
   /** Internal lock. */
   pfs_lock m_lock;
@@ -245,11 +258,14 @@ public:
   const char *m_table_name;
   /** Length in bytes of @c m_table_name. */
   uint m_table_name_length;
-  /** True if this table instrument is enabled. */
-  bool m_enabled;
-  /** True if this table instrument is timed. */
-  bool m_timed;
-  bool m_purge;
+  /** True if table io instrumentation is enabled. */
+  bool m_io_enabled;
+  /** True if table lock instrumentation is enabled. */
+  bool m_lock_enabled;
+  /** True if table io instrumentation is timed. */
+  bool m_io_timed;
+  /** True if table lock instrumentation is timed. */
+  bool m_lock_timed;
   /** Table statistics. */
   PFS_table_stat m_table_stat;
   /** Number of indexes. */

=== modified file 'storage/perfschema/pfs_setup_object.h'
--- a/storage/perfschema/pfs_setup_object.h	2011-02-04 11:55:17 +0000
+++ b/storage/perfschema/pfs_setup_object.h	2011-05-13 13:44:31 +0000
@@ -70,6 +70,20 @@ struct PFS_setup_object
   bool m_timed;
 };
 
+/**
+  Version number of the SETUP_OBJECTS cache.
+  The content of the SETUP_OBJECTS table,
+  and the content of SETUP_INSTRUMENTS table for instruments that apply to objects :
+  - wait/io/table/sql/handler
+  - wait/lock/table/sql/handler
+  is cached once for each object,
+  to avoid evaluating the object ENABLED and TIMED flags too frequently.
+  Incrementing @c setup_objects_version invalidates the cache.
+  @sa global_table_io_class
+  @sa global_table_lock_class
+  @sa PFS_table_share::refresh_setup_objects_flags
+  @sa PFS_table_share::m_setup_objects_version
+*/
 extern uint setup_objects_version;
 
 int init_setup_object(const PFS_global_param *param);

=== modified file 'storage/perfschema/table_setup_instruments.cc'
--- a/storage/perfschema/table_setup_instruments.cc	2011-02-14 14:23:55 +0000
+++ b/storage/perfschema/table_setup_instruments.cc	2011-05-13 13:44:31 +0000
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved.
+/* Copyright (c) 2008, 2011, 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
@@ -25,6 +25,7 @@
 #include "pfs_column_values.h"
 #include "table_setup_instruments.h"
 #include "pfs_global.h"
+#include "pfs_setup_object.h"
 
 THR_LOCK table_setup_instruments::m_table_lock;
 
@@ -173,10 +174,7 @@ int table_setup_instruments::rnd_pos(con
 
 void table_setup_instruments::make_row(PFS_instr_class *klass)
 {
-  m_row.m_name= &klass->m_name[0];
-  m_row.m_name_length= klass->m_name_length;
-  m_row.m_enabled_ptr= &klass->m_enabled;
-  m_row.m_timed_ptr= &klass->m_timed;
+  m_row.m_instr_class= klass;
 }
 
 int table_setup_instruments::read_row_values(TABLE *table,
@@ -200,16 +198,13 @@ int table_setup_instruments::read_row_va
       switch(f->field_index)
       {
       case 0: /* NAME */
-        set_field_varchar_utf8(f, m_row.m_name, m_row.m_name_length);
+        set_field_varchar_utf8(f, m_row.m_instr_class->m_name, m_row.m_instr_class->m_name_length);
         break;
       case 1: /* ENABLED */
-        set_field_enum(f, (*m_row.m_enabled_ptr) ? ENUM_YES : ENUM_NO);
+        set_field_enum(f, m_row.m_instr_class->m_enabled ? ENUM_YES : ENUM_NO);
         break;
       case 2: /* TIMED */
-        if (m_row.m_timed_ptr)
-          set_field_enum(f, (*m_row.m_timed_ptr) ? ENUM_YES : ENUM_NO);
-        else
-          set_field_enum(f, ENUM_NO);
+        set_field_enum(f, m_row.m_instr_class->m_timed ? ENUM_YES : ENUM_NO);
         break;
       default:
         DBUG_ASSERT(false);
@@ -238,14 +233,11 @@ int table_setup_instruments::update_row_
         return HA_ERR_WRONG_COMMAND;
       case 1: /* ENABLED */
         value= (enum_yes_no) get_field_enum(f);
-        *m_row.m_enabled_ptr= (value == ENUM_YES) ? true : false;
+        PFS_instr_class::set_enabled(m_row.m_instr_class, (value == ENUM_YES) ? true : false);
         break;
       case 2: /* TIMED */
-        if (m_row.m_timed_ptr)
-        {
-          value= (enum_yes_no) get_field_enum(f);
-          *m_row.m_timed_ptr= (value == ENUM_YES) ? true : false;
-        }
+        value= (enum_yes_no) get_field_enum(f);
+        PFS_instr_class::set_timed(m_row.m_instr_class, (value == ENUM_YES) ? true : false);
         break;
       default:
         DBUG_ASSERT(false);

=== modified file 'storage/perfschema/table_setup_instruments.h'
--- a/storage/perfschema/table_setup_instruments.h	2011-02-14 14:23:55 +0000
+++ b/storage/perfschema/table_setup_instruments.h	2011-05-13 13:44:31 +0000
@@ -32,14 +32,8 @@
 /** A row of PERFORMANCE_SCHEMA.SETUP_INSTRUMENTS. */
 struct row_setup_instruments
 {
-  /** Column NAME. */
-  const char *m_name;
-  /** Length in bytes of @c m_name. */
-  uint m_name_length;
-  /** Column ENABLED. */
-  bool *m_enabled_ptr;
-  /** Column TIMED. */
-  bool *m_timed_ptr;
+  /** Columns NAME, ENABLED, TIMED. */
+  PFS_instr_class *m_instr_class;
 };
 
 /** Position of a cursor on PERFORMANCE_SCHEMA.SETUP_INSTRUMENTS. */

=== modified file 'strings/decimal.c'
--- a/strings/decimal.c	2011-05-12 12:50:11 +0000
+++ b/strings/decimal.c	2011-05-16 14:30:54 +0000
@@ -678,7 +678,7 @@ int decimal_shift(decimal_t *dec, int sh
     if (do_left)
     {
       do_mini_left_shift(dec, l_mini_shift, beg, end);
-      mini_shift=- l_mini_shift;
+      mini_shift= -l_mini_shift;
     }
     else
     {

=== modified file 'unittest/mysys/lf-t.c'
--- a/unittest/mysys/lf-t.c	2009-11-18 02:31:40 +0000
+++ b/unittest/mysys/lf-t.c	2011-05-13 16:04:49 +0000
@@ -27,6 +27,8 @@ int32 inserts= 0, N;
 LF_ALLOCATOR lf_allocator;
 LF_HASH lf_hash;
 
+int with_my_thread_init=0;
+
 /*
   pin allocator - alloc and release an element in a loop
 */
@@ -36,7 +38,8 @@ pthread_handler_t test_lf_pinbox(void *a
   int32 x= 0;
   LF_PINS *pins;
 
-  my_thread_init();
+  if (with_my_thread_init)
+    my_thread_init();
 
   pins= lf_pinbox_get_pins(&lf_allocator.pinbox);
 
@@ -49,7 +52,10 @@ pthread_handler_t test_lf_pinbox(void *a
   pthread_mutex_lock(&mutex);
   if (!--running_threads) pthread_cond_signal(&cond);
   pthread_mutex_unlock(&mutex);
-  my_thread_end();
+
+  if (with_my_thread_init)
+    my_thread_end();
+
   return 0;
 }
 
@@ -68,7 +74,8 @@ pthread_handler_t test_lf_alloc(void *ar
   int32 x,y= 0;
   LF_PINS *pins;
 
-  my_thread_init();
+  if (with_my_thread_init)
+    my_thread_init();
 
   pins= lf_alloc_get_pins(&lf_allocator);
 
@@ -101,7 +108,9 @@ pthread_handler_t test_lf_alloc(void *ar
   }
   if (!--running_threads) pthread_cond_signal(&cond);
   pthread_mutex_unlock(&mutex);
-  my_thread_end();
+
+  if (with_my_thread_init)
+    my_thread_end();
   return 0;
 }
 
@@ -112,7 +121,8 @@ pthread_handler_t test_lf_hash(void *arg
   int32 x,y,z,sum= 0, ins= 0;
   LF_PINS *pins;
 
-  my_thread_init();
+  if (with_my_thread_init)
+    my_thread_init();
 
   pins= lf_hash_get_pins(&lf_hash);
 
@@ -152,14 +162,15 @@ pthread_handler_t test_lf_hash(void *arg
   }
   if (!--running_threads) pthread_cond_signal(&cond);
   pthread_mutex_unlock(&mutex);
-  my_thread_end();
+  if (with_my_thread_init)
+    my_thread_end();
   return 0;
 }
 
 
 void do_tests()
 {
-  plan(4);
+  plan(7);
 
   lf_alloc_init(&lf_allocator, sizeof(TLA), offsetof(TLA, not_used));
   lf_hash_init(&lf_hash, sizeof(int), LF_HASH_UNIQUE, 0, sizeof(int), 0,
@@ -168,9 +179,15 @@ void do_tests()
   bad= my_atomic_initialize();
   ok(!bad, "my_atomic_initialize() returned %d", bad);
 
-  test_concurrently("lf_pinbox", test_lf_pinbox, N= THREADS, CYCLES);
-  test_concurrently("lf_alloc",  test_lf_alloc,  N= THREADS, CYCLES);
-  test_concurrently("lf_hash",   test_lf_hash,   N= THREADS, CYCLES/10);
+  with_my_thread_init= 1;
+  test_concurrently("lf_pinbox (with my_thread_init)", test_lf_pinbox, N= THREADS, CYCLES);
+  test_concurrently("lf_alloc (with my_thread_init)",  test_lf_alloc,  N= THREADS, CYCLES);
+  test_concurrently("lf_hash (with my_thread_init)",   test_lf_hash,   N= THREADS, CYCLES/10);
+
+  with_my_thread_init= 0;
+  test_concurrently("lf_pinbox (without my_thread_init)", test_lf_pinbox, N= THREADS, CYCLES);
+  test_concurrently("lf_alloc (without my_thread_init)",  test_lf_alloc,  N= THREADS, CYCLES);
+  test_concurrently("lf_hash (without my_thread_init)",   test_lf_hash,   N= THREADS, CYCLES/10);
 
   lf_hash_destroy(&lf_hash);
   lf_alloc_destroy(&lf_allocator);

No bundle (reason: useless for push emails).
Thread
bzr push into mysql-trunk-wl4832 branch (alfranio.correia:3082 to 3084) Alfranio Correia19 May