#At file:///Users/malff/BZR_TREE/mysql-trunk-wl4813/ based on revid:marc.alff@stripped
3208 Marc Alff 2011-02-15
WL#4813 PERFORMANCE_SCHEMA Instrumenting Stages
WL#2515 PERFORMANCE_SCHEMA statements
Implementation (continued)
added:
mysql-test/suite/perfschema/r/ddl_esgs_by_thread_by_event_name.result
mysql-test/suite/perfschema/r/ddl_esgs_global_by_event_name.result
mysql-test/suite/perfschema/r/ddl_esms_by_thread_by_event_name.result
mysql-test/suite/perfschema/r/ddl_esms_global_by_event_name.result
mysql-test/suite/perfschema/r/ddl_events_stages_current.result
mysql-test/suite/perfschema/r/ddl_events_stages_history.result
mysql-test/suite/perfschema/r/ddl_events_stages_history_long.result
mysql-test/suite/perfschema/r/ddl_events_statements_current.result
mysql-test/suite/perfschema/r/ddl_events_statements_history.result
mysql-test/suite/perfschema/r/ddl_events_statements_history_long.result
mysql-test/suite/perfschema/r/dml_esgs_by_thread_by_event_name.result
mysql-test/suite/perfschema/r/dml_esgs_global_by_event_name.result
mysql-test/suite/perfschema/r/dml_esms_by_thread_by_event_name.result
mysql-test/suite/perfschema/r/dml_esms_global_by_event_name.result
mysql-test/suite/perfschema/r/dml_events_stages_current.result
mysql-test/suite/perfschema/r/dml_events_stages_history.result
mysql-test/suite/perfschema/r/dml_events_stages_history_long.result
mysql-test/suite/perfschema/r/dml_events_statements_current.result
mysql-test/suite/perfschema/r/dml_events_statements_history.result
mysql-test/suite/perfschema/r/dml_events_statements_history_long.result
mysql-test/suite/perfschema/t/ddl_esgs_by_thread_by_event_name.test
mysql-test/suite/perfschema/t/ddl_esgs_global_by_event_name.test
mysql-test/suite/perfschema/t/ddl_esms_by_thread_by_event_name.test
mysql-test/suite/perfschema/t/ddl_esms_global_by_event_name.test
mysql-test/suite/perfschema/t/ddl_events_stages_current.test
mysql-test/suite/perfschema/t/ddl_events_stages_history.test
mysql-test/suite/perfschema/t/ddl_events_stages_history_long.test
mysql-test/suite/perfschema/t/ddl_events_statements_current.test
mysql-test/suite/perfschema/t/ddl_events_statements_history.test
mysql-test/suite/perfschema/t/ddl_events_statements_history_long.test
mysql-test/suite/perfschema/t/dml_esgs_by_thread_by_event_name.test
mysql-test/suite/perfschema/t/dml_esgs_global_by_event_name.test
mysql-test/suite/perfschema/t/dml_esms_by_thread_by_event_name.test
mysql-test/suite/perfschema/t/dml_esms_global_by_event_name.test
mysql-test/suite/perfschema/t/dml_events_stages_current.test
mysql-test/suite/perfschema/t/dml_events_stages_history.test
mysql-test/suite/perfschema/t/dml_events_stages_history_long.test
mysql-test/suite/perfschema/t/dml_events_statements_current.test
mysql-test/suite/perfschema/t/dml_events_statements_history.test
mysql-test/suite/perfschema/t/dml_events_statements_history_long.test
mysql-test/suite/sys_vars/r/pfs_events_stages_history_long_size_basic.result
mysql-test/suite/sys_vars/r/pfs_events_stages_history_size_basic.result
mysql-test/suite/sys_vars/r/pfs_events_statements_history_long_size_basic.result
mysql-test/suite/sys_vars/r/pfs_events_statements_history_size_basic.result
mysql-test/suite/sys_vars/r/pfs_max_stage_classes_basic.result
mysql-test/suite/sys_vars/r/pfs_max_statement_classes_basic.result
mysql-test/suite/sys_vars/t/pfs_events_stages_history_long_size_basic-master.opt
mysql-test/suite/sys_vars/t/pfs_events_stages_history_long_size_basic.test
mysql-test/suite/sys_vars/t/pfs_events_stages_history_size_basic-master.opt
mysql-test/suite/sys_vars/t/pfs_events_stages_history_size_basic.test
mysql-test/suite/sys_vars/t/pfs_events_statements_history_long_size_basic-master.opt
mysql-test/suite/sys_vars/t/pfs_events_statements_history_long_size_basic.test
mysql-test/suite/sys_vars/t/pfs_events_statements_history_size_basic-master.opt
mysql-test/suite/sys_vars/t/pfs_events_statements_history_size_basic.test
mysql-test/suite/sys_vars/t/pfs_max_stage_classes_basic-master.opt
mysql-test/suite/sys_vars/t/pfs_max_stage_classes_basic.test
mysql-test/suite/sys_vars/t/pfs_max_statement_classes_basic-master.opt
mysql-test/suite/sys_vars/t/pfs_max_statement_classes_basic.test
modified:
mysql-test/suite/perfschema/r/checksum.result
mysql-test/suite/perfschema/r/start_server_nothing.result
mysql-test/suite/perfschema/t/checksum.test
mysql-test/suite/perfschema/t/start_server_nothing.test
storage/perfschema/pfs_engine_table.cc
storage/perfschema/pfs_instr.cc
=== modified file 'mysql-test/suite/perfschema/r/checksum.result'
--- a/mysql-test/suite/perfschema/r/checksum.result 2010-11-03 15:42:33 +0000
+++ b/mysql-test/suite/perfschema/r/checksum.result 2011-02-15 14:31:13 +0000
@@ -1,4 +1,14 @@
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_thread_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_thread_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;
@@ -14,8 +24,21 @@ checksum table performance_schema.rwlock
checksum table performance_schema.setup_consumers;
checksum table performance_schema.setup_instruments;
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_table;
+checksum table performance_schema.table_lock_waits_summary_by_table;
checksum table performance_schema.threads;
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_thread_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_thread_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;
@@ -31,4 +54,7 @@ checksum table performance_schema.rwlock
checksum table performance_schema.setup_consumers extended;
checksum table performance_schema.setup_instruments 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_table extended;
+checksum table performance_schema.table_lock_waits_summary_by_table extended;
checksum table performance_schema.threads extended;
=== added file 'mysql-test/suite/perfschema/r/ddl_esgs_by_thread_by_event_name.result'
--- a/mysql-test/suite/perfschema/r/ddl_esgs_by_thread_by_event_name.result 1970-01-01 00:00:00 +0000
+++ b/mysql-test/suite/perfschema/r/ddl_esgs_by_thread_by_event_name.result 2011-02-15 14:31:13 +0000
@@ -0,0 +1,9 @@
+alter table performance_schema.events_stages_summary_by_thread_by_event_name
+add column foo integer;
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'performance_schema'
+truncate table performance_schema.events_stages_summary_by_thread_by_event_name;
+ALTER TABLE performance_schema.events_stages_summary_by_thread_by_event_name ADD INDEX test_index(THREAD_ID);
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'performance_schema'
+CREATE UNIQUE INDEX test_index
+ON performance_schema.events_stages_summary_by_thread_by_event_name(THREAD_ID);
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'performance_schema'
=== added file 'mysql-test/suite/perfschema/r/ddl_esgs_global_by_event_name.result'
--- a/mysql-test/suite/perfschema/r/ddl_esgs_global_by_event_name.result 1970-01-01 00:00:00 +0000
+++ b/mysql-test/suite/perfschema/r/ddl_esgs_global_by_event_name.result 2011-02-15 14:31:13 +0000
@@ -0,0 +1,10 @@
+alter table performance_schema.events_stages_summary_global_by_event_name
+add column foo integer;
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'performance_schema'
+truncate table performance_schema.events_stages_summary_global_by_event_name;
+ALTER TABLE performance_schema.events_stages_summary_global_by_event_name
+ADD INDEX test_index(EVENT_NAME);
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'performance_schema'
+CREATE UNIQUE INDEX test_index
+ON performance_schema.events_stages_summary_global_by_event_name(EVENT_NAME);
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'performance_schema'
=== added file 'mysql-test/suite/perfschema/r/ddl_esms_by_thread_by_event_name.result'
--- a/mysql-test/suite/perfschema/r/ddl_esms_by_thread_by_event_name.result 1970-01-01 00:00:00 +0000
+++ b/mysql-test/suite/perfschema/r/ddl_esms_by_thread_by_event_name.result 2011-02-15 14:31:13 +0000
@@ -0,0 +1,9 @@
+alter table performance_schema.events_statements_summary_by_thread_by_event_name
+add column foo integer;
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'performance_schema'
+truncate table performance_schema.events_statements_summary_by_thread_by_event_name;
+ALTER TABLE performance_schema.events_statements_summary_by_thread_by_event_name ADD INDEX test_index(THREAD_ID);
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'performance_schema'
+CREATE UNIQUE INDEX test_index
+ON performance_schema.events_statements_summary_by_thread_by_event_name(THREAD_ID);
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'performance_schema'
=== added file 'mysql-test/suite/perfschema/r/ddl_esms_global_by_event_name.result'
--- a/mysql-test/suite/perfschema/r/ddl_esms_global_by_event_name.result 1970-01-01 00:00:00 +0000
+++ b/mysql-test/suite/perfschema/r/ddl_esms_global_by_event_name.result 2011-02-15 14:31:13 +0000
@@ -0,0 +1,10 @@
+alter table performance_schema.events_statements_summary_global_by_event_name
+add column foo integer;
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'performance_schema'
+truncate table performance_schema.events_statements_summary_global_by_event_name;
+ALTER TABLE performance_schema.events_statements_summary_global_by_event_name
+ADD INDEX test_index(EVENT_NAME);
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'performance_schema'
+CREATE UNIQUE INDEX test_index
+ON performance_schema.events_statements_summary_global_by_event_name(EVENT_NAME);
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'performance_schema'
=== added file 'mysql-test/suite/perfschema/r/ddl_events_stages_current.result'
--- a/mysql-test/suite/perfschema/r/ddl_events_stages_current.result 1970-01-01 00:00:00 +0000
+++ b/mysql-test/suite/perfschema/r/ddl_events_stages_current.result 2011-02-15 14:31:13 +0000
@@ -0,0 +1,7 @@
+alter table performance_schema.events_stages_current add column foo integer;
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'performance_schema'
+truncate table performance_schema.events_stages_current;
+ALTER TABLE performance_schema.events_stages_current ADD INDEX test_index(EVENT_ID);
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'performance_schema'
+CREATE UNIQUE INDEX test_index ON performance_schema.events_stages_current(EVENT_ID);
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'performance_schema'
=== added file 'mysql-test/suite/perfschema/r/ddl_events_stages_history.result'
--- a/mysql-test/suite/perfschema/r/ddl_events_stages_history.result 1970-01-01 00:00:00 +0000
+++ b/mysql-test/suite/perfschema/r/ddl_events_stages_history.result 2011-02-15 14:31:13 +0000
@@ -0,0 +1,7 @@
+alter table performance_schema.events_stages_history add column foo integer;
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'performance_schema'
+truncate table performance_schema.events_stages_history;
+ALTER TABLE performance_schema.events_stages_history ADD INDEX test_index(EVENT_ID);
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'performance_schema'
+CREATE UNIQUE INDEX test_index ON performance_schema.events_stages_history(EVENT_ID);
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'performance_schema'
=== added file 'mysql-test/suite/perfschema/r/ddl_events_stages_history_long.result'
--- a/mysql-test/suite/perfschema/r/ddl_events_stages_history_long.result 1970-01-01 00:00:00 +0000
+++ b/mysql-test/suite/perfschema/r/ddl_events_stages_history_long.result 2011-02-15 14:31:13 +0000
@@ -0,0 +1,7 @@
+alter table performance_schema.events_stages_history_long add column foo integer;
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'performance_schema'
+truncate table performance_schema.events_stages_history_long;
+ALTER TABLE performance_schema.events_stages_history_long ADD INDEX test_index(EVENT_ID);
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'performance_schema'
+CREATE UNIQUE INDEX test_index ON performance_schema.events_stages_history_long(EVENT_ID);
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'performance_schema'
=== added file 'mysql-test/suite/perfschema/r/ddl_events_statements_current.result'
--- a/mysql-test/suite/perfschema/r/ddl_events_statements_current.result 1970-01-01 00:00:00 +0000
+++ b/mysql-test/suite/perfschema/r/ddl_events_statements_current.result 2011-02-15 14:31:13 +0000
@@ -0,0 +1,7 @@
+alter table performance_schema.events_statements_current add column foo integer;
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'performance_schema'
+truncate table performance_schema.events_statements_current;
+ALTER TABLE performance_schema.events_statements_current ADD INDEX test_index(EVENT_ID);
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'performance_schema'
+CREATE UNIQUE INDEX test_index ON performance_schema.events_statements_current(EVENT_ID);
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'performance_schema'
=== added file 'mysql-test/suite/perfschema/r/ddl_events_statements_history.result'
--- a/mysql-test/suite/perfschema/r/ddl_events_statements_history.result 1970-01-01 00:00:00 +0000
+++ b/mysql-test/suite/perfschema/r/ddl_events_statements_history.result 2011-02-15 14:31:13 +0000
@@ -0,0 +1,7 @@
+alter table performance_schema.events_statements_history add column foo integer;
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'performance_schema'
+truncate table performance_schema.events_statements_history;
+ALTER TABLE performance_schema.events_statements_history ADD INDEX test_index(EVENT_ID);
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'performance_schema'
+CREATE UNIQUE INDEX test_index ON performance_schema.events_statements_history(EVENT_ID);
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'performance_schema'
=== added file 'mysql-test/suite/perfschema/r/ddl_events_statements_history_long.result'
--- a/mysql-test/suite/perfschema/r/ddl_events_statements_history_long.result 1970-01-01 00:00:00 +0000
+++ b/mysql-test/suite/perfschema/r/ddl_events_statements_history_long.result 2011-02-15 14:31:13 +0000
@@ -0,0 +1,7 @@
+alter table performance_schema.events_statements_history_long add column foo integer;
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'performance_schema'
+truncate table performance_schema.events_statements_history_long;
+ALTER TABLE performance_schema.events_statements_history_long ADD INDEX test_index(EVENT_ID);
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'performance_schema'
+CREATE UNIQUE INDEX test_index ON performance_schema.events_statements_history_long(EVENT_ID);
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'performance_schema'
=== added file 'mysql-test/suite/perfschema/r/dml_esgs_by_thread_by_event_name.result'
--- a/mysql-test/suite/perfschema/r/dml_esgs_by_thread_by_event_name.result 1970-01-01 00:00:00 +0000
+++ b/mysql-test/suite/perfschema/r/dml_esgs_by_thread_by_event_name.result 2011-02-15 14:31:13 +0000
@@ -0,0 +1,26 @@
+select * from performance_schema.events_stages_summary_by_thread_by_event_name
+where event_name like 'stage/%' limit 1;
+select * from performance_schema.events_stages_summary_by_thread_by_event_name
+where event_name='FOO';
+insert into performance_schema.events_stages_summary_by_thread_by_event_name
+set event_name='FOO', thread_id=1,
+count_star=1, sum_timer_wait=2, min_timer_wait=3,
+avg_timer_wait=4, max_timer_wait=5;
+ERROR 42000: INSERT command denied to user 'root'@'localhost' for table 'events_stages_summary_by_thread_by_event_name'
+update performance_schema.events_stages_summary_by_thread_by_event_name
+set count_star=12;
+ERROR 42000: UPDATE command denied to user 'root'@'localhost' for table 'events_stages_summary_by_thread_by_event_name'
+update performance_schema.events_stages_summary_by_thread_by_event_name
+set count_star=12 where event_name like "FOO";
+ERROR 42000: UPDATE command denied to user 'root'@'localhost' for table 'events_stages_summary_by_thread_by_event_name'
+delete from performance_schema.events_stages_summary_by_thread_by_event_name
+where count_star=1;
+ERROR 42000: DELETE command denied to user 'root'@'localhost' for table 'events_stages_summary_by_thread_by_event_name'
+delete from performance_schema.events_stages_summary_by_thread_by_event_name;
+ERROR 42000: DELETE command denied to user 'root'@'localhost' for table 'events_stages_summary_by_thread_by_event_name'
+LOCK TABLES performance_schema.events_stages_summary_by_thread_by_event_name READ;
+ERROR 42000: SELECT, LOCK TABLES command denied to user 'root'@'localhost' for table 'events_stages_summary_by_thread_by_event_name'
+UNLOCK TABLES;
+LOCK TABLES performance_schema.events_stages_summary_by_thread_by_event_name WRITE;
+ERROR 42000: SELECT, LOCK TABLES command denied to user 'root'@'localhost' for table 'events_stages_summary_by_thread_by_event_name'
+UNLOCK TABLES;
=== added file 'mysql-test/suite/perfschema/r/dml_esgs_global_by_event_name.result'
--- a/mysql-test/suite/perfschema/r/dml_esgs_global_by_event_name.result 1970-01-01 00:00:00 +0000
+++ b/mysql-test/suite/perfschema/r/dml_esgs_global_by_event_name.result 2011-02-15 14:31:13 +0000
@@ -0,0 +1,25 @@
+select * from performance_schema.events_stages_summary_global_by_event_name
+where event_name like 'stage/%' limit 1;
+select * from performance_schema.events_stages_summary_global_by_event_name
+where event_name='FOO';
+insert into performance_schema.events_stages_summary_global_by_event_name
+set event_name='FOO', count_star=1, sum_timer_wait=2, min_timer_wait=3,
+avg_timer_wait=4, max_timer_wait=5;
+ERROR 42000: INSERT command denied to user 'root'@'localhost' for table 'events_stages_summary_global_by_event_name'
+update performance_schema.events_stages_summary_global_by_event_name
+set count_star=12;
+ERROR 42000: UPDATE command denied to user 'root'@'localhost' for table 'events_stages_summary_global_by_event_name'
+update performance_schema.events_stages_summary_global_by_event_name
+set count_star=12 where event_name like "FOO";
+ERROR 42000: UPDATE command denied to user 'root'@'localhost' for table 'events_stages_summary_global_by_event_name'
+delete from performance_schema.events_stages_summary_global_by_event_name
+where count_star=1;
+ERROR 42000: DELETE command denied to user 'root'@'localhost' for table 'events_stages_summary_global_by_event_name'
+delete from performance_schema.events_stages_summary_global_by_event_name;
+ERROR 42000: DELETE command denied to user 'root'@'localhost' for table 'events_stages_summary_global_by_event_name'
+LOCK TABLES performance_schema.events_stages_summary_global_by_event_name READ;
+ERROR 42000: SELECT, LOCK TABLES command denied to user 'root'@'localhost' for table 'events_stages_summary_global_by_event_name'
+UNLOCK TABLES;
+LOCK TABLES performance_schema.events_stages_summary_global_by_event_name WRITE;
+ERROR 42000: SELECT, LOCK TABLES command denied to user 'root'@'localhost' for table 'events_stages_summary_global_by_event_name'
+UNLOCK TABLES;
=== added file 'mysql-test/suite/perfschema/r/dml_esms_by_thread_by_event_name.result'
--- a/mysql-test/suite/perfschema/r/dml_esms_by_thread_by_event_name.result 1970-01-01 00:00:00 +0000
+++ b/mysql-test/suite/perfschema/r/dml_esms_by_thread_by_event_name.result 2011-02-15 14:31:13 +0000
@@ -0,0 +1,26 @@
+select * from performance_schema.events_statements_summary_by_thread_by_event_name
+where event_name like 'statement/%' limit 1;
+select * from performance_schema.events_statements_summary_by_thread_by_event_name
+where event_name='FOO';
+insert into performance_schema.events_statements_summary_by_thread_by_event_name
+set event_name='FOO', thread_id=1,
+count_star=1, sum_timer_wait=2, min_timer_wait=3,
+avg_timer_wait=4, max_timer_wait=5;
+ERROR 42000: INSERT command denied to user 'root'@'localhost' for table 'events_statements_summary_by_thread_by_event_name'
+update performance_schema.events_statements_summary_by_thread_by_event_name
+set count_star=12;
+ERROR 42000: UPDATE command denied to user 'root'@'localhost' for table 'events_statements_summary_by_thread_by_event_name'
+update performance_schema.events_statements_summary_by_thread_by_event_name
+set count_star=12 where event_name like "FOO";
+ERROR 42000: UPDATE command denied to user 'root'@'localhost' for table 'events_statements_summary_by_thread_by_event_name'
+delete from performance_schema.events_statements_summary_by_thread_by_event_name
+where count_star=1;
+ERROR 42000: DELETE command denied to user 'root'@'localhost' for table 'events_statements_summary_by_thread_by_event_name'
+delete from performance_schema.events_statements_summary_by_thread_by_event_name;
+ERROR 42000: DELETE command denied to user 'root'@'localhost' for table 'events_statements_summary_by_thread_by_event_name'
+LOCK TABLES performance_schema.events_statements_summary_by_thread_by_event_name READ;
+ERROR 42000: SELECT, LOCK TABLES command denied to user 'root'@'localhost' for table 'events_statements_summary_by_thread_by_event_name'
+UNLOCK TABLES;
+LOCK TABLES performance_schema.events_statements_summary_by_thread_by_event_name WRITE;
+ERROR 42000: SELECT, LOCK TABLES command denied to user 'root'@'localhost' for table 'events_statements_summary_by_thread_by_event_name'
+UNLOCK TABLES;
=== added file 'mysql-test/suite/perfschema/r/dml_esms_global_by_event_name.result'
--- a/mysql-test/suite/perfschema/r/dml_esms_global_by_event_name.result 1970-01-01 00:00:00 +0000
+++ b/mysql-test/suite/perfschema/r/dml_esms_global_by_event_name.result 2011-02-15 14:31:13 +0000
@@ -0,0 +1,25 @@
+select * from performance_schema.events_statements_summary_global_by_event_name
+where event_name like 'statement/%' limit 1;
+select * from performance_schema.events_statements_summary_global_by_event_name
+where event_name='FOO';
+insert into performance_schema.events_statements_summary_global_by_event_name
+set event_name='FOO', count_star=1, sum_timer_wait=2, min_timer_wait=3,
+avg_timer_wait=4, max_timer_wait=5;
+ERROR 42000: INSERT command denied to user 'root'@'localhost' for table 'events_statements_summary_global_by_event_name'
+update performance_schema.events_statements_summary_global_by_event_name
+set count_star=12;
+ERROR 42000: UPDATE command denied to user 'root'@'localhost' for table 'events_statements_summary_global_by_event_name'
+update performance_schema.events_statements_summary_global_by_event_name
+set count_star=12 where event_name like "FOO";
+ERROR 42000: UPDATE command denied to user 'root'@'localhost' for table 'events_statements_summary_global_by_event_name'
+delete from performance_schema.events_statements_summary_global_by_event_name
+where count_star=1;
+ERROR 42000: DELETE command denied to user 'root'@'localhost' for table 'events_statements_summary_global_by_event_name'
+delete from performance_schema.events_statements_summary_global_by_event_name;
+ERROR 42000: DELETE command denied to user 'root'@'localhost' for table 'events_statements_summary_global_by_event_name'
+LOCK TABLES performance_schema.events_statements_summary_global_by_event_name READ;
+ERROR 42000: SELECT, LOCK TABLES command denied to user 'root'@'localhost' for table 'events_statements_summary_global_by_event_name'
+UNLOCK TABLES;
+LOCK TABLES performance_schema.events_statements_summary_global_by_event_name WRITE;
+ERROR 42000: SELECT, LOCK TABLES command denied to user 'root'@'localhost' for table 'events_statements_summary_global_by_event_name'
+UNLOCK TABLES;
=== added file 'mysql-test/suite/perfschema/r/dml_events_stages_current.result'
--- a/mysql-test/suite/perfschema/r/dml_events_stages_current.result 1970-01-01 00:00:00 +0000
+++ b/mysql-test/suite/perfschema/r/dml_events_stages_current.result 2011-02-15 14:31:13 +0000
@@ -0,0 +1,25 @@
+select * from performance_schema.events_stages_current
+where event_name like 'stage/%' limit 1;
+select * from performance_schema.events_stages_current
+where event_name='FOO';
+insert into performance_schema.events_stages_current
+set thread_id='1', event_id=1,
+event_name='FOO', timer_start=1, timer_end=2, timer_wait=3;
+ERROR 42000: INSERT command denied to user 'root'@'localhost' for table 'events_stages_current'
+update performance_schema.events_stages_current
+set timer_start=12;
+ERROR 42000: UPDATE command denied to user 'root'@'localhost' for table 'events_stages_current'
+update performance_schema.events_stages_current
+set timer_start=12 where thread_id=0;
+ERROR 42000: UPDATE command denied to user 'root'@'localhost' for table 'events_stages_current'
+delete from performance_schema.events_stages_current
+where thread_id=1;
+ERROR 42000: DELETE command denied to user 'root'@'localhost' for table 'events_stages_current'
+delete from performance_schema.events_stages_current;
+ERROR 42000: DELETE command denied to user 'root'@'localhost' for table 'events_stages_current'
+LOCK TABLES performance_schema.events_stages_current READ;
+ERROR 42000: SELECT, LOCK TABLES command denied to user 'root'@'localhost' for table 'events_stages_current'
+UNLOCK TABLES;
+LOCK TABLES performance_schema.events_stages_current WRITE;
+ERROR 42000: SELECT, LOCK TABLES command denied to user 'root'@'localhost' for table 'events_stages_current'
+UNLOCK TABLES;
=== added file 'mysql-test/suite/perfschema/r/dml_events_stages_history.result'
--- a/mysql-test/suite/perfschema/r/dml_events_stages_history.result 1970-01-01 00:00:00 +0000
+++ b/mysql-test/suite/perfschema/r/dml_events_stages_history.result 2011-02-15 14:31:13 +0000
@@ -0,0 +1,29 @@
+select * from performance_schema.events_stages_history
+where event_name like 'stage/%' limit 1;
+select * from performance_schema.events_stages_history
+where event_name='FOO';
+select * from performance_schema.events_stages_history
+where event_name like 'stage/%' order by timer_wait limit 1;
+select * from performance_schema.events_stages_history
+where event_name like 'stage/%' order by timer_wait desc limit 1;
+insert into performance_schema.events_stages_history
+set thread_id='1', event_id=1,
+event_name='FOO', timer_start=1, timer_end=2, timer_wait=3;
+ERROR 42000: INSERT command denied to user 'root'@'localhost' for table 'events_stages_history'
+update performance_schema.events_stages_history
+set timer_start=12;
+ERROR 42000: UPDATE command denied to user 'root'@'localhost' for table 'events_stages_history'
+update performance_schema.events_stages_history
+set timer_start=12 where thread_id=0;
+ERROR 42000: UPDATE command denied to user 'root'@'localhost' for table 'events_stages_history'
+delete from performance_schema.events_stages_history
+where thread_id=1;
+ERROR 42000: DELETE command denied to user 'root'@'localhost' for table 'events_stages_history'
+delete from performance_schema.events_stages_history;
+ERROR 42000: DELETE command denied to user 'root'@'localhost' for table 'events_stages_history'
+LOCK TABLES performance_schema.events_stages_history READ;
+ERROR 42000: SELECT, LOCK TABLES command denied to user 'root'@'localhost' for table 'events_stages_history'
+UNLOCK TABLES;
+LOCK TABLES performance_schema.events_stages_history WRITE;
+ERROR 42000: SELECT, LOCK TABLES command denied to user 'root'@'localhost' for table 'events_stages_history'
+UNLOCK TABLES;
=== added file 'mysql-test/suite/perfschema/r/dml_events_stages_history_long.result'
--- a/mysql-test/suite/perfschema/r/dml_events_stages_history_long.result 1970-01-01 00:00:00 +0000
+++ b/mysql-test/suite/perfschema/r/dml_events_stages_history_long.result 2011-02-15 14:31:13 +0000
@@ -0,0 +1,29 @@
+select * from performance_schema.events_stages_history_long
+where event_name like 'stage/%' limit 1;
+select * from performance_schema.events_stages_history_long
+where event_name='FOO';
+select * from performance_schema.events_stages_history_long
+where event_name like 'stage/%' order by timer_wait limit 1;
+select * from performance_schema.events_stages_history_long
+where event_name like 'stage/%' order by timer_wait desc limit 1;
+insert into performance_schema.events_stages_history_long
+set thread_id='1', event_id=1,
+event_name='FOO', timer_start=1, timer_end=2, timer_wait=3;
+ERROR 42000: INSERT command denied to user 'root'@'localhost' for table 'events_stages_history_long'
+update performance_schema.events_stages_history_long
+set timer_start=12;
+ERROR 42000: UPDATE command denied to user 'root'@'localhost' for table 'events_stages_history_long'
+update performance_schema.events_stages_history_long
+set timer_start=12 where thread_id=0;
+ERROR 42000: UPDATE command denied to user 'root'@'localhost' for table 'events_stages_history_long'
+delete from performance_schema.events_stages_history_long
+where thread_id=1;
+ERROR 42000: DELETE command denied to user 'root'@'localhost' for table 'events_stages_history_long'
+delete from performance_schema.events_stages_history_long;
+ERROR 42000: DELETE command denied to user 'root'@'localhost' for table 'events_stages_history_long'
+LOCK TABLES performance_schema.events_stages_history_long READ;
+ERROR 42000: SELECT, LOCK TABLES command denied to user 'root'@'localhost' for table 'events_stages_history_long'
+UNLOCK TABLES;
+LOCK TABLES performance_schema.events_stages_history_long WRITE;
+ERROR 42000: SELECT, LOCK TABLES command denied to user 'root'@'localhost' for table 'events_stages_history_long'
+UNLOCK TABLES;
=== added file 'mysql-test/suite/perfschema/r/dml_events_statements_current.result'
--- a/mysql-test/suite/perfschema/r/dml_events_statements_current.result 1970-01-01 00:00:00 +0000
+++ b/mysql-test/suite/perfschema/r/dml_events_statements_current.result 2011-02-15 14:31:13 +0000
@@ -0,0 +1,25 @@
+select * from performance_schema.events_statements_current
+where event_name like 'statement/%' limit 1;
+select * from performance_schema.events_statements_current
+where event_name='FOO';
+insert into performance_schema.events_statements_current
+set thread_id='1', event_id=1,
+event_name='FOO', timer_start=1, timer_end=2, timer_wait=3;
+ERROR 42000: INSERT command denied to user 'root'@'localhost' for table 'events_statements_current'
+update performance_schema.events_statements_current
+set timer_start=12;
+ERROR 42000: UPDATE command denied to user 'root'@'localhost' for table 'events_statements_current'
+update performance_schema.events_statements_current
+set timer_start=12 where thread_id=0;
+ERROR 42000: UPDATE command denied to user 'root'@'localhost' for table 'events_statements_current'
+delete from performance_schema.events_statements_current
+where thread_id=1;
+ERROR 42000: DELETE command denied to user 'root'@'localhost' for table 'events_statements_current'
+delete from performance_schema.events_statements_current;
+ERROR 42000: DELETE command denied to user 'root'@'localhost' for table 'events_statements_current'
+LOCK TABLES performance_schema.events_statements_current READ;
+ERROR 42000: SELECT, LOCK TABLES command denied to user 'root'@'localhost' for table 'events_statements_current'
+UNLOCK TABLES;
+LOCK TABLES performance_schema.events_statements_current WRITE;
+ERROR 42000: SELECT, LOCK TABLES command denied to user 'root'@'localhost' for table 'events_statements_current'
+UNLOCK TABLES;
=== added file 'mysql-test/suite/perfschema/r/dml_events_statements_history.result'
--- a/mysql-test/suite/perfschema/r/dml_events_statements_history.result 1970-01-01 00:00:00 +0000
+++ b/mysql-test/suite/perfschema/r/dml_events_statements_history.result 2011-02-15 14:31:13 +0000
@@ -0,0 +1,29 @@
+select * from performance_schema.events_statements_history
+where event_name like 'statement/%' limit 1;
+select * from performance_schema.events_statements_history
+where event_name='FOO';
+select * from performance_schema.events_statements_history
+where event_name like 'statement/%' order by timer_wait limit 1;
+select * from performance_schema.events_statements_history
+where event_name like 'statement/%' order by timer_wait desc limit 1;
+insert into performance_schema.events_statements_history
+set thread_id='1', event_id=1,
+event_name='FOO', timer_start=1, timer_end=2, timer_wait=3;
+ERROR 42000: INSERT command denied to user 'root'@'localhost' for table 'events_statements_history'
+update performance_schema.events_statements_history
+set timer_start=12;
+ERROR 42000: UPDATE command denied to user 'root'@'localhost' for table 'events_statements_history'
+update performance_schema.events_statements_history
+set timer_start=12 where thread_id=0;
+ERROR 42000: UPDATE command denied to user 'root'@'localhost' for table 'events_statements_history'
+delete from performance_schema.events_statements_history
+where thread_id=1;
+ERROR 42000: DELETE command denied to user 'root'@'localhost' for table 'events_statements_history'
+delete from performance_schema.events_statements_history;
+ERROR 42000: DELETE command denied to user 'root'@'localhost' for table 'events_statements_history'
+LOCK TABLES performance_schema.events_statements_history READ;
+ERROR 42000: SELECT, LOCK TABLES command denied to user 'root'@'localhost' for table 'events_statements_history'
+UNLOCK TABLES;
+LOCK TABLES performance_schema.events_statements_history WRITE;
+ERROR 42000: SELECT, LOCK TABLES command denied to user 'root'@'localhost' for table 'events_statements_history'
+UNLOCK TABLES;
=== added file 'mysql-test/suite/perfschema/r/dml_events_statements_history_long.result'
--- a/mysql-test/suite/perfschema/r/dml_events_statements_history_long.result 1970-01-01 00:00:00 +0000
+++ b/mysql-test/suite/perfschema/r/dml_events_statements_history_long.result 2011-02-15 14:31:13 +0000
@@ -0,0 +1,29 @@
+select * from performance_schema.events_statements_history_long
+where event_name like 'statement/%' limit 1;
+select * from performance_schema.events_statements_history_long
+where event_name='FOO';
+select * from performance_schema.events_statements_history_long
+where event_name like 'statement/%' order by timer_wait limit 1;
+select * from performance_schema.events_statements_history_long
+where event_name like 'statement/%' order by timer_wait desc limit 1;
+insert into performance_schema.events_statements_history_long
+set thread_id='1', event_id=1,
+event_name='FOO', timer_start=1, timer_end=2, timer_wait=3;
+ERROR 42000: INSERT command denied to user 'root'@'localhost' for table 'events_statements_history_long'
+update performance_schema.events_statements_history_long
+set timer_start=12;
+ERROR 42000: UPDATE command denied to user 'root'@'localhost' for table 'events_statements_history_long'
+update performance_schema.events_statements_history_long
+set timer_start=12 where thread_id=0;
+ERROR 42000: UPDATE command denied to user 'root'@'localhost' for table 'events_statements_history_long'
+delete from performance_schema.events_statements_history_long
+where thread_id=1;
+ERROR 42000: DELETE command denied to user 'root'@'localhost' for table 'events_statements_history_long'
+delete from performance_schema.events_statements_history_long;
+ERROR 42000: DELETE command denied to user 'root'@'localhost' for table 'events_statements_history_long'
+LOCK TABLES performance_schema.events_statements_history_long READ;
+ERROR 42000: SELECT, LOCK TABLES command denied to user 'root'@'localhost' for table 'events_statements_history_long'
+UNLOCK TABLES;
+LOCK TABLES performance_schema.events_statements_history_long WRITE;
+ERROR 42000: SELECT, LOCK TABLES command denied to user 'root'@'localhost' for table 'events_statements_history_long'
+UNLOCK TABLES;
=== modified file 'mysql-test/suite/perfschema/r/start_server_nothing.result'
--- a/mysql-test/suite/perfschema/r/start_server_nothing.result 2011-02-14 14:23:55 +0000
+++ b/mysql-test/suite/perfschema/r/start_server_nothing.result 2011-02-15 14:31:13 +0000
@@ -157,8 +157,8 @@ select * from performance_schema.file_su
FILE_NAME EVENT_NAME COUNT_READ COUNT_WRITE SUM_NUMBER_OF_BYTES_READ SUM_NUMBER_OF_BYTES_WRITE
select * from performance_schema.mutex_instances;
NAME OBJECT_INSTANCE_BEGIN LOCKED_BY_THREAD_ID
-select * from performance_schema.threads;
-THREAD_ID NAME TYPE PROCESSLIST_ID PROCESSLIST_USER PROCESSLIST_HOST PROCESSLIST_DB PROCESSLIST_COMMAND PROCESSLIST_TIME PROCESSLIST_STATE PROCESSLIST_INFO PARENT_THREAD_ID ROLE INSTRUMENTED
+select * from performance_schema.objects_summary_global_by_type;
+OBJECT_TYPE OBJECT_SCHEMA OBJECT_NAME COUNT_STAR SUM_TIMER_WAIT MIN_TIMER_WAIT AVG_TIMER_WAIT MAX_TIMER_WAIT
select * from performance_schema.rwlock_instances;
NAME OBJECT_INSTANCE_BEGIN WRITE_LOCKED_BY_THREAD_ID READ_LOCKED_BY_COUNT
select * from performance_schema.threads;
=== modified file 'mysql-test/suite/perfschema/t/checksum.test'
--- a/mysql-test/suite/perfschema/t/checksum.test 2010-11-03 15:42:33 +0000
+++ b/mysql-test/suite/perfschema/t/checksum.test 2011-02-15 14:31:13 +0000
@@ -1,4 +1,4 @@
-# Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2010, 2011 Oracle and/or its affiliates. All rights reserved.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -25,6 +25,16 @@
--disable_result_log
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_thread_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_thread_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;
@@ -40,9 +50,22 @@ checksum table performance_schema.rwlock
checksum table performance_schema.setup_consumers;
checksum table performance_schema.setup_instruments;
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_table;
+checksum table performance_schema.table_lock_waits_summary_by_table;
checksum table performance_schema.threads;
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_thread_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_thread_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;
@@ -58,6 +81,9 @@ checksum table performance_schema.rwlock
checksum table performance_schema.setup_consumers extended;
checksum table performance_schema.setup_instruments 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_table extended;
+checksum table performance_schema.table_lock_waits_summary_by_table extended;
checksum table performance_schema.threads extended;
--enable_result_log
=== added file 'mysql-test/suite/perfschema/t/ddl_esgs_by_thread_by_event_name.test'
--- a/mysql-test/suite/perfschema/t/ddl_esgs_by_thread_by_event_name.test 1970-01-01 00:00:00 +0000
+++ b/mysql-test/suite/perfschema/t/ddl_esgs_by_thread_by_event_name.test 2011-02-15 14:31:13 +0000
@@ -0,0 +1,33 @@
+# Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; version 2 of the License.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software Foundation,
+# 51 Franklin Street, Suite 500, Boston, MA 02110-1335 USA
+
+# Tests for PERFORMANCE_SCHEMA
+
+--source include/not_embedded.inc
+--source include/have_perfschema.inc
+
+-- error ER_DBACCESS_DENIED_ERROR
+alter table performance_schema.events_stages_summary_by_thread_by_event_name
+ add column foo integer;
+
+truncate table performance_schema.events_stages_summary_by_thread_by_event_name;
+
+-- error ER_DBACCESS_DENIED_ERROR
+ALTER TABLE performance_schema.events_stages_summary_by_thread_by_event_name ADD INDEX test_index(THREAD_ID);
+
+-- error ER_DBACCESS_DENIED_ERROR
+CREATE UNIQUE INDEX test_index
+ ON performance_schema.events_stages_summary_by_thread_by_event_name(THREAD_ID);
+
=== added file 'mysql-test/suite/perfschema/t/ddl_esgs_global_by_event_name.test'
--- a/mysql-test/suite/perfschema/t/ddl_esgs_global_by_event_name.test 1970-01-01 00:00:00 +0000
+++ b/mysql-test/suite/perfschema/t/ddl_esgs_global_by_event_name.test 2011-02-15 14:31:13 +0000
@@ -0,0 +1,34 @@
+# Copyright (C) 2008-2009 Sun Microsystems, Inc
+#
+# 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, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+
+# Tests for PERFORMANCE_SCHEMA
+
+--source include/not_embedded.inc
+--source include/have_perfschema.inc
+
+-- error ER_DBACCESS_DENIED_ERROR
+alter table performance_schema.events_stages_summary_global_by_event_name
+ add column foo integer;
+
+truncate table performance_schema.events_stages_summary_global_by_event_name;
+
+-- error ER_DBACCESS_DENIED_ERROR
+ALTER TABLE performance_schema.events_stages_summary_global_by_event_name
+ ADD INDEX test_index(EVENT_NAME);
+
+-- error ER_DBACCESS_DENIED_ERROR
+CREATE UNIQUE INDEX test_index
+ ON performance_schema.events_stages_summary_global_by_event_name(EVENT_NAME);
+
=== added file 'mysql-test/suite/perfschema/t/ddl_esms_by_thread_by_event_name.test'
--- a/mysql-test/suite/perfschema/t/ddl_esms_by_thread_by_event_name.test 1970-01-01 00:00:00 +0000
+++ b/mysql-test/suite/perfschema/t/ddl_esms_by_thread_by_event_name.test 2011-02-15 14:31:13 +0000
@@ -0,0 +1,33 @@
+# Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; version 2 of the License.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software Foundation,
+# 51 Franklin Street, Suite 500, Boston, MA 02110-1335 USA
+
+# Tests for PERFORMANCE_SCHEMA
+
+--source include/not_embedded.inc
+--source include/have_perfschema.inc
+
+-- error ER_DBACCESS_DENIED_ERROR
+alter table performance_schema.events_statements_summary_by_thread_by_event_name
+ add column foo integer;
+
+truncate table performance_schema.events_statements_summary_by_thread_by_event_name;
+
+-- error ER_DBACCESS_DENIED_ERROR
+ALTER TABLE performance_schema.events_statements_summary_by_thread_by_event_name ADD INDEX test_index(THREAD_ID);
+
+-- error ER_DBACCESS_DENIED_ERROR
+CREATE UNIQUE INDEX test_index
+ ON performance_schema.events_statements_summary_by_thread_by_event_name(THREAD_ID);
+
=== added file 'mysql-test/suite/perfschema/t/ddl_esms_global_by_event_name.test'
--- a/mysql-test/suite/perfschema/t/ddl_esms_global_by_event_name.test 1970-01-01 00:00:00 +0000
+++ b/mysql-test/suite/perfschema/t/ddl_esms_global_by_event_name.test 2011-02-15 14:31:13 +0000
@@ -0,0 +1,34 @@
+# Copyright (C) 2008-2009 Sun Microsystems, Inc
+#
+# 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, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+
+# Tests for PERFORMANCE_SCHEMA
+
+--source include/not_embedded.inc
+--source include/have_perfschema.inc
+
+-- error ER_DBACCESS_DENIED_ERROR
+alter table performance_schema.events_statements_summary_global_by_event_name
+ add column foo integer;
+
+truncate table performance_schema.events_statements_summary_global_by_event_name;
+
+-- error ER_DBACCESS_DENIED_ERROR
+ALTER TABLE performance_schema.events_statements_summary_global_by_event_name
+ ADD INDEX test_index(EVENT_NAME);
+
+-- error ER_DBACCESS_DENIED_ERROR
+CREATE UNIQUE INDEX test_index
+ ON performance_schema.events_statements_summary_global_by_event_name(EVENT_NAME);
+
=== added file 'mysql-test/suite/perfschema/t/ddl_events_stages_current.test'
--- a/mysql-test/suite/perfschema/t/ddl_events_stages_current.test 1970-01-01 00:00:00 +0000
+++ b/mysql-test/suite/perfschema/t/ddl_events_stages_current.test 2011-02-15 14:31:13 +0000
@@ -0,0 +1,31 @@
+# Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; version 2 of the License.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software Foundation,
+# 51 Franklin Street, Suite 500, Boston, MA 02110-1335 USA
+
+# Tests for PERFORMANCE_SCHEMA
+
+--source include/not_embedded.inc
+--source include/have_perfschema.inc
+
+-- error ER_DBACCESS_DENIED_ERROR
+alter table performance_schema.events_stages_current add column foo integer;
+
+truncate table performance_schema.events_stages_current;
+
+-- error ER_DBACCESS_DENIED_ERROR
+ALTER TABLE performance_schema.events_stages_current ADD INDEX test_index(EVENT_ID);
+
+-- error ER_DBACCESS_DENIED_ERROR
+CREATE UNIQUE INDEX test_index ON performance_schema.events_stages_current(EVENT_ID);
+
=== added file 'mysql-test/suite/perfschema/t/ddl_events_stages_history.test'
--- a/mysql-test/suite/perfschema/t/ddl_events_stages_history.test 1970-01-01 00:00:00 +0000
+++ b/mysql-test/suite/perfschema/t/ddl_events_stages_history.test 2011-02-15 14:31:13 +0000
@@ -0,0 +1,31 @@
+# Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; version 2 of the License.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software Foundation,
+# 51 Franklin Street, Suite 500, Boston, MA 02110-1335 USA
+
+# Tests for PERFORMANCE_SCHEMA
+
+--source include/not_embedded.inc
+--source include/have_perfschema.inc
+
+-- error ER_DBACCESS_DENIED_ERROR
+alter table performance_schema.events_stages_history add column foo integer;
+
+truncate table performance_schema.events_stages_history;
+
+-- error ER_DBACCESS_DENIED_ERROR
+ALTER TABLE performance_schema.events_stages_history ADD INDEX test_index(EVENT_ID);
+
+-- error ER_DBACCESS_DENIED_ERROR
+CREATE UNIQUE INDEX test_index ON performance_schema.events_stages_history(EVENT_ID);
+
=== added file 'mysql-test/suite/perfschema/t/ddl_events_stages_history_long.test'
--- a/mysql-test/suite/perfschema/t/ddl_events_stages_history_long.test 1970-01-01 00:00:00 +0000
+++ b/mysql-test/suite/perfschema/t/ddl_events_stages_history_long.test 2011-02-15 14:31:13 +0000
@@ -0,0 +1,31 @@
+# Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; version 2 of the License.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software Foundation,
+# 51 Franklin Street, Suite 500, Boston, MA 02110-1335 USA
+
+# Tests for PERFORMANCE_SCHEMA
+
+--source include/not_embedded.inc
+--source include/have_perfschema.inc
+
+-- error ER_DBACCESS_DENIED_ERROR
+alter table performance_schema.events_stages_history_long add column foo integer;
+
+truncate table performance_schema.events_stages_history_long;
+
+-- error ER_DBACCESS_DENIED_ERROR
+ALTER TABLE performance_schema.events_stages_history_long ADD INDEX test_index(EVENT_ID);
+
+-- error ER_DBACCESS_DENIED_ERROR
+CREATE UNIQUE INDEX test_index ON performance_schema.events_stages_history_long(EVENT_ID);
+
=== added file 'mysql-test/suite/perfschema/t/ddl_events_statements_current.test'
--- a/mysql-test/suite/perfschema/t/ddl_events_statements_current.test 1970-01-01 00:00:00 +0000
+++ b/mysql-test/suite/perfschema/t/ddl_events_statements_current.test 2011-02-15 14:31:13 +0000
@@ -0,0 +1,31 @@
+# Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; version 2 of the License.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software Foundation,
+# 51 Franklin Street, Suite 500, Boston, MA 02110-1335 USA
+
+# Tests for PERFORMANCE_SCHEMA
+
+--source include/not_embedded.inc
+--source include/have_perfschema.inc
+
+-- error ER_DBACCESS_DENIED_ERROR
+alter table performance_schema.events_statements_current add column foo integer;
+
+truncate table performance_schema.events_statements_current;
+
+-- error ER_DBACCESS_DENIED_ERROR
+ALTER TABLE performance_schema.events_statements_current ADD INDEX test_index(EVENT_ID);
+
+-- error ER_DBACCESS_DENIED_ERROR
+CREATE UNIQUE INDEX test_index ON performance_schema.events_statements_current(EVENT_ID);
+
=== added file 'mysql-test/suite/perfschema/t/ddl_events_statements_history.test'
--- a/mysql-test/suite/perfschema/t/ddl_events_statements_history.test 1970-01-01 00:00:00 +0000
+++ b/mysql-test/suite/perfschema/t/ddl_events_statements_history.test 2011-02-15 14:31:13 +0000
@@ -0,0 +1,31 @@
+# Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; version 2 of the License.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software Foundation,
+# 51 Franklin Street, Suite 500, Boston, MA 02110-1335 USA
+
+# Tests for PERFORMANCE_SCHEMA
+
+--source include/not_embedded.inc
+--source include/have_perfschema.inc
+
+-- error ER_DBACCESS_DENIED_ERROR
+alter table performance_schema.events_statements_history add column foo integer;
+
+truncate table performance_schema.events_statements_history;
+
+-- error ER_DBACCESS_DENIED_ERROR
+ALTER TABLE performance_schema.events_statements_history ADD INDEX test_index(EVENT_ID);
+
+-- error ER_DBACCESS_DENIED_ERROR
+CREATE UNIQUE INDEX test_index ON performance_schema.events_statements_history(EVENT_ID);
+
=== added file 'mysql-test/suite/perfschema/t/ddl_events_statements_history_long.test'
--- a/mysql-test/suite/perfschema/t/ddl_events_statements_history_long.test 1970-01-01 00:00:00 +0000
+++ b/mysql-test/suite/perfschema/t/ddl_events_statements_history_long.test 2011-02-15 14:31:13 +0000
@@ -0,0 +1,31 @@
+# Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; version 2 of the License.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software Foundation,
+# 51 Franklin Street, Suite 500, Boston, MA 02110-1335 USA
+
+# Tests for PERFORMANCE_SCHEMA
+
+--source include/not_embedded.inc
+--source include/have_perfschema.inc
+
+-- error ER_DBACCESS_DENIED_ERROR
+alter table performance_schema.events_statements_history_long add column foo integer;
+
+truncate table performance_schema.events_statements_history_long;
+
+-- error ER_DBACCESS_DENIED_ERROR
+ALTER TABLE performance_schema.events_statements_history_long ADD INDEX test_index(EVENT_ID);
+
+-- error ER_DBACCESS_DENIED_ERROR
+CREATE UNIQUE INDEX test_index ON performance_schema.events_statements_history_long(EVENT_ID);
+
=== added file 'mysql-test/suite/perfschema/t/dml_esgs_by_thread_by_event_name.test'
--- a/mysql-test/suite/perfschema/t/dml_esgs_by_thread_by_event_name.test 1970-01-01 00:00:00 +0000
+++ b/mysql-test/suite/perfschema/t/dml_esgs_by_thread_by_event_name.test 2011-02-15 14:31:13 +0000
@@ -0,0 +1,57 @@
+# Copyright (c) 2009, 2010, Oracle and/or its affiliates. All rights reserved.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; version 2 of the License.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software Foundation,
+# 51 Franklin Street, Suite 500, Boston, MA 02110-1335 USA
+
+# Tests for PERFORMANCE_SCHEMA
+
+--source include/not_embedded.inc
+--source include/have_perfschema.inc
+
+--disable_result_log
+select * from performance_schema.events_stages_summary_by_thread_by_event_name
+ where event_name like 'stage/%' limit 1;
+
+select * from performance_schema.events_stages_summary_by_thread_by_event_name
+ where event_name='FOO';
+--enable_result_log
+
+--error ER_TABLEACCESS_DENIED_ERROR
+insert into performance_schema.events_stages_summary_by_thread_by_event_name
+ set event_name='FOO', thread_id=1,
+ count_star=1, sum_timer_wait=2, min_timer_wait=3,
+ avg_timer_wait=4, max_timer_wait=5;
+
+--error ER_TABLEACCESS_DENIED_ERROR
+update performance_schema.events_stages_summary_by_thread_by_event_name
+ set count_star=12;
+
+--error ER_TABLEACCESS_DENIED_ERROR
+update performance_schema.events_stages_summary_by_thread_by_event_name
+ set count_star=12 where event_name like "FOO";
+
+--error ER_TABLEACCESS_DENIED_ERROR
+delete from performance_schema.events_stages_summary_by_thread_by_event_name
+ where count_star=1;
+
+--error ER_TABLEACCESS_DENIED_ERROR
+delete from performance_schema.events_stages_summary_by_thread_by_event_name;
+
+-- error ER_TABLEACCESS_DENIED_ERROR
+LOCK TABLES performance_schema.events_stages_summary_by_thread_by_event_name READ;
+UNLOCK TABLES;
+
+-- error ER_TABLEACCESS_DENIED_ERROR
+LOCK TABLES performance_schema.events_stages_summary_by_thread_by_event_name WRITE;
+UNLOCK TABLES;
+
=== added file 'mysql-test/suite/perfschema/t/dml_esgs_global_by_event_name.test'
--- a/mysql-test/suite/perfschema/t/dml_esgs_global_by_event_name.test 1970-01-01 00:00:00 +0000
+++ b/mysql-test/suite/perfschema/t/dml_esgs_global_by_event_name.test 2011-02-15 14:31:13 +0000
@@ -0,0 +1,56 @@
+# Copyright (C) 2009 Sun Microsystems, Inc
+#
+# 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, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+
+# Tests for PERFORMANCE_SCHEMA
+
+--source include/not_embedded.inc
+--source include/have_perfschema.inc
+
+--disable_result_log
+select * from performance_schema.events_stages_summary_global_by_event_name
+ where event_name like 'stage/%' limit 1;
+
+select * from performance_schema.events_stages_summary_global_by_event_name
+ where event_name='FOO';
+--enable_result_log
+
+--error ER_TABLEACCESS_DENIED_ERROR
+insert into performance_schema.events_stages_summary_global_by_event_name
+ set event_name='FOO', count_star=1, sum_timer_wait=2, min_timer_wait=3,
+ avg_timer_wait=4, max_timer_wait=5;
+
+--error ER_TABLEACCESS_DENIED_ERROR
+update performance_schema.events_stages_summary_global_by_event_name
+ set count_star=12;
+
+--error ER_TABLEACCESS_DENIED_ERROR
+update performance_schema.events_stages_summary_global_by_event_name
+ set count_star=12 where event_name like "FOO";
+
+--error ER_TABLEACCESS_DENIED_ERROR
+delete from performance_schema.events_stages_summary_global_by_event_name
+ where count_star=1;
+
+--error ER_TABLEACCESS_DENIED_ERROR
+delete from performance_schema.events_stages_summary_global_by_event_name;
+
+-- error ER_TABLEACCESS_DENIED_ERROR
+LOCK TABLES performance_schema.events_stages_summary_global_by_event_name READ;
+UNLOCK TABLES;
+
+-- error ER_TABLEACCESS_DENIED_ERROR
+LOCK TABLES performance_schema.events_stages_summary_global_by_event_name WRITE;
+UNLOCK TABLES;
+
=== added file 'mysql-test/suite/perfschema/t/dml_esms_by_thread_by_event_name.test'
--- a/mysql-test/suite/perfschema/t/dml_esms_by_thread_by_event_name.test 1970-01-01 00:00:00 +0000
+++ b/mysql-test/suite/perfschema/t/dml_esms_by_thread_by_event_name.test 2011-02-15 14:31:13 +0000
@@ -0,0 +1,57 @@
+# Copyright (c) 2009, 2010, Oracle and/or its affiliates. All rights reserved.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; version 2 of the License.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software Foundation,
+# 51 Franklin Street, Suite 500, Boston, MA 02110-1335 USA
+
+# Tests for PERFORMANCE_SCHEMA
+
+--source include/not_embedded.inc
+--source include/have_perfschema.inc
+
+--disable_result_log
+select * from performance_schema.events_statements_summary_by_thread_by_event_name
+ where event_name like 'statement/%' limit 1;
+
+select * from performance_schema.events_statements_summary_by_thread_by_event_name
+ where event_name='FOO';
+--enable_result_log
+
+--error ER_TABLEACCESS_DENIED_ERROR
+insert into performance_schema.events_statements_summary_by_thread_by_event_name
+ set event_name='FOO', thread_id=1,
+ count_star=1, sum_timer_wait=2, min_timer_wait=3,
+ avg_timer_wait=4, max_timer_wait=5;
+
+--error ER_TABLEACCESS_DENIED_ERROR
+update performance_schema.events_statements_summary_by_thread_by_event_name
+ set count_star=12;
+
+--error ER_TABLEACCESS_DENIED_ERROR
+update performance_schema.events_statements_summary_by_thread_by_event_name
+ set count_star=12 where event_name like "FOO";
+
+--error ER_TABLEACCESS_DENIED_ERROR
+delete from performance_schema.events_statements_summary_by_thread_by_event_name
+ where count_star=1;
+
+--error ER_TABLEACCESS_DENIED_ERROR
+delete from performance_schema.events_statements_summary_by_thread_by_event_name;
+
+-- error ER_TABLEACCESS_DENIED_ERROR
+LOCK TABLES performance_schema.events_statements_summary_by_thread_by_event_name READ;
+UNLOCK TABLES;
+
+-- error ER_TABLEACCESS_DENIED_ERROR
+LOCK TABLES performance_schema.events_statements_summary_by_thread_by_event_name WRITE;
+UNLOCK TABLES;
+
=== added file 'mysql-test/suite/perfschema/t/dml_esms_global_by_event_name.test'
--- a/mysql-test/suite/perfschema/t/dml_esms_global_by_event_name.test 1970-01-01 00:00:00 +0000
+++ b/mysql-test/suite/perfschema/t/dml_esms_global_by_event_name.test 2011-02-15 14:31:13 +0000
@@ -0,0 +1,56 @@
+# Copyright (C) 2009 Sun Microsystems, Inc
+#
+# 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, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+
+# Tests for PERFORMANCE_SCHEMA
+
+--source include/not_embedded.inc
+--source include/have_perfschema.inc
+
+--disable_result_log
+select * from performance_schema.events_statements_summary_global_by_event_name
+ where event_name like 'statement/%' limit 1;
+
+select * from performance_schema.events_statements_summary_global_by_event_name
+ where event_name='FOO';
+--enable_result_log
+
+--error ER_TABLEACCESS_DENIED_ERROR
+insert into performance_schema.events_statements_summary_global_by_event_name
+ set event_name='FOO', count_star=1, sum_timer_wait=2, min_timer_wait=3,
+ avg_timer_wait=4, max_timer_wait=5;
+
+--error ER_TABLEACCESS_DENIED_ERROR
+update performance_schema.events_statements_summary_global_by_event_name
+ set count_star=12;
+
+--error ER_TABLEACCESS_DENIED_ERROR
+update performance_schema.events_statements_summary_global_by_event_name
+ set count_star=12 where event_name like "FOO";
+
+--error ER_TABLEACCESS_DENIED_ERROR
+delete from performance_schema.events_statements_summary_global_by_event_name
+ where count_star=1;
+
+--error ER_TABLEACCESS_DENIED_ERROR
+delete from performance_schema.events_statements_summary_global_by_event_name;
+
+-- error ER_TABLEACCESS_DENIED_ERROR
+LOCK TABLES performance_schema.events_statements_summary_global_by_event_name READ;
+UNLOCK TABLES;
+
+-- error ER_TABLEACCESS_DENIED_ERROR
+LOCK TABLES performance_schema.events_statements_summary_global_by_event_name WRITE;
+UNLOCK TABLES;
+
=== added file 'mysql-test/suite/perfschema/t/dml_events_stages_current.test'
--- a/mysql-test/suite/perfschema/t/dml_events_stages_current.test 1970-01-01 00:00:00 +0000
+++ b/mysql-test/suite/perfschema/t/dml_events_stages_current.test 2011-02-15 14:31:13 +0000
@@ -0,0 +1,56 @@
+# Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; version 2 of the License.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software Foundation,
+# 51 Franklin Street, Suite 500, Boston, MA 02110-1335 USA
+
+# Tests for PERFORMANCE_SCHEMA
+
+--source include/not_embedded.inc
+--source include/have_perfschema.inc
+
+--disable_result_log
+select * from performance_schema.events_stages_current
+ where event_name like 'stage/%' limit 1;
+
+select * from performance_schema.events_stages_current
+ where event_name='FOO';
+--enable_result_log
+
+--error ER_TABLEACCESS_DENIED_ERROR
+insert into performance_schema.events_stages_current
+ set thread_id='1', event_id=1,
+ event_name='FOO', timer_start=1, timer_end=2, timer_wait=3;
+
+--error ER_TABLEACCESS_DENIED_ERROR
+update performance_schema.events_stages_current
+ set timer_start=12;
+
+--error ER_TABLEACCESS_DENIED_ERROR
+update performance_schema.events_stages_current
+ set timer_start=12 where thread_id=0;
+
+--error ER_TABLEACCESS_DENIED_ERROR
+delete from performance_schema.events_stages_current
+ where thread_id=1;
+
+--error ER_TABLEACCESS_DENIED_ERROR
+delete from performance_schema.events_stages_current;
+
+-- error ER_TABLEACCESS_DENIED_ERROR
+LOCK TABLES performance_schema.events_stages_current READ;
+UNLOCK TABLES;
+
+-- error ER_TABLEACCESS_DENIED_ERROR
+LOCK TABLES performance_schema.events_stages_current WRITE;
+UNLOCK TABLES;
+
=== added file 'mysql-test/suite/perfschema/t/dml_events_stages_history.test'
--- a/mysql-test/suite/perfschema/t/dml_events_stages_history.test 1970-01-01 00:00:00 +0000
+++ b/mysql-test/suite/perfschema/t/dml_events_stages_history.test 2011-02-15 14:31:13 +0000
@@ -0,0 +1,62 @@
+# Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; version 2 of the License.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software Foundation,
+# 51 Franklin Street, Suite 500, Boston, MA 02110-1335 USA
+
+# Tests for PERFORMANCE_SCHEMA
+
+--source include/not_embedded.inc
+--source include/have_perfschema.inc
+
+--disable_result_log
+select * from performance_schema.events_stages_history
+ where event_name like 'stage/%' limit 1;
+
+select * from performance_schema.events_stages_history
+ where event_name='FOO';
+
+select * from performance_schema.events_stages_history
+ where event_name like 'stage/%' order by timer_wait limit 1;
+
+select * from performance_schema.events_stages_history
+ where event_name like 'stage/%' order by timer_wait desc limit 1;
+--enable_result_log
+
+--error ER_TABLEACCESS_DENIED_ERROR
+insert into performance_schema.events_stages_history
+ set thread_id='1', event_id=1,
+ event_name='FOO', timer_start=1, timer_end=2, timer_wait=3;
+
+--error ER_TABLEACCESS_DENIED_ERROR
+update performance_schema.events_stages_history
+ set timer_start=12;
+
+--error ER_TABLEACCESS_DENIED_ERROR
+update performance_schema.events_stages_history
+ set timer_start=12 where thread_id=0;
+
+--error ER_TABLEACCESS_DENIED_ERROR
+delete from performance_schema.events_stages_history
+ where thread_id=1;
+
+--error ER_TABLEACCESS_DENIED_ERROR
+delete from performance_schema.events_stages_history;
+
+-- error ER_TABLEACCESS_DENIED_ERROR
+LOCK TABLES performance_schema.events_stages_history READ;
+UNLOCK TABLES;
+
+-- error ER_TABLEACCESS_DENIED_ERROR
+LOCK TABLES performance_schema.events_stages_history WRITE;
+UNLOCK TABLES;
+
=== added file 'mysql-test/suite/perfschema/t/dml_events_stages_history_long.test'
--- a/mysql-test/suite/perfschema/t/dml_events_stages_history_long.test 1970-01-01 00:00:00 +0000
+++ b/mysql-test/suite/perfschema/t/dml_events_stages_history_long.test 2011-02-15 14:31:13 +0000
@@ -0,0 +1,62 @@
+# Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; version 2 of the License.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software Foundation,
+# 51 Franklin Street, Suite 500, Boston, MA 02110-1335 USA
+
+# Tests for PERFORMANCE_SCHEMA
+
+--source include/not_embedded.inc
+--source include/have_perfschema.inc
+
+--disable_result_log
+select * from performance_schema.events_stages_history_long
+ where event_name like 'stage/%' limit 1;
+
+select * from performance_schema.events_stages_history_long
+ where event_name='FOO';
+
+select * from performance_schema.events_stages_history_long
+ where event_name like 'stage/%' order by timer_wait limit 1;
+
+select * from performance_schema.events_stages_history_long
+ where event_name like 'stage/%' order by timer_wait desc limit 1;
+--enable_result_log
+
+--error ER_TABLEACCESS_DENIED_ERROR
+insert into performance_schema.events_stages_history_long
+ set thread_id='1', event_id=1,
+ event_name='FOO', timer_start=1, timer_end=2, timer_wait=3;
+
+--error ER_TABLEACCESS_DENIED_ERROR
+update performance_schema.events_stages_history_long
+ set timer_start=12;
+
+--error ER_TABLEACCESS_DENIED_ERROR
+update performance_schema.events_stages_history_long
+ set timer_start=12 where thread_id=0;
+
+--error ER_TABLEACCESS_DENIED_ERROR
+delete from performance_schema.events_stages_history_long
+ where thread_id=1;
+
+--error ER_TABLEACCESS_DENIED_ERROR
+delete from performance_schema.events_stages_history_long;
+
+-- error ER_TABLEACCESS_DENIED_ERROR
+LOCK TABLES performance_schema.events_stages_history_long READ;
+UNLOCK TABLES;
+
+-- error ER_TABLEACCESS_DENIED_ERROR
+LOCK TABLES performance_schema.events_stages_history_long WRITE;
+UNLOCK TABLES;
+
=== added file 'mysql-test/suite/perfschema/t/dml_events_statements_current.test'
--- a/mysql-test/suite/perfschema/t/dml_events_statements_current.test 1970-01-01 00:00:00 +0000
+++ b/mysql-test/suite/perfschema/t/dml_events_statements_current.test 2011-02-15 14:31:13 +0000
@@ -0,0 +1,56 @@
+# Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; version 2 of the License.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software Foundation,
+# 51 Franklin Street, Suite 500, Boston, MA 02110-1335 USA
+
+# Tests for PERFORMANCE_SCHEMA
+
+--source include/not_embedded.inc
+--source include/have_perfschema.inc
+
+--disable_result_log
+select * from performance_schema.events_statements_current
+ where event_name like 'statement/%' limit 1;
+
+select * from performance_schema.events_statements_current
+ where event_name='FOO';
+--enable_result_log
+
+--error ER_TABLEACCESS_DENIED_ERROR
+insert into performance_schema.events_statements_current
+ set thread_id='1', event_id=1,
+ event_name='FOO', timer_start=1, timer_end=2, timer_wait=3;
+
+--error ER_TABLEACCESS_DENIED_ERROR
+update performance_schema.events_statements_current
+ set timer_start=12;
+
+--error ER_TABLEACCESS_DENIED_ERROR
+update performance_schema.events_statements_current
+ set timer_start=12 where thread_id=0;
+
+--error ER_TABLEACCESS_DENIED_ERROR
+delete from performance_schema.events_statements_current
+ where thread_id=1;
+
+--error ER_TABLEACCESS_DENIED_ERROR
+delete from performance_schema.events_statements_current;
+
+-- error ER_TABLEACCESS_DENIED_ERROR
+LOCK TABLES performance_schema.events_statements_current READ;
+UNLOCK TABLES;
+
+-- error ER_TABLEACCESS_DENIED_ERROR
+LOCK TABLES performance_schema.events_statements_current WRITE;
+UNLOCK TABLES;
+
=== added file 'mysql-test/suite/perfschema/t/dml_events_statements_history.test'
--- a/mysql-test/suite/perfschema/t/dml_events_statements_history.test 1970-01-01 00:00:00 +0000
+++ b/mysql-test/suite/perfschema/t/dml_events_statements_history.test 2011-02-15 14:31:13 +0000
@@ -0,0 +1,62 @@
+# Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; version 2 of the License.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software Foundation,
+# 51 Franklin Street, Suite 500, Boston, MA 02110-1335 USA
+
+# Tests for PERFORMANCE_SCHEMA
+
+--source include/not_embedded.inc
+--source include/have_perfschema.inc
+
+--disable_result_log
+select * from performance_schema.events_statements_history
+ where event_name like 'statement/%' limit 1;
+
+select * from performance_schema.events_statements_history
+ where event_name='FOO';
+
+select * from performance_schema.events_statements_history
+ where event_name like 'statement/%' order by timer_wait limit 1;
+
+select * from performance_schema.events_statements_history
+ where event_name like 'statement/%' order by timer_wait desc limit 1;
+--enable_result_log
+
+--error ER_TABLEACCESS_DENIED_ERROR
+insert into performance_schema.events_statements_history
+ set thread_id='1', event_id=1,
+ event_name='FOO', timer_start=1, timer_end=2, timer_wait=3;
+
+--error ER_TABLEACCESS_DENIED_ERROR
+update performance_schema.events_statements_history
+ set timer_start=12;
+
+--error ER_TABLEACCESS_DENIED_ERROR
+update performance_schema.events_statements_history
+ set timer_start=12 where thread_id=0;
+
+--error ER_TABLEACCESS_DENIED_ERROR
+delete from performance_schema.events_statements_history
+ where thread_id=1;
+
+--error ER_TABLEACCESS_DENIED_ERROR
+delete from performance_schema.events_statements_history;
+
+-- error ER_TABLEACCESS_DENIED_ERROR
+LOCK TABLES performance_schema.events_statements_history READ;
+UNLOCK TABLES;
+
+-- error ER_TABLEACCESS_DENIED_ERROR
+LOCK TABLES performance_schema.events_statements_history WRITE;
+UNLOCK TABLES;
+
=== added file 'mysql-test/suite/perfschema/t/dml_events_statements_history_long.test'
--- a/mysql-test/suite/perfschema/t/dml_events_statements_history_long.test 1970-01-01 00:00:00 +0000
+++ b/mysql-test/suite/perfschema/t/dml_events_statements_history_long.test 2011-02-15 14:31:13 +0000
@@ -0,0 +1,62 @@
+# Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; version 2 of the License.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software Foundation,
+# 51 Franklin Street, Suite 500, Boston, MA 02110-1335 USA
+
+# Tests for PERFORMANCE_SCHEMA
+
+--source include/not_embedded.inc
+--source include/have_perfschema.inc
+
+--disable_result_log
+select * from performance_schema.events_statements_history_long
+ where event_name like 'statement/%' limit 1;
+
+select * from performance_schema.events_statements_history_long
+ where event_name='FOO';
+
+select * from performance_schema.events_statements_history_long
+ where event_name like 'statement/%' order by timer_wait limit 1;
+
+select * from performance_schema.events_statements_history_long
+ where event_name like 'statement/%' order by timer_wait desc limit 1;
+--enable_result_log
+
+--error ER_TABLEACCESS_DENIED_ERROR
+insert into performance_schema.events_statements_history_long
+ set thread_id='1', event_id=1,
+ event_name='FOO', timer_start=1, timer_end=2, timer_wait=3;
+
+--error ER_TABLEACCESS_DENIED_ERROR
+update performance_schema.events_statements_history_long
+ set timer_start=12;
+
+--error ER_TABLEACCESS_DENIED_ERROR
+update performance_schema.events_statements_history_long
+ set timer_start=12 where thread_id=0;
+
+--error ER_TABLEACCESS_DENIED_ERROR
+delete from performance_schema.events_statements_history_long
+ where thread_id=1;
+
+--error ER_TABLEACCESS_DENIED_ERROR
+delete from performance_schema.events_statements_history_long;
+
+-- error ER_TABLEACCESS_DENIED_ERROR
+LOCK TABLES performance_schema.events_statements_history_long READ;
+UNLOCK TABLES;
+
+-- error ER_TABLEACCESS_DENIED_ERROR
+LOCK TABLES performance_schema.events_statements_history_long WRITE;
+UNLOCK TABLES;
+
=== modified file 'mysql-test/suite/perfschema/t/start_server_nothing.test'
--- a/mysql-test/suite/perfschema/t/start_server_nothing.test 2010-11-09 08:16:50 +0000
+++ b/mysql-test/suite/perfschema/t/start_server_nothing.test 2011-02-15 14:31:13 +0000
@@ -40,7 +40,7 @@ select * from performance_schema.file_in
select * from performance_schema.file_summary_by_event_name;
select * from performance_schema.file_summary_by_instance;
select * from performance_schema.mutex_instances;
-select * from performance_schema.threads;
+select * from performance_schema.objects_summary_global_by_type;
select * from performance_schema.rwlock_instances;
select * from performance_schema.threads;
=== added file 'mysql-test/suite/sys_vars/r/pfs_events_stages_history_long_size_basic.result'
--- a/mysql-test/suite/sys_vars/r/pfs_events_stages_history_long_size_basic.result 1970-01-01 00:00:00 +0000
+++ b/mysql-test/suite/sys_vars/r/pfs_events_stages_history_long_size_basic.result 2011-02-15 14:31:13 +0000
@@ -0,0 +1,23 @@
+select @@global.performance_schema_events_stages_history_long_size;
+@@global.performance_schema_events_stages_history_long_size
+15000
+select @@session.performance_schema_events_stages_history_long_size;
+ERROR HY000: Variable 'performance_schema_events_stages_history_long_size' is a GLOBAL variable
+show global variables like 'performance_schema_events_stages_history_long_size';
+Variable_name Value
+performance_schema_events_stages_history_long_size 15000
+show session variables like 'performance_schema_events_stages_history_long_size';
+Variable_name Value
+performance_schema_events_stages_history_long_size 15000
+select * from information_schema.global_variables
+where variable_name='performance_schema_events_stages_history_long_size';
+VARIABLE_NAME VARIABLE_VALUE
+PERFORMANCE_SCHEMA_EVENTS_STAGES_HISTORY_LONG_SIZE 15000
+select * from information_schema.session_variables
+where variable_name='performance_schema_events_stages_history_long_size';
+VARIABLE_NAME VARIABLE_VALUE
+PERFORMANCE_SCHEMA_EVENTS_STAGES_HISTORY_LONG_SIZE 15000
+set global performance_schema_events_stages_history_long_size=1;
+ERROR HY000: Variable 'performance_schema_events_stages_history_long_size' is a read only variable
+set session performance_schema_events_stages_history_long_size=1;
+ERROR HY000: Variable 'performance_schema_events_stages_history_long_size' is a read only variable
=== added file 'mysql-test/suite/sys_vars/r/pfs_events_stages_history_size_basic.result'
--- a/mysql-test/suite/sys_vars/r/pfs_events_stages_history_size_basic.result 1970-01-01 00:00:00 +0000
+++ b/mysql-test/suite/sys_vars/r/pfs_events_stages_history_size_basic.result 2011-02-15 14:31:13 +0000
@@ -0,0 +1,23 @@
+select @@global.performance_schema_events_stages_history_size;
+@@global.performance_schema_events_stages_history_size
+15
+select @@session.performance_schema_events_stages_history_size;
+ERROR HY000: Variable 'performance_schema_events_stages_history_size' is a GLOBAL variable
+show global variables like 'performance_schema_events_stages_history_size';
+Variable_name Value
+performance_schema_events_stages_history_size 15
+show session variables like 'performance_schema_events_stages_history_size';
+Variable_name Value
+performance_schema_events_stages_history_size 15
+select * from information_schema.global_variables
+where variable_name='performance_schema_events_stages_history_size';
+VARIABLE_NAME VARIABLE_VALUE
+PERFORMANCE_SCHEMA_EVENTS_STAGES_HISTORY_SIZE 15
+select * from information_schema.session_variables
+where variable_name='performance_schema_events_stages_history_size';
+VARIABLE_NAME VARIABLE_VALUE
+PERFORMANCE_SCHEMA_EVENTS_STAGES_HISTORY_SIZE 15
+set global performance_schema_events_stages_history_size=1;
+ERROR HY000: Variable 'performance_schema_events_stages_history_size' is a read only variable
+set session performance_schema_events_stages_history_size=1;
+ERROR HY000: Variable 'performance_schema_events_stages_history_size' is a read only variable
=== added file 'mysql-test/suite/sys_vars/r/pfs_events_statements_history_long_size_basic.result'
--- a/mysql-test/suite/sys_vars/r/pfs_events_statements_history_long_size_basic.result 1970-01-01 00:00:00 +0000
+++ b/mysql-test/suite/sys_vars/r/pfs_events_statements_history_long_size_basic.result 2011-02-15 14:31:13 +0000
@@ -0,0 +1,23 @@
+select @@global.performance_schema_events_statements_history_long_size;
+@@global.performance_schema_events_statements_history_long_size
+15000
+select @@session.performance_schema_events_statements_history_long_size;
+ERROR HY000: Variable 'performance_schema_events_statements_history_long_size' is a GLOBAL variable
+show global variables like 'performance_schema_events_statements_history_long_size';
+Variable_name Value
+performance_schema_events_statements_history_long_size 15000
+show session variables like 'performance_schema_events_statements_history_long_size';
+Variable_name Value
+performance_schema_events_statements_history_long_size 15000
+select * from information_schema.global_variables
+where variable_name='performance_schema_events_statements_history_long_size';
+VARIABLE_NAME VARIABLE_VALUE
+PERFORMANCE_SCHEMA_EVENTS_STATEMENTS_HISTORY_LONG_SIZE 15000
+select * from information_schema.session_variables
+where variable_name='performance_schema_events_statements_history_long_size';
+VARIABLE_NAME VARIABLE_VALUE
+PERFORMANCE_SCHEMA_EVENTS_STATEMENTS_HISTORY_LONG_SIZE 15000
+set global performance_schema_events_statements_history_long_size=1;
+ERROR HY000: Variable 'performance_schema_events_statements_history_long_size' is a read only variable
+set session performance_schema_events_statements_history_long_size=1;
+ERROR HY000: Variable 'performance_schema_events_statements_history_long_size' is a read only variable
=== added file 'mysql-test/suite/sys_vars/r/pfs_events_statements_history_size_basic.result'
--- a/mysql-test/suite/sys_vars/r/pfs_events_statements_history_size_basic.result 1970-01-01 00:00:00 +0000
+++ b/mysql-test/suite/sys_vars/r/pfs_events_statements_history_size_basic.result 2011-02-15 14:31:13 +0000
@@ -0,0 +1,23 @@
+select @@global.performance_schema_events_statements_history_size;
+@@global.performance_schema_events_statements_history_size
+15
+select @@session.performance_schema_events_statements_history_size;
+ERROR HY000: Variable 'performance_schema_events_statements_history_size' is a GLOBAL variable
+show global variables like 'performance_schema_events_statements_history_size';
+Variable_name Value
+performance_schema_events_statements_history_size 15
+show session variables like 'performance_schema_events_statements_history_size';
+Variable_name Value
+performance_schema_events_statements_history_size 15
+select * from information_schema.global_variables
+where variable_name='performance_schema_events_statements_history_size';
+VARIABLE_NAME VARIABLE_VALUE
+PERFORMANCE_SCHEMA_EVENTS_STATEMENTS_HISTORY_SIZE 15
+select * from information_schema.session_variables
+where variable_name='performance_schema_events_statements_history_size';
+VARIABLE_NAME VARIABLE_VALUE
+PERFORMANCE_SCHEMA_EVENTS_STATEMENTS_HISTORY_SIZE 15
+set global performance_schema_events_statements_history_size=1;
+ERROR HY000: Variable 'performance_schema_events_statements_history_size' is a read only variable
+set session performance_schema_events_statements_history_size=1;
+ERROR HY000: Variable 'performance_schema_events_statements_history_size' is a read only variable
=== added file 'mysql-test/suite/sys_vars/r/pfs_max_stage_classes_basic.result'
--- a/mysql-test/suite/sys_vars/r/pfs_max_stage_classes_basic.result 1970-01-01 00:00:00 +0000
+++ b/mysql-test/suite/sys_vars/r/pfs_max_stage_classes_basic.result 2011-02-15 14:31:13 +0000
@@ -0,0 +1,23 @@
+select @@global.performance_schema_max_stage_classes;
+@@global.performance_schema_max_stage_classes
+123
+select @@session.performance_schema_max_stage_classes;
+ERROR HY000: Variable 'performance_schema_max_stage_classes' is a GLOBAL variable
+show global variables like 'performance_schema_max_stage_classes';
+Variable_name Value
+performance_schema_max_stage_classes 123
+show session variables like 'performance_schema_max_stage_classes';
+Variable_name Value
+performance_schema_max_stage_classes 123
+select * from information_schema.global_variables
+where variable_name='performance_schema_max_stage_classes';
+VARIABLE_NAME VARIABLE_VALUE
+PERFORMANCE_SCHEMA_MAX_STAGE_CLASSES 123
+select * from information_schema.session_variables
+where variable_name='performance_schema_max_stage_classes';
+VARIABLE_NAME VARIABLE_VALUE
+PERFORMANCE_SCHEMA_MAX_STAGE_CLASSES 123
+set global performance_schema_max_stage_classes=1;
+ERROR HY000: Variable 'performance_schema_max_stage_classes' is a read only variable
+set session performance_schema_max_stage_classes=1;
+ERROR HY000: Variable 'performance_schema_max_stage_classes' is a read only variable
=== added file 'mysql-test/suite/sys_vars/r/pfs_max_statement_classes_basic.result'
--- a/mysql-test/suite/sys_vars/r/pfs_max_statement_classes_basic.result 1970-01-01 00:00:00 +0000
+++ b/mysql-test/suite/sys_vars/r/pfs_max_statement_classes_basic.result 2011-02-15 14:31:13 +0000
@@ -0,0 +1,23 @@
+select @@global.performance_schema_max_statement_classes;
+@@global.performance_schema_max_statement_classes
+123
+select @@session.performance_schema_max_statement_classes;
+ERROR HY000: Variable 'performance_schema_max_statement_classes' is a GLOBAL variable
+show global variables like 'performance_schema_max_statement_classes';
+Variable_name Value
+performance_schema_max_statement_classes 123
+show session variables like 'performance_schema_max_statement_classes';
+Variable_name Value
+performance_schema_max_statement_classes 123
+select * from information_schema.global_variables
+where variable_name='performance_schema_max_statement_classes';
+VARIABLE_NAME VARIABLE_VALUE
+PERFORMANCE_SCHEMA_MAX_STATEMENT_CLASSES 123
+select * from information_schema.session_variables
+where variable_name='performance_schema_max_statement_classes';
+VARIABLE_NAME VARIABLE_VALUE
+PERFORMANCE_SCHEMA_MAX_STATEMENT_CLASSES 123
+set global performance_schema_max_statement_classes=1;
+ERROR HY000: Variable 'performance_schema_max_statement_classes' is a read only variable
+set session performance_schema_max_statement_classes=1;
+ERROR HY000: Variable 'performance_schema_max_statement_classes' is a read only variable
=== added file 'mysql-test/suite/sys_vars/t/pfs_events_stages_history_long_size_basic-master.opt'
--- a/mysql-test/suite/sys_vars/t/pfs_events_stages_history_long_size_basic-master.opt 1970-01-01 00:00:00 +0000
+++ b/mysql-test/suite/sys_vars/t/pfs_events_stages_history_long_size_basic-master.opt 2011-02-15 14:31:13 +0000
@@ -0,0 +1,2 @@
+--loose-enable-performance-schema
+--loose-performance-schema-events-stages-history-long-size=15000
=== added file 'mysql-test/suite/sys_vars/t/pfs_events_stages_history_long_size_basic.test'
--- a/mysql-test/suite/sys_vars/t/pfs_events_stages_history_long_size_basic.test 1970-01-01 00:00:00 +0000
+++ b/mysql-test/suite/sys_vars/t/pfs_events_stages_history_long_size_basic.test 2011-02-15 14:31:13 +0000
@@ -0,0 +1,47 @@
+# Copyright (C) 2010 Sun Microsystems, Inc.
+#
+# 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, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+
+--source include/not_embedded.inc
+--source include/have_perfschema.inc
+
+#
+# Only global
+#
+
+select @@global.performance_schema_events_stages_history_long_size;
+
+--error ER_INCORRECT_GLOBAL_LOCAL_VAR
+select @@session.performance_schema_events_stages_history_long_size;
+
+show global variables like 'performance_schema_events_stages_history_long_size';
+
+show session variables like 'performance_schema_events_stages_history_long_size';
+
+select * from information_schema.global_variables
+ where variable_name='performance_schema_events_stages_history_long_size';
+
+select * from information_schema.session_variables
+ where variable_name='performance_schema_events_stages_history_long_size';
+
+#
+# Read-only
+#
+
+--error ER_INCORRECT_GLOBAL_LOCAL_VAR
+set global performance_schema_events_stages_history_long_size=1;
+
+--error ER_INCORRECT_GLOBAL_LOCAL_VAR
+set session performance_schema_events_stages_history_long_size=1;
+
=== added file 'mysql-test/suite/sys_vars/t/pfs_events_stages_history_size_basic-master.opt'
--- a/mysql-test/suite/sys_vars/t/pfs_events_stages_history_size_basic-master.opt 1970-01-01 00:00:00 +0000
+++ b/mysql-test/suite/sys_vars/t/pfs_events_stages_history_size_basic-master.opt 2011-02-15 14:31:13 +0000
@@ -0,0 +1,2 @@
+--loose-enable-performance-schema
+--loose-performance-schema-events-stages-history-size=15
=== added file 'mysql-test/suite/sys_vars/t/pfs_events_stages_history_size_basic.test'
--- a/mysql-test/suite/sys_vars/t/pfs_events_stages_history_size_basic.test 1970-01-01 00:00:00 +0000
+++ b/mysql-test/suite/sys_vars/t/pfs_events_stages_history_size_basic.test 2011-02-15 14:31:13 +0000
@@ -0,0 +1,47 @@
+# Copyright (C) 2010 Sun Microsystems, Inc.
+#
+# 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, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+
+--source include/not_embedded.inc
+--source include/have_perfschema.inc
+
+#
+# Only global
+#
+
+select @@global.performance_schema_events_stages_history_size;
+
+--error ER_INCORRECT_GLOBAL_LOCAL_VAR
+select @@session.performance_schema_events_stages_history_size;
+
+show global variables like 'performance_schema_events_stages_history_size';
+
+show session variables like 'performance_schema_events_stages_history_size';
+
+select * from information_schema.global_variables
+ where variable_name='performance_schema_events_stages_history_size';
+
+select * from information_schema.session_variables
+ where variable_name='performance_schema_events_stages_history_size';
+
+#
+# Read-only
+#
+
+--error ER_INCORRECT_GLOBAL_LOCAL_VAR
+set global performance_schema_events_stages_history_size=1;
+
+--error ER_INCORRECT_GLOBAL_LOCAL_VAR
+set session performance_schema_events_stages_history_size=1;
+
=== added file 'mysql-test/suite/sys_vars/t/pfs_events_statements_history_long_size_basic-master.opt'
--- a/mysql-test/suite/sys_vars/t/pfs_events_statements_history_long_size_basic-master.opt 1970-01-01 00:00:00 +0000
+++ b/mysql-test/suite/sys_vars/t/pfs_events_statements_history_long_size_basic-master.opt 2011-02-15 14:31:13 +0000
@@ -0,0 +1,2 @@
+--loose-enable-performance-schema
+--loose-performance-schema-events-statements-history-long-size=15000
=== added file 'mysql-test/suite/sys_vars/t/pfs_events_statements_history_long_size_basic.test'
--- a/mysql-test/suite/sys_vars/t/pfs_events_statements_history_long_size_basic.test 1970-01-01 00:00:00 +0000
+++ b/mysql-test/suite/sys_vars/t/pfs_events_statements_history_long_size_basic.test 2011-02-15 14:31:13 +0000
@@ -0,0 +1,47 @@
+# Copyright (C) 2010 Sun Microsystems, Inc.
+#
+# 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, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+
+--source include/not_embedded.inc
+--source include/have_perfschema.inc
+
+#
+# Only global
+#
+
+select @@global.performance_schema_events_statements_history_long_size;
+
+--error ER_INCORRECT_GLOBAL_LOCAL_VAR
+select @@session.performance_schema_events_statements_history_long_size;
+
+show global variables like 'performance_schema_events_statements_history_long_size';
+
+show session variables like 'performance_schema_events_statements_history_long_size';
+
+select * from information_schema.global_variables
+ where variable_name='performance_schema_events_statements_history_long_size';
+
+select * from information_schema.session_variables
+ where variable_name='performance_schema_events_statements_history_long_size';
+
+#
+# Read-only
+#
+
+--error ER_INCORRECT_GLOBAL_LOCAL_VAR
+set global performance_schema_events_statements_history_long_size=1;
+
+--error ER_INCORRECT_GLOBAL_LOCAL_VAR
+set session performance_schema_events_statements_history_long_size=1;
+
=== added file 'mysql-test/suite/sys_vars/t/pfs_events_statements_history_size_basic-master.opt'
--- a/mysql-test/suite/sys_vars/t/pfs_events_statements_history_size_basic-master.opt 1970-01-01 00:00:00 +0000
+++ b/mysql-test/suite/sys_vars/t/pfs_events_statements_history_size_basic-master.opt 2011-02-15 14:31:13 +0000
@@ -0,0 +1,2 @@
+--loose-enable-performance-schema
+--loose-performance-schema-events-statements-history-size=15
=== added file 'mysql-test/suite/sys_vars/t/pfs_events_statements_history_size_basic.test'
--- a/mysql-test/suite/sys_vars/t/pfs_events_statements_history_size_basic.test 1970-01-01 00:00:00 +0000
+++ b/mysql-test/suite/sys_vars/t/pfs_events_statements_history_size_basic.test 2011-02-15 14:31:13 +0000
@@ -0,0 +1,47 @@
+# Copyright (C) 2010 Sun Microsystems, Inc.
+#
+# 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, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+
+--source include/not_embedded.inc
+--source include/have_perfschema.inc
+
+#
+# Only global
+#
+
+select @@global.performance_schema_events_statements_history_size;
+
+--error ER_INCORRECT_GLOBAL_LOCAL_VAR
+select @@session.performance_schema_events_statements_history_size;
+
+show global variables like 'performance_schema_events_statements_history_size';
+
+show session variables like 'performance_schema_events_statements_history_size';
+
+select * from information_schema.global_variables
+ where variable_name='performance_schema_events_statements_history_size';
+
+select * from information_schema.session_variables
+ where variable_name='performance_schema_events_statements_history_size';
+
+#
+# Read-only
+#
+
+--error ER_INCORRECT_GLOBAL_LOCAL_VAR
+set global performance_schema_events_statements_history_size=1;
+
+--error ER_INCORRECT_GLOBAL_LOCAL_VAR
+set session performance_schema_events_statements_history_size=1;
+
=== added file 'mysql-test/suite/sys_vars/t/pfs_max_stage_classes_basic-master.opt'
--- a/mysql-test/suite/sys_vars/t/pfs_max_stage_classes_basic-master.opt 1970-01-01 00:00:00 +0000
+++ b/mysql-test/suite/sys_vars/t/pfs_max_stage_classes_basic-master.opt 2011-02-15 14:31:13 +0000
@@ -0,0 +1,2 @@
+--loose-enable-performance-schema
+--loose-performance-schema-max-stage_classes=123
=== added file 'mysql-test/suite/sys_vars/t/pfs_max_stage_classes_basic.test'
--- a/mysql-test/suite/sys_vars/t/pfs_max_stage_classes_basic.test 1970-01-01 00:00:00 +0000
+++ b/mysql-test/suite/sys_vars/t/pfs_max_stage_classes_basic.test 2011-02-15 14:31:13 +0000
@@ -0,0 +1,47 @@
+# Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; version 2 of the License.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+
+--source include/not_embedded.inc
+--source include/have_perfschema.inc
+
+#
+# Only global
+#
+
+select @@global.performance_schema_max_stage_classes;
+
+--error ER_INCORRECT_GLOBAL_LOCAL_VAR
+select @@session.performance_schema_max_stage_classes;
+
+show global variables like 'performance_schema_max_stage_classes';
+
+show session variables like 'performance_schema_max_stage_classes';
+
+select * from information_schema.global_variables
+ where variable_name='performance_schema_max_stage_classes';
+
+select * from information_schema.session_variables
+ where variable_name='performance_schema_max_stage_classes';
+
+#
+# Read-only
+#
+
+--error ER_INCORRECT_GLOBAL_LOCAL_VAR
+set global performance_schema_max_stage_classes=1;
+
+--error ER_INCORRECT_GLOBAL_LOCAL_VAR
+set session performance_schema_max_stage_classes=1;
+
=== added file 'mysql-test/suite/sys_vars/t/pfs_max_statement_classes_basic-master.opt'
--- a/mysql-test/suite/sys_vars/t/pfs_max_statement_classes_basic-master.opt 1970-01-01 00:00:00 +0000
+++ b/mysql-test/suite/sys_vars/t/pfs_max_statement_classes_basic-master.opt 2011-02-15 14:31:13 +0000
@@ -0,0 +1,2 @@
+--loose-enable-performance-schema
+--loose-performance-schema-max-statement_classes=123
=== added file 'mysql-test/suite/sys_vars/t/pfs_max_statement_classes_basic.test'
--- a/mysql-test/suite/sys_vars/t/pfs_max_statement_classes_basic.test 1970-01-01 00:00:00 +0000
+++ b/mysql-test/suite/sys_vars/t/pfs_max_statement_classes_basic.test 2011-02-15 14:31:13 +0000
@@ -0,0 +1,47 @@
+# Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; version 2 of the License.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+
+--source include/not_embedded.inc
+--source include/have_perfschema.inc
+
+#
+# Only global
+#
+
+select @@global.performance_schema_max_statement_classes;
+
+--error ER_INCORRECT_GLOBAL_LOCAL_VAR
+select @@session.performance_schema_max_statement_classes;
+
+show global variables like 'performance_schema_max_statement_classes';
+
+show session variables like 'performance_schema_max_statement_classes';
+
+select * from information_schema.global_variables
+ where variable_name='performance_schema_max_statement_classes';
+
+select * from information_schema.session_variables
+ where variable_name='performance_schema_max_statement_classes';
+
+#
+# Read-only
+#
+
+--error ER_INCORRECT_GLOBAL_LOCAL_VAR
+set global performance_schema_max_statement_classes=1;
+
+--error ER_INCORRECT_GLOBAL_LOCAL_VAR
+set session performance_schema_max_statement_classes=1;
+
=== modified file 'storage/perfschema/pfs_engine_table.cc'
--- a/storage/perfschema/pfs_engine_table.cc 2011-02-14 14:23:55 +0000
+++ b/storage/perfschema/pfs_engine_table.cc 2011-02-15 14:31:13 +0000
@@ -912,7 +912,7 @@ bool pfs_show_status(handlerton *hton, T
size= setup_object_max * sizeof(PFS_setup_object);
total_memory+= size;
break;
- case 56:
+ case 56:
name= "events_waits_summary_global_by_event_name.row_size";
size= sizeof(PFS_single_stat);
break;
@@ -1078,7 +1078,7 @@ bool pfs_show_status(handlerton *hton, T
name= "performance_schema.memory";
size= total_memory;
/* This will fail if something is not advertised here */
- /* DBUG_ASSERT(size == pfs_allocated_memory); */
+ DBUG_ASSERT(size == pfs_allocated_memory);
break;
default:
goto end;
=== modified file 'storage/perfschema/pfs_instr.cc'
--- a/storage/perfschema/pfs_instr.cc 2011-02-14 14:23:55 +0000
+++ b/storage/perfschema/pfs_instr.cc 2011-02-15 14:31:13 +0000
@@ -834,9 +834,6 @@ PFS_thread* create_thread(PFS_thread_cla
child_statement->m_source_line= 0;
child_statement->m_current_schema_name_length= 0;
child_statement->m_sqltext_length= 0;
- child_statement->m_sp_type= 0;
- child_statement->m_schema_name_length= 0;
- child_statement->m_object_name_length= 0;
child_statement->m_message_text[0]= '\0';
child_statement->m_sql_errno= 0;
Attachment: [text/bzr-bundle] bzr/marc.alff@oracle.com-20110215143113-jihwmg0ei9lznske.bundle
| Thread |
|---|
| • bzr commit into mysql-trunk branch (marc.alff:3208) WL#2515 WL#4813 | Marc Alff | 15 Feb |