List:Commits« Previous MessageNext Message »
From:Marc Alff Date:July 29 2011 9:11am
Subject:bzr push into mysql-trunk-wl5378 branch (marc.alff:3365 to 3366)
View as plain text  
 3366 Marc Alff	2011-07-29
      Improved test coverage
      Removed dead code

    added:
      mysql-test/suite/perfschema/r/start_server_no_account.result
      mysql-test/suite/perfschema/r/start_server_no_host.result
      mysql-test/suite/perfschema/r/start_server_no_user.result
      mysql-test/suite/perfschema/r/start_server_no_waits_history.result
      mysql-test/suite/perfschema/r/start_server_no_waits_history_long.result
      mysql-test/suite/perfschema/t/start_server_no_account-master.opt
      mysql-test/suite/perfschema/t/start_server_no_account.test
      mysql-test/suite/perfschema/t/start_server_no_host-master.opt
      mysql-test/suite/perfschema/t/start_server_no_host.test
      mysql-test/suite/perfschema/t/start_server_no_user-master.opt
      mysql-test/suite/perfschema/t/start_server_no_user.test
      mysql-test/suite/perfschema/t/start_server_no_waits_history-master.opt
      mysql-test/suite/perfschema/t/start_server_no_waits_history.test
      mysql-test/suite/perfschema/t/start_server_no_waits_history_long-master.opt
      mysql-test/suite/perfschema/t/start_server_no_waits_history_long.test
      storage/perfschema/unittest/pfs_account-oom-t.cc
      storage/perfschema/unittest/pfs_host-oom-t.cc
      storage/perfschema/unittest/pfs_user-oom-t.cc
    modified:
      mysql-test/suite/perfschema/include/start_server_common.inc
      mysql-test/suite/perfschema/r/checksum.result
      mysql-test/suite/perfschema/r/start_server_innodb.result
      mysql-test/suite/perfschema/r/start_server_no_cond_class.result
      mysql-test/suite/perfschema/r/start_server_no_cond_inst.result
      mysql-test/suite/perfschema/r/start_server_no_file_class.result
      mysql-test/suite/perfschema/r/start_server_no_file_inst.result
      mysql-test/suite/perfschema/r/start_server_no_mutex_class.result
      mysql-test/suite/perfschema/r/start_server_no_mutex_inst.result
      mysql-test/suite/perfschema/r/start_server_no_rwlock_class.result
      mysql-test/suite/perfschema/r/start_server_no_rwlock_inst.result
      mysql-test/suite/perfschema/r/start_server_no_setup_actors.result
      mysql-test/suite/perfschema/r/start_server_no_setup_objects.result
      mysql-test/suite/perfschema/r/start_server_no_stage_class.result
      mysql-test/suite/perfschema/r/start_server_no_stages_history.result
      mysql-test/suite/perfschema/r/start_server_no_stages_history_long.result
      mysql-test/suite/perfschema/r/start_server_no_statement_class.result
      mysql-test/suite/perfschema/r/start_server_no_statements_history.result
      mysql-test/suite/perfschema/r/start_server_no_statements_history_long.result
      mysql-test/suite/perfschema/r/start_server_no_table_hdl.result
      mysql-test/suite/perfschema/r/start_server_no_table_inst.result
      mysql-test/suite/perfschema/r/start_server_no_thread_class.result
      mysql-test/suite/perfschema/r/start_server_no_thread_inst.result
      mysql-test/suite/perfschema/r/start_server_nothing.result
      mysql-test/suite/perfschema/r/start_server_off.result
      mysql-test/suite/perfschema/r/start_server_on.result
      mysql-test/suite/perfschema/t/checksum.test
      storage/perfschema/ha_perfschema.cc
      storage/perfschema/pfs_events_waits.cc
      storage/perfschema/pfs_instr.cc
      storage/perfschema/pfs_instr.h
      storage/perfschema/pfs_instr_class.cc
      storage/perfschema/pfs_instr_class.h
      storage/perfschema/unittest/CMakeLists.txt
      storage/perfschema/unittest/pfs_instr-oom-t.cc
      storage/perfschema/unittest/pfs_instr_class-oom-t.cc
      storage/perfschema/unittest/stub_pfs_global.h
 3365 Marc Alff	2011-07-25 [merge]
      Merge mysql-trunk --> mysl-trunk-wl53878

    added:
      mysql-test/suite/perfschema/include/stage_cleanup.inc
      mysql-test/suite/perfschema/include/stage_setup.inc
      mysql-test/suite/perfschema/r/stage_mdl_function.result
      mysql-test/suite/perfschema/r/stage_mdl_global.result
      mysql-test/suite/perfschema/r/stage_mdl_procedure.result
      mysql-test/suite/perfschema/r/stage_mdl_table.result
      mysql-test/suite/perfschema/t/stage_mdl_function.test
      mysql-test/suite/perfschema/t/stage_mdl_global.test
      mysql-test/suite/perfschema/t/stage_mdl_procedure.test
      mysql-test/suite/perfschema/t/stage_mdl_table.test
    modified:
      client/mysql.cc
      client/mysql_upgrade.c
      client/mysqladmin.cc
      client/mysqlcheck.c
      client/mysqldump.c
      client/mysqlimport.c
      client/mysqlshow.c
      client/mysqltest.cc
      cmake/create_initial_db.cmake.in
      config.h.cmake
      configure.cmake
      dbug/dbug_analyze.c
      dbug/my_main.c
      dbug/tests.c
      include/my_sys.h
      mysql-test/collections/default.weekly
      mysql-test/r/func_if.result
      mysql-test/r/merge.result
      mysql-test/r/mysqld--help-notwin.result
      mysql-test/r/mysqld--help-win.result
      mysql-test/r/parser.result
      mysql-test/suite/innodb/r/innodb_bug54044.result
      mysql-test/suite/innodb/t/innodb_bug54044.test
      mysql-test/suite/perfschema/r/ortho_iter.result
      mysql-test/suite/perfschema/r/privilege_table_io.result
      mysql-test/suite/perfschema/r/query_cache.result
      mysql-test/suite/perfschema/r/start_server_innodb.result
      mysql-test/suite/perfschema/r/start_server_no_cond_class.result
      mysql-test/suite/perfschema/r/start_server_no_cond_inst.result
      mysql-test/suite/perfschema/r/start_server_no_file_class.result
      mysql-test/suite/perfschema/r/start_server_no_file_inst.result
      mysql-test/suite/perfschema/r/start_server_no_mutex_class.result
      mysql-test/suite/perfschema/r/start_server_no_mutex_inst.result
      mysql-test/suite/perfschema/r/start_server_no_rwlock_class.result
      mysql-test/suite/perfschema/r/start_server_no_rwlock_inst.result
      mysql-test/suite/perfschema/r/start_server_no_setup_actors.result
      mysql-test/suite/perfschema/r/start_server_no_setup_objects.result
      mysql-test/suite/perfschema/r/start_server_no_stages_history.result
      mysql-test/suite/perfschema/r/start_server_no_stages_history_long.result
      mysql-test/suite/perfschema/r/start_server_no_statement_class.result
      mysql-test/suite/perfschema/r/start_server_no_statements_history.result
      mysql-test/suite/perfschema/r/start_server_no_statements_history_long.result
      mysql-test/suite/perfschema/r/start_server_no_table_hdl.result
      mysql-test/suite/perfschema/r/start_server_no_table_inst.result
      mysql-test/suite/perfschema/r/start_server_no_thread_class.result
      mysql-test/suite/perfschema/r/start_server_no_thread_inst.result
      mysql-test/suite/perfschema/r/start_server_off.result
      mysql-test/suite/perfschema/r/start_server_on.result
      mysql-test/suite/perfschema/r/table_aggregate_global_2u_2t.result
      mysql-test/suite/perfschema/r/table_aggregate_global_2u_3t.result
      mysql-test/suite/perfschema/r/table_aggregate_global_4u_2t.result
      mysql-test/suite/perfschema/r/table_aggregate_global_4u_3t.result
      mysql-test/suite/perfschema/r/table_aggregate_hist_2u_2t.result
      mysql-test/suite/perfschema/r/table_aggregate_hist_2u_3t.result
      mysql-test/suite/perfschema/r/table_aggregate_hist_4u_2t.result
      mysql-test/suite/perfschema/r/table_aggregate_hist_4u_3t.result
      mysql-test/suite/perfschema/r/table_aggregate_off.result
      mysql-test/suite/perfschema/r/table_aggregate_thread_2u_2t.result
      mysql-test/suite/perfschema/r/table_aggregate_thread_2u_3t.result
      mysql-test/suite/perfschema/r/table_aggregate_thread_4u_2t.result
      mysql-test/suite/perfschema/r/table_aggregate_thread_4u_3t.result
      mysql-test/suite/perfschema/r/table_io_aggregate_global_2u_2t.result
      mysql-test/suite/perfschema/r/table_io_aggregate_global_2u_3t.result
      mysql-test/suite/perfschema/r/table_io_aggregate_global_4u_2t.result
      mysql-test/suite/perfschema/r/table_io_aggregate_global_4u_3t.result
      mysql-test/suite/perfschema/r/table_io_aggregate_hist_2u_2t.result
      mysql-test/suite/perfschema/r/table_io_aggregate_hist_2u_3t.result
      mysql-test/suite/perfschema/r/table_io_aggregate_hist_4u_2t.result
      mysql-test/suite/perfschema/r/table_io_aggregate_hist_4u_3t.result
      mysql-test/suite/perfschema/r/table_io_aggregate_thread_2u_2t.result
      mysql-test/suite/perfschema/r/table_io_aggregate_thread_2u_3t.result
      mysql-test/suite/perfschema/r/table_io_aggregate_thread_4u_2t.result
      mysql-test/suite/perfschema/r/table_io_aggregate_thread_4u_3t.result
      mysql-test/suite/perfschema/r/table_lock_aggregate_global_2u_2t.result
      mysql-test/suite/perfschema/r/table_lock_aggregate_global_2u_3t.result
      mysql-test/suite/perfschema/r/table_lock_aggregate_global_4u_2t.result
      mysql-test/suite/perfschema/r/table_lock_aggregate_global_4u_3t.result
      mysql-test/suite/perfschema/r/table_lock_aggregate_hist_2u_2t.result
      mysql-test/suite/perfschema/r/table_lock_aggregate_hist_2u_3t.result
      mysql-test/suite/perfschema/r/table_lock_aggregate_hist_4u_2t.result
      mysql-test/suite/perfschema/r/table_lock_aggregate_hist_4u_3t.result
      mysql-test/suite/perfschema/r/table_lock_aggregate_thread_2u_2t.result
      mysql-test/suite/perfschema/r/table_lock_aggregate_thread_2u_3t.result
      mysql-test/suite/perfschema/r/table_lock_aggregate_thread_4u_2t.result
      mysql-test/suite/perfschema/r/table_lock_aggregate_thread_4u_3t.result
      mysql-test/suite/sys_vars/r/innodb_buffer_pool_filename_basic.result
      mysql-test/suite/sys_vars/t/innodb_buffer_pool_filename_basic.test
      mysql-test/t/func_if.test
      mysql-test/t/merge.test
      mysql-test/t/parser.test
      mysys/my_init.c
      mysys/my_static.c
      mysys/mysys_priv.h
      mysys/thr_lock.c
      plugin/semisync/semisync_master.cc
      plugin/semisync/semisync_master.h
      plugin/semisync/semisync_master_plugin.cc
      sql/CMakeLists.txt
      sql/binlog.cc
      sql/event_queue.cc
      sql/event_queue.h
      sql/event_scheduler.cc
      sql/event_scheduler.h
      sql/events.cc
      sql/events.h
      sql/field.cc
      sql/gen_lex_hash.cc
      sql/item_cmpfunc.cc
      sql/item_cmpfunc.h
      sql/mdl.cc
      sql/mdl.h
      sql/mysqld.cc
      sql/mysqld.h
      sql/replication.h
      sql/rpl_master.cc
      sql/rpl_rli.cc
      sql/rpl_slave.cc
      sql/sql_base.cc
      sql/sql_cache.cc
      sql/sql_class.cc
      sql/sql_class.h
      sql/sql_lex.cc
      sql/table.cc
      storage/innobase/fil/fil0fil.c
      storage/myisammrg/ha_myisammrg.cc
      storage/myisammrg/myrg_open.c
      storage/perfschema/pfs_server.h
      support-files/mysql.spec.sh
      unittest/gunit/CMakeLists.txt
      unittest/gunit/opt_trace-t.cc
      unittest/gunit/test_mdl_context_owner.h
=== modified file 'mysql-test/suite/perfschema/include/start_server_common.inc'
--- a/mysql-test/suite/perfschema/include/start_server_common.inc	2011-07-07 19:06:44 +0000
+++ b/mysql-test/suite/perfschema/include/start_server_common.inc	2011-07-29 09:10:56 +0000
@@ -32,7 +32,10 @@ select * from performance_schema.cond_in
 select * from performance_schema.events_stages_current;
 select * from performance_schema.events_stages_history;
 select * from performance_schema.events_stages_history_long;
+select * from performance_schema.events_stages_summary_by_account_by_event_name;
+select * from performance_schema.events_stages_summary_by_host_by_event_name;
 select * from performance_schema.events_stages_summary_by_thread_by_event_name;
+select * from performance_schema.events_stages_summary_by_user_by_event_name;
 select * from performance_schema.events_stages_summary_global_by_event_name;
 select * from performance_schema.events_statements_current;
 select * from performance_schema.events_statements_history;

=== modified file 'mysql-test/suite/perfschema/r/checksum.result'
--- a/mysql-test/suite/perfschema/r/checksum.result	2011-02-15 14:31:13 +0000
+++ b/mysql-test/suite/perfschema/r/checksum.result	2011-07-29 09:10:56 +0000
@@ -1,60 +1,90 @@
+checksum table performance_schema.accounts;
 checksum table performance_schema.cond_instances;
 checksum table performance_schema.events_stages_current;
 checksum table performance_schema.events_stages_history;
 checksum table performance_schema.events_stages_history_long;
+checksum table performance_schema.events_stages_summary_by_account_by_event_name;
+checksum table performance_schema.events_stages_summary_by_host_by_event_name;
 checksum table performance_schema.events_stages_summary_by_thread_by_event_name;
+checksum table performance_schema.events_stages_summary_by_user_by_event_name;
 checksum table performance_schema.events_stages_summary_global_by_event_name;
 checksum table performance_schema.events_statements_current;
 checksum table performance_schema.events_statements_history;
 checksum table performance_schema.events_statements_history_long;
+checksum table performance_schema.events_statements_summary_by_account_by_event_name;
+checksum table performance_schema.events_statements_summary_by_host_by_event_name;
 checksum table performance_schema.events_statements_summary_by_thread_by_event_name;
+checksum table performance_schema.events_statements_summary_by_user_by_event_name;
 checksum table performance_schema.events_statements_summary_global_by_event_name;
 checksum table performance_schema.events_waits_current;
 checksum table performance_schema.events_waits_history;
 checksum table performance_schema.events_waits_history_long;
+checksum table performance_schema.events_waits_summary_by_account_by_event_name;
+checksum table performance_schema.events_waits_summary_by_host_by_event_name;
 checksum table performance_schema.events_waits_summary_by_instance;
 checksum table performance_schema.events_waits_summary_by_thread_by_event_name;
+checksum table performance_schema.events_waits_summary_by_user_by_event_name;
 checksum table performance_schema.events_waits_summary_global_by_event_name;
 checksum table performance_schema.file_instances;
 checksum table performance_schema.file_summary_by_event_name;
 checksum table performance_schema.file_summary_by_instance;
+checksum table performance_schema.hosts;
 checksum table performance_schema.mutex_instances;
+checksum table performance_schema.objects_summary_global_by_type;
 checksum table performance_schema.performance_timers;
 checksum table performance_schema.rwlock_instances;
+checksum table performance_schema.setup_actors;
 checksum table performance_schema.setup_consumers;
 checksum table performance_schema.setup_instruments;
+checksum table performance_schema.setup_objects;
 checksum table performance_schema.setup_timers;
-checksum table performance_schema.table_io_waits_summary_by_index;
+checksum table performance_schema.table_io_waits_summary_by_index_usage;
 checksum table performance_schema.table_io_waits_summary_by_table;
 checksum table performance_schema.table_lock_waits_summary_by_table;
 checksum table performance_schema.threads;
+checksum table performance_schema.users;
+checksum table performance_schema.accounts extended;
 checksum table performance_schema.cond_instances extended;
 checksum table performance_schema.events_stages_current extended;
 checksum table performance_schema.events_stages_history extended;
 checksum table performance_schema.events_stages_history_long extended;
+checksum table performance_schema.events_stages_summary_by_account_by_event_name extended;
+checksum table performance_schema.events_stages_summary_by_host_by_event_name extended;
 checksum table performance_schema.events_stages_summary_by_thread_by_event_name extended;
+checksum table performance_schema.events_stages_summary_by_user_by_event_name extended;
 checksum table performance_schema.events_stages_summary_global_by_event_name extended;
 checksum table performance_schema.events_statements_current extended;
 checksum table performance_schema.events_statements_history extended;
 checksum table performance_schema.events_statements_history_long extended;
+checksum table performance_schema.events_statements_summary_by_account_by_event_name extended;
+checksum table performance_schema.events_statements_summary_by_host_by_event_name extended;
 checksum table performance_schema.events_statements_summary_by_thread_by_event_name extended;
+checksum table performance_schema.events_statements_summary_by_user_by_event_name extended;
 checksum table performance_schema.events_statements_summary_global_by_event_name extended;
 checksum table performance_schema.events_waits_current extended;
 checksum table performance_schema.events_waits_history extended;
 checksum table performance_schema.events_waits_history_long extended;
+checksum table performance_schema.events_waits_summary_by_account_by_event_name extended;
+checksum table performance_schema.events_waits_summary_by_host_by_event_name extended;
 checksum table performance_schema.events_waits_summary_by_instance extended;
 checksum table performance_schema.events_waits_summary_by_thread_by_event_name extended;
+checksum table performance_schema.events_waits_summary_by_user_by_event_name extended;
 checksum table performance_schema.events_waits_summary_global_by_event_name extended;
 checksum table performance_schema.file_instances extended;
 checksum table performance_schema.file_summary_by_event_name extended;
 checksum table performance_schema.file_summary_by_instance extended;
+checksum table performance_schema.hosts extended;
 checksum table performance_schema.mutex_instances extended;
+checksum table performance_schema.objects_summary_global_by_type extended;
 checksum table performance_schema.performance_timers extended;
 checksum table performance_schema.rwlock_instances extended;
+checksum table performance_schema.setup_actors extended;
 checksum table performance_schema.setup_consumers extended;
 checksum table performance_schema.setup_instruments extended;
+checksum table performance_schema.setup_objects extended;
 checksum table performance_schema.setup_timers extended;
-checksum table performance_schema.table_io_waits_summary_by_index extended;
+checksum table performance_schema.table_io_waits_summary_by_index_usage extended;
 checksum table performance_schema.table_io_waits_summary_by_table extended;
 checksum table performance_schema.table_lock_waits_summary_by_table extended;
 checksum table performance_schema.threads extended;
+checksum table performance_schema.users extended;

=== modified file 'mysql-test/suite/perfschema/r/start_server_innodb.result'
--- a/mysql-test/suite/perfschema/r/start_server_innodb.result	2011-07-25 18:11:52 +0000
+++ b/mysql-test/suite/perfschema/r/start_server_innodb.result	2011-07-29 09:10:56 +0000
@@ -22,7 +22,10 @@ select * from performance_schema.cond_in
 select * from performance_schema.events_stages_current;
 select * from performance_schema.events_stages_history;
 select * from performance_schema.events_stages_history_long;
+select * from performance_schema.events_stages_summary_by_account_by_event_name;
+select * from performance_schema.events_stages_summary_by_host_by_event_name;
 select * from performance_schema.events_stages_summary_by_thread_by_event_name;
+select * from performance_schema.events_stages_summary_by_user_by_event_name;
 select * from performance_schema.events_stages_summary_global_by_event_name;
 select * from performance_schema.events_statements_current;
 select * from performance_schema.events_statements_history;

=== added file 'mysql-test/suite/perfschema/r/start_server_no_account.result'
--- a/mysql-test/suite/perfschema/r/start_server_no_account.result	1970-01-01 00:00:00 +0000
+++ b/mysql-test/suite/perfschema/r/start_server_no_account.result	2011-07-29 09:10:56 +0000
@@ -0,0 +1,105 @@
+show databases;
+Database
+information_schema
+mtr
+mysql
+performance_schema
+test
+select count(*) from performance_schema.performance_timers;
+count(*)
+5
+select count(*) from performance_schema.setup_consumers;
+count(*)
+11
+select count(*) > 2 from performance_schema.setup_instruments;
+count(*) > 2
+1
+select count(*) from performance_schema.setup_timers;
+count(*)
+3
+select * from performance_schema.accounts;
+select * from performance_schema.cond_instances;
+select * from performance_schema.events_stages_current;
+select * from performance_schema.events_stages_history;
+select * from performance_schema.events_stages_history_long;
+select * from performance_schema.events_stages_summary_by_account_by_event_name;
+select * from performance_schema.events_stages_summary_by_host_by_event_name;
+select * from performance_schema.events_stages_summary_by_thread_by_event_name;
+select * from performance_schema.events_stages_summary_by_user_by_event_name;
+select * from performance_schema.events_stages_summary_global_by_event_name;
+select * from performance_schema.events_statements_current;
+select * from performance_schema.events_statements_history;
+select * from performance_schema.events_statements_history_long;
+select * from performance_schema.events_statements_summary_by_account_by_event_name;
+select * from performance_schema.events_statements_summary_by_host_by_event_name;
+select * from performance_schema.events_statements_summary_by_thread_by_event_name;
+select * from performance_schema.events_statements_summary_by_user_by_event_name;
+select * from performance_schema.events_statements_summary_global_by_event_name;
+select * from performance_schema.events_waits_current;
+select * from performance_schema.events_waits_history;
+select * from performance_schema.events_waits_history_long;
+select * from performance_schema.events_waits_summary_by_account_by_event_name;
+select * from performance_schema.events_waits_summary_by_host_by_event_name;
+select * from performance_schema.events_waits_summary_by_instance;
+select * from performance_schema.events_waits_summary_by_thread_by_event_name;
+select * from performance_schema.events_waits_summary_by_user_by_event_name;
+select * from performance_schema.events_waits_summary_global_by_event_name;
+select * from performance_schema.file_instances;
+select * from performance_schema.file_summary_by_event_name;
+select * from performance_schema.file_summary_by_instance;
+select * from performance_schema.hosts;
+select * from performance_schema.mutex_instances;
+select * from performance_schema.objects_summary_global_by_type;
+select * from performance_schema.performance_timers;
+select * from performance_schema.rwlock_instances;
+select * from performance_schema.setup_actors;
+select * from performance_schema.setup_consumers;
+select * from performance_schema.setup_instruments;
+select * from performance_schema.setup_objects;
+select * from performance_schema.setup_timers;
+select * from performance_schema.table_io_waits_summary_by_index_usage;
+select * from performance_schema.table_io_waits_summary_by_table;
+select * from performance_schema.table_lock_waits_summary_by_table;
+select * from performance_schema.threads;
+select * from performance_schema.users;
+show variables like "performance_schema%";
+Variable_name	Value
+performance_schema	ON
+performance_schema_accounts_size	0
+performance_schema_events_stages_history_long_size	1000
+performance_schema_events_stages_history_size	10
+performance_schema_events_statements_history_long_size	1000
+performance_schema_events_statements_history_size	10
+performance_schema_events_waits_history_long_size	10000
+performance_schema_events_waits_history_size	10
+performance_schema_hosts_size	100
+performance_schema_max_cond_classes	80
+performance_schema_max_cond_instances	1000
+performance_schema_max_file_classes	50
+performance_schema_max_file_handles	32768
+performance_schema_max_file_instances	10000
+performance_schema_max_mutex_classes	200
+performance_schema_max_mutex_instances	5000
+performance_schema_max_rwlock_classes	30
+performance_schema_max_rwlock_instances	5000
+performance_schema_max_stage_classes	150
+performance_schema_max_statement_classes	165
+performance_schema_max_table_handles	1000
+performance_schema_max_table_instances	500
+performance_schema_max_thread_classes	50
+performance_schema_max_thread_instances	200
+performance_schema_setup_actors_size	100
+performance_schema_setup_objects_size	100
+performance_schema_users_size	100
+show engine PERFORMANCE_SCHEMA status;
+show status like "performance_schema%";
+show variables like "performance_schema_accounts_size";
+Variable_name	Value
+performance_schema_accounts_size	0
+select count(*) from performance_schema.accounts;
+count(*)
+0
+select variable_value > 0 from information_schema.global_status
+where variable_name like 'PERFORMANCE_SCHEMA_ACCOUNTS_LOST';
+variable_value > 0
+1

=== modified file 'mysql-test/suite/perfschema/r/start_server_no_cond_class.result'
--- a/mysql-test/suite/perfschema/r/start_server_no_cond_class.result	2011-07-25 18:11:52 +0000
+++ b/mysql-test/suite/perfschema/r/start_server_no_cond_class.result	2011-07-29 09:10:56 +0000
@@ -22,7 +22,10 @@ select * from performance_schema.cond_in
 select * from performance_schema.events_stages_current;
 select * from performance_schema.events_stages_history;
 select * from performance_schema.events_stages_history_long;
+select * from performance_schema.events_stages_summary_by_account_by_event_name;
+select * from performance_schema.events_stages_summary_by_host_by_event_name;
 select * from performance_schema.events_stages_summary_by_thread_by_event_name;
+select * from performance_schema.events_stages_summary_by_user_by_event_name;
 select * from performance_schema.events_stages_summary_global_by_event_name;
 select * from performance_schema.events_statements_current;
 select * from performance_schema.events_statements_history;

=== modified file 'mysql-test/suite/perfschema/r/start_server_no_cond_inst.result'
--- a/mysql-test/suite/perfschema/r/start_server_no_cond_inst.result	2011-07-25 18:11:52 +0000
+++ b/mysql-test/suite/perfschema/r/start_server_no_cond_inst.result	2011-07-29 09:10:56 +0000
@@ -22,7 +22,10 @@ select * from performance_schema.cond_in
 select * from performance_schema.events_stages_current;
 select * from performance_schema.events_stages_history;
 select * from performance_schema.events_stages_history_long;
+select * from performance_schema.events_stages_summary_by_account_by_event_name;
+select * from performance_schema.events_stages_summary_by_host_by_event_name;
 select * from performance_schema.events_stages_summary_by_thread_by_event_name;
+select * from performance_schema.events_stages_summary_by_user_by_event_name;
 select * from performance_schema.events_stages_summary_global_by_event_name;
 select * from performance_schema.events_statements_current;
 select * from performance_schema.events_statements_history;

=== modified file 'mysql-test/suite/perfschema/r/start_server_no_file_class.result'
--- a/mysql-test/suite/perfschema/r/start_server_no_file_class.result	2011-07-25 18:11:52 +0000
+++ b/mysql-test/suite/perfschema/r/start_server_no_file_class.result	2011-07-29 09:10:56 +0000
@@ -22,7 +22,10 @@ select * from performance_schema.cond_in
 select * from performance_schema.events_stages_current;
 select * from performance_schema.events_stages_history;
 select * from performance_schema.events_stages_history_long;
+select * from performance_schema.events_stages_summary_by_account_by_event_name;
+select * from performance_schema.events_stages_summary_by_host_by_event_name;
 select * from performance_schema.events_stages_summary_by_thread_by_event_name;
+select * from performance_schema.events_stages_summary_by_user_by_event_name;
 select * from performance_schema.events_stages_summary_global_by_event_name;
 select * from performance_schema.events_statements_current;
 select * from performance_schema.events_statements_history;

=== modified file 'mysql-test/suite/perfschema/r/start_server_no_file_inst.result'
--- a/mysql-test/suite/perfschema/r/start_server_no_file_inst.result	2011-07-25 18:11:52 +0000
+++ b/mysql-test/suite/perfschema/r/start_server_no_file_inst.result	2011-07-29 09:10:56 +0000
@@ -22,7 +22,10 @@ select * from performance_schema.cond_in
 select * from performance_schema.events_stages_current;
 select * from performance_schema.events_stages_history;
 select * from performance_schema.events_stages_history_long;
+select * from performance_schema.events_stages_summary_by_account_by_event_name;
+select * from performance_schema.events_stages_summary_by_host_by_event_name;
 select * from performance_schema.events_stages_summary_by_thread_by_event_name;
+select * from performance_schema.events_stages_summary_by_user_by_event_name;
 select * from performance_schema.events_stages_summary_global_by_event_name;
 select * from performance_schema.events_statements_current;
 select * from performance_schema.events_statements_history;

=== added file 'mysql-test/suite/perfschema/r/start_server_no_host.result'
--- a/mysql-test/suite/perfschema/r/start_server_no_host.result	1970-01-01 00:00:00 +0000
+++ b/mysql-test/suite/perfschema/r/start_server_no_host.result	2011-07-29 09:10:56 +0000
@@ -0,0 +1,105 @@
+show databases;
+Database
+information_schema
+mtr
+mysql
+performance_schema
+test
+select count(*) from performance_schema.performance_timers;
+count(*)
+5
+select count(*) from performance_schema.setup_consumers;
+count(*)
+11
+select count(*) > 2 from performance_schema.setup_instruments;
+count(*) > 2
+1
+select count(*) from performance_schema.setup_timers;
+count(*)
+3
+select * from performance_schema.accounts;
+select * from performance_schema.cond_instances;
+select * from performance_schema.events_stages_current;
+select * from performance_schema.events_stages_history;
+select * from performance_schema.events_stages_history_long;
+select * from performance_schema.events_stages_summary_by_account_by_event_name;
+select * from performance_schema.events_stages_summary_by_host_by_event_name;
+select * from performance_schema.events_stages_summary_by_thread_by_event_name;
+select * from performance_schema.events_stages_summary_by_user_by_event_name;
+select * from performance_schema.events_stages_summary_global_by_event_name;
+select * from performance_schema.events_statements_current;
+select * from performance_schema.events_statements_history;
+select * from performance_schema.events_statements_history_long;
+select * from performance_schema.events_statements_summary_by_account_by_event_name;
+select * from performance_schema.events_statements_summary_by_host_by_event_name;
+select * from performance_schema.events_statements_summary_by_thread_by_event_name;
+select * from performance_schema.events_statements_summary_by_user_by_event_name;
+select * from performance_schema.events_statements_summary_global_by_event_name;
+select * from performance_schema.events_waits_current;
+select * from performance_schema.events_waits_history;
+select * from performance_schema.events_waits_history_long;
+select * from performance_schema.events_waits_summary_by_account_by_event_name;
+select * from performance_schema.events_waits_summary_by_host_by_event_name;
+select * from performance_schema.events_waits_summary_by_instance;
+select * from performance_schema.events_waits_summary_by_thread_by_event_name;
+select * from performance_schema.events_waits_summary_by_user_by_event_name;
+select * from performance_schema.events_waits_summary_global_by_event_name;
+select * from performance_schema.file_instances;
+select * from performance_schema.file_summary_by_event_name;
+select * from performance_schema.file_summary_by_instance;
+select * from performance_schema.hosts;
+select * from performance_schema.mutex_instances;
+select * from performance_schema.objects_summary_global_by_type;
+select * from performance_schema.performance_timers;
+select * from performance_schema.rwlock_instances;
+select * from performance_schema.setup_actors;
+select * from performance_schema.setup_consumers;
+select * from performance_schema.setup_instruments;
+select * from performance_schema.setup_objects;
+select * from performance_schema.setup_timers;
+select * from performance_schema.table_io_waits_summary_by_index_usage;
+select * from performance_schema.table_io_waits_summary_by_table;
+select * from performance_schema.table_lock_waits_summary_by_table;
+select * from performance_schema.threads;
+select * from performance_schema.users;
+show variables like "performance_schema%";
+Variable_name	Value
+performance_schema	ON
+performance_schema_accounts_size	100
+performance_schema_events_stages_history_long_size	1000
+performance_schema_events_stages_history_size	10
+performance_schema_events_statements_history_long_size	1000
+performance_schema_events_statements_history_size	10
+performance_schema_events_waits_history_long_size	10000
+performance_schema_events_waits_history_size	10
+performance_schema_hosts_size	0
+performance_schema_max_cond_classes	80
+performance_schema_max_cond_instances	1000
+performance_schema_max_file_classes	50
+performance_schema_max_file_handles	32768
+performance_schema_max_file_instances	10000
+performance_schema_max_mutex_classes	200
+performance_schema_max_mutex_instances	5000
+performance_schema_max_rwlock_classes	30
+performance_schema_max_rwlock_instances	5000
+performance_schema_max_stage_classes	150
+performance_schema_max_statement_classes	165
+performance_schema_max_table_handles	1000
+performance_schema_max_table_instances	500
+performance_schema_max_thread_classes	50
+performance_schema_max_thread_instances	200
+performance_schema_setup_actors_size	100
+performance_schema_setup_objects_size	100
+performance_schema_users_size	100
+show engine PERFORMANCE_SCHEMA status;
+show status like "performance_schema%";
+show variables like "performance_schema_hosts_size";
+Variable_name	Value
+performance_schema_hosts_size	0
+select count(*) from performance_schema.hosts;
+count(*)
+0
+select variable_value > 0 from information_schema.global_status
+where variable_name like 'PERFORMANCE_SCHEMA_HOSTS_LOST';
+variable_value > 0
+1

=== modified file 'mysql-test/suite/perfschema/r/start_server_no_mutex_class.result'
--- a/mysql-test/suite/perfschema/r/start_server_no_mutex_class.result	2011-07-25 18:11:52 +0000
+++ b/mysql-test/suite/perfschema/r/start_server_no_mutex_class.result	2011-07-29 09:10:56 +0000
@@ -22,7 +22,10 @@ select * from performance_schema.cond_in
 select * from performance_schema.events_stages_current;
 select * from performance_schema.events_stages_history;
 select * from performance_schema.events_stages_history_long;
+select * from performance_schema.events_stages_summary_by_account_by_event_name;
+select * from performance_schema.events_stages_summary_by_host_by_event_name;
 select * from performance_schema.events_stages_summary_by_thread_by_event_name;
+select * from performance_schema.events_stages_summary_by_user_by_event_name;
 select * from performance_schema.events_stages_summary_global_by_event_name;
 select * from performance_schema.events_statements_current;
 select * from performance_schema.events_statements_history;

=== modified file 'mysql-test/suite/perfschema/r/start_server_no_mutex_inst.result'
--- a/mysql-test/suite/perfschema/r/start_server_no_mutex_inst.result	2011-07-25 18:11:52 +0000
+++ b/mysql-test/suite/perfschema/r/start_server_no_mutex_inst.result	2011-07-29 09:10:56 +0000
@@ -22,7 +22,10 @@ select * from performance_schema.cond_in
 select * from performance_schema.events_stages_current;
 select * from performance_schema.events_stages_history;
 select * from performance_schema.events_stages_history_long;
+select * from performance_schema.events_stages_summary_by_account_by_event_name;
+select * from performance_schema.events_stages_summary_by_host_by_event_name;
 select * from performance_schema.events_stages_summary_by_thread_by_event_name;
+select * from performance_schema.events_stages_summary_by_user_by_event_name;
 select * from performance_schema.events_stages_summary_global_by_event_name;
 select * from performance_schema.events_statements_current;
 select * from performance_schema.events_statements_history;

=== modified file 'mysql-test/suite/perfschema/r/start_server_no_rwlock_class.result'
--- a/mysql-test/suite/perfschema/r/start_server_no_rwlock_class.result	2011-07-25 18:11:52 +0000
+++ b/mysql-test/suite/perfschema/r/start_server_no_rwlock_class.result	2011-07-29 09:10:56 +0000
@@ -22,7 +22,10 @@ select * from performance_schema.cond_in
 select * from performance_schema.events_stages_current;
 select * from performance_schema.events_stages_history;
 select * from performance_schema.events_stages_history_long;
+select * from performance_schema.events_stages_summary_by_account_by_event_name;
+select * from performance_schema.events_stages_summary_by_host_by_event_name;
 select * from performance_schema.events_stages_summary_by_thread_by_event_name;
+select * from performance_schema.events_stages_summary_by_user_by_event_name;
 select * from performance_schema.events_stages_summary_global_by_event_name;
 select * from performance_schema.events_statements_current;
 select * from performance_schema.events_statements_history;

=== modified file 'mysql-test/suite/perfschema/r/start_server_no_rwlock_inst.result'
--- a/mysql-test/suite/perfschema/r/start_server_no_rwlock_inst.result	2011-07-25 18:11:52 +0000
+++ b/mysql-test/suite/perfschema/r/start_server_no_rwlock_inst.result	2011-07-29 09:10:56 +0000
@@ -22,7 +22,10 @@ select * from performance_schema.cond_in
 select * from performance_schema.events_stages_current;
 select * from performance_schema.events_stages_history;
 select * from performance_schema.events_stages_history_long;
+select * from performance_schema.events_stages_summary_by_account_by_event_name;
+select * from performance_schema.events_stages_summary_by_host_by_event_name;
 select * from performance_schema.events_stages_summary_by_thread_by_event_name;
+select * from performance_schema.events_stages_summary_by_user_by_event_name;
 select * from performance_schema.events_stages_summary_global_by_event_name;
 select * from performance_schema.events_statements_current;
 select * from performance_schema.events_statements_history;

=== modified file 'mysql-test/suite/perfschema/r/start_server_no_setup_actors.result'
--- a/mysql-test/suite/perfschema/r/start_server_no_setup_actors.result	2011-07-25 18:11:52 +0000
+++ b/mysql-test/suite/perfschema/r/start_server_no_setup_actors.result	2011-07-29 09:10:56 +0000
@@ -22,7 +22,10 @@ select * from performance_schema.cond_in
 select * from performance_schema.events_stages_current;
 select * from performance_schema.events_stages_history;
 select * from performance_schema.events_stages_history_long;
+select * from performance_schema.events_stages_summary_by_account_by_event_name;
+select * from performance_schema.events_stages_summary_by_host_by_event_name;
 select * from performance_schema.events_stages_summary_by_thread_by_event_name;
+select * from performance_schema.events_stages_summary_by_user_by_event_name;
 select * from performance_schema.events_stages_summary_global_by_event_name;
 select * from performance_schema.events_statements_current;
 select * from performance_schema.events_statements_history;

=== modified file 'mysql-test/suite/perfschema/r/start_server_no_setup_objects.result'
--- a/mysql-test/suite/perfschema/r/start_server_no_setup_objects.result	2011-07-25 18:11:52 +0000
+++ b/mysql-test/suite/perfschema/r/start_server_no_setup_objects.result	2011-07-29 09:10:56 +0000
@@ -22,7 +22,10 @@ select * from performance_schema.cond_in
 select * from performance_schema.events_stages_current;
 select * from performance_schema.events_stages_history;
 select * from performance_schema.events_stages_history_long;
+select * from performance_schema.events_stages_summary_by_account_by_event_name;
+select * from performance_schema.events_stages_summary_by_host_by_event_name;
 select * from performance_schema.events_stages_summary_by_thread_by_event_name;
+select * from performance_schema.events_stages_summary_by_user_by_event_name;
 select * from performance_schema.events_stages_summary_global_by_event_name;
 select * from performance_schema.events_statements_current;
 select * from performance_schema.events_statements_history;

=== modified file 'mysql-test/suite/perfschema/r/start_server_no_stage_class.result'
--- a/mysql-test/suite/perfschema/r/start_server_no_stage_class.result	2011-05-07 04:28:13 +0000
+++ b/mysql-test/suite/perfschema/r/start_server_no_stage_class.result	2011-07-29 09:10:56 +0000
@@ -22,7 +22,10 @@ select * from performance_schema.cond_in
 select * from performance_schema.events_stages_current;
 select * from performance_schema.events_stages_history;
 select * from performance_schema.events_stages_history_long;
+select * from performance_schema.events_stages_summary_by_account_by_event_name;
+select * from performance_schema.events_stages_summary_by_host_by_event_name;
 select * from performance_schema.events_stages_summary_by_thread_by_event_name;
+select * from performance_schema.events_stages_summary_by_user_by_event_name;
 select * from performance_schema.events_stages_summary_global_by_event_name;
 select * from performance_schema.events_statements_current;
 select * from performance_schema.events_statements_history;

=== modified file 'mysql-test/suite/perfschema/r/start_server_no_stages_history.result'
--- a/mysql-test/suite/perfschema/r/start_server_no_stages_history.result	2011-07-25 18:11:52 +0000
+++ b/mysql-test/suite/perfschema/r/start_server_no_stages_history.result	2011-07-29 09:10:56 +0000
@@ -22,7 +22,10 @@ select * from performance_schema.cond_in
 select * from performance_schema.events_stages_current;
 select * from performance_schema.events_stages_history;
 select * from performance_schema.events_stages_history_long;
+select * from performance_schema.events_stages_summary_by_account_by_event_name;
+select * from performance_schema.events_stages_summary_by_host_by_event_name;
 select * from performance_schema.events_stages_summary_by_thread_by_event_name;
+select * from performance_schema.events_stages_summary_by_user_by_event_name;
 select * from performance_schema.events_stages_summary_global_by_event_name;
 select * from performance_schema.events_statements_current;
 select * from performance_schema.events_statements_history;

=== modified file 'mysql-test/suite/perfschema/r/start_server_no_stages_history_long.result'
--- a/mysql-test/suite/perfschema/r/start_server_no_stages_history_long.result	2011-07-25 18:11:52 +0000
+++ b/mysql-test/suite/perfschema/r/start_server_no_stages_history_long.result	2011-07-29 09:10:56 +0000
@@ -22,7 +22,10 @@ select * from performance_schema.cond_in
 select * from performance_schema.events_stages_current;
 select * from performance_schema.events_stages_history;
 select * from performance_schema.events_stages_history_long;
+select * from performance_schema.events_stages_summary_by_account_by_event_name;
+select * from performance_schema.events_stages_summary_by_host_by_event_name;
 select * from performance_schema.events_stages_summary_by_thread_by_event_name;
+select * from performance_schema.events_stages_summary_by_user_by_event_name;
 select * from performance_schema.events_stages_summary_global_by_event_name;
 select * from performance_schema.events_statements_current;
 select * from performance_schema.events_statements_history;

=== modified file 'mysql-test/suite/perfschema/r/start_server_no_statement_class.result'
--- a/mysql-test/suite/perfschema/r/start_server_no_statement_class.result	2011-07-25 18:11:52 +0000
+++ b/mysql-test/suite/perfschema/r/start_server_no_statement_class.result	2011-07-29 09:10:56 +0000
@@ -22,7 +22,10 @@ select * from performance_schema.cond_in
 select * from performance_schema.events_stages_current;
 select * from performance_schema.events_stages_history;
 select * from performance_schema.events_stages_history_long;
+select * from performance_schema.events_stages_summary_by_account_by_event_name;
+select * from performance_schema.events_stages_summary_by_host_by_event_name;
 select * from performance_schema.events_stages_summary_by_thread_by_event_name;
+select * from performance_schema.events_stages_summary_by_user_by_event_name;
 select * from performance_schema.events_stages_summary_global_by_event_name;
 select * from performance_schema.events_statements_current;
 select * from performance_schema.events_statements_history;

=== modified file 'mysql-test/suite/perfschema/r/start_server_no_statements_history.result'
--- a/mysql-test/suite/perfschema/r/start_server_no_statements_history.result	2011-07-25 18:11:52 +0000
+++ b/mysql-test/suite/perfschema/r/start_server_no_statements_history.result	2011-07-29 09:10:56 +0000
@@ -22,7 +22,10 @@ select * from performance_schema.cond_in
 select * from performance_schema.events_stages_current;
 select * from performance_schema.events_stages_history;
 select * from performance_schema.events_stages_history_long;
+select * from performance_schema.events_stages_summary_by_account_by_event_name;
+select * from performance_schema.events_stages_summary_by_host_by_event_name;
 select * from performance_schema.events_stages_summary_by_thread_by_event_name;
+select * from performance_schema.events_stages_summary_by_user_by_event_name;
 select * from performance_schema.events_stages_summary_global_by_event_name;
 select * from performance_schema.events_statements_current;
 select * from performance_schema.events_statements_history;

=== modified file 'mysql-test/suite/perfschema/r/start_server_no_statements_history_long.result'
--- a/mysql-test/suite/perfschema/r/start_server_no_statements_history_long.result	2011-07-25 18:11:52 +0000
+++ b/mysql-test/suite/perfschema/r/start_server_no_statements_history_long.result	2011-07-29 09:10:56 +0000
@@ -22,7 +22,10 @@ select * from performance_schema.cond_in
 select * from performance_schema.events_stages_current;
 select * from performance_schema.events_stages_history;
 select * from performance_schema.events_stages_history_long;
+select * from performance_schema.events_stages_summary_by_account_by_event_name;
+select * from performance_schema.events_stages_summary_by_host_by_event_name;
 select * from performance_schema.events_stages_summary_by_thread_by_event_name;
+select * from performance_schema.events_stages_summary_by_user_by_event_name;
 select * from performance_schema.events_stages_summary_global_by_event_name;
 select * from performance_schema.events_statements_current;
 select * from performance_schema.events_statements_history;

=== modified file 'mysql-test/suite/perfschema/r/start_server_no_table_hdl.result'
--- a/mysql-test/suite/perfschema/r/start_server_no_table_hdl.result	2011-07-25 18:11:52 +0000
+++ b/mysql-test/suite/perfschema/r/start_server_no_table_hdl.result	2011-07-29 09:10:56 +0000
@@ -22,7 +22,10 @@ select * from performance_schema.cond_in
 select * from performance_schema.events_stages_current;
 select * from performance_schema.events_stages_history;
 select * from performance_schema.events_stages_history_long;
+select * from performance_schema.events_stages_summary_by_account_by_event_name;
+select * from performance_schema.events_stages_summary_by_host_by_event_name;
 select * from performance_schema.events_stages_summary_by_thread_by_event_name;
+select * from performance_schema.events_stages_summary_by_user_by_event_name;
 select * from performance_schema.events_stages_summary_global_by_event_name;
 select * from performance_schema.events_statements_current;
 select * from performance_schema.events_statements_history;

=== modified file 'mysql-test/suite/perfschema/r/start_server_no_table_inst.result'
--- a/mysql-test/suite/perfschema/r/start_server_no_table_inst.result	2011-07-25 18:11:52 +0000
+++ b/mysql-test/suite/perfschema/r/start_server_no_table_inst.result	2011-07-29 09:10:56 +0000
@@ -22,7 +22,10 @@ select * from performance_schema.cond_in
 select * from performance_schema.events_stages_current;
 select * from performance_schema.events_stages_history;
 select * from performance_schema.events_stages_history_long;
+select * from performance_schema.events_stages_summary_by_account_by_event_name;
+select * from performance_schema.events_stages_summary_by_host_by_event_name;
 select * from performance_schema.events_stages_summary_by_thread_by_event_name;
+select * from performance_schema.events_stages_summary_by_user_by_event_name;
 select * from performance_schema.events_stages_summary_global_by_event_name;
 select * from performance_schema.events_statements_current;
 select * from performance_schema.events_statements_history;

=== modified file 'mysql-test/suite/perfschema/r/start_server_no_thread_class.result'
--- a/mysql-test/suite/perfschema/r/start_server_no_thread_class.result	2011-07-25 18:11:52 +0000
+++ b/mysql-test/suite/perfschema/r/start_server_no_thread_class.result	2011-07-29 09:10:56 +0000
@@ -22,7 +22,10 @@ select * from performance_schema.cond_in
 select * from performance_schema.events_stages_current;
 select * from performance_schema.events_stages_history;
 select * from performance_schema.events_stages_history_long;
+select * from performance_schema.events_stages_summary_by_account_by_event_name;
+select * from performance_schema.events_stages_summary_by_host_by_event_name;
 select * from performance_schema.events_stages_summary_by_thread_by_event_name;
+select * from performance_schema.events_stages_summary_by_user_by_event_name;
 select * from performance_schema.events_stages_summary_global_by_event_name;
 select * from performance_schema.events_statements_current;
 select * from performance_schema.events_statements_history;

=== modified file 'mysql-test/suite/perfschema/r/start_server_no_thread_inst.result'
--- a/mysql-test/suite/perfschema/r/start_server_no_thread_inst.result	2011-07-25 18:11:52 +0000
+++ b/mysql-test/suite/perfschema/r/start_server_no_thread_inst.result	2011-07-29 09:10:56 +0000
@@ -22,7 +22,10 @@ select * from performance_schema.cond_in
 select * from performance_schema.events_stages_current;
 select * from performance_schema.events_stages_history;
 select * from performance_schema.events_stages_history_long;
+select * from performance_schema.events_stages_summary_by_account_by_event_name;
+select * from performance_schema.events_stages_summary_by_host_by_event_name;
 select * from performance_schema.events_stages_summary_by_thread_by_event_name;
+select * from performance_schema.events_stages_summary_by_user_by_event_name;
 select * from performance_schema.events_stages_summary_global_by_event_name;
 select * from performance_schema.events_statements_current;
 select * from performance_schema.events_statements_history;

=== added file 'mysql-test/suite/perfschema/r/start_server_no_user.result'
--- a/mysql-test/suite/perfschema/r/start_server_no_user.result	1970-01-01 00:00:00 +0000
+++ b/mysql-test/suite/perfschema/r/start_server_no_user.result	2011-07-29 09:10:56 +0000
@@ -0,0 +1,105 @@
+show databases;
+Database
+information_schema
+mtr
+mysql
+performance_schema
+test
+select count(*) from performance_schema.performance_timers;
+count(*)
+5
+select count(*) from performance_schema.setup_consumers;
+count(*)
+11
+select count(*) > 2 from performance_schema.setup_instruments;
+count(*) > 2
+1
+select count(*) from performance_schema.setup_timers;
+count(*)
+3
+select * from performance_schema.accounts;
+select * from performance_schema.cond_instances;
+select * from performance_schema.events_stages_current;
+select * from performance_schema.events_stages_history;
+select * from performance_schema.events_stages_history_long;
+select * from performance_schema.events_stages_summary_by_account_by_event_name;
+select * from performance_schema.events_stages_summary_by_host_by_event_name;
+select * from performance_schema.events_stages_summary_by_thread_by_event_name;
+select * from performance_schema.events_stages_summary_by_user_by_event_name;
+select * from performance_schema.events_stages_summary_global_by_event_name;
+select * from performance_schema.events_statements_current;
+select * from performance_schema.events_statements_history;
+select * from performance_schema.events_statements_history_long;
+select * from performance_schema.events_statements_summary_by_account_by_event_name;
+select * from performance_schema.events_statements_summary_by_host_by_event_name;
+select * from performance_schema.events_statements_summary_by_thread_by_event_name;
+select * from performance_schema.events_statements_summary_by_user_by_event_name;
+select * from performance_schema.events_statements_summary_global_by_event_name;
+select * from performance_schema.events_waits_current;
+select * from performance_schema.events_waits_history;
+select * from performance_schema.events_waits_history_long;
+select * from performance_schema.events_waits_summary_by_account_by_event_name;
+select * from performance_schema.events_waits_summary_by_host_by_event_name;
+select * from performance_schema.events_waits_summary_by_instance;
+select * from performance_schema.events_waits_summary_by_thread_by_event_name;
+select * from performance_schema.events_waits_summary_by_user_by_event_name;
+select * from performance_schema.events_waits_summary_global_by_event_name;
+select * from performance_schema.file_instances;
+select * from performance_schema.file_summary_by_event_name;
+select * from performance_schema.file_summary_by_instance;
+select * from performance_schema.hosts;
+select * from performance_schema.mutex_instances;
+select * from performance_schema.objects_summary_global_by_type;
+select * from performance_schema.performance_timers;
+select * from performance_schema.rwlock_instances;
+select * from performance_schema.setup_actors;
+select * from performance_schema.setup_consumers;
+select * from performance_schema.setup_instruments;
+select * from performance_schema.setup_objects;
+select * from performance_schema.setup_timers;
+select * from performance_schema.table_io_waits_summary_by_index_usage;
+select * from performance_schema.table_io_waits_summary_by_table;
+select * from performance_schema.table_lock_waits_summary_by_table;
+select * from performance_schema.threads;
+select * from performance_schema.users;
+show variables like "performance_schema%";
+Variable_name	Value
+performance_schema	ON
+performance_schema_accounts_size	100
+performance_schema_events_stages_history_long_size	1000
+performance_schema_events_stages_history_size	10
+performance_schema_events_statements_history_long_size	1000
+performance_schema_events_statements_history_size	10
+performance_schema_events_waits_history_long_size	10000
+performance_schema_events_waits_history_size	10
+performance_schema_hosts_size	100
+performance_schema_max_cond_classes	80
+performance_schema_max_cond_instances	1000
+performance_schema_max_file_classes	50
+performance_schema_max_file_handles	32768
+performance_schema_max_file_instances	10000
+performance_schema_max_mutex_classes	200
+performance_schema_max_mutex_instances	5000
+performance_schema_max_rwlock_classes	30
+performance_schema_max_rwlock_instances	5000
+performance_schema_max_stage_classes	150
+performance_schema_max_statement_classes	165
+performance_schema_max_table_handles	1000
+performance_schema_max_table_instances	500
+performance_schema_max_thread_classes	50
+performance_schema_max_thread_instances	200
+performance_schema_setup_actors_size	100
+performance_schema_setup_objects_size	100
+performance_schema_users_size	0
+show engine PERFORMANCE_SCHEMA status;
+show status like "performance_schema%";
+show variables like "performance_schema_users_size";
+Variable_name	Value
+performance_schema_users_size	0
+select count(*) from performance_schema.users;
+count(*)
+0
+select variable_value > 0 from information_schema.global_status
+where variable_name like 'PERFORMANCE_SCHEMA_USERS_LOST';
+variable_value > 0
+1

=== added file 'mysql-test/suite/perfschema/r/start_server_no_waits_history.result'
--- a/mysql-test/suite/perfschema/r/start_server_no_waits_history.result	1970-01-01 00:00:00 +0000
+++ b/mysql-test/suite/perfschema/r/start_server_no_waits_history.result	2011-07-29 09:10:56 +0000
@@ -0,0 +1,102 @@
+show databases;
+Database
+information_schema
+mtr
+mysql
+performance_schema
+test
+select count(*) from performance_schema.performance_timers;
+count(*)
+5
+select count(*) from performance_schema.setup_consumers;
+count(*)
+11
+select count(*) > 2 from performance_schema.setup_instruments;
+count(*) > 2
+1
+select count(*) from performance_schema.setup_timers;
+count(*)
+3
+select * from performance_schema.accounts;
+select * from performance_schema.cond_instances;
+select * from performance_schema.events_stages_current;
+select * from performance_schema.events_stages_history;
+select * from performance_schema.events_stages_history_long;
+select * from performance_schema.events_stages_summary_by_account_by_event_name;
+select * from performance_schema.events_stages_summary_by_host_by_event_name;
+select * from performance_schema.events_stages_summary_by_thread_by_event_name;
+select * from performance_schema.events_stages_summary_by_user_by_event_name;
+select * from performance_schema.events_stages_summary_global_by_event_name;
+select * from performance_schema.events_statements_current;
+select * from performance_schema.events_statements_history;
+select * from performance_schema.events_statements_history_long;
+select * from performance_schema.events_statements_summary_by_account_by_event_name;
+select * from performance_schema.events_statements_summary_by_host_by_event_name;
+select * from performance_schema.events_statements_summary_by_thread_by_event_name;
+select * from performance_schema.events_statements_summary_by_user_by_event_name;
+select * from performance_schema.events_statements_summary_global_by_event_name;
+select * from performance_schema.events_waits_current;
+select * from performance_schema.events_waits_history;
+select * from performance_schema.events_waits_history_long;
+select * from performance_schema.events_waits_summary_by_account_by_event_name;
+select * from performance_schema.events_waits_summary_by_host_by_event_name;
+select * from performance_schema.events_waits_summary_by_instance;
+select * from performance_schema.events_waits_summary_by_thread_by_event_name;
+select * from performance_schema.events_waits_summary_by_user_by_event_name;
+select * from performance_schema.events_waits_summary_global_by_event_name;
+select * from performance_schema.file_instances;
+select * from performance_schema.file_summary_by_event_name;
+select * from performance_schema.file_summary_by_instance;
+select * from performance_schema.hosts;
+select * from performance_schema.mutex_instances;
+select * from performance_schema.objects_summary_global_by_type;
+select * from performance_schema.performance_timers;
+select * from performance_schema.rwlock_instances;
+select * from performance_schema.setup_actors;
+select * from performance_schema.setup_consumers;
+select * from performance_schema.setup_instruments;
+select * from performance_schema.setup_objects;
+select * from performance_schema.setup_timers;
+select * from performance_schema.table_io_waits_summary_by_index_usage;
+select * from performance_schema.table_io_waits_summary_by_table;
+select * from performance_schema.table_lock_waits_summary_by_table;
+select * from performance_schema.threads;
+select * from performance_schema.users;
+show variables like "performance_schema%";
+Variable_name	Value
+performance_schema	ON
+performance_schema_accounts_size	100
+performance_schema_events_stages_history_long_size	1000
+performance_schema_events_stages_history_size	10
+performance_schema_events_statements_history_long_size	1000
+performance_schema_events_statements_history_size	10
+performance_schema_events_waits_history_long_size	10000
+performance_schema_events_waits_history_size	0
+performance_schema_hosts_size	100
+performance_schema_max_cond_classes	80
+performance_schema_max_cond_instances	1000
+performance_schema_max_file_classes	50
+performance_schema_max_file_handles	32768
+performance_schema_max_file_instances	10000
+performance_schema_max_mutex_classes	200
+performance_schema_max_mutex_instances	5000
+performance_schema_max_rwlock_classes	30
+performance_schema_max_rwlock_instances	5000
+performance_schema_max_stage_classes	150
+performance_schema_max_statement_classes	165
+performance_schema_max_table_handles	1000
+performance_schema_max_table_instances	500
+performance_schema_max_thread_classes	50
+performance_schema_max_thread_instances	200
+performance_schema_setup_actors_size	100
+performance_schema_setup_objects_size	100
+performance_schema_users_size	100
+show engine PERFORMANCE_SCHEMA status;
+show status like "performance_schema%";
+show variables like "performance_schema_events_waits_history_size";
+Variable_name	Value
+performance_schema_events_waits_history_size	0
+select count(*) from performance_schema.events_waits_history;
+count(*)
+0
+truncate table performance_schema.events_waits_history;

=== added file 'mysql-test/suite/perfschema/r/start_server_no_waits_history_long.result'
--- a/mysql-test/suite/perfschema/r/start_server_no_waits_history_long.result	1970-01-01 00:00:00 +0000
+++ b/mysql-test/suite/perfschema/r/start_server_no_waits_history_long.result	2011-07-29 09:10:56 +0000
@@ -0,0 +1,102 @@
+show databases;
+Database
+information_schema
+mtr
+mysql
+performance_schema
+test
+select count(*) from performance_schema.performance_timers;
+count(*)
+5
+select count(*) from performance_schema.setup_consumers;
+count(*)
+11
+select count(*) > 2 from performance_schema.setup_instruments;
+count(*) > 2
+1
+select count(*) from performance_schema.setup_timers;
+count(*)
+3
+select * from performance_schema.accounts;
+select * from performance_schema.cond_instances;
+select * from performance_schema.events_stages_current;
+select * from performance_schema.events_stages_history;
+select * from performance_schema.events_stages_history_long;
+select * from performance_schema.events_stages_summary_by_account_by_event_name;
+select * from performance_schema.events_stages_summary_by_host_by_event_name;
+select * from performance_schema.events_stages_summary_by_thread_by_event_name;
+select * from performance_schema.events_stages_summary_by_user_by_event_name;
+select * from performance_schema.events_stages_summary_global_by_event_name;
+select * from performance_schema.events_statements_current;
+select * from performance_schema.events_statements_history;
+select * from performance_schema.events_statements_history_long;
+select * from performance_schema.events_statements_summary_by_account_by_event_name;
+select * from performance_schema.events_statements_summary_by_host_by_event_name;
+select * from performance_schema.events_statements_summary_by_thread_by_event_name;
+select * from performance_schema.events_statements_summary_by_user_by_event_name;
+select * from performance_schema.events_statements_summary_global_by_event_name;
+select * from performance_schema.events_waits_current;
+select * from performance_schema.events_waits_history;
+select * from performance_schema.events_waits_history_long;
+select * from performance_schema.events_waits_summary_by_account_by_event_name;
+select * from performance_schema.events_waits_summary_by_host_by_event_name;
+select * from performance_schema.events_waits_summary_by_instance;
+select * from performance_schema.events_waits_summary_by_thread_by_event_name;
+select * from performance_schema.events_waits_summary_by_user_by_event_name;
+select * from performance_schema.events_waits_summary_global_by_event_name;
+select * from performance_schema.file_instances;
+select * from performance_schema.file_summary_by_event_name;
+select * from performance_schema.file_summary_by_instance;
+select * from performance_schema.hosts;
+select * from performance_schema.mutex_instances;
+select * from performance_schema.objects_summary_global_by_type;
+select * from performance_schema.performance_timers;
+select * from performance_schema.rwlock_instances;
+select * from performance_schema.setup_actors;
+select * from performance_schema.setup_consumers;
+select * from performance_schema.setup_instruments;
+select * from performance_schema.setup_objects;
+select * from performance_schema.setup_timers;
+select * from performance_schema.table_io_waits_summary_by_index_usage;
+select * from performance_schema.table_io_waits_summary_by_table;
+select * from performance_schema.table_lock_waits_summary_by_table;
+select * from performance_schema.threads;
+select * from performance_schema.users;
+show variables like "performance_schema%";
+Variable_name	Value
+performance_schema	ON
+performance_schema_accounts_size	100
+performance_schema_events_stages_history_long_size	1000
+performance_schema_events_stages_history_size	10
+performance_schema_events_statements_history_long_size	1000
+performance_schema_events_statements_history_size	10
+performance_schema_events_waits_history_long_size	0
+performance_schema_events_waits_history_size	10
+performance_schema_hosts_size	100
+performance_schema_max_cond_classes	80
+performance_schema_max_cond_instances	1000
+performance_schema_max_file_classes	50
+performance_schema_max_file_handles	32768
+performance_schema_max_file_instances	10000
+performance_schema_max_mutex_classes	200
+performance_schema_max_mutex_instances	5000
+performance_schema_max_rwlock_classes	30
+performance_schema_max_rwlock_instances	5000
+performance_schema_max_stage_classes	150
+performance_schema_max_statement_classes	165
+performance_schema_max_table_handles	1000
+performance_schema_max_table_instances	500
+performance_schema_max_thread_classes	50
+performance_schema_max_thread_instances	200
+performance_schema_setup_actors_size	100
+performance_schema_setup_objects_size	100
+performance_schema_users_size	100
+show engine PERFORMANCE_SCHEMA status;
+show status like "performance_schema%";
+show variables like "performance_schema_events_waits_history_long_size";
+Variable_name	Value
+performance_schema_events_waits_history_long_size	0
+select count(*) from performance_schema.events_waits_history_long;
+count(*)
+0
+truncate table performance_schema.events_waits_history_long;

=== modified file 'mysql-test/suite/perfschema/r/start_server_nothing.result'
--- a/mysql-test/suite/perfschema/r/start_server_nothing.result	2011-07-18 09:49:22 +0000
+++ b/mysql-test/suite/perfschema/r/start_server_nothing.result	2011-07-29 09:10:56 +0000
@@ -22,7 +22,10 @@ select * from performance_schema.cond_in
 select * from performance_schema.events_stages_current;
 select * from performance_schema.events_stages_history;
 select * from performance_schema.events_stages_history_long;
+select * from performance_schema.events_stages_summary_by_account_by_event_name;
+select * from performance_schema.events_stages_summary_by_host_by_event_name;
 select * from performance_schema.events_stages_summary_by_thread_by_event_name;
+select * from performance_schema.events_stages_summary_by_user_by_event_name;
 select * from performance_schema.events_stages_summary_global_by_event_name;
 select * from performance_schema.events_statements_current;
 select * from performance_schema.events_statements_history;

=== modified file 'mysql-test/suite/perfschema/r/start_server_off.result'
--- a/mysql-test/suite/perfschema/r/start_server_off.result	2011-07-25 18:11:52 +0000
+++ b/mysql-test/suite/perfschema/r/start_server_off.result	2011-07-29 09:10:56 +0000
@@ -22,7 +22,10 @@ select * from performance_schema.cond_in
 select * from performance_schema.events_stages_current;
 select * from performance_schema.events_stages_history;
 select * from performance_schema.events_stages_history_long;
+select * from performance_schema.events_stages_summary_by_account_by_event_name;
+select * from performance_schema.events_stages_summary_by_host_by_event_name;
 select * from performance_schema.events_stages_summary_by_thread_by_event_name;
+select * from performance_schema.events_stages_summary_by_user_by_event_name;
 select * from performance_schema.events_stages_summary_global_by_event_name;
 select * from performance_schema.events_statements_current;
 select * from performance_schema.events_statements_history;

=== modified file 'mysql-test/suite/perfschema/r/start_server_on.result'
--- a/mysql-test/suite/perfschema/r/start_server_on.result	2011-07-25 18:11:52 +0000
+++ b/mysql-test/suite/perfschema/r/start_server_on.result	2011-07-29 09:10:56 +0000
@@ -22,7 +22,10 @@ select * from performance_schema.cond_in
 select * from performance_schema.events_stages_current;
 select * from performance_schema.events_stages_history;
 select * from performance_schema.events_stages_history_long;
+select * from performance_schema.events_stages_summary_by_account_by_event_name;
+select * from performance_schema.events_stages_summary_by_host_by_event_name;
 select * from performance_schema.events_stages_summary_by_thread_by_event_name;
+select * from performance_schema.events_stages_summary_by_user_by_event_name;
 select * from performance_schema.events_stages_summary_global_by_event_name;
 select * from performance_schema.events_statements_current;
 select * from performance_schema.events_statements_history;

=== modified file 'mysql-test/suite/perfschema/t/checksum.test'
--- a/mysql-test/suite/perfschema/t/checksum.test	2011-02-15 14:31:13 +0000
+++ b/mysql-test/suite/perfschema/t/checksum.test	2011-07-29 09:10:56 +0000
@@ -24,67 +24,97 @@
 #
 --disable_result_log
 
+checksum table performance_schema.accounts;
 checksum table performance_schema.cond_instances;
 checksum table performance_schema.events_stages_current;
 checksum table performance_schema.events_stages_history;
 checksum table performance_schema.events_stages_history_long;
+checksum table performance_schema.events_stages_summary_by_account_by_event_name;
+checksum table performance_schema.events_stages_summary_by_host_by_event_name;
 checksum table performance_schema.events_stages_summary_by_thread_by_event_name;
+checksum table performance_schema.events_stages_summary_by_user_by_event_name;
 checksum table performance_schema.events_stages_summary_global_by_event_name;
 checksum table performance_schema.events_statements_current;
 checksum table performance_schema.events_statements_history;
 checksum table performance_schema.events_statements_history_long;
+checksum table performance_schema.events_statements_summary_by_account_by_event_name;
+checksum table performance_schema.events_statements_summary_by_host_by_event_name;
 checksum table performance_schema.events_statements_summary_by_thread_by_event_name;
+checksum table performance_schema.events_statements_summary_by_user_by_event_name;
 checksum table performance_schema.events_statements_summary_global_by_event_name;
 checksum table performance_schema.events_waits_current;
 checksum table performance_schema.events_waits_history;
 checksum table performance_schema.events_waits_history_long;
+checksum table performance_schema.events_waits_summary_by_account_by_event_name;
+checksum table performance_schema.events_waits_summary_by_host_by_event_name;
 checksum table performance_schema.events_waits_summary_by_instance;
 checksum table performance_schema.events_waits_summary_by_thread_by_event_name;
+checksum table performance_schema.events_waits_summary_by_user_by_event_name;
 checksum table performance_schema.events_waits_summary_global_by_event_name;
 checksum table performance_schema.file_instances;
 checksum table performance_schema.file_summary_by_event_name;
 checksum table performance_schema.file_summary_by_instance;
+checksum table performance_schema.hosts;
 checksum table performance_schema.mutex_instances;
+checksum table performance_schema.objects_summary_global_by_type;
 checksum table performance_schema.performance_timers;
 checksum table performance_schema.rwlock_instances;
+checksum table performance_schema.setup_actors;
 checksum table performance_schema.setup_consumers;
 checksum table performance_schema.setup_instruments;
+checksum table performance_schema.setup_objects;
 checksum table performance_schema.setup_timers;
-checksum table performance_schema.table_io_waits_summary_by_index;
+checksum table performance_schema.table_io_waits_summary_by_index_usage;
 checksum table performance_schema.table_io_waits_summary_by_table;
 checksum table performance_schema.table_lock_waits_summary_by_table;
 checksum table performance_schema.threads;
+checksum table performance_schema.users;
 
+checksum table performance_schema.accounts extended;
 checksum table performance_schema.cond_instances extended;
 checksum table performance_schema.events_stages_current extended;
 checksum table performance_schema.events_stages_history extended;
 checksum table performance_schema.events_stages_history_long extended;
+checksum table performance_schema.events_stages_summary_by_account_by_event_name extended;
+checksum table performance_schema.events_stages_summary_by_host_by_event_name extended;
 checksum table performance_schema.events_stages_summary_by_thread_by_event_name extended;
+checksum table performance_schema.events_stages_summary_by_user_by_event_name extended;
 checksum table performance_schema.events_stages_summary_global_by_event_name extended;
 checksum table performance_schema.events_statements_current extended;
 checksum table performance_schema.events_statements_history extended;
 checksum table performance_schema.events_statements_history_long extended;
+checksum table performance_schema.events_statements_summary_by_account_by_event_name extended;
+checksum table performance_schema.events_statements_summary_by_host_by_event_name extended;
 checksum table performance_schema.events_statements_summary_by_thread_by_event_name extended;
+checksum table performance_schema.events_statements_summary_by_user_by_event_name extended;
 checksum table performance_schema.events_statements_summary_global_by_event_name extended;
 checksum table performance_schema.events_waits_current extended;
 checksum table performance_schema.events_waits_history extended;
 checksum table performance_schema.events_waits_history_long extended;
+checksum table performance_schema.events_waits_summary_by_account_by_event_name extended;
+checksum table performance_schema.events_waits_summary_by_host_by_event_name extended;
 checksum table performance_schema.events_waits_summary_by_instance extended;
 checksum table performance_schema.events_waits_summary_by_thread_by_event_name extended;
+checksum table performance_schema.events_waits_summary_by_user_by_event_name extended;
 checksum table performance_schema.events_waits_summary_global_by_event_name extended;
 checksum table performance_schema.file_instances extended;
 checksum table performance_schema.file_summary_by_event_name extended;
 checksum table performance_schema.file_summary_by_instance extended;
+checksum table performance_schema.hosts extended;
 checksum table performance_schema.mutex_instances extended;
+checksum table performance_schema.objects_summary_global_by_type extended;
 checksum table performance_schema.performance_timers extended;
 checksum table performance_schema.rwlock_instances extended;
+checksum table performance_schema.setup_actors extended;
 checksum table performance_schema.setup_consumers extended;
 checksum table performance_schema.setup_instruments extended;
+checksum table performance_schema.setup_objects extended;
 checksum table performance_schema.setup_timers extended;
-checksum table performance_schema.table_io_waits_summary_by_index extended;
+checksum table performance_schema.table_io_waits_summary_by_index_usage extended;
 checksum table performance_schema.table_io_waits_summary_by_table extended;
 checksum table performance_schema.table_lock_waits_summary_by_table extended;
 checksum table performance_schema.threads extended;
+checksum table performance_schema.users extended;
 
 --enable_result_log
 

=== added file 'mysql-test/suite/perfschema/t/start_server_no_account-master.opt'
--- a/mysql-test/suite/perfschema/t/start_server_no_account-master.opt	1970-01-01 00:00:00 +0000
+++ b/mysql-test/suite/perfschema/t/start_server_no_account-master.opt	2011-07-29 09:10:56 +0000
@@ -0,0 +1,2 @@
+--loose-enable-performance-schema
+--loose-performance_schema_accounts_size=0

=== added file 'mysql-test/suite/perfschema/t/start_server_no_account.test'
--- a/mysql-test/suite/perfschema/t/start_server_no_account.test	1970-01-01 00:00:00 +0000
+++ b/mysql-test/suite/perfschema/t/start_server_no_account.test	2011-07-29 09:10:56 +0000
@@ -0,0 +1,31 @@
+# Copyright (c) 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
+
+--source include/not_embedded.inc
+--source include/have_perfschema.inc
+
+--source ../include/start_server_common.inc
+
+# Expect no records
+show variables like "performance_schema_accounts_size";
+
+select count(*) from performance_schema.accounts;
+
+# We lost all the data
+select variable_value > 0 from information_schema.global_status
+  where variable_name like 'PERFORMANCE_SCHEMA_ACCOUNTS_LOST';
+

=== added file 'mysql-test/suite/perfschema/t/start_server_no_host-master.opt'
--- a/mysql-test/suite/perfschema/t/start_server_no_host-master.opt	1970-01-01 00:00:00 +0000
+++ b/mysql-test/suite/perfschema/t/start_server_no_host-master.opt	2011-07-29 09:10:56 +0000
@@ -0,0 +1,2 @@
+--loose-enable-performance-schema
+--loose-performance_schema_hosts_size=0

=== added file 'mysql-test/suite/perfschema/t/start_server_no_host.test'
--- a/mysql-test/suite/perfschema/t/start_server_no_host.test	1970-01-01 00:00:00 +0000
+++ b/mysql-test/suite/perfschema/t/start_server_no_host.test	2011-07-29 09:10:56 +0000
@@ -0,0 +1,31 @@
+# Copyright (c) 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
+
+--source include/not_embedded.inc
+--source include/have_perfschema.inc
+
+--source ../include/start_server_common.inc
+
+# Expect no records
+show variables like "performance_schema_hosts_size";
+
+select count(*) from performance_schema.hosts;
+
+# We lost all the data
+select variable_value > 0 from information_schema.global_status
+  where variable_name like 'PERFORMANCE_SCHEMA_HOSTS_LOST';
+

=== added file 'mysql-test/suite/perfschema/t/start_server_no_user-master.opt'
--- a/mysql-test/suite/perfschema/t/start_server_no_user-master.opt	1970-01-01 00:00:00 +0000
+++ b/mysql-test/suite/perfschema/t/start_server_no_user-master.opt	2011-07-29 09:10:56 +0000
@@ -0,0 +1,2 @@
+--loose-enable-performance-schema
+--loose-performance_schema_users_size=0

=== added file 'mysql-test/suite/perfschema/t/start_server_no_user.test'
--- a/mysql-test/suite/perfschema/t/start_server_no_user.test	1970-01-01 00:00:00 +0000
+++ b/mysql-test/suite/perfschema/t/start_server_no_user.test	2011-07-29 09:10:56 +0000
@@ -0,0 +1,31 @@
+# Copyright (c) 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
+
+--source include/not_embedded.inc
+--source include/have_perfschema.inc
+
+--source ../include/start_server_common.inc
+
+# Expect no records
+show variables like "performance_schema_users_size";
+
+select count(*) from performance_schema.users;
+
+# We lost all the data
+select variable_value > 0 from information_schema.global_status
+  where variable_name like 'PERFORMANCE_SCHEMA_USERS_LOST';
+

=== added file 'mysql-test/suite/perfschema/t/start_server_no_waits_history-master.opt'
--- a/mysql-test/suite/perfschema/t/start_server_no_waits_history-master.opt	1970-01-01 00:00:00 +0000
+++ b/mysql-test/suite/perfschema/t/start_server_no_waits_history-master.opt	2011-07-29 09:10:56 +0000
@@ -0,0 +1,2 @@
+--loose-enable-performance-schema
+--loose-performance_schema_events_waits_history_size=0

=== added file 'mysql-test/suite/perfschema/t/start_server_no_waits_history.test'
--- a/mysql-test/suite/perfschema/t/start_server_no_waits_history.test	1970-01-01 00:00:00 +0000
+++ b/mysql-test/suite/perfschema/t/start_server_no_waits_history.test	2011-07-29 09:10:56 +0000
@@ -0,0 +1,29 @@
+# Copyright (c) 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
+
+--source include/not_embedded.inc
+--source include/have_perfschema.inc
+
+--source ../include/start_server_common.inc
+
+# Expect no history
+show variables like "performance_schema_events_waits_history_size";
+select count(*) from performance_schema.events_waits_history;
+
+# Valid operation, edge case
+truncate table performance_schema.events_waits_history;
+

=== added file 'mysql-test/suite/perfschema/t/start_server_no_waits_history_long-master.opt'
--- a/mysql-test/suite/perfschema/t/start_server_no_waits_history_long-master.opt	1970-01-01 00:00:00 +0000
+++ b/mysql-test/suite/perfschema/t/start_server_no_waits_history_long-master.opt	2011-07-29 09:10:56 +0000
@@ -0,0 +1,2 @@
+--loose-enable-performance-schema
+--loose-performance_schema_events_waits_history_long_size=0

=== added file 'mysql-test/suite/perfschema/t/start_server_no_waits_history_long.test'
--- a/mysql-test/suite/perfschema/t/start_server_no_waits_history_long.test	1970-01-01 00:00:00 +0000
+++ b/mysql-test/suite/perfschema/t/start_server_no_waits_history_long.test	2011-07-29 09:10:56 +0000
@@ -0,0 +1,29 @@
+# Copyright (c) 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
+
+--source include/not_embedded.inc
+--source include/have_perfschema.inc
+
+--source ../include/start_server_common.inc
+
+# Expect no history long
+show variables like "performance_schema_events_waits_history_long_size";
+select count(*) from performance_schema.events_waits_history_long;
+
+# Valid operation, edge case
+truncate table performance_schema.events_waits_history_long;
+

=== modified file 'storage/perfschema/ha_perfschema.cc'
--- a/storage/perfschema/ha_perfschema.cc	2011-07-07 19:06:44 +0000
+++ b/storage/perfschema/ha_perfschema.cc	2011-07-29 09:10:56 +0000
@@ -28,6 +28,7 @@
 #include "pfs_column_values.h"
 #include "pfs_instr_class.h"
 #include "pfs_instr.h"
+#include "pfs_account.h"
 #include "pfs_host.h"
 #include "pfs_user.h"
 #include "pfs_account.h"
@@ -154,7 +155,7 @@ static struct st_mysql_show_var pfs_stat
   {"Performance_schema_users_lost",
     (char*) &user_lost, SHOW_LONG},
   {"Performance_schema_accounts_lost",
-    (char*) &user_lost, SHOW_LONG},
+    (char*) &account_lost, SHOW_LONG},
   {"Performance_schema_stage_classes_lost",
     (char*) &stage_class_lost, SHOW_LONG},
   {"Performance_schema_statement_classes_lost",

=== modified file 'storage/perfschema/pfs_events_waits.cc'
--- a/storage/perfschema/pfs_events_waits.cc	2011-07-07 19:06:44 +0000
+++ b/storage/perfschema/pfs_events_waits.cc	2011-07-29 09:10:56 +0000
@@ -89,6 +89,9 @@ static inline void copy_events_waits(PFS
 */
 void insert_events_waits_history(PFS_thread *thread, PFS_events_waits *wait)
 {
+  if (unlikely(events_waits_history_per_thread == 0))
+    return;
+
   uint index= thread->m_waits_history_index;
 
   /*
@@ -116,6 +119,9 @@ void insert_events_waits_history(PFS_thr
 */
 void insert_events_waits_history_long(PFS_events_waits *wait)
 {
+  if (unlikely(events_waits_history_long_size == 0))
+    return;
+
   uint index= PFS_atomic::add_u32(&events_waits_history_long_index, 1);
 
   index= index % events_waits_history_long_size;

=== modified file 'storage/perfschema/pfs_instr.cc'
--- a/storage/perfschema/pfs_instr.cc	2011-07-18 09:49:22 +0000
+++ b/storage/perfschema/pfs_instr.cc	2011-07-29 09:10:56 +0000
@@ -917,26 +917,6 @@ PFS_thread *sanitize_thread(PFS_thread *
   SANITIZE_ARRAY_BODY(PFS_thread, thread_array, thread_max, unsafe);
 }
 
-const char *sanitize_file_name(const char *unsafe)
-{
-  intptr ptr= (intptr) unsafe;
-  intptr first= (intptr) &file_array[0];
-  intptr last= (intptr) &file_array[file_max];
-
-  /* Check if unsafe points inside file_array[] */
-  if (likely((first <= ptr) && (ptr < last)))
-  {
-    /* Check if unsafe points to PFS_file::m_filename */
-    intptr offset= (ptr - first) % sizeof(PFS_file);
-    intptr valid_offset= my_offsetof(PFS_file, m_filename[0]);
-    if (likely(offset == valid_offset))
-    {   
-      return unsafe;
-    }   
-  }
-  return NULL;
-}
-
 PFS_file *sanitize_file(PFS_file *unsafe)
 {
   SANITIZE_ARRAY_BODY(PFS_file, file_array, file_max, unsafe);

=== modified file 'storage/perfschema/pfs_instr.h'
--- a/storage/perfschema/pfs_instr.h	2011-07-18 09:49:22 +0000
+++ b/storage/perfschema/pfs_instr.h	2011-07-29 09:10:56 +0000
@@ -446,7 +446,6 @@ PFS_mutex *sanitize_mutex(PFS_mutex *uns
 PFS_rwlock *sanitize_rwlock(PFS_rwlock *unsafe);
 PFS_cond *sanitize_cond(PFS_cond *unsafe);
 PFS_thread *sanitize_thread(PFS_thread *unsafe);
-const char *sanitize_file_name(const char *unsafe);
 PFS_file *sanitize_file(PFS_file *unsafe);
 
 int init_instruments(const PFS_global_param *param);

=== modified file 'storage/perfschema/pfs_instr_class.cc'
--- a/storage/perfschema/pfs_instr_class.cc	2011-07-07 19:06:44 +0000
+++ b/storage/perfschema/pfs_instr_class.cc	2011-07-29 09:10:56 +0000
@@ -1163,24 +1163,6 @@ void release_table_share(PFS_table_share
 }
 
 /**
-  Purge an instrumented table share from the performance schema buffers.
-  The table share is removed from the hash index, and freed.
-  @param thread The running thread
-  @param pfs The table share to purge
-*/
-void purge_table_share(PFS_thread *thread, PFS_table_share *pfs)
-{
-  if (pfs->get_refcount() == 1)
-  {
-    LF_PINS* pins= get_table_share_hash_pins(thread);
-    if (likely(pins != NULL))
-      lf_hash_delete(&table_share_hash, pins,
-                     pfs->m_key.m_hash_key, pfs->m_key.m_key_length);
-    pfs->m_lock.allocated_to_free();
-  }
-}
-
-/**
   Drop the instrumented table share associated with a table.
   @param thread The running thread
   @param temporary True for TEMPORARY TABLE
@@ -1224,58 +1206,6 @@ PFS_table_share *sanitize_table_share(PF
   SANITIZE_ARRAY_BODY(PFS_table_share, table_share_array, table_share_max, unsafe);
 }
 
-const char *sanitize_table_schema_name(const char *unsafe)
-{
-  intptr ptr= (intptr) unsafe;
-  intptr first= (intptr) &table_share_array[0];
-  intptr last= (intptr) &table_share_array[table_share_max];
-
-  PFS_table_share dummy;
-
-  /* Check if unsafe points inside table_share_array[] */
-  if (likely((first <= ptr) && (ptr < last)))
-  {
-    intptr offset= (ptr - first) % sizeof(PFS_table_share);
-    intptr from= my_offsetof(PFS_table_share, m_key.m_hash_key);
-    intptr len= sizeof(dummy.m_key.m_hash_key);
-    /* Check if unsafe points inside PFS_table_share::m_key::m_hash_key */
-    if (likely((from <= offset) && (offset < from + len)))
-    {
-      PFS_table_share *base= (PFS_table_share*) (ptr - offset);
-      /* Check if unsafe really is the schema name */
-      if (likely(base->m_schema_name == unsafe))
-        return unsafe;
-    }
-  }
-  return NULL;
-}
-
-const char *sanitize_table_object_name(const char *unsafe)
-{
-  intptr ptr= (intptr) unsafe;
-  intptr first= (intptr) &table_share_array[0];
-  intptr last= (intptr) &table_share_array[table_share_max];
-
-  PFS_table_share dummy;
-
-  /* Check if unsafe points inside table_share_array[] */
-  if (likely((first <= ptr) && (ptr < last)))
-  {
-    intptr offset= (ptr - first) % sizeof(PFS_table_share);
-    intptr from= my_offsetof(PFS_table_share, m_key.m_hash_key);
-    intptr len= sizeof(dummy.m_key.m_hash_key);
-    /* Check if unsafe points inside PFS_table_share::m_key::m_hash_key */
-    if (likely((from <= offset) && (offset < from + len)))
-    {
-      PFS_table_share *base= (PFS_table_share*) (ptr - offset);
-      /* Check if unsafe really is the table name */
-      if (likely(base->m_table_name == unsafe))
-        return unsafe;
-    }
-  }
-  return NULL;
-}
-
 /** Reset the io statistics per file class. */
 void reset_file_class_io(void)
 {

=== modified file 'storage/perfschema/pfs_instr_class.h'
--- a/storage/perfschema/pfs_instr_class.h	2011-07-07 19:06:44 +0000
+++ b/storage/perfschema/pfs_instr_class.h	2011-07-29 09:10:56 +0000
@@ -353,8 +353,6 @@ PFS_stage_class *find_stage_class(PSI_st
 PFS_stage_class *sanitize_stage_class(PFS_stage_class *unsafe);
 PFS_statement_class *find_statement_class(PSI_statement_key key);
 PFS_statement_class *sanitize_statement_class(PFS_statement_class *unsafe);
-const char *sanitize_table_schema_name(const char *unsafe);
-const char *sanitize_table_object_name(const char *unsafe);
 PFS_instr_class *find_table_class(uint index);
 PFS_instr_class *sanitize_table_class(PFS_instr_class *unsafe);
 
@@ -362,7 +360,6 @@ PFS_table_share *find_or_create_table_sh
                                             bool temporary,
                                             const TABLE_SHARE *share);
 void release_table_share(PFS_table_share *pfs);
-void purge_table_share(PFS_thread *thread, PFS_table_share *pfs);
 void drop_table_share(PFS_thread *thread,
                       bool temporary,
                       const char *schema_name, uint schema_name_length,

=== modified file 'storage/perfschema/unittest/CMakeLists.txt'
--- a/storage/perfschema/unittest/CMakeLists.txt	2011-06-30 15:50:45 +0000
+++ b/storage/perfschema/unittest/CMakeLists.txt	2011-07-29 09:10:56 +0000
@@ -35,6 +35,9 @@ SET(tests
  pfs_instr_class-oom
  pfs_instr
  pfs_instr-oom
+ pfs_account-oom
+ pfs_host-oom
+ pfs_user-oom
  pfs
 )
 FOREACH(testname ${tests})

=== added file 'storage/perfschema/unittest/pfs_account-oom-t.cc'
--- a/storage/perfschema/unittest/pfs_account-oom-t.cc	1970-01-01 00:00:00 +0000
+++ b/storage/perfschema/unittest/pfs_account-oom-t.cc	2011-07-29 09:10:56 +0000
@@ -0,0 +1,116 @@
+/* Copyright (c) 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 */
+
+#include <my_global.h>
+#include <my_pthread.h>
+#include <pfs_instr.h>
+#include <pfs_stat.h>
+#include <pfs_global.h>
+#include <pfs_account.h>
+#include <tap.h>
+
+#include "stub_pfs_global.h"
+#include "stub_server_misc.h"
+
+#include <string.h> /* memset */
+
+void test_oom()
+{
+  int rc;
+  PFS_global_param param;
+
+  memset(& param, 0xFF, sizeof(param));
+  param.m_enabled= true;
+  param.m_mutex_class_sizing= 0;
+  param.m_rwlock_class_sizing= 0;
+  param.m_cond_class_sizing= 0;
+  param.m_thread_class_sizing= 10;
+  param.m_table_share_sizing= 0;
+  param.m_file_class_sizing= 0;
+  param.m_mutex_sizing= 0;
+  param.m_rwlock_sizing= 0;
+  param.m_cond_sizing= 0;
+  param.m_thread_sizing= 1000;
+  param.m_table_sizing= 0;
+  param.m_file_sizing= 0;
+  param.m_file_handle_sizing= 0;
+  param.m_events_waits_history_sizing= 10;
+  param.m_events_waits_history_long_sizing= 0;
+  param.m_setup_actor_sizing= 0;
+  param.m_setup_object_sizing= 0;
+  param.m_host_sizing= 0;
+  param.m_user_sizing= 0;
+  param.m_account_sizing= 1000;
+  param.m_stage_class_sizing= 50;
+  param.m_events_stages_history_sizing= 0;
+  param.m_events_stages_history_long_sizing= 0;
+  param.m_statement_class_sizing= 50;
+  param.m_events_statements_history_sizing= 0;
+  param.m_events_statements_history_long_sizing= 0;
+
+  /* Setup */
+
+  stub_alloc_always_fails= false;
+  stub_alloc_fails_after_count= 1000;
+
+  init_event_name_sizing(& param);
+  rc= init_stage_class(param.m_stage_class_sizing);
+  ok(rc == 0, "init stage class");
+  rc= init_statement_class(param.m_statement_class_sizing);
+  ok(rc == 0, "init statement class");
+
+  /* Tests */
+
+  stub_alloc_fails_after_count= 1;
+  rc= init_account(& param);
+  ok(rc == 1, "oom (account)");
+  cleanup_account();
+
+  stub_alloc_fails_after_count= 2;
+  rc= init_account(& param);
+  ok(rc == 1, "oom (account waits)");
+  cleanup_account();
+
+  stub_alloc_fails_after_count= 3;
+  rc= init_account(& param);
+  ok(rc == 1, "oom (account stages)");
+  cleanup_account();
+
+  stub_alloc_fails_after_count= 4;
+  rc= init_account(& param);
+  ok(rc == 1, "oom (account statements)");
+  cleanup_account();
+
+  cleanup_statement_class();
+  cleanup_stage_class();
+}
+
+void do_all_tests()
+{
+  PFS_atomic::init();
+
+  test_oom();
+
+  PFS_atomic::cleanup();
+}
+
+int main(int, char **)
+{
+  plan(6);
+  MY_INIT("pfs_account-oom-t");
+  do_all_tests();
+  return 0;
+}
+

=== added file 'storage/perfschema/unittest/pfs_host-oom-t.cc'
--- a/storage/perfschema/unittest/pfs_host-oom-t.cc	1970-01-01 00:00:00 +0000
+++ b/storage/perfschema/unittest/pfs_host-oom-t.cc	2011-07-29 09:10:56 +0000
@@ -0,0 +1,116 @@
+/* Copyright (c) 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 */
+
+#include <my_global.h>
+#include <my_pthread.h>
+#include <pfs_instr.h>
+#include <pfs_stat.h>
+#include <pfs_global.h>
+#include <pfs_host.h>
+#include <tap.h>
+
+#include "stub_pfs_global.h"
+#include "stub_server_misc.h"
+
+#include <string.h> /* memset */
+
+void test_oom()
+{
+  int rc;
+  PFS_global_param param;
+
+  memset(& param, 0xFF, sizeof(param));
+  param.m_enabled= true;
+  param.m_mutex_class_sizing= 0;
+  param.m_rwlock_class_sizing= 0;
+  param.m_cond_class_sizing= 0;
+  param.m_thread_class_sizing= 10;
+  param.m_table_share_sizing= 0;
+  param.m_file_class_sizing= 0;
+  param.m_mutex_sizing= 0;
+  param.m_rwlock_sizing= 0;
+  param.m_cond_sizing= 0;
+  param.m_thread_sizing= 1000;
+  param.m_table_sizing= 0;
+  param.m_file_sizing= 0;
+  param.m_file_handle_sizing= 0;
+  param.m_events_waits_history_sizing= 10;
+  param.m_events_waits_history_long_sizing= 0;
+  param.m_setup_actor_sizing= 0;
+  param.m_setup_object_sizing= 0;
+  param.m_host_sizing= 1000;
+  param.m_user_sizing= 0;
+  param.m_account_sizing= 0;
+  param.m_stage_class_sizing= 50;
+  param.m_events_stages_history_sizing= 0;
+  param.m_events_stages_history_long_sizing= 0;
+  param.m_statement_class_sizing= 50;
+  param.m_events_statements_history_sizing= 0;
+  param.m_events_statements_history_long_sizing= 0;
+
+  /* Setup */
+
+  stub_alloc_always_fails= false;
+  stub_alloc_fails_after_count= 1000;
+
+  init_event_name_sizing(& param);
+  rc= init_stage_class(param.m_stage_class_sizing);
+  ok(rc == 0, "init stage class");
+  rc= init_statement_class(param.m_statement_class_sizing);
+  ok(rc == 0, "init statement class");
+
+  /* Tests */
+
+  stub_alloc_fails_after_count= 1;
+  rc= init_host(& param);
+  ok(rc == 1, "oom (host)");
+  cleanup_host();
+
+  stub_alloc_fails_after_count= 2;
+  rc= init_host(& param);
+  ok(rc == 1, "oom (host waits)");
+  cleanup_host();
+
+  stub_alloc_fails_after_count= 3;
+  rc= init_host(& param);
+  ok(rc == 1, "oom (host stages)");
+  cleanup_host();
+
+  stub_alloc_fails_after_count= 4;
+  rc= init_host(& param);
+  ok(rc == 1, "oom (host statements)");
+  cleanup_host();
+
+  cleanup_statement_class();
+  cleanup_stage_class();
+}
+
+void do_all_tests()
+{
+  PFS_atomic::init();
+
+  test_oom();
+
+  PFS_atomic::cleanup();
+}
+
+int main(int, char **)
+{
+  plan(6);
+  MY_INIT("pfs_host-oom-t");
+  do_all_tests();
+  return 0;
+}
+

=== modified file 'storage/perfschema/unittest/pfs_instr-oom-t.cc'
--- a/storage/perfschema/unittest/pfs_instr-oom-t.cc	2011-07-07 19:06:44 +0000
+++ b/storage/perfschema/unittest/pfs_instr-oom-t.cc	2011-07-29 09:10:56 +0000
@@ -65,6 +65,7 @@ void test_oom()
   init_event_name_sizing(& param);
   rc= init_instruments(& param);
   ok(rc == 1, "oom (mutex)");
+  cleanup_instruments();
 
   param.m_enabled= true;
   param.m_mutex_class_sizing= 0;
@@ -97,6 +98,7 @@ void test_oom()
   init_event_name_sizing(& param);
   rc= init_instruments(& param);
   ok(rc == 1, "oom (rwlock)");
+  cleanup_instruments();
 
   param.m_enabled= true;
   param.m_mutex_class_sizing= 0;
@@ -129,6 +131,7 @@ void test_oom()
   init_event_name_sizing(& param);
   rc= init_instruments(& param);
   ok(rc == 1, "oom (cond)");
+  cleanup_instruments();
 
   param.m_enabled= true;
   param.m_mutex_class_sizing= 0;
@@ -161,6 +164,40 @@ void test_oom()
   init_event_name_sizing(& param);
   rc= init_instruments(& param);
   ok(rc == 1, "oom (file)");
+  cleanup_instruments();
+
+  param.m_enabled= true;
+  param.m_mutex_class_sizing= 0;
+  param.m_rwlock_class_sizing= 0;
+  param.m_cond_class_sizing= 0;
+  param.m_thread_class_sizing= 0;
+  param.m_table_share_sizing= 0;
+  param.m_file_class_sizing= 0;
+  param.m_mutex_sizing= 0;
+  param.m_rwlock_sizing= 0;
+  param.m_cond_sizing= 0;
+  param.m_thread_sizing= 0;
+  param.m_table_sizing= 0;
+  param.m_file_sizing= 0;
+  param.m_file_handle_sizing= 1000;
+  param.m_events_waits_history_sizing= 0;
+  param.m_events_waits_history_long_sizing= 0;
+  param.m_setup_actor_sizing= 0;
+  param.m_setup_object_sizing= 0;
+  param.m_host_sizing= 0;
+  param.m_user_sizing= 0;
+  param.m_account_sizing= 0;
+  param.m_stage_class_sizing= 0;
+  param.m_events_stages_history_sizing= 0;
+  param.m_events_stages_history_long_sizing= 0;
+  param.m_statement_class_sizing= 0;
+  param.m_events_statements_history_sizing= 0;
+  param.m_events_statements_history_long_sizing= 0;
+
+  init_event_name_sizing(& param);
+  rc= init_instruments(& param);
+  ok(rc == 1, "oom (file handle)");
+  cleanup_instruments();
 
   param.m_enabled= true;
   param.m_mutex_class_sizing= 0;
@@ -193,6 +230,7 @@ void test_oom()
   init_event_name_sizing(& param);
   rc= init_instruments(& param);
   ok(rc == 1, "oom (table)");
+  cleanup_instruments();
 
   param.m_enabled= true;
   param.m_mutex_class_sizing= 0;
@@ -225,6 +263,7 @@ void test_oom()
   init_event_name_sizing(& param);
   rc= init_instruments(& param);
   ok(rc == 1, "oom (thread)");
+  cleanup_instruments();
 
   stub_alloc_always_fails= false;
 
@@ -259,7 +298,8 @@ void test_oom()
   stub_alloc_fails_after_count= 2;
   init_event_name_sizing(& param);
   rc= init_instruments(& param);
-  ok(rc == 1, "oom (thread history sizing)");
+  ok(rc == 1, "oom (thread waits history sizing)");
+  cleanup_instruments();
 
   param.m_enabled= true;
   param.m_mutex_class_sizing= 50;
@@ -292,9 +332,252 @@ void test_oom()
   stub_alloc_fails_after_count= 2;
   init_event_name_sizing(& param);
   rc= init_instruments(& param);
-  ok(rc == 1, "oom (per thread wait)");
+  ok(rc == 1, "oom (per thread waits)");
+  cleanup_instruments();
+
+  param.m_enabled= true;
+  param.m_mutex_class_sizing= 0;
+  param.m_rwlock_class_sizing= 0;
+  param.m_cond_class_sizing= 0;
+  param.m_thread_class_sizing= 10;
+  param.m_table_share_sizing= 0;
+  param.m_file_class_sizing= 0;
+  param.m_mutex_sizing= 0;
+  param.m_rwlock_sizing= 0;
+  param.m_cond_sizing= 0;
+  param.m_thread_sizing= 1000;
+  param.m_table_sizing= 0;
+  param.m_file_sizing= 0;
+  param.m_file_handle_sizing= 0;
+  param.m_events_waits_history_sizing= 0;
+  param.m_events_waits_history_long_sizing= 0;
+  param.m_setup_actor_sizing= 0;
+  param.m_setup_object_sizing= 0;
+  param.m_host_sizing= 0;
+  param.m_user_sizing= 0;
+  param.m_account_sizing= 0;
+  param.m_stage_class_sizing= 0;
+  param.m_events_stages_history_sizing= 10;
+  param.m_events_stages_history_long_sizing= 0;
+  param.m_statement_class_sizing= 0;
+  param.m_events_statements_history_sizing= 0;
+  param.m_events_statements_history_long_sizing= 0;
+
+  stub_alloc_fails_after_count= 3;
+  init_event_name_sizing(& param);
+  rc= init_instruments(& param);
+  ok(rc == 1, "oom (thread stages history sizing)");
+  cleanup_instruments();
+
+  param.m_enabled= true;
+  param.m_mutex_class_sizing= 0;
+  param.m_rwlock_class_sizing= 0;
+  param.m_cond_class_sizing= 0;
+  param.m_thread_class_sizing= 10;
+  param.m_table_share_sizing= 0;
+  param.m_file_class_sizing= 0;
+  param.m_mutex_sizing= 0;
+  param.m_rwlock_sizing= 0;
+  param.m_cond_sizing= 0;
+  param.m_thread_sizing= 1000;
+  param.m_table_sizing= 0;
+  param.m_file_sizing= 0;
+  param.m_file_handle_sizing= 0;
+  param.m_events_waits_history_sizing= 0;
+  param.m_events_waits_history_long_sizing= 0;
+  param.m_setup_actor_sizing= 0;
+  param.m_setup_object_sizing= 0;
+  param.m_host_sizing= 0;
+  param.m_user_sizing= 0;
+  param.m_account_sizing= 0;
+  param.m_stage_class_sizing= 50;
+  param.m_events_stages_history_sizing= 0;
+  param.m_events_stages_history_long_sizing= 0;
+  param.m_statement_class_sizing= 0;
+  param.m_events_statements_history_sizing= 0;
+  param.m_events_statements_history_long_sizing= 0;
+
+  stub_alloc_fails_after_count= 2;
+  init_event_name_sizing(& param);
+  rc= init_instruments(& param);
+  ok(rc == 1, "oom (per thread stages)");
+  cleanup_instruments();
+
+  param.m_enabled= true;
+  param.m_mutex_class_sizing= 0;
+  param.m_rwlock_class_sizing= 0;
+  param.m_cond_class_sizing= 0;
+  param.m_thread_class_sizing= 10;
+  param.m_table_share_sizing= 0;
+  param.m_file_class_sizing= 0;
+  param.m_mutex_sizing= 0;
+  param.m_rwlock_sizing= 0;
+  param.m_cond_sizing= 0;
+  param.m_thread_sizing= 1000;
+  param.m_table_sizing= 0;
+  param.m_file_sizing= 0;
+  param.m_file_handle_sizing= 0;
+  param.m_events_waits_history_sizing= 0;
+  param.m_events_waits_history_long_sizing= 0;
+  param.m_setup_actor_sizing= 0;
+  param.m_setup_object_sizing= 0;
+  param.m_host_sizing= 0;
+  param.m_user_sizing= 0;
+  param.m_account_sizing= 0;
+  param.m_stage_class_sizing= 0;
+  param.m_events_stages_history_sizing= 0;
+  param.m_events_stages_history_long_sizing= 0;
+  param.m_statement_class_sizing= 0;
+  param.m_events_statements_history_sizing= 10;
+  param.m_events_statements_history_long_sizing= 0;
+
+  stub_alloc_fails_after_count= 2;
+  init_event_name_sizing(& param);
+  rc= init_instruments(& param);
+  ok(rc == 1, "oom (thread statements history sizing)");
+  cleanup_instruments();
+
+  param.m_enabled= true;
+  param.m_mutex_class_sizing= 0;
+  param.m_rwlock_class_sizing= 0;
+  param.m_cond_class_sizing= 0;
+  param.m_thread_class_sizing= 10;
+  param.m_table_share_sizing= 0;
+  param.m_file_class_sizing= 0;
+  param.m_mutex_sizing= 0;
+  param.m_rwlock_sizing= 0;
+  param.m_cond_sizing= 0;
+  param.m_thread_sizing= 1000;
+  param.m_table_sizing= 0;
+  param.m_file_sizing= 0;
+  param.m_file_handle_sizing= 0;
+  param.m_events_waits_history_sizing= 0;
+  param.m_events_waits_history_long_sizing= 0;
+  param.m_setup_actor_sizing= 0;
+  param.m_setup_object_sizing= 0;
+  param.m_host_sizing= 0;
+  param.m_user_sizing= 0;
+  param.m_account_sizing= 0;
+  param.m_stage_class_sizing= 0;
+  param.m_events_stages_history_sizing= 0;
+  param.m_events_stages_history_long_sizing= 0;
+  param.m_statement_class_sizing= 50;
+  param.m_events_statements_history_sizing= 0;
+  param.m_events_statements_history_long_sizing= 0;
+
+  stub_alloc_fails_after_count= 2;
+  init_event_name_sizing(& param);
+  rc= init_instruments(& param);
+  ok(rc == 1, "oom (per thread statements)");
+  cleanup_instruments();
+
+  param.m_enabled= true;
+  param.m_mutex_class_sizing= 10;
+  param.m_rwlock_class_sizing= 0;
+  param.m_cond_class_sizing= 0;
+  param.m_thread_class_sizing= 0;
+  param.m_table_share_sizing= 0;
+  param.m_file_class_sizing= 0;
+  param.m_mutex_sizing= 0;
+  param.m_rwlock_sizing= 0;
+  param.m_cond_sizing= 0;
+  param.m_thread_sizing= 0;
+  param.m_table_sizing= 0;
+  param.m_file_sizing= 0;
+  param.m_file_handle_sizing= 0;
+  param.m_events_waits_history_sizing= 0;
+  param.m_events_waits_history_long_sizing= 0;
+  param.m_setup_actor_sizing= 0;
+  param.m_setup_object_sizing= 0;
+  param.m_host_sizing= 0;
+  param.m_user_sizing= 0;
+  param.m_account_sizing= 0;
+  param.m_stage_class_sizing= 0;
+  param.m_events_stages_history_sizing= 0;
+  param.m_events_stages_history_long_sizing= 0;
+  param.m_statement_class_sizing= 0;
+  param.m_events_statements_history_sizing= 0;
+  param.m_events_statements_history_long_sizing= 0;
+
+  stub_alloc_fails_after_count= 1;
+  init_event_name_sizing(& param);
+  rc= init_instruments(& param);
+  ok(rc == 1, "oom (global waits)");
+  cleanup_instruments();
+
+  param.m_enabled= true;
+  param.m_mutex_class_sizing= 10;
+  param.m_rwlock_class_sizing= 0;
+  param.m_cond_class_sizing= 0;
+  param.m_thread_class_sizing= 0;
+  param.m_table_share_sizing= 0;
+  param.m_file_class_sizing= 0;
+  param.m_mutex_sizing= 0;
+  param.m_rwlock_sizing= 0;
+  param.m_cond_sizing= 0;
+  param.m_thread_sizing= 0;
+  param.m_table_sizing= 0;
+  param.m_file_sizing= 0;
+  param.m_file_handle_sizing= 0;
+  param.m_events_waits_history_sizing= 0;
+  param.m_events_waits_history_long_sizing= 0;
+  param.m_setup_actor_sizing= 0;
+  param.m_setup_object_sizing= 0;
+  param.m_host_sizing= 0;
+  param.m_user_sizing= 0;
+  param.m_account_sizing= 0;
+  param.m_stage_class_sizing= 20;
+  param.m_events_stages_history_sizing= 0;
+  param.m_events_stages_history_long_sizing= 0;
+  param.m_statement_class_sizing= 0;
+  param.m_events_statements_history_sizing= 0;
+  param.m_events_statements_history_long_sizing= 0;
+
+  stub_alloc_fails_after_count= 3;
+  init_event_name_sizing(& param);
+  rc= init_stage_class(param.m_stage_class_sizing);
+  ok(rc == 0, "init stage class");
+  rc= init_instruments(& param);
+  ok(rc == 1, "oom (global stages)");
+  cleanup_instruments();
+  cleanup_stage_class();
+
+  param.m_enabled= true;
+  param.m_mutex_class_sizing= 10;
+  param.m_rwlock_class_sizing= 0;
+  param.m_cond_class_sizing= 0;
+  param.m_thread_class_sizing= 0;
+  param.m_table_share_sizing= 0;
+  param.m_file_class_sizing= 0;
+  param.m_mutex_sizing= 0;
+  param.m_rwlock_sizing= 0;
+  param.m_cond_sizing= 0;
+  param.m_thread_sizing= 0;
+  param.m_table_sizing= 0;
+  param.m_file_sizing= 0;
+  param.m_file_handle_sizing= 0;
+  param.m_events_waits_history_sizing= 0;
+  param.m_events_waits_history_long_sizing= 0;
+  param.m_setup_actor_sizing= 0;
+  param.m_setup_object_sizing= 0;
+  param.m_host_sizing= 0;
+  param.m_user_sizing= 0;
+  param.m_account_sizing= 0;
+  param.m_stage_class_sizing= 0;
+  param.m_events_stages_history_sizing= 0;
+  param.m_events_stages_history_long_sizing= 0;
+  param.m_statement_class_sizing= 20;
+  param.m_events_statements_history_sizing= 0;
+  param.m_events_statements_history_long_sizing= 0;
 
+  stub_alloc_fails_after_count= 3;
+  init_event_name_sizing(& param);
+  rc= init_statement_class(param.m_statement_class_sizing);
+  ok(rc == 0, "init statement class");
+  rc= init_instruments(& param);
+  ok(rc == 1, "oom (global statements)");
   cleanup_instruments();
+  cleanup_statement_class();
 }
 
 void do_all_tests()
@@ -308,7 +591,7 @@ void do_all_tests()
 
 int main(int, char **)
 {
-  plan(8);
+  plan(18);
   MY_INIT("pfs_instr-oom-t");
   do_all_tests();
   return 0;

=== modified file 'storage/perfschema/unittest/pfs_instr_class-oom-t.cc'
--- a/storage/perfschema/unittest/pfs_instr_class-oom-t.cc	2011-06-30 15:50:45 +0000
+++ b/storage/perfschema/unittest/pfs_instr_class-oom-t.cc	2011-07-29 09:10:56 +0000
@@ -38,11 +38,17 @@ void test_oom()
   ok(rc == 1, "oom (file)");
   rc= init_table_share(1000);
   ok(rc == 1, "oom (cond)");
+  rc= init_stage_class(1000);
+  ok(rc == 1, "oom (stage)");
+  rc= init_statement_class(1000);
+  ok(rc == 1, "oom (statement)");
 
   cleanup_sync_class();
   cleanup_thread_class();
   cleanup_file_class();
   cleanup_table_share();
+  cleanup_stage_class();
+  cleanup_statement_class();
 }
 
 void do_all_tests()
@@ -56,7 +62,7 @@ void do_all_tests()
 
 int main(int, char **)
 {
-  plan(6);
+  plan(8);
   MY_INIT("pfs_instr_info-oom-t");
   do_all_tests();
   return 0;

=== added file 'storage/perfschema/unittest/pfs_user-oom-t.cc'
--- a/storage/perfschema/unittest/pfs_user-oom-t.cc	1970-01-01 00:00:00 +0000
+++ b/storage/perfschema/unittest/pfs_user-oom-t.cc	2011-07-29 09:10:56 +0000
@@ -0,0 +1,116 @@
+/* Copyright (c) 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 */
+
+#include <my_global.h>
+#include <my_pthread.h>
+#include <pfs_instr.h>
+#include <pfs_stat.h>
+#include <pfs_global.h>
+#include <pfs_user.h>
+#include <tap.h>
+
+#include "stub_pfs_global.h"
+#include "stub_server_misc.h"
+
+#include <string.h> /* memset */
+
+void test_oom()
+{
+  int rc;
+  PFS_global_param param;
+
+  memset(& param, 0xFF, sizeof(param));
+  param.m_enabled= true;
+  param.m_mutex_class_sizing= 0;
+  param.m_rwlock_class_sizing= 0;
+  param.m_cond_class_sizing= 0;
+  param.m_thread_class_sizing= 10;
+  param.m_table_share_sizing= 0;
+  param.m_file_class_sizing= 0;
+  param.m_mutex_sizing= 0;
+  param.m_rwlock_sizing= 0;
+  param.m_cond_sizing= 0;
+  param.m_thread_sizing= 1000;
+  param.m_table_sizing= 0;
+  param.m_file_sizing= 0;
+  param.m_file_handle_sizing= 0;
+  param.m_events_waits_history_sizing= 10;
+  param.m_events_waits_history_long_sizing= 0;
+  param.m_setup_actor_sizing= 0;
+  param.m_setup_object_sizing= 0;
+  param.m_host_sizing= 0;
+  param.m_user_sizing= 1000;
+  param.m_account_sizing= 0;
+  param.m_stage_class_sizing= 50;
+  param.m_events_stages_history_sizing= 0;
+  param.m_events_stages_history_long_sizing= 0;
+  param.m_statement_class_sizing= 50;
+  param.m_events_statements_history_sizing= 0;
+  param.m_events_statements_history_long_sizing= 0;
+
+  /* Setup */
+
+  stub_alloc_always_fails= false;
+  stub_alloc_fails_after_count= 1000;
+
+  init_event_name_sizing(& param);
+  rc= init_stage_class(param.m_stage_class_sizing);
+  ok(rc == 0, "init stage class");
+  rc= init_statement_class(param.m_statement_class_sizing);
+  ok(rc == 0, "init statement class");
+
+  /* Tests */
+
+  stub_alloc_fails_after_count= 1;
+  rc= init_user(& param);
+  ok(rc == 1, "oom (user)");
+  cleanup_user();
+
+  stub_alloc_fails_after_count= 2;
+  rc= init_user(& param);
+  ok(rc == 1, "oom (user waits)");
+  cleanup_user();
+
+  stub_alloc_fails_after_count= 3;
+  rc= init_user(& param);
+  ok(rc == 1, "oom (user stages)");
+  cleanup_user();
+
+  stub_alloc_fails_after_count= 4;
+  rc= init_user(& param);
+  ok(rc == 1, "oom (user statements)");
+  cleanup_user();
+
+  cleanup_statement_class();
+  cleanup_stage_class();
+}
+
+void do_all_tests()
+{
+  PFS_atomic::init();
+
+  test_oom();
+
+  PFS_atomic::cleanup();
+}
+
+int main(int, char **)
+{
+  plan(6);
+  MY_INIT("pfs_user-oom-t");
+  do_all_tests();
+  return 0;
+}
+

=== modified file 'storage/perfschema/unittest/stub_pfs_global.h'
--- a/storage/perfschema/unittest/stub_pfs_global.h	2011-06-30 15:50:45 +0000
+++ b/storage/perfschema/unittest/stub_pfs_global.h	2011-07-29 09:10:56 +0000
@@ -16,27 +16,31 @@
 #include <my_global.h>
 #include <my_sys.h>
 #include <pfs_global.h>
+#include <string.h>
 
 bool pfs_initialized= false;
 
 bool stub_alloc_always_fails= true;
 int stub_alloc_fails_after_count= 0;
 
-void *pfs_malloc(size_t, myf)
+void *pfs_malloc(size_t size, myf)
 {
-  static char garbage[100];
-
   if (stub_alloc_always_fails)
     return NULL;
 
   if (--stub_alloc_fails_after_count <= 0)
     return NULL;
 
-  return garbage;
+  void *ptr= malloc(size);
+  if (ptr != NULL)
+    memset(ptr, 0, size);
+  return ptr;
 }
 
-void pfs_free(void *)
+void pfs_free(void *ptr)
 {
+  if (ptr != NULL)
+    free(ptr);
 }
 
 void pfs_print_error(const char *format, ...)

No bundle (reason: useless for push emails).
Thread
bzr push into mysql-trunk-wl5378 branch (marc.alff:3365 to 3366) Marc Alff3 Aug