summaryrefslogtreecommitdiff
path: root/mysql-test/suite/perfschema/t
diff options
context:
space:
mode:
Diffstat (limited to 'mysql-test/suite/perfschema/t')
-rw-r--r--mysql-test/suite/perfschema/t/aggregate.test96
-rw-r--r--mysql-test/suite/perfschema/t/binlog_mix.test9
-rw-r--r--mysql-test/suite/perfschema/t/binlog_row.test9
-rw-r--r--mysql-test/suite/perfschema/t/binlog_stmt.test6
-rw-r--r--mysql-test/suite/perfschema/t/checksum.test68
-rw-r--r--mysql-test/suite/perfschema/t/column_privilege.test28
-rw-r--r--mysql-test/suite/perfschema/t/ddl_cond_instances.test8
-rw-r--r--mysql-test/suite/perfschema/t/ddl_events_waits_current.test8
-rw-r--r--mysql-test/suite/perfschema/t/ddl_events_waits_history.test8
-rw-r--r--mysql-test/suite/perfschema/t/ddl_events_waits_history_long.test8
-rw-r--r--mysql-test/suite/perfschema/t/ddl_ews_by_instance.test8
-rw-r--r--mysql-test/suite/perfschema/t/ddl_ews_by_thread_by_event_name.test8
-rw-r--r--mysql-test/suite/perfschema/t/ddl_ews_global_by_event_name.test8
-rw-r--r--mysql-test/suite/perfschema/t/ddl_file_instances.test8
-rw-r--r--mysql-test/suite/perfschema/t/ddl_fs_by_event_name.test8
-rw-r--r--mysql-test/suite/perfschema/t/ddl_fs_by_instance.test8
-rw-r--r--mysql-test/suite/perfschema/t/ddl_mutex_instances.test8
-rw-r--r--mysql-test/suite/perfschema/t/ddl_performance_timers.test8
-rw-r--r--mysql-test/suite/perfschema/t/ddl_rwlock_instances.test8
-rw-r--r--mysql-test/suite/perfschema/t/ddl_setup_consumers.test9
-rw-r--r--mysql-test/suite/perfschema/t/ddl_setup_instruments.test9
-rw-r--r--mysql-test/suite/perfschema/t/ddl_setup_timers.test9
-rw-r--r--mysql-test/suite/perfschema/t/ddl_threads.test8
-rw-r--r--mysql-test/suite/perfschema/t/dml_cond_instances.test25
-rw-r--r--mysql-test/suite/perfschema/t/dml_events_waits_current.test28
-rw-r--r--mysql-test/suite/perfschema/t/dml_events_waits_history.test34
-rw-r--r--mysql-test/suite/perfschema/t/dml_events_waits_history_long.test34
-rw-r--r--mysql-test/suite/perfschema/t/dml_ews_by_instance.test40
-rw-r--r--mysql-test/suite/perfschema/t/dml_ews_by_thread_by_event_name.test28
-rw-r--r--mysql-test/suite/perfschema/t/dml_ews_global_by_event_name.test28
-rw-r--r--mysql-test/suite/perfschema/t/dml_file_instances.test25
-rw-r--r--mysql-test/suite/perfschema/t/dml_file_summary_by_event_name.test28
-rw-r--r--mysql-test/suite/perfschema/t/dml_file_summary_by_instance.test28
-rw-r--r--mysql-test/suite/perfschema/t/dml_mutex_instances.test25
-rw-r--r--mysql-test/suite/perfschema/t/dml_performance_timers.test22
-rw-r--r--mysql-test/suite/perfschema/t/dml_rwlock_instances.test25
-rw-r--r--mysql-test/suite/perfschema/t/dml_setup_consumers.test26
-rw-r--r--mysql-test/suite/perfschema/t/dml_setup_instruments.test36
-rw-r--r--mysql-test/suite/perfschema/t/dml_setup_timers.test28
-rw-r--r--mysql-test/suite/perfschema/t/dml_threads.test36
-rw-r--r--mysql-test/suite/perfschema/t/func_file_io.test95
-rw-r--r--mysql-test/suite/perfschema/t/func_mutex.test50
-rw-r--r--mysql-test/suite/perfschema/t/global_read_lock.test32
-rw-r--r--mysql-test/suite/perfschema/t/information_schema.test22
-rw-r--r--mysql-test/suite/perfschema/t/misc.test14
-rw-r--r--mysql-test/suite/perfschema/t/myisam_file_io.test20
-rw-r--r--mysql-test/suite/perfschema/t/no_threads.test23
-rw-r--r--mysql-test/suite/perfschema/t/one_thread_per_con.test5
-rw-r--r--mysql-test/suite/perfschema/t/privilege.test160
-rw-r--r--mysql-test/suite/perfschema/t/query_cache.test8
-rw-r--r--mysql-test/suite/perfschema/t/read_only.test22
-rw-r--r--mysql-test/suite/perfschema/t/relaylog.test179
-rw-r--r--mysql-test/suite/perfschema/t/schema.test34
-rw-r--r--mysql-test/suite/perfschema/t/selects.test54
-rw-r--r--mysql-test/suite/perfschema/t/server_init.test116
-rw-r--r--mysql-test/suite/perfschema/t/start_server_no_cond_class.test4
-rw-r--r--mysql-test/suite/perfschema/t/start_server_no_cond_inst.test4
-rw-r--r--mysql-test/suite/perfschema/t/start_server_no_file_class.test4
-rw-r--r--mysql-test/suite/perfschema/t/start_server_no_file_inst.test4
-rw-r--r--mysql-test/suite/perfschema/t/start_server_no_mutex_class.test4
-rw-r--r--mysql-test/suite/perfschema/t/start_server_no_mutex_inst.test4
-rw-r--r--mysql-test/suite/perfschema/t/start_server_no_rwlock_class.test4
-rw-r--r--mysql-test/suite/perfschema/t/start_server_no_rwlock_inst.test4
-rw-r--r--mysql-test/suite/perfschema/t/start_server_no_thread_class.test4
-rw-r--r--mysql-test/suite/perfschema/t/start_server_no_thread_inst.test4
-rw-r--r--mysql-test/suite/perfschema/t/tampered_perfschema_table1.test10
-rw-r--r--mysql-test/suite/perfschema/t/thread_cache.test76
67 files changed, 948 insertions, 863 deletions
diff --git a/mysql-test/suite/perfschema/t/aggregate.test b/mysql-test/suite/perfschema/t/aggregate.test
index a8ca3dd91e2..13906af3099 100644
--- a/mysql-test/suite/perfschema/t/aggregate.test
+++ b/mysql-test/suite/perfschema/t/aggregate.test
@@ -25,19 +25,19 @@
drop table if exists t1;
--enable_warnings
-update performance_schema.SETUP_INSTRUMENTS set enabled = 'NO';
-update performance_schema.SETUP_CONSUMERS set enabled = 'NO';
+update performance_schema.setup_instruments set enabled = 'NO';
+update performance_schema.setup_consumers set enabled = 'NO';
# Cleanup statistics
-truncate table performance_schema.FILE_SUMMARY_BY_EVENT_NAME;
-truncate table performance_schema.FILE_SUMMARY_BY_INSTANCE;
-truncate table performance_schema.EVENTS_WAITS_SUMMARY_GLOBAL_BY_EVENT_NAME;
-truncate table performance_schema.EVENTS_WAITS_SUMMARY_BY_INSTANCE;
-truncate table performance_schema.EVENTS_WAITS_SUMMARY_BY_THREAD_BY_EVENT_NAME;
+truncate table performance_schema.file_summary_by_event_name;
+truncate table performance_schema.file_summary_by_instance;
+truncate table performance_schema.events_waits_summary_global_by_event_name;
+truncate table performance_schema.events_waits_summary_by_instance;
+truncate table performance_schema.events_waits_summary_by_thread_by_event_name;
# Start recording data
-update performance_schema.SETUP_CONSUMERS set enabled = 'YES';
-update performance_schema.SETUP_INSTRUMENTS
+update performance_schema.setup_consumers set enabled = 'YES';
+update performance_schema.setup_instruments
set enabled = 'YES', timed = 'YES';
@@ -49,27 +49,27 @@ create table t1 (
insert into t1 (id) values (1), (2), (3), (4), (5), (6), (7), (8);
# Stop recording data, so the select below don't add noise.
-update performance_schema.SETUP_INSTRUMENTS SET enabled = 'NO';
+update performance_schema.setup_instruments SET enabled = 'NO';
# Disable all consumers, for long standing waits
-update performance_schema.SETUP_CONSUMERS set enabled = 'NO';
+update performance_schema.setup_consumers set enabled = 'NO';
# Helper to debug
set @dump_all=FALSE;
# Note that in general:
-# - COUNT/SUM/MAX(FILE_SUMMARY_BY_EVENT_NAME) >=
-# COUNT/SUM/MAX(FILE_SUMMARY_BY_INSTANCE).
-# - MIN(FILE_SUMMARY_BY_EVENT_NAME) <=
-# MIN(FILE_SUMMARY_BY_INSTANCE).
+# - COUNT/SUM/MAX(file_summary_by_event_name) >=
+# COUNT/SUM/MAX(file_summary_by_instance).
+# - MIN(file_summary_by_event_name) <=
+# MIN(file_summary_by_instance).
# There will be equality only when file instances are not removed,
# aka when a file is not deleted from the file system,
-# because doing so removes a row in FILE_SUMMARY_BY_INSTANCE.
+# because doing so removes a row in file_summary_by_instance.
# Likewise:
-# - COUNT/SUM/MAX(EVENTS_WAITS_SUMMARY_GLOBAL_BY_EVENT_NAME) >=
-# COUNT/SUM/MAX(EVENTS_WAITS_SUMMARY_BY_INSTANCE)
-# - MIN(EVENTS_WAITS_SUMMARY_GLOBAL_BY_EVENT_NAME) <=
-# MIN(EVENTS_WAITS_SUMMARY_BY_INSTANCE)
+# - COUNT/SUM/MAX(events_waits_summary_global_by_event_name) >=
+# COUNT/SUM/MAX(events_waits_summary_by_instance)
+# - MIN(events_waits_summary_global_by_event_name) <=
+# MIN(events_waits_summary_by_instance)
# There will be equality only when an instrument instance
# is not removed, which is next to impossible to predictably guarantee
# in the server.
@@ -77,18 +77,18 @@ set @dump_all=FALSE;
# will cause a mysql_mutex_destroy on myisam/MYISAM_SHARE::intern_lock.
# Another example, a thread terminating will cause a mysql_mutex_destroy
# on sql/LOCK_delete
-# Both cause a row to be deleted from EVENTS_WAITS_SUMMARY_BY_INSTANCE.
+# Both cause a row to be deleted from events_waits_summary_by_instance.
# Likewise:
-# - COUNT/SUM/MAX(EVENTS_WAITS_SUMMARY_GLOBAL_BY_EVENT_NAME) >=
-# COUNT/SUM/MAX(EVENTS_WAITS_SUMMARY_BY_THREAD_BY_EVENT_NAME)
-# - MIN(EVENTS_WAITS_SUMMARY_GLOBAL_BY_EVENT_NAME) <=
-# MIN(EVENTS_WAITS_SUMMARY_BY_THREAD_BY_EVENT_NAME)
+# - COUNT/SUM/MAX(events_waits_summary_global_by_event_name) >=
+# COUNT/SUM/MAX(events_waits_summary_by_thread_by_event_name)
+# - MIN(events_waits_summary_global_by_event_name) <=
+# MIN(events_waits_summary_by_thread_by_event_name)
# There will be equality only when no thread is removed,
# that is if no thread disconnects, or no sub thread (for example insert
# delayed) ever completes.
# A thread completing will cause rows in
-# EVENTS_WAITS_SUMMARY_BY_THREAD_BY_EVENT_NAME to be removed.
+# events_waits_summary_by_thread_by_event_name to be removed.
--echo "Verifying file aggregate consistency"
@@ -101,29 +101,29 @@ set @dump_all=FALSE;
# If any of these queries returns data, the test failed.
SELECT EVENT_NAME, e.COUNT_READ, SUM(i.COUNT_READ)
-FROM performance_schema.FILE_SUMMARY_BY_EVENT_NAME AS e
-JOIN performance_schema.FILE_SUMMARY_BY_INSTANCE AS i USING (EVENT_NAME)
+FROM performance_schema.file_summary_by_event_name AS e
+JOIN performance_schema.file_summary_by_instance AS i USING (EVENT_NAME)
GROUP BY EVENT_NAME
HAVING (e.COUNT_READ <> SUM(i.COUNT_READ))
OR @dump_all;
SELECT EVENT_NAME, e.COUNT_WRITE, SUM(i.COUNT_WRITE)
-FROM performance_schema.FILE_SUMMARY_BY_EVENT_NAME AS e
-JOIN performance_schema.FILE_SUMMARY_BY_INSTANCE AS i USING (EVENT_NAME)
+FROM performance_schema.file_summary_by_event_name AS e
+JOIN performance_schema.file_summary_by_instance AS i USING (EVENT_NAME)
GROUP BY EVENT_NAME
HAVING (e.COUNT_WRITE <> SUM(i.COUNT_WRITE))
OR @dump_all;
SELECT EVENT_NAME, e.SUM_NUMBER_OF_BYTES_READ, SUM(i.SUM_NUMBER_OF_BYTES_READ)
-FROM performance_schema.FILE_SUMMARY_BY_EVENT_NAME AS e
-JOIN performance_schema.FILE_SUMMARY_BY_INSTANCE AS i USING (EVENT_NAME)
+FROM performance_schema.file_summary_by_event_name AS e
+JOIN performance_schema.file_summary_by_instance AS i USING (EVENT_NAME)
GROUP BY EVENT_NAME
HAVING (e.SUM_NUMBER_OF_BYTES_READ <> SUM(i.SUM_NUMBER_OF_BYTES_READ))
OR @dump_all;
SELECT EVENT_NAME, e.SUM_NUMBER_OF_BYTES_WRITE, SUM(i.SUM_NUMBER_OF_BYTES_WRITE)
-FROM performance_schema.FILE_SUMMARY_BY_EVENT_NAME AS e
-JOIN performance_schema.FILE_SUMMARY_BY_INSTANCE AS i USING (EVENT_NAME)
+FROM performance_schema.file_summary_by_event_name AS e
+JOIN performance_schema.file_summary_by_instance AS i USING (EVENT_NAME)
GROUP BY EVENT_NAME
HAVING (e.SUM_NUMBER_OF_BYTES_WRITE <> SUM(i.SUM_NUMBER_OF_BYTES_WRITE))
OR @dump_all;
@@ -131,23 +131,23 @@ OR @dump_all;
--echo "Verifying waits aggregate consistency (instance)"
SELECT EVENT_NAME, e.SUM_TIMER_WAIT, SUM(i.SUM_TIMER_WAIT)
-FROM performance_schema.EVENTS_WAITS_SUMMARY_GLOBAL_BY_EVENT_NAME AS e
-JOIN performance_schema.EVENTS_WAITS_SUMMARY_BY_INSTANCE AS i USING (EVENT_NAME)
+FROM performance_schema.events_waits_summary_global_by_event_name AS e
+JOIN performance_schema.events_waits_summary_by_instance AS i USING (EVENT_NAME)
GROUP BY EVENT_NAME
HAVING (e.SUM_TIMER_WAIT < SUM(i.SUM_TIMER_WAIT))
OR @dump_all;
SELECT EVENT_NAME, e.MIN_TIMER_WAIT, MIN(i.MIN_TIMER_WAIT)
-FROM performance_schema.EVENTS_WAITS_SUMMARY_GLOBAL_BY_EVENT_NAME AS e
-JOIN performance_schema.EVENTS_WAITS_SUMMARY_BY_INSTANCE AS i USING (EVENT_NAME)
+FROM performance_schema.events_waits_summary_global_by_event_name AS e
+JOIN performance_schema.events_waits_summary_by_instance AS i USING (EVENT_NAME)
GROUP BY EVENT_NAME
HAVING (e.MIN_TIMER_WAIT > MIN(i.MIN_TIMER_WAIT))
AND (MIN(i.MIN_TIMER_WAIT) != 0)
OR @dump_all;
SELECT EVENT_NAME, e.MAX_TIMER_WAIT, MAX(i.MAX_TIMER_WAIT)
-FROM performance_schema.EVENTS_WAITS_SUMMARY_GLOBAL_BY_EVENT_NAME AS e
-JOIN performance_schema.EVENTS_WAITS_SUMMARY_BY_INSTANCE AS i USING (EVENT_NAME)
+FROM performance_schema.events_waits_summary_global_by_event_name AS e
+JOIN performance_schema.events_waits_summary_by_instance AS i USING (EVENT_NAME)
GROUP BY EVENT_NAME
HAVING (e.MAX_TIMER_WAIT < MAX(i.MAX_TIMER_WAIT))
OR @dump_all;
@@ -155,16 +155,16 @@ OR @dump_all;
--echo "Verifying waits aggregate consistency (thread)"
SELECT EVENT_NAME, e.SUM_TIMER_WAIT, SUM(t.SUM_TIMER_WAIT)
-FROM performance_schema.EVENTS_WAITS_SUMMARY_GLOBAL_BY_EVENT_NAME AS e
-JOIN performance_schema.EVENTS_WAITS_SUMMARY_BY_THREAD_BY_EVENT_NAME AS t
+FROM performance_schema.events_waits_summary_global_by_event_name AS e
+JOIN performance_schema.events_waits_summary_by_thread_by_event_name AS t
USING (EVENT_NAME)
GROUP BY EVENT_NAME
HAVING (e.SUM_TIMER_WAIT < SUM(t.SUM_TIMER_WAIT))
OR @dump_all;
SELECT EVENT_NAME, e.MIN_TIMER_WAIT, MIN(t.MIN_TIMER_WAIT)
-FROM performance_schema.EVENTS_WAITS_SUMMARY_GLOBAL_BY_EVENT_NAME AS e
-JOIN performance_schema.EVENTS_WAITS_SUMMARY_BY_THREAD_BY_EVENT_NAME AS t
+FROM performance_schema.events_waits_summary_global_by_event_name AS e
+JOIN performance_schema.events_waits_summary_by_thread_by_event_name AS t
USING (EVENT_NAME)
GROUP BY EVENT_NAME
HAVING (e.MIN_TIMER_WAIT > MIN(t.MIN_TIMER_WAIT))
@@ -172,8 +172,8 @@ AND (MIN(t.MIN_TIMER_WAIT) != 0)
OR @dump_all;
SELECT EVENT_NAME, e.MAX_TIMER_WAIT, MAX(t.MAX_TIMER_WAIT)
-FROM performance_schema.EVENTS_WAITS_SUMMARY_GLOBAL_BY_EVENT_NAME AS e
-JOIN performance_schema.EVENTS_WAITS_SUMMARY_BY_THREAD_BY_EVENT_NAME AS t
+FROM performance_schema.events_waits_summary_global_by_event_name AS e
+JOIN performance_schema.events_waits_summary_by_thread_by_event_name AS t
USING (EVENT_NAME)
GROUP BY EVENT_NAME
HAVING (e.MAX_TIMER_WAIT < MAX(t.MAX_TIMER_WAIT))
@@ -182,8 +182,8 @@ OR @dump_all;
# Cleanup
-update performance_schema.SETUP_CONSUMERS set enabled = 'YES';
-update performance_schema.SETUP_INSTRUMENTS
+update performance_schema.setup_consumers set enabled = 'YES';
+update performance_schema.setup_instruments
set enabled = 'YES', timed = 'YES';
drop table test.t1;
diff --git a/mysql-test/suite/perfschema/t/binlog_mix.test b/mysql-test/suite/perfschema/t/binlog_mix.test
index 4fe7d68b555..5e2c65d6fe4 100644
--- a/mysql-test/suite/perfschema/t/binlog_mix.test
+++ b/mysql-test/suite/perfschema/t/binlog_mix.test
@@ -1,4 +1,4 @@
-# Copyright (C) 2009 Sun Microsystems, Inc
+# Copyright (c) 2009, 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
@@ -10,8 +10,8 @@
# 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
+# 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
@@ -19,9 +19,6 @@
--source include/not_embedded.inc
--source include/have_perfschema.inc
-# See Bug#46896 binlog: case sensitivity of table names
---source include/have_lowercase0.inc
-
set binlog_format=mixed;
--source ../include/binlog_common.inc
diff --git a/mysql-test/suite/perfschema/t/binlog_row.test b/mysql-test/suite/perfschema/t/binlog_row.test
index c1c1e06d3f0..d09baaa3011 100644
--- a/mysql-test/suite/perfschema/t/binlog_row.test
+++ b/mysql-test/suite/perfschema/t/binlog_row.test
@@ -1,4 +1,4 @@
-# Copyright (C) 2009 Sun Microsystems, Inc
+# Copyright (c) 2009, 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
@@ -10,8 +10,8 @@
# 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
+# 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
@@ -19,9 +19,6 @@
--source include/not_embedded.inc
--source include/have_perfschema.inc
-# See Bug#46896 binlog: case sensitivity of table names
---source include/have_lowercase0.inc
-
set binlog_format=row;
--source ../include/binlog_common.inc
diff --git a/mysql-test/suite/perfschema/t/binlog_stmt.test b/mysql-test/suite/perfschema/t/binlog_stmt.test
index a0fbc5ef335..46418d5703f 100644
--- a/mysql-test/suite/perfschema/t/binlog_stmt.test
+++ b/mysql-test/suite/perfschema/t/binlog_stmt.test
@@ -1,4 +1,4 @@
-# Copyright (C) 2009 Sun Microsystems, Inc
+# Copyright (c) 2009, 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
@@ -10,8 +10,8 @@
# 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
+# 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
diff --git a/mysql-test/suite/perfschema/t/checksum.test b/mysql-test/suite/perfschema/t/checksum.test
index d7fdd7b4c2c..0600edcef26 100644
--- a/mysql-test/suite/perfschema/t/checksum.test
+++ b/mysql-test/suite/perfschema/t/checksum.test
@@ -24,41 +24,41 @@
#
--disable_result_log
-checksum table performance_schema.COND_INSTANCES;
-checksum table performance_schema.EVENTS_WAITS_CURRENT;
-checksum table performance_schema.EVENTS_WAITS_HISTORY;
-checksum table performance_schema.EVENTS_WAITS_HISTORY_LONG;
-checksum table performance_schema.EVENTS_WAITS_SUMMARY_BY_INSTANCE;
-checksum table performance_schema.EVENTS_WAITS_SUMMARY_BY_THREAD_BY_EVENT_NAME;
-checksum table performance_schema.EVENTS_WAITS_SUMMARY_GLOBAL_BY_EVENT_NAME;
-checksum table performance_schema.FILE_INSTANCES;
-checksum table performance_schema.FILE_SUMMARY_BY_EVENT_NAME;
-checksum table performance_schema.FILE_SUMMARY_BY_INSTANCE;
-checksum table performance_schema.MUTEX_INSTANCES;
-checksum table performance_schema.PERFORMANCE_TIMERS;
-checksum table performance_schema.RWLOCK_INSTANCES;
-checksum table performance_schema.SETUP_CONSUMERS;
-checksum table performance_schema.SETUP_INSTRUMENTS;
-checksum table performance_schema.SETUP_TIMERS;
-checksum table performance_schema.THREADS;
+checksum table performance_schema.cond_instances;
+checksum table performance_schema.events_waits_current;
+checksum table performance_schema.events_waits_history;
+checksum table performance_schema.events_waits_history_long;
+checksum table performance_schema.events_waits_summary_by_instance;
+checksum table performance_schema.events_waits_summary_by_thread_by_event_name;
+checksum table performance_schema.events_waits_summary_global_by_event_name;
+checksum table performance_schema.file_instances;
+checksum table performance_schema.file_summary_by_event_name;
+checksum table performance_schema.file_summary_by_instance;
+checksum table performance_schema.mutex_instances;
+checksum table performance_schema.performance_timers;
+checksum table performance_schema.rwlock_instances;
+checksum table performance_schema.setup_consumers;
+checksum table performance_schema.setup_instruments;
+checksum table performance_schema.setup_timers;
+checksum table performance_schema.threads;
-checksum table performance_schema.COND_INSTANCES extended;
-checksum table performance_schema.EVENTS_WAITS_CURRENT extended;
-checksum table performance_schema.EVENTS_WAITS_HISTORY extended;
-checksum table performance_schema.EVENTS_WAITS_HISTORY_LONG extended;
-checksum table performance_schema.EVENTS_WAITS_SUMMARY_BY_INSTANCE extended;
-checksum table performance_schema.EVENTS_WAITS_SUMMARY_BY_THREAD_BY_EVENT_NAME extended;
-checksum table performance_schema.EVENTS_WAITS_SUMMARY_GLOBAL_BY_EVENT_NAME extended;
-checksum table performance_schema.FILE_INSTANCES extended;
-checksum table performance_schema.FILE_SUMMARY_BY_EVENT_NAME extended;
-checksum table performance_schema.FILE_SUMMARY_BY_INSTANCE extended;
-checksum table performance_schema.MUTEX_INSTANCES extended;
-checksum table performance_schema.PERFORMANCE_TIMERS extended;
-checksum table performance_schema.RWLOCK_INSTANCES extended;
-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.THREADS extended;
+checksum table performance_schema.cond_instances extended;
+checksum table performance_schema.events_waits_current extended;
+checksum table performance_schema.events_waits_history extended;
+checksum table performance_schema.events_waits_history_long extended;
+checksum table performance_schema.events_waits_summary_by_instance extended;
+checksum table performance_schema.events_waits_summary_by_thread_by_event_name extended;
+checksum table performance_schema.events_waits_summary_global_by_event_name extended;
+checksum table performance_schema.file_instances extended;
+checksum table performance_schema.file_summary_by_event_name extended;
+checksum table performance_schema.file_summary_by_instance extended;
+checksum table performance_schema.mutex_instances extended;
+checksum table performance_schema.performance_timers extended;
+checksum table performance_schema.rwlock_instances extended;
+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.threads extended;
--enable_result_log
diff --git a/mysql-test/suite/perfschema/t/column_privilege.test b/mysql-test/suite/perfschema/t/column_privilege.test
index b6bcbdb3396..a1b0ede6b45 100644
--- a/mysql-test/suite/perfschema/t/column_privilege.test
+++ b/mysql-test/suite/perfschema/t/column_privilege.test
@@ -26,10 +26,10 @@ grant usage on *.* to 'pfs_user_5'@localhost with GRANT OPTION;
# Test per column privileges on performance_schema
-grant SELECT(thread_id, event_id) on performance_schema.EVENTS_WAITS_CURRENT
+grant SELECT(thread_id, event_id) on performance_schema.events_waits_current
to 'pfs_user_5'@localhost;
-grant UPDATE(enabled) on performance_schema.SETUP_INSTRUMENTS
+grant UPDATE(enabled) on performance_schema.setup_instruments
to 'pfs_user_5'@localhost;
flush privileges;
@@ -42,32 +42,28 @@ connect (con1, localhost, pfs_user_5, , );
# For statements that works, we do not look at the output
--disable_result_log
-select thread_id from performance_schema.EVENTS_WAITS_CURRENT;
+select thread_id from performance_schema.events_waits_current;
-select thread_id, event_id from performance_schema.EVENTS_WAITS_CURRENT;
+select thread_id, event_id from performance_schema.events_waits_current;
-update performance_schema.SETUP_INSTRUMENTS set enabled='YES';
+update performance_schema.setup_instruments set enabled='YES';
--enable_result_log
# For statements that are denied, check the error number and error text.
---replace_result '\'events_waits_current' '\'EVENTS_WAITS_CURRENT'
--error ER_COLUMNACCESS_DENIED_ERROR
-select event_name from performance_schema.EVENTS_WAITS_CURRENT;
+select event_name from performance_schema.events_waits_current;
---replace_result '\'events_waits_current' '\'EVENTS_WAITS_CURRENT'
--error ER_COLUMNACCESS_DENIED_ERROR
select thread_id, event_id, event_name
- from performance_schema.EVENTS_WAITS_CURRENT;
+ from performance_schema.events_waits_current;
---replace_result '\'setup_instruments' '\'SETUP_INSTRUMENTS'
--error ER_COLUMNACCESS_DENIED_ERROR
-update performance_schema.SETUP_INSTRUMENTS set name='illegal';
+update performance_schema.setup_instruments set name='illegal';
---replace_result '\'setup_instruments' '\'SETUP_INSTRUMENTS'
--error ER_COLUMNACCESS_DENIED_ERROR
-update performance_schema.SETUP_INSTRUMENTS set timed='NO';
+update performance_schema.setup_instruments set timed='NO';
# Cleanup
@@ -76,7 +72,7 @@ update performance_schema.SETUP_INSTRUMENTS set timed='NO';
REVOKE ALL PRIVILEGES, GRANT OPTION FROM 'pfs_user_5'@localhost;
DROP USER 'pfs_user_5'@localhost;
flush privileges;
-UPDATE performance_schema.SETUP_INSTRUMENTS SET enabled = 'YES', timed = 'YES';
-UPDATE performance_schema.SETUP_CONSUMERS SET enabled = 'YES';
-UPDATE performance_schema.SETUP_TIMERS SET timer_name = 'CYCLE';
+UPDATE performance_schema.setup_instruments SET enabled = 'YES', timed = 'YES';
+UPDATE performance_schema.setup_consumers SET enabled = 'YES';
+UPDATE performance_schema.setup_timers SET timer_name = 'CYCLE';
diff --git a/mysql-test/suite/perfschema/t/ddl_cond_instances.test b/mysql-test/suite/perfschema/t/ddl_cond_instances.test
index e78429cb181..2da1100702f 100644
--- a/mysql-test/suite/perfschema/t/ddl_cond_instances.test
+++ b/mysql-test/suite/perfschema/t/ddl_cond_instances.test
@@ -19,14 +19,14 @@
--source include/have_perfschema.inc
-- error ER_DBACCESS_DENIED_ERROR
-alter table performance_schema.COND_INSTANCES add column foo integer;
+alter table performance_schema.cond_instances add column foo integer;
-- error ER_WRONG_PERFSCHEMA_USAGE
-truncate table performance_schema.COND_INSTANCES;
+truncate table performance_schema.cond_instances;
-- error ER_DBACCESS_DENIED_ERROR
-ALTER TABLE performance_schema.COND_INSTANCES ADD INDEX test_index(NAME);
+ALTER TABLE performance_schema.cond_instances ADD INDEX test_index(NAME);
-- error ER_DBACCESS_DENIED_ERROR
-CREATE UNIQUE INDEX test_index ON performance_schema.COND_INSTANCES(NAME);
+CREATE UNIQUE INDEX test_index ON performance_schema.cond_instances(NAME);
diff --git a/mysql-test/suite/perfschema/t/ddl_events_waits_current.test b/mysql-test/suite/perfschema/t/ddl_events_waits_current.test
index 34f735c1271..1914d333f00 100644
--- a/mysql-test/suite/perfschema/t/ddl_events_waits_current.test
+++ b/mysql-test/suite/perfschema/t/ddl_events_waits_current.test
@@ -19,13 +19,13 @@
--source include/have_perfschema.inc
-- error ER_DBACCESS_DENIED_ERROR
-alter table performance_schema.EVENTS_WAITS_CURRENT add column foo integer;
+alter table performance_schema.events_waits_current add column foo integer;
-truncate table performance_schema.EVENTS_WAITS_CURRENT;
+truncate table performance_schema.events_waits_current;
-- error ER_DBACCESS_DENIED_ERROR
-ALTER TABLE performance_schema.EVENTS_WAITS_CURRENT ADD INDEX test_index(EVENT_ID);
+ALTER TABLE performance_schema.events_waits_current ADD INDEX test_index(EVENT_ID);
-- error ER_DBACCESS_DENIED_ERROR
-CREATE UNIQUE INDEX test_index ON performance_schema.EVENTS_WAITS_CURRENT(EVENT_ID);
+CREATE UNIQUE INDEX test_index ON performance_schema.events_waits_current(EVENT_ID);
diff --git a/mysql-test/suite/perfschema/t/ddl_events_waits_history.test b/mysql-test/suite/perfschema/t/ddl_events_waits_history.test
index 76ebe3d85c4..97c840a350d 100644
--- a/mysql-test/suite/perfschema/t/ddl_events_waits_history.test
+++ b/mysql-test/suite/perfschema/t/ddl_events_waits_history.test
@@ -19,13 +19,13 @@
--source include/have_perfschema.inc
-- error ER_DBACCESS_DENIED_ERROR
-alter table performance_schema.EVENTS_WAITS_HISTORY add column foo integer;
+alter table performance_schema.events_waits_history add column foo integer;
-truncate table performance_schema.EVENTS_WAITS_HISTORY;
+truncate table performance_schema.events_waits_history;
-- error ER_DBACCESS_DENIED_ERROR
-ALTER TABLE performance_schema.EVENTS_WAITS_HISTORY ADD INDEX test_index(EVENT_ID);
+ALTER TABLE performance_schema.events_waits_history ADD INDEX test_index(EVENT_ID);
-- error ER_DBACCESS_DENIED_ERROR
-CREATE UNIQUE INDEX test_index ON performance_schema.EVENTS_WAITS_HISTORY(EVENT_ID);
+CREATE UNIQUE INDEX test_index ON performance_schema.events_waits_history(EVENT_ID);
diff --git a/mysql-test/suite/perfschema/t/ddl_events_waits_history_long.test b/mysql-test/suite/perfschema/t/ddl_events_waits_history_long.test
index 549c5d6880b..b57a3864e1a 100644
--- a/mysql-test/suite/perfschema/t/ddl_events_waits_history_long.test
+++ b/mysql-test/suite/perfschema/t/ddl_events_waits_history_long.test
@@ -19,13 +19,13 @@
--source include/have_perfschema.inc
-- error ER_DBACCESS_DENIED_ERROR
-alter table performance_schema.EVENTS_WAITS_HISTORY_LONG add column foo integer;
+alter table performance_schema.events_waits_history_long add column foo integer;
-truncate table performance_schema.EVENTS_WAITS_HISTORY_LONG;
+truncate table performance_schema.events_waits_history_long;
-- error ER_DBACCESS_DENIED_ERROR
-ALTER TABLE performance_schema.EVENTS_WAITS_HISTORY_LONG ADD INDEX test_index(EVENT_ID);
+ALTER TABLE performance_schema.events_waits_history_long ADD INDEX test_index(EVENT_ID);
-- error ER_DBACCESS_DENIED_ERROR
-CREATE UNIQUE INDEX test_index ON performance_schema.EVENTS_WAITS_HISTORY_LONG(EVENT_ID);
+CREATE UNIQUE INDEX test_index ON performance_schema.events_waits_history_long(EVENT_ID);
diff --git a/mysql-test/suite/perfschema/t/ddl_ews_by_instance.test b/mysql-test/suite/perfschema/t/ddl_ews_by_instance.test
index e6dad07fd63..a6315edd31d 100644
--- a/mysql-test/suite/perfschema/t/ddl_ews_by_instance.test
+++ b/mysql-test/suite/perfschema/t/ddl_ews_by_instance.test
@@ -19,13 +19,13 @@
--source include/have_perfschema.inc
-- error ER_DBACCESS_DENIED_ERROR
-alter table performance_schema.EVENTS_WAITS_SUMMARY_BY_INSTANCE add column foo integer;
+alter table performance_schema.events_waits_summary_by_instance add column foo integer;
-truncate table performance_schema.EVENTS_WAITS_SUMMARY_BY_INSTANCE;
+truncate table performance_schema.events_waits_summary_by_instance;
-- error ER_DBACCESS_DENIED_ERROR
-ALTER TABLE performance_schema.EVENTS_WAITS_SUMMARY_BY_INSTANCE ADD INDEX test_index(EVENT_NAME);
+ALTER TABLE performance_schema.events_waits_summary_by_instance ADD INDEX test_index(EVENT_NAME);
-- error ER_DBACCESS_DENIED_ERROR
-CREATE UNIQUE INDEX test_index ON performance_schema.EVENTS_WAITS_SUMMARY_BY_INSTANCE(EVENT_NAME);
+CREATE UNIQUE INDEX test_index ON performance_schema.events_waits_summary_by_instance(EVENT_NAME);
diff --git a/mysql-test/suite/perfschema/t/ddl_ews_by_thread_by_event_name.test b/mysql-test/suite/perfschema/t/ddl_ews_by_thread_by_event_name.test
index 5b65ec26064..f59daca4b46 100644
--- a/mysql-test/suite/perfschema/t/ddl_ews_by_thread_by_event_name.test
+++ b/mysql-test/suite/perfschema/t/ddl_ews_by_thread_by_event_name.test
@@ -19,15 +19,15 @@
--source include/have_perfschema.inc
-- error ER_DBACCESS_DENIED_ERROR
-alter table performance_schema.EVENTS_WAITS_SUMMARY_BY_THREAD_BY_EVENT_NAME
+alter table performance_schema.events_waits_summary_by_thread_by_event_name
add column foo integer;
-truncate table performance_schema.EVENTS_WAITS_SUMMARY_BY_THREAD_BY_EVENT_NAME;
+truncate table performance_schema.events_waits_summary_by_thread_by_event_name;
-- error ER_DBACCESS_DENIED_ERROR
-ALTER TABLE performance_schema.EVENTS_WAITS_SUMMARY_BY_THREAD_BY_EVENT_NAME ADD INDEX test_index(THREAD_ID);
+ALTER TABLE performance_schema.events_waits_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_WAITS_SUMMARY_BY_THREAD_BY_EVENT_NAME(THREAD_ID);
+ ON performance_schema.events_waits_summary_by_thread_by_event_name(THREAD_ID);
diff --git a/mysql-test/suite/perfschema/t/ddl_ews_global_by_event_name.test b/mysql-test/suite/perfschema/t/ddl_ews_global_by_event_name.test
index c7a767b013b..880b4bf1a59 100644
--- a/mysql-test/suite/perfschema/t/ddl_ews_global_by_event_name.test
+++ b/mysql-test/suite/perfschema/t/ddl_ews_global_by_event_name.test
@@ -19,16 +19,16 @@
--source include/have_perfschema.inc
-- error ER_DBACCESS_DENIED_ERROR
-alter table performance_schema.EVENTS_WAITS_SUMMARY_GLOBAL_BY_EVENT_NAME
+alter table performance_schema.events_waits_summary_global_by_event_name
add column foo integer;
-truncate table performance_schema.EVENTS_WAITS_SUMMARY_GLOBAL_BY_EVENT_NAME;
+truncate table performance_schema.events_waits_summary_global_by_event_name;
-- error ER_DBACCESS_DENIED_ERROR
-ALTER TABLE performance_schema.EVENTS_WAITS_SUMMARY_GLOBAL_BY_EVENT_NAME
+ALTER TABLE performance_schema.events_waits_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_WAITS_SUMMARY_GLOBAL_BY_EVENT_NAME(EVENT_NAME);
+ ON performance_schema.events_waits_summary_global_by_event_name(EVENT_NAME);
diff --git a/mysql-test/suite/perfschema/t/ddl_file_instances.test b/mysql-test/suite/perfschema/t/ddl_file_instances.test
index a9c9a2a95b6..9d6b8c3cf26 100644
--- a/mysql-test/suite/perfschema/t/ddl_file_instances.test
+++ b/mysql-test/suite/perfschema/t/ddl_file_instances.test
@@ -19,14 +19,14 @@
--source include/have_perfschema.inc
-- error ER_DBACCESS_DENIED_ERROR
-alter table performance_schema.FILE_INSTANCES add column foo integer;
+alter table performance_schema.file_instances add column foo integer;
-- error ER_WRONG_PERFSCHEMA_USAGE
-truncate table performance_schema.FILE_INSTANCES;
+truncate table performance_schema.file_instances;
-- error ER_DBACCESS_DENIED_ERROR
-ALTER TABLE performance_schema.FILE_INSTANCES ADD INDEX test_index(FILE_NAME);
+ALTER TABLE performance_schema.file_instances ADD INDEX test_index(FILE_NAME);
-- error ER_DBACCESS_DENIED_ERROR
-CREATE UNIQUE INDEX test_index ON performance_schema.FILE_INSTANCES(FILE_NAME);
+CREATE UNIQUE INDEX test_index ON performance_schema.file_instances(FILE_NAME);
diff --git a/mysql-test/suite/perfschema/t/ddl_fs_by_event_name.test b/mysql-test/suite/perfschema/t/ddl_fs_by_event_name.test
index 2581f07c0d2..f9a9cabb5b2 100644
--- a/mysql-test/suite/perfschema/t/ddl_fs_by_event_name.test
+++ b/mysql-test/suite/perfschema/t/ddl_fs_by_event_name.test
@@ -19,13 +19,13 @@
--source include/have_perfschema.inc
-- error ER_DBACCESS_DENIED_ERROR
-alter table performance_schema.FILE_SUMMARY_BY_EVENT_NAME add column foo integer;
+alter table performance_schema.file_summary_by_event_name add column foo integer;
-truncate table performance_schema.FILE_SUMMARY_BY_EVENT_NAME;
+truncate table performance_schema.file_summary_by_event_name;
-- error ER_DBACCESS_DENIED_ERROR
-ALTER TABLE performance_schema.FILE_SUMMARY_BY_EVENT_NAME ADD INDEX test_index(NAME);
+ALTER TABLE performance_schema.file_summary_by_event_name ADD INDEX test_index(NAME);
-- error ER_DBACCESS_DENIED_ERROR
-CREATE UNIQUE INDEX test_index ON performance_schema.FILE_SUMMARY_BY_EVENT_NAME(NAME);
+CREATE UNIQUE INDEX test_index ON performance_schema.file_summary_by_event_name(NAME);
diff --git a/mysql-test/suite/perfschema/t/ddl_fs_by_instance.test b/mysql-test/suite/perfschema/t/ddl_fs_by_instance.test
index e06ad2eb7cd..defbff34321 100644
--- a/mysql-test/suite/perfschema/t/ddl_fs_by_instance.test
+++ b/mysql-test/suite/perfschema/t/ddl_fs_by_instance.test
@@ -19,13 +19,13 @@
--source include/have_perfschema.inc
-- error ER_DBACCESS_DENIED_ERROR
-alter table performance_schema.FILE_SUMMARY_BY_INSTANCE add column foo integer;
+alter table performance_schema.file_summary_by_instance add column foo integer;
-truncate table performance_schema.FILE_SUMMARY_BY_INSTANCE;
+truncate table performance_schema.file_summary_by_instance;
-- error ER_DBACCESS_DENIED_ERROR
-ALTER TABLE performance_schema.FILE_SUMMARY_BY_INSTANCE ADD INDEX test_index(NAME);
+ALTER TABLE performance_schema.file_summary_by_instance ADD INDEX test_index(NAME);
-- error ER_DBACCESS_DENIED_ERROR
-CREATE UNIQUE INDEX test_index ON performance_schema.FILE_SUMMARY_BY_INSTANCE(NAME);
+CREATE UNIQUE INDEX test_index ON performance_schema.file_summary_by_instance(NAME);
diff --git a/mysql-test/suite/perfschema/t/ddl_mutex_instances.test b/mysql-test/suite/perfschema/t/ddl_mutex_instances.test
index 6489a689620..ccd970655af 100644
--- a/mysql-test/suite/perfschema/t/ddl_mutex_instances.test
+++ b/mysql-test/suite/perfschema/t/ddl_mutex_instances.test
@@ -19,14 +19,14 @@
--source include/have_perfschema.inc
-- error ER_DBACCESS_DENIED_ERROR
-alter table performance_schema.MUTEX_INSTANCES add column foo integer;
+alter table performance_schema.mutex_instances add column foo integer;
-- error ER_WRONG_PERFSCHEMA_USAGE
-truncate table performance_schema.MUTEX_INSTANCES;
+truncate table performance_schema.mutex_instances;
-- error ER_DBACCESS_DENIED_ERROR
-ALTER TABLE performance_schema.MUTEX_INSTANCES ADD INDEX test_index(NAME);
+ALTER TABLE performance_schema.mutex_instances ADD INDEX test_index(NAME);
-- error ER_DBACCESS_DENIED_ERROR
-CREATE UNIQUE INDEX test_index ON performance_schema.MUTEX_INSTANCES(NAME);
+CREATE UNIQUE INDEX test_index ON performance_schema.mutex_instances(NAME);
diff --git a/mysql-test/suite/perfschema/t/ddl_performance_timers.test b/mysql-test/suite/perfschema/t/ddl_performance_timers.test
index b692291b8cf..f6fcfd58bab 100644
--- a/mysql-test/suite/perfschema/t/ddl_performance_timers.test
+++ b/mysql-test/suite/perfschema/t/ddl_performance_timers.test
@@ -19,14 +19,14 @@
--source include/have_perfschema.inc
-- error ER_DBACCESS_DENIED_ERROR
-alter table performance_schema.PERFORMANCE_TIMERS add column foo integer;
+alter table performance_schema.performance_timers add column foo integer;
-- error ER_WRONG_PERFSCHEMA_USAGE
-truncate table performance_schema.PERFORMANCE_TIMERS;
+truncate table performance_schema.performance_timers;
-- error ER_DBACCESS_DENIED_ERROR
-ALTER TABLE performance_schema.PERFORMANCE_TIMERS ADD INDEX test_index(TIMER_NAME);
+ALTER TABLE performance_schema.performance_timers ADD INDEX test_index(TIMER_NAME);
-- error ER_DBACCESS_DENIED_ERROR
-CREATE UNIQUE INDEX test_index ON performance_schema.PERFORMANCE_TIMERS(TIMER_NAME);
+CREATE UNIQUE INDEX test_index ON performance_schema.performance_timers(TIMER_NAME);
diff --git a/mysql-test/suite/perfschema/t/ddl_rwlock_instances.test b/mysql-test/suite/perfschema/t/ddl_rwlock_instances.test
index c07cd1ede48..e5bd8b890a1 100644
--- a/mysql-test/suite/perfschema/t/ddl_rwlock_instances.test
+++ b/mysql-test/suite/perfschema/t/ddl_rwlock_instances.test
@@ -19,14 +19,14 @@
--source include/have_perfschema.inc
-- error ER_DBACCESS_DENIED_ERROR
-alter table performance_schema.RWLOCK_INSTANCES add column foo integer;
+alter table performance_schema.rwlock_instances add column foo integer;
-- error ER_WRONG_PERFSCHEMA_USAGE
-truncate table performance_schema.RWLOCK_INSTANCES;
+truncate table performance_schema.rwlock_instances;
-- error ER_DBACCESS_DENIED_ERROR
-ALTER TABLE performance_schema.RWLOCK_INSTANCES ADD INDEX test_index(NAME);
+ALTER TABLE performance_schema.rwlock_instances ADD INDEX test_index(NAME);
-- error ER_DBACCESS_DENIED_ERROR
-CREATE UNIQUE INDEX test_index ON performance_schema.RWLOCK_INSTANCES(NAME);
+CREATE UNIQUE INDEX test_index ON performance_schema.rwlock_instances(NAME);
diff --git a/mysql-test/suite/perfschema/t/ddl_setup_consumers.test b/mysql-test/suite/perfschema/t/ddl_setup_consumers.test
index c44db822145..3984e0b7fab 100644
--- a/mysql-test/suite/perfschema/t/ddl_setup_consumers.test
+++ b/mysql-test/suite/perfschema/t/ddl_setup_consumers.test
@@ -18,16 +18,15 @@
--source include/not_embedded.inc
--source include/have_perfschema.inc
---replace_result '\'setup_consumers' '\'SETUP_CONSUMERS'
-- error ER_DBACCESS_DENIED_ERROR
-alter table performance_schema.SETUP_CONSUMERS add column foo integer;
+alter table performance_schema.setup_consumers add column foo integer;
-- error ER_WRONG_PERFSCHEMA_USAGE
-truncate table performance_schema.SETUP_CONSUMERS;
+truncate table performance_schema.setup_consumers;
-- error ER_DBACCESS_DENIED_ERROR
-ALTER TABLE performance_schema.SETUP_CONSUMERS ADD INDEX test_index(NAME);
+ALTER TABLE performance_schema.setup_consumers ADD INDEX test_index(NAME);
-- error ER_DBACCESS_DENIED_ERROR
-CREATE UNIQUE INDEX test_index ON performance_schema.SETUP_CONSUMERS(NAME);
+CREATE UNIQUE INDEX test_index ON performance_schema.setup_consumers(NAME);
diff --git a/mysql-test/suite/perfschema/t/ddl_setup_instruments.test b/mysql-test/suite/perfschema/t/ddl_setup_instruments.test
index c20c386447c..b900f69e801 100644
--- a/mysql-test/suite/perfschema/t/ddl_setup_instruments.test
+++ b/mysql-test/suite/perfschema/t/ddl_setup_instruments.test
@@ -18,16 +18,15 @@
--source include/not_embedded.inc
--source include/have_perfschema.inc
---replace_result '\'setup_instruments' '\'SETUP_INSTRUMENTS'
-- error ER_DBACCESS_DENIED_ERROR
-alter table performance_schema.SETUP_INSTRUMENTS add column foo integer;
+alter table performance_schema.setup_instruments add column foo integer;
-- error ER_WRONG_PERFSCHEMA_USAGE
-truncate table performance_schema.SETUP_INSTRUMENTS;
+truncate table performance_schema.setup_instruments;
-- error ER_DBACCESS_DENIED_ERROR
-ALTER TABLE performance_schema.SETUP_INSTRUMENTS ADD INDEX test_index(NAME);
+ALTER TABLE performance_schema.setup_instruments ADD INDEX test_index(NAME);
-- error ER_DBACCESS_DENIED_ERROR
-CREATE UNIQUE INDEX test_index ON performance_schema.SETUP_INSTRUMENTS(NAME);
+CREATE UNIQUE INDEX test_index ON performance_schema.setup_instruments(NAME);
diff --git a/mysql-test/suite/perfschema/t/ddl_setup_timers.test b/mysql-test/suite/perfschema/t/ddl_setup_timers.test
index b9a5c32ecbe..bf8878a496d 100644
--- a/mysql-test/suite/perfschema/t/ddl_setup_timers.test
+++ b/mysql-test/suite/perfschema/t/ddl_setup_timers.test
@@ -18,16 +18,15 @@
--source include/not_embedded.inc
--source include/have_perfschema.inc
---replace_result '\'setup_timers' '\'SETUP_TIMERS'
-- error ER_DBACCESS_DENIED_ERROR
-alter table performance_schema.SETUP_TIMERS add column foo integer;
+alter table performance_schema.setup_timers add column foo integer;
-- error ER_WRONG_PERFSCHEMA_USAGE
-truncate table performance_schema.SETUP_TIMERS;
+truncate table performance_schema.setup_timers;
-- error ER_DBACCESS_DENIED_ERROR
-ALTER TABLE performance_schema.SETUP_TIMERS ADD INDEX test_index(NAME);
+ALTER TABLE performance_schema.setup_timers ADD INDEX test_index(NAME);
-- error ER_DBACCESS_DENIED_ERROR
-CREATE UNIQUE INDEX test_index ON performance_schema.SETUP_TIMERS(NAME);
+CREATE UNIQUE INDEX test_index ON performance_schema.setup_timers(NAME);
diff --git a/mysql-test/suite/perfschema/t/ddl_threads.test b/mysql-test/suite/perfschema/t/ddl_threads.test
index 12613e30c1f..d9ff3356b8d 100644
--- a/mysql-test/suite/perfschema/t/ddl_threads.test
+++ b/mysql-test/suite/perfschema/t/ddl_threads.test
@@ -19,14 +19,14 @@
--source include/have_perfschema.inc
-- error ER_DBACCESS_DENIED_ERROR
-alter table performance_schema.THREADS add column foo integer;
+alter table performance_schema.threads add column foo integer;
-- error ER_WRONG_PERFSCHEMA_USAGE
-truncate table performance_schema.THREADS;
+truncate table performance_schema.threads;
-- error ER_DBACCESS_DENIED_ERROR
-ALTER TABLE performance_schema.THREADS ADD INDEX test_index(ID);
+ALTER TABLE performance_schema.threads ADD INDEX test_index(ID);
-- error ER_DBACCESS_DENIED_ERROR
-CREATE UNIQUE INDEX test_index ON performance_schema.THREADS(ID);
+CREATE UNIQUE INDEX test_index ON performance_schema.threads(ID);
diff --git a/mysql-test/suite/perfschema/t/dml_cond_instances.test b/mysql-test/suite/perfschema/t/dml_cond_instances.test
index 1d1614db73f..e2773d15252 100644
--- a/mysql-test/suite/perfschema/t/dml_cond_instances.test
+++ b/mysql-test/suite/perfschema/t/dml_cond_instances.test
@@ -18,38 +18,33 @@
--source include/not_embedded.inc
--source include/have_perfschema.inc
---replace_column 1 # 2 #
-select * from performance_schema.COND_INSTANCES limit 1;
+--disable_result_log
+select * from performance_schema.cond_instances limit 1;
-select * from performance_schema.COND_INSTANCES
+select * from performance_schema.cond_instances
where name='FOO';
+--enable_result_log
---replace_result '\'cond_instances' '\'COND_INSTANCES'
--error ER_TABLEACCESS_DENIED_ERROR
-insert into performance_schema.COND_INSTANCES
+insert into performance_schema.cond_instances
set name='FOO', object_instance_begin=12;
---replace_result '\'cond_instances' '\'COND_INSTANCES'
--error ER_TABLEACCESS_DENIED_ERROR
-update performance_schema.COND_INSTANCES
+update performance_schema.cond_instances
set name='FOO';
---replace_result '\'cond_instances' '\'COND_INSTANCES'
--error ER_TABLEACCESS_DENIED_ERROR
-delete from performance_schema.COND_INSTANCES
+delete from performance_schema.cond_instances
where name like "wait/%";
---replace_result '\'cond_instances' '\'COND_INSTANCES'
--error ER_TABLEACCESS_DENIED_ERROR
-delete from performance_schema.COND_INSTANCES;
+delete from performance_schema.cond_instances;
---replace_result '\'cond_instances' '\'COND_INSTANCES'
-- error ER_TABLEACCESS_DENIED_ERROR
-LOCK TABLES performance_schema.COND_INSTANCES READ;
+LOCK TABLES performance_schema.cond_instances READ;
UNLOCK TABLES;
---replace_result '\'cond_instances' '\'COND_INSTANCES'
-- error ER_TABLEACCESS_DENIED_ERROR
-LOCK TABLES performance_schema.COND_INSTANCES WRITE;
+LOCK TABLES performance_schema.cond_instances WRITE;
UNLOCK TABLES;
diff --git a/mysql-test/suite/perfschema/t/dml_events_waits_current.test b/mysql-test/suite/perfschema/t/dml_events_waits_current.test
index 3a93b98cb57..43a70618b4d 100644
--- a/mysql-test/suite/perfschema/t/dml_events_waits_current.test
+++ b/mysql-test/suite/perfschema/t/dml_events_waits_current.test
@@ -18,45 +18,39 @@
--source include/not_embedded.inc
--source include/have_perfschema.inc
---replace_column 1 # 2 # 3 # 4 # 5 # 6 # 7 # 8 # 12 # 14 #
-select * from performance_schema.EVENTS_WAITS_CURRENT
+--disable_result_log
+select * from performance_schema.events_waits_current
where event_name like 'Wait/Synch/%' limit 1;
-select * from performance_schema.EVENTS_WAITS_CURRENT
+select * from performance_schema.events_waits_current
where event_name='FOO';
+--enable_result_log
---replace_result '\'events_waits_current' '\'EVENTS_WAITS_CURRENT'
--error ER_TABLEACCESS_DENIED_ERROR
-insert into performance_schema.EVENTS_WAITS_CURRENT
+insert into performance_schema.events_waits_current
set thread_id='1', event_id=1,
event_name='FOO', timer_start=1, timer_end=2, timer_wait=3;
---replace_result '\'events_waits_current' '\'EVENTS_WAITS_CURRENT'
--error ER_TABLEACCESS_DENIED_ERROR
-update performance_schema.EVENTS_WAITS_CURRENT
+update performance_schema.events_waits_current
set timer_start=12;
---replace_result '\'events_waits_current' '\'EVENTS_WAITS_CURRENT'
--error ER_TABLEACCESS_DENIED_ERROR
-update performance_schema.EVENTS_WAITS_CURRENT
+update performance_schema.events_waits_current
set timer_start=12 where thread_id=0;
---replace_result '\'events_waits_current' '\'EVENTS_WAITS_CURRENT'
--error ER_TABLEACCESS_DENIED_ERROR
-delete from performance_schema.EVENTS_WAITS_CURRENT
+delete from performance_schema.events_waits_current
where thread_id=1;
---replace_result '\'events_waits_current' '\'EVENTS_WAITS_CURRENT'
--error ER_TABLEACCESS_DENIED_ERROR
-delete from performance_schema.EVENTS_WAITS_CURRENT;
+delete from performance_schema.events_waits_current;
---replace_result '\'events_waits_current' '\'EVENTS_WAITS_CURRENT'
-- error ER_TABLEACCESS_DENIED_ERROR
-LOCK TABLES performance_schema.EVENTS_WAITS_CURRENT READ;
+LOCK TABLES performance_schema.events_waits_current READ;
UNLOCK TABLES;
---replace_result '\'events_waits_current' '\'EVENTS_WAITS_CURRENT'
-- error ER_TABLEACCESS_DENIED_ERROR
-LOCK TABLES performance_schema.EVENTS_WAITS_CURRENT WRITE;
+LOCK TABLES performance_schema.events_waits_current WRITE;
UNLOCK TABLES;
diff --git a/mysql-test/suite/perfschema/t/dml_events_waits_history.test b/mysql-test/suite/perfschema/t/dml_events_waits_history.test
index 174ef2147d1..51937a75f49 100644
--- a/mysql-test/suite/perfschema/t/dml_events_waits_history.test
+++ b/mysql-test/suite/perfschema/t/dml_events_waits_history.test
@@ -18,53 +18,45 @@
--source include/not_embedded.inc
--source include/have_perfschema.inc
---replace_column 1 # 2 # 3 # 4 # 5 # 6 # 7 # 8 # 12 # 14 #
-select * from performance_schema.EVENTS_WAITS_HISTORY
+--disable_result_log
+select * from performance_schema.events_waits_history
where event_name like 'Wait/Synch/%' limit 1;
-select * from performance_schema.EVENTS_WAITS_HISTORY
+select * from performance_schema.events_waits_history
where event_name='FOO';
---replace_column 1 # 2 # 3 # 4 # 5 # 6 # 7 # 8 # 12 # 14 #
-select * from performance_schema.EVENTS_WAITS_HISTORY
+select * from performance_schema.events_waits_history
where event_name like 'Wait/Synch/%' order by timer_wait limit 1;
---replace_column 1 # 2 # 3 # 4 # 5 # 6 # 7 # 8 # 12 # 14 #
-select * from performance_schema.EVENTS_WAITS_HISTORY
+select * from performance_schema.events_waits_history
where event_name like 'Wait/Synch/%' order by timer_wait desc limit 1;
+--enable_result_log
---replace_result '\'events_waits_history' '\'EVENTS_WAITS_HISTORY'
--error ER_TABLEACCESS_DENIED_ERROR
-insert into performance_schema.EVENTS_WAITS_HISTORY
+insert into performance_schema.events_waits_history
set thread_id='1', event_id=1,
event_name='FOO', timer_start=1, timer_end=2, timer_wait=3;
---replace_result '\'events_waits_history' '\'EVENTS_WAITS_HISTORY'
--error ER_TABLEACCESS_DENIED_ERROR
-update performance_schema.EVENTS_WAITS_HISTORY
+update performance_schema.events_waits_history
set timer_start=12;
---replace_result '\'events_waits_history' '\'EVENTS_WAITS_HISTORY'
--error ER_TABLEACCESS_DENIED_ERROR
-update performance_schema.EVENTS_WAITS_HISTORY
+update performance_schema.events_waits_history
set timer_start=12 where thread_id=0;
---replace_result '\'events_waits_history' '\'EVENTS_WAITS_HISTORY'
--error ER_TABLEACCESS_DENIED_ERROR
-delete from performance_schema.EVENTS_WAITS_HISTORY
+delete from performance_schema.events_waits_history
where thread_id=1;
---replace_result '\'events_waits_history' '\'EVENTS_WAITS_HISTORY'
--error ER_TABLEACCESS_DENIED_ERROR
-delete from performance_schema.EVENTS_WAITS_HISTORY;
+delete from performance_schema.events_waits_history;
---replace_result '\'events_waits_history' '\'EVENTS_WAITS_HISTORY'
-- error ER_TABLEACCESS_DENIED_ERROR
-LOCK TABLES performance_schema.EVENTS_WAITS_HISTORY READ;
+LOCK TABLES performance_schema.events_waits_history READ;
UNLOCK TABLES;
---replace_result '\'events_waits_history' '\'EVENTS_WAITS_HISTORY'
-- error ER_TABLEACCESS_DENIED_ERROR
-LOCK TABLES performance_schema.EVENTS_WAITS_HISTORY WRITE;
+LOCK TABLES performance_schema.events_waits_history WRITE;
UNLOCK TABLES;
diff --git a/mysql-test/suite/perfschema/t/dml_events_waits_history_long.test b/mysql-test/suite/perfschema/t/dml_events_waits_history_long.test
index 73dc0aefd06..a7fc1937529 100644
--- a/mysql-test/suite/perfschema/t/dml_events_waits_history_long.test
+++ b/mysql-test/suite/perfschema/t/dml_events_waits_history_long.test
@@ -18,53 +18,45 @@
--source include/not_embedded.inc
--source include/have_perfschema.inc
---replace_column 1 # 2 # 3 # 4 # 5 # 6 # 7 # 8 # 12 # 14 #
-select * from performance_schema.EVENTS_WAITS_HISTORY_LONG
+--disable_result_log
+select * from performance_schema.events_waits_history_long
where event_name like 'Wait/Synch/%' limit 1;
-select * from performance_schema.EVENTS_WAITS_HISTORY_LONG
+select * from performance_schema.events_waits_history_long
where event_name='FOO';
---replace_column 1 # 2 # 3 # 4 # 5 # 6 # 7 # 8 # 12 # 14 #
-select * from performance_schema.EVENTS_WAITS_HISTORY_LONG
+select * from performance_schema.events_waits_history_long
where event_name like 'Wait/Synch/%' order by timer_wait limit 1;
---replace_column 1 # 2 # 3 # 4 # 5 # 6 # 7 # 8 # 12 # 14 #
-select * from performance_schema.EVENTS_WAITS_HISTORY_LONG
+select * from performance_schema.events_waits_history_long
where event_name like 'Wait/Synch/%' order by timer_wait desc limit 1;
+--enable_result_log
---replace_result '\'events_waits_history_long' '\'EVENTS_WAITS_HISTORY_LONG'
--error ER_TABLEACCESS_DENIED_ERROR
-insert into performance_schema.EVENTS_WAITS_HISTORY_LONG
+insert into performance_schema.events_waits_history_long
set thread_id='1', event_id=1,
event_name='FOO', timer_start=1, timer_end=2, timer_wait=3;
---replace_result '\'events_waits_history_long' '\'EVENTS_WAITS_HISTORY_LONG'
--error ER_TABLEACCESS_DENIED_ERROR
-update performance_schema.EVENTS_WAITS_HISTORY_LONG
+update performance_schema.events_waits_history_long
set timer_start=12;
---replace_result '\'events_waits_history_long' '\'EVENTS_WAITS_HISTORY_LONG'
--error ER_TABLEACCESS_DENIED_ERROR
-update performance_schema.EVENTS_WAITS_HISTORY_LONG
+update performance_schema.events_waits_history_long
set timer_start=12 where thread_id=0;
---replace_result '\'events_waits_history_long' '\'EVENTS_WAITS_HISTORY_LONG'
--error ER_TABLEACCESS_DENIED_ERROR
-delete from performance_schema.EVENTS_WAITS_HISTORY_LONG
+delete from performance_schema.events_waits_history_long
where thread_id=1;
---replace_result '\'events_waits_history_long' '\'EVENTS_WAITS_HISTORY_LONG'
--error ER_TABLEACCESS_DENIED_ERROR
-delete from performance_schema.EVENTS_WAITS_HISTORY_LONG;
+delete from performance_schema.events_waits_history_long;
---replace_result '\'events_waits_history_long' '\'EVENTS_WAITS_HISTORY_LONG'
-- error ER_TABLEACCESS_DENIED_ERROR
-LOCK TABLES performance_schema.EVENTS_WAITS_HISTORY_LONG READ;
+LOCK TABLES performance_schema.events_waits_history_long READ;
UNLOCK TABLES;
---replace_result '\'events_waits_history_long' '\'EVENTS_WAITS_HISTORY_LONG'
-- error ER_TABLEACCESS_DENIED_ERROR
-LOCK TABLES performance_schema.EVENTS_WAITS_HISTORY_LONG WRITE;
+LOCK TABLES performance_schema.events_waits_history_long WRITE;
UNLOCK TABLES;
diff --git a/mysql-test/suite/perfschema/t/dml_ews_by_instance.test b/mysql-test/suite/perfschema/t/dml_ews_by_instance.test
index 4c386313bc5..2f25f842dcc 100644
--- a/mysql-test/suite/perfschema/t/dml_ews_by_instance.test
+++ b/mysql-test/suite/perfschema/t/dml_ews_by_instance.test
@@ -18,62 +18,52 @@
--source include/not_embedded.inc
--source include/have_perfschema.inc
---replace_column 1 # 2 # 3 # 4 # 5 # 6 # 7 #
-select * from performance_schema.EVENTS_WAITS_SUMMARY_BY_INSTANCE
+--disable_result_log
+select * from performance_schema.events_waits_summary_by_instance
where event_name like 'Wait/Synch/%' limit 1;
-select * from performance_schema.EVENTS_WAITS_SUMMARY_BY_INSTANCE
+select * from performance_schema.events_waits_summary_by_instance
where event_name='FOO';
---replace_column 1 # 2 # 3 # 4 # 5 # 6 # 7 #
-select * from performance_schema.EVENTS_WAITS_SUMMARY_BY_INSTANCE
+select * from performance_schema.events_waits_summary_by_instance
order by count_star limit 1;
---replace_column 1 # 2 # 3 # 4 # 5 # 6 # 7 #
-select * from performance_schema.EVENTS_WAITS_SUMMARY_BY_INSTANCE
+select * from performance_schema.events_waits_summary_by_instance
order by count_star desc limit 1;
---replace_column 1 # 2 # 3 # 4 # 5 # 6 # 7 #
-select * from performance_schema.EVENTS_WAITS_SUMMARY_BY_INSTANCE
+select * from performance_schema.events_waits_summary_by_instance
where min_timer_wait > 0 order by count_star limit 1;
---replace_column 1 # 2 # 3 # 4 # 5 # 6 # 7 #
-select * from performance_schema.EVENTS_WAITS_SUMMARY_BY_INSTANCE
+select * from performance_schema.events_waits_summary_by_instance
where min_timer_wait > 0 order by count_star desc limit 1;
+--enable_result_log
---replace_result '\'events_waits_summary_by_instance' '\'EVENTS_WAITS_SUMMARY_BY_INSTANCE'
--error ER_TABLEACCESS_DENIED_ERROR
-insert into performance_schema.EVENTS_WAITS_SUMMARY_BY_INSTANCE
+insert into performance_schema.events_waits_summary_by_instance
set event_name='FOO', object_instance_begin=0,
count_star=1, sum_timer_wait=2, min_timer_wait=3,
avg_timer_wait=4, max_timer_wait=5;
---replace_result '\'events_waits_summary_by_instance' '\'EVENTS_WAITS_SUMMARY_BY_INSTANCE'
--error ER_TABLEACCESS_DENIED_ERROR
-update performance_schema.EVENTS_WAITS_SUMMARY_BY_INSTANCE
+update performance_schema.events_waits_summary_by_instance
set count_star=12;
---replace_result '\'events_waits_summary_by_instance' '\'EVENTS_WAITS_SUMMARY_BY_INSTANCE'
--error ER_TABLEACCESS_DENIED_ERROR
-update performance_schema.EVENTS_WAITS_SUMMARY_BY_INSTANCE
+update performance_schema.events_waits_summary_by_instance
set count_star=12 where event_name like "FOO";
---replace_result '\'events_waits_summary_by_instance' '\'EVENTS_WAITS_SUMMARY_BY_INSTANCE'
--error ER_TABLEACCESS_DENIED_ERROR
-delete from performance_schema.EVENTS_WAITS_SUMMARY_BY_INSTANCE
+delete from performance_schema.events_waits_summary_by_instance
where count_star=1;
---replace_result '\'events_waits_summary_by_instance' '\'EVENTS_WAITS_SUMMARY_BY_INSTANCE'
--error ER_TABLEACCESS_DENIED_ERROR
-delete from performance_schema.EVENTS_WAITS_SUMMARY_BY_INSTANCE;
+delete from performance_schema.events_waits_summary_by_instance;
---replace_result '\'events_waits_summary_by_instance' '\'EVENTS_WAITS_SUMMARY_BY_INSTANCE'
-- error ER_TABLEACCESS_DENIED_ERROR
-LOCK TABLES performance_schema.EVENTS_WAITS_SUMMARY_BY_INSTANCE READ;
+LOCK TABLES performance_schema.events_waits_summary_by_instance READ;
UNLOCK TABLES;
---replace_result '\'events_waits_summary_by_instance' '\'EVENTS_WAITS_SUMMARY_BY_INSTANCE'
-- error ER_TABLEACCESS_DENIED_ERROR
-LOCK TABLES performance_schema.EVENTS_WAITS_SUMMARY_BY_INSTANCE WRITE;
+LOCK TABLES performance_schema.events_waits_summary_by_instance WRITE;
UNLOCK TABLES;
diff --git a/mysql-test/suite/perfschema/t/dml_ews_by_thread_by_event_name.test b/mysql-test/suite/perfschema/t/dml_ews_by_thread_by_event_name.test
index ce29e59d014..a1b41fdab42 100644
--- a/mysql-test/suite/perfschema/t/dml_ews_by_thread_by_event_name.test
+++ b/mysql-test/suite/perfschema/t/dml_ews_by_thread_by_event_name.test
@@ -18,46 +18,40 @@
--source include/not_embedded.inc
--source include/have_perfschema.inc
---replace_column 1 # 2 # 3 # 4 # 5 # 6 # 7 #
-select * from performance_schema.EVENTS_WAITS_SUMMARY_BY_THREAD_BY_EVENT_NAME
+--disable_result_log
+select * from performance_schema.events_waits_summary_by_thread_by_event_name
where event_name like 'Wait/Synch/%' limit 1;
-select * from performance_schema.EVENTS_WAITS_SUMMARY_BY_THREAD_BY_EVENT_NAME
+select * from performance_schema.events_waits_summary_by_thread_by_event_name
where event_name='FOO';
+--enable_result_log
---replace_result '\'events_waits_summary_by_thread_by_event_name' '\'EVENTS_WAITS_SUMMARY_BY_THREAD_BY_EVENT_NAME'
--error ER_TABLEACCESS_DENIED_ERROR
-insert into performance_schema.EVENTS_WAITS_SUMMARY_BY_THREAD_BY_EVENT_NAME
+insert into performance_schema.events_waits_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;
---replace_result '\'events_waits_summary_by_thread_by_event_name' '\'EVENTS_WAITS_SUMMARY_BY_THREAD_BY_EVENT_NAME'
--error ER_TABLEACCESS_DENIED_ERROR
-update performance_schema.EVENTS_WAITS_SUMMARY_BY_THREAD_BY_EVENT_NAME
+update performance_schema.events_waits_summary_by_thread_by_event_name
set count_star=12;
---replace_result '\'events_waits_summary_by_thread_by_event_name' '\'EVENTS_WAITS_SUMMARY_BY_THREAD_BY_EVENT_NAME'
--error ER_TABLEACCESS_DENIED_ERROR
-update performance_schema.EVENTS_WAITS_SUMMARY_BY_THREAD_BY_EVENT_NAME
+update performance_schema.events_waits_summary_by_thread_by_event_name
set count_star=12 where event_name like "FOO";
---replace_result '\'events_waits_summary_by_thread_by_event_name' '\'EVENTS_WAITS_SUMMARY_BY_THREAD_BY_EVENT_NAME'
--error ER_TABLEACCESS_DENIED_ERROR
-delete from performance_schema.EVENTS_WAITS_SUMMARY_BY_THREAD_BY_EVENT_NAME
+delete from performance_schema.events_waits_summary_by_thread_by_event_name
where count_star=1;
---replace_result '\'events_waits_summary_by_thread_by_event_name' '\'EVENTS_WAITS_SUMMARY_BY_THREAD_BY_EVENT_NAME'
--error ER_TABLEACCESS_DENIED_ERROR
-delete from performance_schema.EVENTS_WAITS_SUMMARY_BY_THREAD_BY_EVENT_NAME;
+delete from performance_schema.events_waits_summary_by_thread_by_event_name;
---replace_result '\'events_waits_summary_by_thread_by_event_name' '\'EVENTS_WAITS_SUMMARY_BY_THREAD_BY_EVENT_NAME'
-- error ER_TABLEACCESS_DENIED_ERROR
-LOCK TABLES performance_schema.EVENTS_WAITS_SUMMARY_BY_THREAD_BY_EVENT_NAME READ;
+LOCK TABLES performance_schema.events_waits_summary_by_thread_by_event_name READ;
UNLOCK TABLES;
---replace_result '\'events_waits_summary_by_thread_by_event_name' '\'EVENTS_WAITS_SUMMARY_BY_THREAD_BY_EVENT_NAME'
-- error ER_TABLEACCESS_DENIED_ERROR
-LOCK TABLES performance_schema.EVENTS_WAITS_SUMMARY_BY_THREAD_BY_EVENT_NAME WRITE;
+LOCK TABLES performance_schema.events_waits_summary_by_thread_by_event_name WRITE;
UNLOCK TABLES;
diff --git a/mysql-test/suite/perfschema/t/dml_ews_global_by_event_name.test b/mysql-test/suite/perfschema/t/dml_ews_global_by_event_name.test
index cd3918f38be..bf311c7b470 100644
--- a/mysql-test/suite/perfschema/t/dml_ews_global_by_event_name.test
+++ b/mysql-test/suite/perfschema/t/dml_ews_global_by_event_name.test
@@ -18,45 +18,39 @@
--source include/not_embedded.inc
--source include/have_perfschema.inc
---replace_column 1 # 2 # 3 # 4 # 5 # 6 #
-select * from performance_schema.EVENTS_WAITS_SUMMARY_GLOBAL_BY_EVENT_NAME
+--disable_result_log
+select * from performance_schema.events_waits_summary_global_by_event_name
where event_name like 'Wait/Synch/%' limit 1;
-select * from performance_schema.EVENTS_WAITS_SUMMARY_GLOBAL_BY_EVENT_NAME
+select * from performance_schema.events_waits_summary_global_by_event_name
where event_name='FOO';
+--enable_result_log
---replace_result '\'events_waits_summary_global_by_event_name' '\'EVENTS_WAITS_SUMMARY_GLOBAL_BY_EVENT_NAME'
--error ER_TABLEACCESS_DENIED_ERROR
-insert into performance_schema.EVENTS_WAITS_SUMMARY_GLOBAL_BY_EVENT_NAME
+insert into performance_schema.events_waits_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;
---replace_result '\'events_waits_summary_global_by_event_name' '\'EVENTS_WAITS_SUMMARY_GLOBAL_BY_EVENT_NAME'
--error ER_TABLEACCESS_DENIED_ERROR
-update performance_schema.EVENTS_WAITS_SUMMARY_GLOBAL_BY_EVENT_NAME
+update performance_schema.events_waits_summary_global_by_event_name
set count_star=12;
---replace_result '\'events_waits_summary_global_by_event_name' '\'EVENTS_WAITS_SUMMARY_GLOBAL_BY_EVENT_NAME'
--error ER_TABLEACCESS_DENIED_ERROR
-update performance_schema.EVENTS_WAITS_SUMMARY_GLOBAL_BY_EVENT_NAME
+update performance_schema.events_waits_summary_global_by_event_name
set count_star=12 where event_name like "FOO";
---replace_result '\'events_waits_summary_global_by_event_name' '\'EVENTS_WAITS_SUMMARY_GLOBAL_BY_EVENT_NAME'
--error ER_TABLEACCESS_DENIED_ERROR
-delete from performance_schema.EVENTS_WAITS_SUMMARY_GLOBAL_BY_EVENT_NAME
+delete from performance_schema.events_waits_summary_global_by_event_name
where count_star=1;
---replace_result '\'events_waits_summary_global_by_event_name' '\'EVENTS_WAITS_SUMMARY_GLOBAL_BY_EVENT_NAME'
--error ER_TABLEACCESS_DENIED_ERROR
-delete from performance_schema.EVENTS_WAITS_SUMMARY_GLOBAL_BY_EVENT_NAME;
+delete from performance_schema.events_waits_summary_global_by_event_name;
---replace_result '\'events_waits_summary_global_by_event_name' '\'EVENTS_WAITS_SUMMARY_GLOBAL_BY_EVENT_NAME'
-- error ER_TABLEACCESS_DENIED_ERROR
-LOCK TABLES performance_schema.EVENTS_WAITS_SUMMARY_GLOBAL_BY_EVENT_NAME READ;
+LOCK TABLES performance_schema.events_waits_summary_global_by_event_name READ;
UNLOCK TABLES;
---replace_result '\'events_waits_summary_global_by_event_name' '\'EVENTS_WAITS_SUMMARY_GLOBAL_BY_EVENT_NAME'
-- error ER_TABLEACCESS_DENIED_ERROR
-LOCK TABLES performance_schema.EVENTS_WAITS_SUMMARY_GLOBAL_BY_EVENT_NAME WRITE;
+LOCK TABLES performance_schema.events_waits_summary_global_by_event_name WRITE;
UNLOCK TABLES;
diff --git a/mysql-test/suite/perfschema/t/dml_file_instances.test b/mysql-test/suite/perfschema/t/dml_file_instances.test
index 71a053c21be..d7a1002b040 100644
--- a/mysql-test/suite/perfschema/t/dml_file_instances.test
+++ b/mysql-test/suite/perfschema/t/dml_file_instances.test
@@ -18,38 +18,33 @@
--source include/not_embedded.inc
--source include/have_perfschema.inc
---replace_column 1 # 2 # 3 #
-select * from performance_schema.FILE_INSTANCES limit 1;
+--disable_result_log
+select * from performance_schema.file_instances limit 1;
-select * from performance_schema.FILE_INSTANCES
+select * from performance_schema.file_instances
where file_name='FOO';
+--enable_result_log
---replace_result '\'file_instances' '\'FILE_INSTANCES'
--error ER_TABLEACCESS_DENIED_ERROR
-insert into performance_schema.FILE_INSTANCES
+insert into performance_schema.file_instances
set file_name='FOO', event_name='BAR', open_count=12;
---replace_result '\'file_instances' '\'FILE_INSTANCES'
--error ER_TABLEACCESS_DENIED_ERROR
-update performance_schema.FILE_INSTANCES
+update performance_schema.file_instances
set file_name='FOO';
---replace_result '\'file_instances' '\'FILE_INSTANCES'
--error ER_TABLEACCESS_DENIED_ERROR
-delete from performance_schema.FILE_INSTANCES
+delete from performance_schema.file_instances
where event_name like "wait/%";
---replace_result '\'file_instances' '\'FILE_INSTANCES'
--error ER_TABLEACCESS_DENIED_ERROR
-delete from performance_schema.FILE_INSTANCES;
+delete from performance_schema.file_instances;
---replace_result '\'file_instances' '\'FILE_INSTANCES'
-- error ER_TABLEACCESS_DENIED_ERROR
-LOCK TABLES performance_schema.FILE_INSTANCES READ;
+LOCK TABLES performance_schema.file_instances READ;
UNLOCK TABLES;
---replace_result '\'file_instances' '\'FILE_INSTANCES'
-- error ER_TABLEACCESS_DENIED_ERROR
-LOCK TABLES performance_schema.FILE_INSTANCES WRITE;
+LOCK TABLES performance_schema.file_instances WRITE;
UNLOCK TABLES;
diff --git a/mysql-test/suite/perfschema/t/dml_file_summary_by_event_name.test b/mysql-test/suite/perfschema/t/dml_file_summary_by_event_name.test
index 3753f581560..8060c4a4cbe 100644
--- a/mysql-test/suite/perfschema/t/dml_file_summary_by_event_name.test
+++ b/mysql-test/suite/perfschema/t/dml_file_summary_by_event_name.test
@@ -18,45 +18,39 @@
--source include/not_embedded.inc
--source include/have_perfschema.inc
---replace_column 1 # 2 # 3 # 4 # 5 #
-select * from performance_schema.FILE_SUMMARY_BY_EVENT_NAME
+--disable_result_log
+select * from performance_schema.file_summary_by_event_name
where event_name like 'Wait/io/%' limit 1;
-select * from performance_schema.FILE_SUMMARY_BY_EVENT_NAME
+select * from performance_schema.file_summary_by_event_name
where event_name='FOO';
+--enable_result_log
---replace_result '\'file_summary_by_event_name' '\'FILE_SUMMARY_BY_EVENT_NAME'
--error ER_TABLEACCESS_DENIED_ERROR
-insert into performance_schema.FILE_SUMMARY_BY_EVENT_NAME
+insert into performance_schema.file_summary_by_event_name
set event_name='FOO', count_read=1, count_write=2,
sum_number_of_bytes_read=4, sum_number_of_bytes_write=5;
---replace_result '\'file_summary_by_event_name' '\'FILE_SUMMARY_BY_EVENT_NAME'
--error ER_TABLEACCESS_DENIED_ERROR
-update performance_schema.FILE_SUMMARY_BY_EVENT_NAME
+update performance_schema.file_summary_by_event_name
set count_read=12;
---replace_result '\'file_summary_by_event_name' '\'FILE_SUMMARY_BY_EVENT_NAME'
--error ER_TABLEACCESS_DENIED_ERROR
-update performance_schema.FILE_SUMMARY_BY_EVENT_NAME
+update performance_schema.file_summary_by_event_name
set count_write=12 where event_name like "FOO";
---replace_result '\'file_summary_by_event_name' '\'FILE_SUMMARY_BY_EVENT_NAME'
--error ER_TABLEACCESS_DENIED_ERROR
-delete from performance_schema.FILE_SUMMARY_BY_EVENT_NAME
+delete from performance_schema.file_summary_by_event_name
where count_read=1;
---replace_result '\'file_summary_by_event_name' '\'FILE_SUMMARY_BY_EVENT_NAME'
--error ER_TABLEACCESS_DENIED_ERROR
-delete from performance_schema.FILE_SUMMARY_BY_EVENT_NAME;
+delete from performance_schema.file_summary_by_event_name;
---replace_result '\'file_summary_by_event_name' '\'FILE_SUMMARY_BY_EVENT_NAME'
-- error ER_TABLEACCESS_DENIED_ERROR
-LOCK TABLES performance_schema.FILE_SUMMARY_BY_EVENT_NAME READ;
+LOCK TABLES performance_schema.file_summary_by_event_name READ;
UNLOCK TABLES;
---replace_result '\'file_summary_by_event_name' '\'FILE_SUMMARY_BY_EVENT_NAME'
-- error ER_TABLEACCESS_DENIED_ERROR
-LOCK TABLES performance_schema.FILE_SUMMARY_BY_EVENT_NAME WRITE;
+LOCK TABLES performance_schema.file_summary_by_event_name WRITE;
UNLOCK TABLES;
diff --git a/mysql-test/suite/perfschema/t/dml_file_summary_by_instance.test b/mysql-test/suite/perfschema/t/dml_file_summary_by_instance.test
index 07372af5f36..c24f57390a4 100644
--- a/mysql-test/suite/perfschema/t/dml_file_summary_by_instance.test
+++ b/mysql-test/suite/perfschema/t/dml_file_summary_by_instance.test
@@ -18,45 +18,39 @@
--source include/not_embedded.inc
--source include/have_perfschema.inc
---replace_column 1 # 2 # 3 # 4 # 5 # 6 #
-select * from performance_schema.FILE_SUMMARY_BY_INSTANCE
+--disable_result_log
+select * from performance_schema.file_summary_by_instance
where event_name like 'Wait/io/%' limit 1;
-select * from performance_schema.FILE_SUMMARY_BY_INSTANCE
+select * from performance_schema.file_summary_by_instance
where event_name='FOO';
+--enable_result_log
---replace_result '\'file_summary_by_instance' '\'FILE_SUMMARY_BY_INSTANCE'
--error ER_TABLEACCESS_DENIED_ERROR
-insert into performance_schema.FILE_SUMMARY_BY_INSTANCE
+insert into performance_schema.file_summary_by_instance
set event_name='FOO', count_read=1, count_write=2,
sum_number_of_bytes_read=4, sum_number_of_bytes_write=5;
---replace_result '\'file_summary_by_instance' '\'FILE_SUMMARY_BY_INSTANCE'
--error ER_TABLEACCESS_DENIED_ERROR
-update performance_schema.FILE_SUMMARY_BY_INSTANCE
+update performance_schema.file_summary_by_instance
set count_read=12;
---replace_result '\'file_summary_by_instance' '\'FILE_SUMMARY_BY_INSTANCE'
--error ER_TABLEACCESS_DENIED_ERROR
-update performance_schema.FILE_SUMMARY_BY_INSTANCE
+update performance_schema.file_summary_by_instance
set count_write=12 where event_name like "FOO";
---replace_result '\'file_summary_by_instance' '\'FILE_SUMMARY_BY_INSTANCE'
--error ER_TABLEACCESS_DENIED_ERROR
-delete from performance_schema.FILE_SUMMARY_BY_INSTANCE
+delete from performance_schema.file_summary_by_instance
where count_read=1;
---replace_result '\'file_summary_by_instance' '\'FILE_SUMMARY_BY_INSTANCE'
--error ER_TABLEACCESS_DENIED_ERROR
-delete from performance_schema.FILE_SUMMARY_BY_INSTANCE;
+delete from performance_schema.file_summary_by_instance;
---replace_result '\'file_summary_by_instance' '\'FILE_SUMMARY_BY_INSTANCE'
-- error ER_TABLEACCESS_DENIED_ERROR
-LOCK TABLES performance_schema.FILE_SUMMARY_BY_INSTANCE READ;
+LOCK TABLES performance_schema.file_summary_by_instance READ;
UNLOCK TABLES;
---replace_result '\'file_summary_by_instance' '\'FILE_SUMMARY_BY_INSTANCE'
-- error ER_TABLEACCESS_DENIED_ERROR
-LOCK TABLES performance_schema.FILE_SUMMARY_BY_INSTANCE WRITE;
+LOCK TABLES performance_schema.file_summary_by_instance WRITE;
UNLOCK TABLES;
diff --git a/mysql-test/suite/perfschema/t/dml_mutex_instances.test b/mysql-test/suite/perfschema/t/dml_mutex_instances.test
index 0971c664eb8..1a48bd9d8ea 100644
--- a/mysql-test/suite/perfschema/t/dml_mutex_instances.test
+++ b/mysql-test/suite/perfschema/t/dml_mutex_instances.test
@@ -18,38 +18,33 @@
--source include/not_embedded.inc
--source include/have_perfschema.inc
---replace_column 1 # 2 # 3 #
-select * from performance_schema.MUTEX_INSTANCES limit 1;
+--disable_result_log
+select * from performance_schema.mutex_instances limit 1;
-select * from performance_schema.MUTEX_INSTANCES
+select * from performance_schema.mutex_instances
where name='FOO';
+--enable_result_log
---replace_result '\'mutex_instances' '\'MUTEX_INSTANCES'
--error ER_TABLEACCESS_DENIED_ERROR
-insert into performance_schema.MUTEX_INSTANCES
+insert into performance_schema.mutex_instances
set name='FOO', object_instance_begin=12;
---replace_result '\'mutex_instances' '\'MUTEX_INSTANCES'
--error ER_TABLEACCESS_DENIED_ERROR
-update performance_schema.MUTEX_INSTANCES
+update performance_schema.mutex_instances
set name='FOO';
---replace_result '\'mutex_instances' '\'MUTEX_INSTANCES'
--error ER_TABLEACCESS_DENIED_ERROR
-delete from performance_schema.MUTEX_INSTANCES
+delete from performance_schema.mutex_instances
where name like "wait/%";
---replace_result '\'mutex_instances' '\'MUTEX_INSTANCES'
--error ER_TABLEACCESS_DENIED_ERROR
-delete from performance_schema.MUTEX_INSTANCES;
+delete from performance_schema.mutex_instances;
---replace_result '\'mutex_instances' '\'MUTEX_INSTANCES'
-- error ER_TABLEACCESS_DENIED_ERROR
-LOCK TABLES performance_schema.MUTEX_INSTANCES READ;
+LOCK TABLES performance_schema.mutex_instances READ;
UNLOCK TABLES;
---replace_result '\'mutex_instances' '\'MUTEX_INSTANCES'
-- error ER_TABLEACCESS_DENIED_ERROR
-LOCK TABLES performance_schema.MUTEX_INSTANCES WRITE;
+LOCK TABLES performance_schema.mutex_instances WRITE;
UNLOCK TABLES;
diff --git a/mysql-test/suite/perfschema/t/dml_performance_timers.test b/mysql-test/suite/perfschema/t/dml_performance_timers.test
index 9c2efb6f709..211e6db4fb1 100644
--- a/mysql-test/suite/perfschema/t/dml_performance_timers.test
+++ b/mysql-test/suite/perfschema/t/dml_performance_timers.test
@@ -19,39 +19,33 @@
--source include/have_perfschema.inc
--replace_column 2 <frequency> 3 <resolution> 4 <overhead>
-select * from performance_schema.PERFORMANCE_TIMERS;
+select * from performance_schema.performance_timers;
--replace_column 2 <frequency> 3 <resolution> 4 <overhead>
-select * from performance_schema.PERFORMANCE_TIMERS
+select * from performance_schema.performance_timers
where timer_name='CYCLE';
---replace_result '\'performance_timers' '\'PERFORMANCE_TIMERS'
--error ER_TABLEACCESS_DENIED_ERROR
-insert into performance_schema.PERFORMANCE_TIMERS
+insert into performance_schema.performance_timers
set timer_name='FOO', timer_frequency=1,
timer_resolution=2, timer_overhead=3;
---replace_result '\'performance_timers' '\'PERFORMANCE_TIMERS'
--error ER_TABLEACCESS_DENIED_ERROR
-update performance_schema.PERFORMANCE_TIMERS
+update performance_schema.performance_timers
set timer_frequency=12 where timer_name='CYCLE';
---replace_result '\'performance_timers' '\'PERFORMANCE_TIMERS'
--error ER_TABLEACCESS_DENIED_ERROR
-delete from performance_schema.PERFORMANCE_TIMERS;
+delete from performance_schema.performance_timers;
---replace_result '\'performance_timers' '\'PERFORMANCE_TIMERS'
--error ER_TABLEACCESS_DENIED_ERROR
-delete from performance_schema.PERFORMANCE_TIMERS
+delete from performance_schema.performance_timers
where timer_name='CYCLE';
---replace_result '\'performance_timers' '\'PERFORMANCE_TIMERS'
-- error ER_TABLEACCESS_DENIED_ERROR
-LOCK TABLES performance_schema.PERFORMANCE_TIMERS READ;
+LOCK TABLES performance_schema.performance_timers READ;
UNLOCK TABLES;
---replace_result '\'performance_timers' '\'PERFORMANCE_TIMERS'
-- error ER_TABLEACCESS_DENIED_ERROR
-LOCK TABLES performance_schema.PERFORMANCE_TIMERS WRITE;
+LOCK TABLES performance_schema.performance_timers WRITE;
UNLOCK TABLES;
diff --git a/mysql-test/suite/perfschema/t/dml_rwlock_instances.test b/mysql-test/suite/perfschema/t/dml_rwlock_instances.test
index 33a42450681..b588502c996 100644
--- a/mysql-test/suite/perfschema/t/dml_rwlock_instances.test
+++ b/mysql-test/suite/perfschema/t/dml_rwlock_instances.test
@@ -18,38 +18,33 @@
--source include/not_embedded.inc
--source include/have_perfschema.inc
---replace_column 1 # 2 # 3 # 4 #
-select * from performance_schema.RWLOCK_INSTANCES limit 1;
+--disable_result_log
+select * from performance_schema.rwlock_instances limit 1;
-select * from performance_schema.RWLOCK_INSTANCES
+select * from performance_schema.rwlock_instances
where name='FOO';
+--enable_result_log
---replace_result '\'rwlock_instances' '\'RWLOCK_INSTANCES'
--error ER_TABLEACCESS_DENIED_ERROR
-insert into performance_schema.RWLOCK_INSTANCES
+insert into performance_schema.rwlock_instances
set name='FOO', object_instance_begin=12;
---replace_result '\'rwlock_instances' '\'RWLOCK_INSTANCES'
--error ER_TABLEACCESS_DENIED_ERROR
-update performance_schema.RWLOCK_INSTANCES
+update performance_schema.rwlock_instances
set name='FOO';
---replace_result '\'rwlock_instances' '\'RWLOCK_INSTANCES'
--error ER_TABLEACCESS_DENIED_ERROR
-delete from performance_schema.RWLOCK_INSTANCES
+delete from performance_schema.rwlock_instances
where name like "wait/%";
---replace_result '\'rwlock_instances' '\'RWLOCK_INSTANCES'
--error ER_TABLEACCESS_DENIED_ERROR
-delete from performance_schema.RWLOCK_INSTANCES;
+delete from performance_schema.rwlock_instances;
---replace_result '\'rwlock_instances' '\'RWLOCK_INSTANCES'
-- error ER_TABLEACCESS_DENIED_ERROR
-LOCK TABLES performance_schema.RWLOCK_INSTANCES READ;
+LOCK TABLES performance_schema.rwlock_instances READ;
UNLOCK TABLES;
---replace_result '\'rwlock_instances' '\'RWLOCK_INSTANCES'
-- error ER_TABLEACCESS_DENIED_ERROR
-LOCK TABLES performance_schema.RWLOCK_INSTANCES WRITE;
+LOCK TABLES performance_schema.rwlock_instances WRITE;
UNLOCK TABLES;
diff --git a/mysql-test/suite/perfschema/t/dml_setup_consumers.test b/mysql-test/suite/perfschema/t/dml_setup_consumers.test
index 85b65864f91..2a29f428f3d 100644
--- a/mysql-test/suite/perfschema/t/dml_setup_consumers.test
+++ b/mysql-test/suite/perfschema/t/dml_setup_consumers.test
@@ -18,42 +18,38 @@
--source include/not_embedded.inc
--source include/have_perfschema.inc
-select * from performance_schema.SETUP_CONSUMERS;
+select * from performance_schema.setup_consumers;
-select * from performance_schema.SETUP_CONSUMERS
+select * from performance_schema.setup_consumers
where name='events_waits_current';
-select * from performance_schema.SETUP_CONSUMERS
+select * from performance_schema.setup_consumers
where enabled='YES';
-select * from performance_schema.SETUP_CONSUMERS
+select * from performance_schema.setup_consumers
where enabled='NO';
---replace_result '\'setup_consumers' '\'SETUP_CONSUMERS'
--error ER_TABLEACCESS_DENIED_ERROR
-insert into performance_schema.SETUP_CONSUMERS
+insert into performance_schema.setup_consumers
set name='FOO', enabled='YES';
---replace_result '\'setup_consumers' '\'SETUP_CONSUMERS'
--error ER_WRONG_PERFSCHEMA_USAGE
-update performance_schema.SETUP_CONSUMERS
+update performance_schema.setup_consumers
set name='FOO';
-update performance_schema.SETUP_CONSUMERS
+update performance_schema.setup_consumers
set enabled='YES';
---replace_result '\'setup_consumers' '\'SETUP_CONSUMERS'
--error ER_TABLEACCESS_DENIED_ERROR
-delete from performance_schema.SETUP_CONSUMERS;
+delete from performance_schema.setup_consumers;
---replace_result '\'setup_consumers' '\'SETUP_CONSUMERS'
--error ER_TABLEACCESS_DENIED_ERROR
-delete from performance_schema.SETUP_CONSUMERS
+delete from performance_schema.setup_consumers
where name='events_waits_current';
-LOCK TABLES performance_schema.SETUP_CONSUMERS READ;
+LOCK TABLES performance_schema.setup_consumers READ;
UNLOCK TABLES;
-LOCK TABLES performance_schema.SETUP_CONSUMERS WRITE;
+LOCK TABLES performance_schema.setup_consumers WRITE;
UNLOCK TABLES;
diff --git a/mysql-test/suite/perfschema/t/dml_setup_instruments.test b/mysql-test/suite/perfschema/t/dml_setup_instruments.test
index b82cde15fb5..b6e28440758 100644
--- a/mysql-test/suite/perfschema/t/dml_setup_instruments.test
+++ b/mysql-test/suite/perfschema/t/dml_setup_instruments.test
@@ -26,19 +26,19 @@
# - valgrind coverage
--disable_result_log
-select * from performance_schema.SETUP_INSTRUMENTS;
+select * from performance_schema.setup_instruments;
--enable_result_log
# DEBUG_SYNC::mutex is dependent on the build (DEBUG only)
-select * from performance_schema.SETUP_INSTRUMENTS
+select * from performance_schema.setup_instruments
where name like 'Wait/Synch/Mutex/sql/%'
and name not in ('wait/synch/mutex/sql/DEBUG_SYNC::mutex')
order by name limit 10;
# CRYPTO_dynlock_value::lock is dependent on the build (SSL)
-select * from performance_schema.SETUP_INSTRUMENTS
+select * from performance_schema.setup_instruments
where name like 'Wait/Synch/Rwlock/sql/%'
and name not in ('wait/synch/rwlock/sql/CRYPTO_dynlock_value::lock')
order by name limit 10;
@@ -46,7 +46,7 @@ select * from performance_schema.SETUP_INSTRUMENTS
# COND_handler_count is dependent on the build (Windows only)
# DEBUG_SYNC::cond is dependent on the build (DEBUG only)
-select * from performance_schema.SETUP_INSTRUMENTS
+select * from performance_schema.setup_instruments
where name like 'Wait/Synch/Cond/sql/%'
and name not in (
'wait/synch/cond/sql/COND_handler_count',
@@ -54,50 +54,46 @@ select * from performance_schema.SETUP_INSTRUMENTS
order by name limit 10;
--disable_result_log
-select * from performance_schema.SETUP_INSTRUMENTS
+select * from performance_schema.setup_instruments
where name='Wait';
--enable_result_log
--disable_result_log
-select * from performance_schema.SETUP_INSTRUMENTS
+select * from performance_schema.setup_instruments
where enabled='YES';
--enable_result_log
---replace_result '\'setup_instruments' '\'SETUP_INSTRUMENTS'
--error ER_TABLEACCESS_DENIED_ERROR
-insert into performance_schema.SETUP_INSTRUMENTS
+insert into performance_schema.setup_instruments
set name='FOO', enabled='YES', timed='YES';
---replace_result '\'setup_instruments' '\'SETUP_INSTRUMENTS'
--error ER_WRONG_PERFSCHEMA_USAGE
-update performance_schema.SETUP_INSTRUMENTS
+update performance_schema.setup_instruments
set name='FOO';
-update performance_schema.SETUP_INSTRUMENTS
+update performance_schema.setup_instruments
set enabled='NO';
-update performance_schema.SETUP_INSTRUMENTS
+update performance_schema.setup_instruments
set timed='NO';
--disable_result_log
-select * from performance_schema.SETUP_INSTRUMENTS;
+select * from performance_schema.setup_instruments;
--enable_result_log
-update performance_schema.SETUP_INSTRUMENTS
+update performance_schema.setup_instruments
set enabled='YES', timed='YES';
---replace_result '\'setup_instruments' '\'SETUP_INSTRUMENTS'
--error ER_TABLEACCESS_DENIED_ERROR
-delete from performance_schema.SETUP_INSTRUMENTS;
+delete from performance_schema.setup_instruments;
---replace_result '\'setup_instruments' '\'SETUP_INSTRUMENTS'
--error ER_TABLEACCESS_DENIED_ERROR
-delete from performance_schema.SETUP_INSTRUMENTS
+delete from performance_schema.setup_instruments
where name like 'Wait/Synch/%';
-LOCK TABLES performance_schema.SETUP_INSTRUMENTS READ;
+LOCK TABLES performance_schema.setup_instruments READ;
UNLOCK TABLES;
-LOCK TABLES performance_schema.SETUP_INSTRUMENTS WRITE;
+LOCK TABLES performance_schema.setup_instruments WRITE;
UNLOCK TABLES;
diff --git a/mysql-test/suite/perfschema/t/dml_setup_timers.test b/mysql-test/suite/perfschema/t/dml_setup_timers.test
index 5b5850db575..1bfc0ab83a2 100644
--- a/mysql-test/suite/perfschema/t/dml_setup_timers.test
+++ b/mysql-test/suite/perfschema/t/dml_setup_timers.test
@@ -18,44 +18,40 @@
--source include/not_embedded.inc
--source include/have_perfschema.inc
-select * from performance_schema.SETUP_TIMERS;
+select * from performance_schema.setup_timers;
-select * from performance_schema.SETUP_TIMERS
+select * from performance_schema.setup_timers
where name='Wait';
-select * from performance_schema.SETUP_TIMERS
+select * from performance_schema.setup_timers
where timer_name='CYCLE';
---replace_result '\'setup_timers' '\'SETUP_TIMERS'
--error ER_TABLEACCESS_DENIED_ERROR
-insert into performance_schema.SETUP_TIMERS
+insert into performance_schema.setup_timers
set name='FOO', timer_name='CYCLE';
---replace_result '\'setup_timers' '\'SETUP_TIMERS'
--error ER_WRONG_PERFSCHEMA_USAGE
-update performance_schema.SETUP_TIMERS
+update performance_schema.setup_timers
set name='FOO';
-update performance_schema.SETUP_TIMERS
+update performance_schema.setup_timers
set timer_name='MILLISECOND';
-select * from performance_schema.SETUP_TIMERS;
+select * from performance_schema.setup_timers;
-update performance_schema.SETUP_TIMERS
+update performance_schema.setup_timers
set timer_name='CYCLE';
---replace_result '\'setup_timers' '\'SETUP_TIMERS'
--error ER_TABLEACCESS_DENIED_ERROR
-delete from performance_schema.SETUP_TIMERS;
+delete from performance_schema.setup_timers;
---replace_result '\'setup_timers' '\'SETUP_TIMERS'
--error ER_TABLEACCESS_DENIED_ERROR
-delete from performance_schema.SETUP_TIMERS
+delete from performance_schema.setup_timers
where name='Wait';
-LOCK TABLES performance_schema.SETUP_TIMERS READ;
+LOCK TABLES performance_schema.setup_timers READ;
UNLOCK TABLES;
-LOCK TABLES performance_schema.SETUP_TIMERS WRITE;
+LOCK TABLES performance_schema.setup_timers WRITE;
UNLOCK TABLES;
diff --git a/mysql-test/suite/perfschema/t/dml_threads.test b/mysql-test/suite/perfschema/t/dml_threads.test
index 6ea456fee69..6cb372e2c96 100644
--- a/mysql-test/suite/perfschema/t/dml_threads.test
+++ b/mysql-test/suite/perfschema/t/dml_threads.test
@@ -1,4 +1,4 @@
-# Copyright (C) 2009 Sun Microsystems, Inc
+# 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
@@ -10,52 +10,46 @@
# 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
+# 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
---replace_column 1 # 2 # 3 #
-select * from performance_schema.THREADS
+--disable_result_log
+select * from performance_schema.threads
where name like 'Thread/%' limit 1;
-select * from performance_schema.THREADS
+select * from performance_schema.threads
where name='FOO';
+--enable_result_log
---replace_result '\'threads' '\'THREADS'
--error ER_TABLEACCESS_DENIED_ERROR
-insert into performance_schema.THREADS
- set name='FOO', thread_id=1, id=2;
+insert into performance_schema.threads
+ set name='FOO', thread_id=1, processlist_id=2;
---replace_result '\'threads' '\'THREADS'
--error ER_TABLEACCESS_DENIED_ERROR
-update performance_schema.THREADS
+update performance_schema.threads
set thread_id=12;
---replace_result '\'threads' '\'THREADS'
--error ER_TABLEACCESS_DENIED_ERROR
-update performance_schema.THREADS
+update performance_schema.threads
set thread_id=12 where name like "FOO";
---replace_result '\'threads' '\'THREADS'
--error ER_TABLEACCESS_DENIED_ERROR
-delete from performance_schema.THREADS
+delete from performance_schema.threads
where id=1;
---replace_result '\'threads' '\'THREADS'
--error ER_TABLEACCESS_DENIED_ERROR
-delete from performance_schema.THREADS;
+delete from performance_schema.threads;
---replace_result '\'threads' '\'THREADS'
-- error ER_TABLEACCESS_DENIED_ERROR
-LOCK TABLES performance_schema.THREADS READ;
+LOCK TABLES performance_schema.threads READ;
UNLOCK TABLES;
---replace_result '\'threads' '\'THREADS'
-- error ER_TABLEACCESS_DENIED_ERROR
-LOCK TABLES performance_schema.THREADS WRITE;
+LOCK TABLES performance_schema.threads WRITE;
UNLOCK TABLES;
diff --git a/mysql-test/suite/perfschema/t/func_file_io.test b/mysql-test/suite/perfschema/t/func_file_io.test
index 6b6335ac424..64f71a99ee6 100644
--- a/mysql-test/suite/perfschema/t/func_file_io.test
+++ b/mysql-test/suite/perfschema/t/func_file_io.test
@@ -1,4 +1,4 @@
-# Copyright (C) 2008-2009 Sun Microsystems, Inc
+# 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
@@ -10,8 +10,8 @@
# 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
+# along with this program; if not, write to the Free Software Foundation,
+# 51 Franklin Street, Suite 500, Boston, MA 02110-1335 USA
##
## WL#4814, 4.1.4 FILE IO
@@ -22,9 +22,9 @@
--source include/not_embedded.inc
--source include/have_perfschema.inc
-UPDATE performance_schema.SETUP_INSTRUMENTS SET enabled = 'NO', timed = 'YES';
+UPDATE performance_schema.setup_instruments SET enabled = 'NO', timed = 'YES';
-UPDATE performance_schema.SETUP_INSTRUMENTS SET enabled = 'YES'
+UPDATE performance_schema.setup_instruments SET enabled = 'YES'
WHERE name LIKE 'wait/io/file/%';
--disable_warnings
@@ -40,9 +40,9 @@ ENGINE=MyISAM;
INSERT INTO t1 (id) VALUES (1), (2), (3), (4), (5), (6), (7), (8);
-TRUNCATE TABLE performance_schema.EVENTS_WAITS_HISTORY_LONG;
-TRUNCATE TABLE performance_schema.EVENTS_WAITS_HISTORY;
-TRUNCATE TABLE performance_schema.EVENTS_WAITS_CURRENT;
+TRUNCATE TABLE performance_schema.events_waits_history_long;
+TRUNCATE TABLE performance_schema.events_waits_history;
+TRUNCATE TABLE performance_schema.events_waits_current;
#
# FF1: Count for file should increase with instrumentation enabled and
@@ -52,7 +52,7 @@ TRUNCATE TABLE performance_schema.EVENTS_WAITS_CURRENT;
SELECT * FROM t1 WHERE id = 1;
SET @before_count = (SELECT SUM(TIMER_WAIT)
- FROM performance_schema.EVENTS_WAITS_HISTORY_LONG
+ FROM performance_schema.events_waits_history_long
WHERE (EVENT_NAME = 'wait/io/file/myisam/dfile')
AND (OBJECT_NAME LIKE '%t1.MYD'));
@@ -61,23 +61,23 @@ SELECT IF(@before_count > 0, 'Success', 'Failure') has_instrumentation;
SELECT * FROM t1 WHERE id < 4;
SET @after_count = (SELECT SUM(TIMER_WAIT)
- FROM performance_schema.EVENTS_WAITS_HISTORY_LONG
+ FROM performance_schema.events_waits_history_long
WHERE (EVENT_NAME = 'wait/io/file/myisam/dfile')
AND (OBJECT_NAME LIKE '%t1.MYD') AND (1 = 1));
SELECT IF((@after_count - @before_count) > 0, 'Success', 'Failure') test_ff1_timed;
-UPDATE performance_schema.SETUP_INSTRUMENTS SET enabled='NO';
+UPDATE performance_schema.setup_instruments SET enabled='NO';
SET @before_count = (SELECT SUM(TIMER_WAIT)
- FROM performance_schema.EVENTS_WAITS_HISTORY_LONG
+ FROM performance_schema.events_waits_history_long
WHERE (EVENT_NAME = 'wait/io/file/myisam/dfile')
AND (OBJECT_NAME LIKE '%t1.MYD') AND (2 = 2));
SELECT * FROM t1 WHERE id < 6;
SET @after_count = (SELECT SUM(TIMER_WAIT)
- FROM performance_schema.EVENTS_WAITS_HISTORY_LONG
+ FROM performance_schema.events_waits_history_long
WHERE (EVENT_NAME = 'wait/io/file/myisam/dfile')
AND (OBJECT_NAME LIKE '%t1.MYD') AND (3 = 3));
@@ -87,33 +87,33 @@ SELECT IF((COALESCE(@after_count, 0) - COALESCE(@before_count, 0)) = 0, 'Success
# Check not timed measurements
#
-UPDATE performance_schema.SETUP_INSTRUMENTS SET enabled = 'YES'
+UPDATE performance_schema.setup_instruments SET enabled = 'YES'
WHERE name LIKE 'wait/io/file/%';
-UPDATE performance_schema.SETUP_INSTRUMENTS SET timed = 'NO';
+UPDATE performance_schema.setup_instruments SET timed = 'NO';
-TRUNCATE TABLE performance_schema.EVENTS_WAITS_HISTORY_LONG;
-TRUNCATE TABLE performance_schema.EVENTS_WAITS_HISTORY;
-TRUNCATE TABLE performance_schema.EVENTS_WAITS_CURRENT;
+TRUNCATE TABLE performance_schema.events_waits_history_long;
+TRUNCATE TABLE performance_schema.events_waits_history;
+TRUNCATE TABLE performance_schema.events_waits_current;
SELECT * FROM t1 WHERE id > 4;
-SELECT * FROM performance_schema.EVENTS_WAITS_HISTORY_LONG
+SELECT * FROM performance_schema.events_waits_history_long
WHERE TIMER_WAIT != NULL
OR TIMER_START != NULL
OR TIMER_END != NULL;
-SELECT * FROM performance_schema.EVENTS_WAITS_HISTORY
+SELECT * FROM performance_schema.events_waits_history
WHERE TIMER_WAIT != NULL
OR TIMER_START != NULL
OR TIMER_END != NULL;
-SELECT * FROM performance_schema.EVENTS_WAITS_CURRENT
+SELECT * FROM performance_schema.events_waits_current
WHERE TIMER_WAIT != NULL
OR TIMER_START != NULL
OR TIMER_END != NULL;
-UPDATE performance_schema.SETUP_INSTRUMENTS SET timed = 'YES';
+UPDATE performance_schema.setup_instruments SET timed = 'YES';
SELECT * FROM t1 WHERE id < 4;
@@ -128,7 +128,7 @@ SELECT SUM(COUNT_READ) AS sum_count_read,
SUM(COUNT_WRITE) AS sum_count_write,
SUM(SUM_NUMBER_OF_BYTES_READ) AS sum_num_bytes_read,
SUM(SUM_NUMBER_OF_BYTES_WRITE) AS sum_num_bytes_write
-FROM performance_schema.FILE_SUMMARY_BY_INSTANCE
+FROM performance_schema.file_summary_by_instance
WHERE FILE_NAME LIKE CONCAT('%', @@tmpdir, '%') ORDER BY NULL;
--enable_result_log
@@ -144,7 +144,7 @@ WHERE FILE_NAME LIKE CONCAT('%', @@tmpdir, '%') ORDER BY NULL;
#
--disable_result_log
SELECT EVENT_NAME, COUNT_STAR, AVG_TIMER_WAIT, SUM_TIMER_WAIT
-FROM performance_schema.EVENTS_WAITS_SUMMARY_GLOBAL_BY_EVENT_NAME
+FROM performance_schema.events_waits_summary_global_by_event_name
WHERE COUNT_STAR > 0
ORDER BY SUM_TIMER_WAIT DESC
LIMIT 10;
@@ -154,25 +154,25 @@ LIMIT 10;
# Total and average wait time for different users
#
---disable_result_log
-SELECT i.user, SUM(TIMER_WAIT) SUM_WAIT
-# ((TIME_TO_SEC(TIMEDIFF(NOW(), i.startup_time)) * 1000) / SUM(TIMER_WAIT)) * 100 WAIT_PERCENTAGE
-FROM performance_schema.EVENTS_WAITS_HISTORY_LONG h
-INNER JOIN performance_schema.THREADS p USING (THREAD_ID)
-LEFT JOIN information_schema.PROCESSLIST i USING (ID)
-GROUP BY i.user
-ORDER BY SUM_WAIT DESC
-LIMIT 20;
---enable_result_log
+## --disable_result_log
+## SELECT i.user, SUM(TIMER_WAIT) SUM_WAIT
+## # ((TIME_TO_SEC(TIMEDIFF(NOW(), i.startup_time)) * 1000) / SUM(TIMER_WAIT)) * 100 WAIT_PERCENTAGE
+## FROM performance_schema.events_waits_history_long h
+## INNER JOIN performance_schema.threads p USING (THREAD_ID)
+## LEFT JOIN information_schema.PROCESSLIST i USING (ID)
+## GROUP BY i.user
+## ORDER BY SUM_WAIT DESC
+## LIMIT 20;
+## --enable_result_log
#
# Total and average wait times for different events for a session
#
--disable_result_log
SELECT h.EVENT_NAME, SUM(h.TIMER_WAIT) TOTAL_WAIT
-FROM performance_schema.EVENTS_WAITS_HISTORY_LONG h
-INNER JOIN performance_schema.THREADS p USING (THREAD_ID)
-WHERE p.ID = 1
+FROM performance_schema.events_waits_history_long h
+INNER JOIN performance_schema.threads p USING (THREAD_ID)
+WHERE p.PROCESSLIST_ID = 1
GROUP BY h.EVENT_NAME
HAVING TOTAL_WAIT > 0;
--enable_result_log
@@ -181,12 +181,15 @@ HAVING TOTAL_WAIT > 0;
# Which user reads and writes data
#
---disable_result_log
-SELECT i.user, h.operation, SUM(NUMBER_OF_BYTES) bytes
-FROM performance_schema.EVENTS_WAITS_HISTORY_LONG h
-INNER JOIN performance_schema.THREADS p USING (THREAD_ID)
-LEFT JOIN information_schema.PROCESSLIST i USING (ID)
-GROUP BY i.user, h.operation
-HAVING BYTES > 0
-ORDER BY i.user, h.operation;
---enable_result_log
+## --disable_result_log
+## SELECT i.user, h.operation, SUM(NUMBER_OF_BYTES) bytes
+## FROM performance_schema.events_waits_history_long h
+## INNER JOIN performance_schema.threads p USING (THREAD_ID)
+## LEFT JOIN information_schema.PROCESSLIST i USING (ID)
+## GROUP BY i.user, h.operation
+## HAVING BYTES > 0
+## ORDER BY i.user, h.operation;
+## --enable_result_log
+
+# Clean-up.
+UPDATE performance_schema.setup_instruments SET enabled = 'YES';
diff --git a/mysql-test/suite/perfschema/t/func_mutex.test b/mysql-test/suite/perfschema/t/func_mutex.test
index 98cb905c67c..51cbc77790e 100644
--- a/mysql-test/suite/perfschema/t/func_mutex.test
+++ b/mysql-test/suite/perfschema/t/func_mutex.test
@@ -22,9 +22,9 @@
--source include/not_embedded.inc
--source include/have_perfschema.inc
-UPDATE performance_schema.SETUP_INSTRUMENTS SET enabled = 'NO', timed = 'YES';
+UPDATE performance_schema.setup_instruments SET enabled = 'NO', timed = 'YES';
-UPDATE performance_schema.SETUP_INSTRUMENTS SET enabled = 'YES'
+UPDATE performance_schema.setup_instruments SET enabled = 'YES'
WHERE name LIKE 'wait/synch/mutex/%'
OR name LIKE 'wait/synch/rwlock/%';
@@ -46,41 +46,41 @@ INSERT INTO t1 (id) VALUES (1), (2), (3), (4), (5), (6), (7), (8);
# FM2: Count for mutex should not increase with instrumentation disabled
#
-TRUNCATE TABLE performance_schema.EVENTS_WAITS_HISTORY_LONG;
-TRUNCATE TABLE performance_schema.EVENTS_WAITS_HISTORY;
-TRUNCATE TABLE performance_schema.EVENTS_WAITS_CURRENT;
+TRUNCATE TABLE performance_schema.events_waits_history_long;
+TRUNCATE TABLE performance_schema.events_waits_history;
+TRUNCATE TABLE performance_schema.events_waits_current;
SELECT * FROM t1 WHERE id = 1;
SET @before_count = (SELECT SUM(TIMER_WAIT)
- FROM performance_schema.EVENTS_WAITS_HISTORY_LONG
+ FROM performance_schema.events_waits_history_long
WHERE (EVENT_NAME = 'wait/synch/mutex/sql/LOCK_open'));
SELECT * FROM t1;
SET @after_count = (SELECT SUM(TIMER_WAIT)
- FROM performance_schema.EVENTS_WAITS_HISTORY_LONG
+ FROM performance_schema.events_waits_history_long
WHERE (EVENT_NAME = 'wait/synch/mutex/sql/LOCK_open'));
SELECT IF((@after_count - @before_count) > 0, 'Success', 'Failure') test_fm1_timed;
-UPDATE performance_schema.SETUP_INSTRUMENTS SET enabled = 'NO'
+UPDATE performance_schema.setup_instruments SET enabled = 'NO'
WHERE NAME = 'wait/synch/mutex/sql/LOCK_open';
-TRUNCATE TABLE performance_schema.EVENTS_WAITS_HISTORY_LONG;
-TRUNCATE TABLE performance_schema.EVENTS_WAITS_HISTORY;
-TRUNCATE TABLE performance_schema.EVENTS_WAITS_CURRENT;
+TRUNCATE TABLE performance_schema.events_waits_history_long;
+TRUNCATE TABLE performance_schema.events_waits_history;
+TRUNCATE TABLE performance_schema.events_waits_current;
SELECT * FROM t1 WHERE id = 1;
SET @before_count = (SELECT SUM(TIMER_WAIT)
- FROM performance_schema.EVENTS_WAITS_HISTORY_LONG
+ FROM performance_schema.events_waits_history_long
WHERE (EVENT_NAME = 'wait/synch/mutex/sql/LOCK_open'));
SELECT * FROM t1;
SET @after_count = (SELECT SUM(TIMER_WAIT)
- FROM performance_schema.EVENTS_WAITS_HISTORY_LONG
+ FROM performance_schema.events_waits_history_long
WHERE (EVENT_NAME = 'wait/synch/mutex/sql/LOCK_open'));
SELECT IF((COALESCE(@after_count, 0) - COALESCE(@before_count, 0)) = 0, 'Success', 'Failure') test_fm2_timed;
@@ -89,43 +89,45 @@ SELECT IF((COALESCE(@after_count, 0) - COALESCE(@before_count, 0)) = 0, 'Success
# Repeat for RW-lock
#
-TRUNCATE TABLE performance_schema.EVENTS_WAITS_HISTORY_LONG;
-TRUNCATE TABLE performance_schema.EVENTS_WAITS_HISTORY;
-TRUNCATE TABLE performance_schema.EVENTS_WAITS_CURRENT;
+TRUNCATE TABLE performance_schema.events_waits_history_long;
+TRUNCATE TABLE performance_schema.events_waits_history;
+TRUNCATE TABLE performance_schema.events_waits_current;
SELECT * FROM t1 WHERE id = 1;
SET @before_count = (SELECT SUM(TIMER_WAIT)
- FROM performance_schema.EVENTS_WAITS_HISTORY_LONG
+ FROM performance_schema.events_waits_history_long
WHERE (EVENT_NAME = 'wait/synch/rwlock/sql/LOCK_grant'));
SELECT * FROM t1;
SET @after_count = (SELECT SUM(TIMER_WAIT)
- FROM performance_schema.EVENTS_WAITS_HISTORY_LONG
+ FROM performance_schema.events_waits_history_long
WHERE (EVENT_NAME = 'wait/synch/rwlock/sql/LOCK_grant'));
SELECT IF((@after_count - @before_count) > 0, 'Success', 'Failure') test_fm1_rw_timed;
-UPDATE performance_schema.SETUP_INSTRUMENTS SET enabled = 'NO'
+UPDATE performance_schema.setup_instruments SET enabled = 'NO'
WHERE NAME = 'wait/synch/rwlock/sql/LOCK_grant';
-TRUNCATE TABLE performance_schema.EVENTS_WAITS_HISTORY_LONG;
-TRUNCATE TABLE performance_schema.EVENTS_WAITS_HISTORY;
-TRUNCATE TABLE performance_schema.EVENTS_WAITS_CURRENT;
+TRUNCATE TABLE performance_schema.events_waits_history_long;
+TRUNCATE TABLE performance_schema.events_waits_history;
+TRUNCATE TABLE performance_schema.events_waits_current;
SELECT * FROM t1 WHERE id = 1;
SET @before_count = (SELECT SUM(TIMER_WAIT)
- FROM performance_schema.EVENTS_WAITS_HISTORY_LONG
+ FROM performance_schema.events_waits_history_long
WHERE (EVENT_NAME = 'wait/synch/rwlock/sql/LOCK_grant'));
SELECT * FROM t1;
SET @after_count = (SELECT SUM(TIMER_WAIT)
- FROM performance_schema.EVENTS_WAITS_HISTORY_LONG
+ FROM performance_schema.events_waits_history_long
WHERE (EVENT_NAME = 'wait/synch/rwlock/sql/LOCK_grant'));
SELECT IF((COALESCE(@after_count, 0) - COALESCE(@before_count, 0)) = 0, 'Success', 'Failure') test_fm2_rw_timed;
+# Clean-up.
+UPDATE performance_schema.setup_instruments SET enabled = 'YES';
DROP TABLE t1;
diff --git a/mysql-test/suite/perfschema/t/global_read_lock.test b/mysql-test/suite/perfschema/t/global_read_lock.test
index b953ea32ce0..d00c6583e31 100644
--- a/mysql-test/suite/perfschema/t/global_read_lock.test
+++ b/mysql-test/suite/perfschema/t/global_read_lock.test
@@ -15,28 +15,32 @@
# Tests for PERFORMANCE_SCHEMA
#
-# Test the effect of a flush tables with read lock on SETUP_ tables.
+# Test the effect of a flush tables with read lock on setup_ tables.
--source include/not_embedded.inc
--source include/have_perfschema.inc
use performance_schema;
+# Make test robust against errors in other tests.
+# Ensure that instrumentation is turned on when we create new connection.
+update performance_schema.setup_instruments set enabled='YES';
+
grant SELECT, UPDATE, LOCK TABLES on performance_schema.* to pfsuser@localhost;
flush privileges;
--echo connect (con1, localhost, pfsuser, , test);
connect (con1, localhost, pfsuser, , test);
-lock tables performance_schema.SETUP_INSTRUMENTS read;
+lock tables performance_schema.setup_instruments read;
--disable_result_log
-select * from performance_schema.SETUP_INSTRUMENTS;
+select * from performance_schema.setup_instruments;
--enable_result_log
unlock tables;
-lock tables performance_schema.SETUP_INSTRUMENTS write;
-update performance_schema.SETUP_INSTRUMENTS set enabled='NO';
-update performance_schema.SETUP_INSTRUMENTS set enabled='YES';
+lock tables performance_schema.setup_instruments write;
+update performance_schema.setup_instruments set enabled='NO';
+update performance_schema.setup_instruments set enabled='YES';
unlock tables;
--echo connection default;
@@ -47,20 +51,20 @@ flush tables with read lock;
--echo connection con1;
connection con1;
-lock tables performance_schema.SETUP_INSTRUMENTS read;
+lock tables performance_schema.setup_instruments read;
--disable_result_log
-select * from performance_schema.SETUP_INSTRUMENTS;
+select * from performance_schema.setup_instruments;
--enable_result_log
unlock tables;
# This will block
--send
-lock tables performance_schema.SETUP_INSTRUMENTS write;
+lock tables performance_schema.setup_instruments write;
--echo connection default;
connection default;
-let $wait_condition= select 1 from performance_schema.EVENTS_WAITS_CURRENT where event_name like "wait/synch/cond/sql/COND_global_read_lock";
+let $wait_condition= select 1 from performance_schema.events_waits_current where event_name like "wait/synch/cond/sql/MDL_context::COND_wait_status";
--source include/wait_condition.inc
@@ -68,16 +72,16 @@ let $wait_condition= select 1 from performance_schema.EVENTS_WAITS_CURRENT where
select event_name,
left(source, locate(":", source)) as short_source,
timer_end, timer_wait, operation
- from performance_schema.EVENTS_WAITS_CURRENT
- where event_name like "wait/synch/cond/sql/COND_global_read_lock";
+ from performance_schema.events_waits_current
+ where event_name like "wait/synch/cond/sql/MDL_context::COND_wait_status";
unlock tables;
connection con1;
--reap
-update performance_schema.SETUP_INSTRUMENTS set enabled='NO';
-update performance_schema.SETUP_INSTRUMENTS set enabled='YES';
+update performance_schema.setup_instruments set enabled='NO';
+update performance_schema.setup_instruments set enabled='YES';
unlock tables;
disconnect con1;
diff --git a/mysql-test/suite/perfschema/t/information_schema.test b/mysql-test/suite/perfschema/t/information_schema.test
index 3d2822a1db3..36ba1912df3 100644
--- a/mysql-test/suite/perfschema/t/information_schema.test
+++ b/mysql-test/suite/perfschema/t/information_schema.test
@@ -22,46 +22,46 @@
# Note that TABLE_NAME is in uppercase is some platforms,
# and in lowercase in others.
-# Using upper(TABLE_NAME) to have consistent results.
+# Using lower(TABLE_NAME) to have consistent results.
-select TABLE_SCHEMA, upper(TABLE_NAME), TABLE_CATALOG
+select TABLE_SCHEMA, lower(TABLE_NAME), TABLE_CATALOG
from information_schema.tables
where TABLE_SCHEMA='performance_schema';
-select upper(TABLE_NAME), TABLE_TYPE, ENGINE
+select lower(TABLE_NAME), TABLE_TYPE, ENGINE
from information_schema.tables
where TABLE_SCHEMA='performance_schema';
-select upper(TABLE_NAME), VERSION, ROW_FORMAT
+select lower(TABLE_NAME), VERSION, ROW_FORMAT
from information_schema.tables
where TABLE_SCHEMA='performance_schema';
-select upper(TABLE_NAME), TABLE_ROWS, AVG_ROW_LENGTH
+select lower(TABLE_NAME), TABLE_ROWS, AVG_ROW_LENGTH
from information_schema.tables
where TABLE_SCHEMA='performance_schema';
-select upper(TABLE_NAME), DATA_LENGTH, MAX_DATA_LENGTH
+select lower(TABLE_NAME), DATA_LENGTH, MAX_DATA_LENGTH
from information_schema.tables
where TABLE_SCHEMA='performance_schema';
-select upper(TABLE_NAME), INDEX_LENGTH, DATA_FREE, AUTO_INCREMENT
+select lower(TABLE_NAME), INDEX_LENGTH, DATA_FREE, AUTO_INCREMENT
from information_schema.tables
where TABLE_SCHEMA='performance_schema';
-select upper(TABLE_NAME), CREATE_TIME, UPDATE_TIME, CHECK_TIME
+select lower(TABLE_NAME), CREATE_TIME, UPDATE_TIME, CHECK_TIME
from information_schema.tables
where TABLE_SCHEMA='performance_schema';
-select upper(TABLE_NAME), TABLE_COLLATION, CHECKSUM
+select lower(TABLE_NAME), TABLE_COLLATION, CHECKSUM
from information_schema.tables
where TABLE_SCHEMA='performance_schema';
# TABLESPACE_NAME does not exist in 5.4
-# select upper(TABLE_NAME), CREATE_OPTIONS, TABLESPACE_NAME
+# select lower(TABLE_NAME), CREATE_OPTIONS, TABLESPACE_NAME
# from information_schema.tables
# where TABLE_SCHEMA='performance_schema';
-select upper(TABLE_NAME), TABLE_COMMENT
+select lower(TABLE_NAME), TABLE_COMMENT
from information_schema.tables
where TABLE_SCHEMA='performance_schema';
diff --git a/mysql-test/suite/perfschema/t/misc.test b/mysql-test/suite/perfschema/t/misc.test
index d497c205d50..dee18f0fa21 100644
--- a/mysql-test/suite/perfschema/t/misc.test
+++ b/mysql-test/suite/perfschema/t/misc.test
@@ -25,11 +25,11 @@
#
--disable_result_log
-SELECT EVENT_ID FROM performance_schema.EVENTS_WAITS_CURRENT
+SELECT EVENT_ID FROM performance_schema.events_waits_current
WHERE THREAD_ID IN
- (SELECT THREAD_ID FROM performance_schema.THREADS)
+ (SELECT THREAD_ID FROM performance_schema.threads)
AND EVENT_NAME IN
- (SELECT NAME FROM performance_schema.SETUP_INSTRUMENTS
+ (SELECT NAME FROM performance_schema.setup_instruments
WHERE NAME LIKE "wait/synch/%")
LIMIT 1;
--enable_result_log
@@ -38,15 +38,15 @@ LIMIT 1;
# Bug#45088 Should not be able to create tables of engine PERFORMANCE_SCHEMA
#
---error ER_WRONG_PERFSCHEMA_USAGE
+--error ER_CANT_CREATE_TABLE
create table test.t1(a int) engine=performance_schema;
#
# Bug#44897 Performance Schema: can create a ghost table in another database
#
---error ER_WRONG_PERFSCHEMA_USAGE
-create table test.t1 like performance_schema.EVENTS_WAITS_CURRENT;
+--error ER_CANT_CREATE_TABLE
+create table test.t1 like performance_schema.events_waits_current;
#
# Bug#44898 PerformanceSchema: can create a table in db performance_schema, cannot insert
@@ -73,7 +73,7 @@ select * from test.ghost;
drop table test.ghost;
# Shoud return nothing
-select * from performance_schema.FILE_INSTANCES
+select * from performance_schema.file_instances
where file_name like "%ghost%";
#
diff --git a/mysql-test/suite/perfschema/t/myisam_file_io.test b/mysql-test/suite/perfschema/t/myisam_file_io.test
index 0861e8f4b74..de9f6f48480 100644
--- a/mysql-test/suite/perfschema/t/myisam_file_io.test
+++ b/mysql-test/suite/perfschema/t/myisam_file_io.test
@@ -20,14 +20,14 @@
# Setup
-update performance_schema.SETUP_INSTRUMENTS set enabled='NO';
-update performance_schema.SETUP_INSTRUMENTS set enabled='YES'
+update performance_schema.setup_instruments set enabled='NO';
+update performance_schema.setup_instruments set enabled='YES'
where name like "wait/io/file/myisam/%";
-update performance_schema.SETUP_CONSUMERS
+update performance_schema.setup_consumers
set enabled='YES';
-truncate table performance_schema.EVENTS_WAITS_HISTORY_LONG;
+truncate table performance_schema.events_waits_history_long;
# Reset lost counters to a known state
flush status;
@@ -46,13 +46,21 @@ insert into no_index_tab set a = 'foo', b = 1;
# Verification
# Note that mi_create.c contains mysql_file_tell() calls in debug only,
# so the result are filtered to remove 'tell'.
+# Note that even after setting other instruments to enabled='NO'
+# and truncating the events_waits_history_long table,
+# some events -- that were already started but not completed --
+# for other instruments could still be added in the history.
+# To protect against that, an extra where clause
+# "and event_name like "wait/io/file/myisam/%"
+# is added to the select to filter out the result.
select event_name,
left(source, locate(":", source)) as short_source,
operation, number_of_bytes,
substring(object_name, locate("no_index_tab", object_name)) as short_name
- from performance_schema.EVENTS_WAITS_HISTORY_LONG
+ from performance_schema.events_waits_history_long
where operation not like "tell"
+ and event_name like "wait/io/file/myisam/%"
order by thread_id, event_id;
# In case of failures, this will tell if file io are lost.
@@ -60,7 +68,7 @@ show status like 'performance_schema_%';
# Cleanup
-update performance_schema.SETUP_INSTRUMENTS set enabled='YES';
+update performance_schema.setup_instruments set enabled='YES';
drop table test.no_index_tab;
diff --git a/mysql-test/suite/perfschema/t/no_threads.test b/mysql-test/suite/perfschema/t/no_threads.test
index 9254535bf1f..dd0bd076dfc 100644
--- a/mysql-test/suite/perfschema/t/no_threads.test
+++ b/mysql-test/suite/perfschema/t/no_threads.test
@@ -17,22 +17,23 @@
--source include/not_embedded.inc
--source include/have_perfschema.inc
+--source include/not_threadpool.inc
# Setup : in this main thread
-update performance_schema.SETUP_INSTRUMENTS set enabled='NO';
-update performance_schema.SETUP_CONSUMERS set enabled='YES';
-update performance_schema.SETUP_INSTRUMENTS set enabled='YES'
+update performance_schema.setup_instruments set enabled='NO';
+update performance_schema.setup_consumers set enabled='YES';
+update performance_schema.setup_instruments set enabled='YES'
where name like "wait/synch/mutex/mysys/THR_LOCK_myisam";
--disable_warnings
drop table if exists test.t1;
--enable_warnings
-truncate table performance_schema.EVENTS_WAITS_CURRENT;
-truncate table performance_schema.EVENTS_WAITS_HISTORY;
-truncate table performance_schema.EVENTS_WAITS_HISTORY_LONG;
+truncate table performance_schema.events_waits_current;
+truncate table performance_schema.events_waits_history;
+truncate table performance_schema.events_waits_history_long;
show variables like "thread_handling";
@@ -45,23 +46,23 @@ show variables like "performance_schema_max_thread%";
# Verification : in this main thread
-select count(*) from performance_schema.THREADS
+select count(*) from performance_schema.threads
where name like "thread/sql/main";
-select count(*) from performance_schema.THREADS
+select count(*) from performance_schema.threads
where name like "thread/sql/OneConnection";
select event_name, operation,
left(source, locate(":", source)) as short_source
- from performance_schema.EVENTS_WAITS_CURRENT;
+ from performance_schema.events_waits_current;
select event_name, operation,
left(source, locate(":", source)) as short_source
- from performance_schema.EVENTS_WAITS_HISTORY;
+ from performance_schema.events_waits_history;
select event_name, operation,
left(source, locate(":", source)) as short_source
- from performance_schema.EVENTS_WAITS_HISTORY_LONG;
+ from performance_schema.events_waits_history_long;
# Cleanup
diff --git a/mysql-test/suite/perfschema/t/one_thread_per_con.test b/mysql-test/suite/perfschema/t/one_thread_per_con.test
index 7d0daffe228..fc4d17e34c7 100644
--- a/mysql-test/suite/perfschema/t/one_thread_per_con.test
+++ b/mysql-test/suite/perfschema/t/one_thread_per_con.test
@@ -17,6 +17,7 @@
--source include/not_embedded.inc
--source include/have_perfschema.inc
+--source include/not_threadpool.inc
# Setup
@@ -27,7 +28,7 @@
# The point is not to test myisam, but to test that each
# connection is properly instrumented, with one-thread-per-connection
-update performance_schema.SETUP_INSTRUMENTS set enabled='YES'
+update performance_schema.setup_instruments set enabled='YES'
where name like "wait/synch/mutex/mysys/THR_LOCK_myisam";
--disable_warnings
@@ -36,7 +37,7 @@ drop table if exists test.t2;
drop table if exists test.t3;
--enable_warnings
-truncate table performance_schema.EVENTS_WAITS_HISTORY_LONG;
+truncate table performance_schema.events_waits_history_long;
show variables like "thread_handling";
diff --git a/mysql-test/suite/perfschema/t/privilege.test b/mysql-test/suite/perfschema/t/privilege.test
index 2d682de2870..277ba9bf3b8 100644
--- a/mysql-test/suite/perfschema/t/privilege.test
+++ b/mysql-test/suite/perfschema/t/privilege.test
@@ -76,136 +76,128 @@ grant DELETE on performance_schema.* to 'pfs_user_2'@localhost;
grant LOCK TABLES on performance_schema.* to 'pfs_user_2'@localhost;
# Test denied privileges on specific performance_schema tables.
-# SETUP_INSTRUMENT : example of PFS_updatable_acl
-# EVENTS_WAITS_CURRENT : example of PFS_truncatable_acl
-# FILE_INSTANCES : example of PFS_readonly_acl
+# setup_instrument : example of PFS_updatable_acl
+# events_waits_current : example of PFS_truncatable_acl
+# file_instances : example of PFS_readonly_acl
--error ER_DBACCESS_DENIED_ERROR
-grant ALL on performance_schema.SETUP_INSTRUMENTS to 'pfs_user_3'@localhost
+grant ALL on performance_schema.setup_instruments to 'pfs_user_3'@localhost
with GRANT OPTION;
# will be ER_DBACCESS_DENIED_ERROR once .FRM are removed
-grant CREATE on performance_schema.SETUP_INSTRUMENTS to 'pfs_user_3'@localhost;
+grant CREATE on performance_schema.setup_instruments to 'pfs_user_3'@localhost;
# will be ER_DBACCESS_DENIED_ERROR once .FRM are removed
-grant DROP on performance_schema.SETUP_INSTRUMENTS to 'pfs_user_3'@localhost;
+grant DROP on performance_schema.setup_instruments to 'pfs_user_3'@localhost;
--error ER_DBACCESS_DENIED_ERROR
-grant REFERENCES on performance_schema.SETUP_INSTRUMENTS to 'pfs_user_3'@localhost;
+grant REFERENCES on performance_schema.setup_instruments to 'pfs_user_3'@localhost;
--error ER_DBACCESS_DENIED_ERROR
-grant INDEX on performance_schema.SETUP_INSTRUMENTS to 'pfs_user_3'@localhost;
+grant INDEX on performance_schema.setup_instruments to 'pfs_user_3'@localhost;
--error ER_DBACCESS_DENIED_ERROR
-grant ALTER on performance_schema.SETUP_INSTRUMENTS to 'pfs_user_3'@localhost;
+grant ALTER on performance_schema.setup_instruments to 'pfs_user_3'@localhost;
--error ER_DBACCESS_DENIED_ERROR
-grant CREATE VIEW on performance_schema.SETUP_INSTRUMENTS to 'pfs_user_3'@localhost;
+grant CREATE VIEW on performance_schema.setup_instruments to 'pfs_user_3'@localhost;
--error ER_DBACCESS_DENIED_ERROR
-grant SHOW VIEW on performance_schema.SETUP_INSTRUMENTS to 'pfs_user_3'@localhost;
+grant SHOW VIEW on performance_schema.setup_instruments to 'pfs_user_3'@localhost;
--error ER_DBACCESS_DENIED_ERROR
-grant TRIGGER on performance_schema.SETUP_INSTRUMENTS to 'pfs_user_3'@localhost;
+grant TRIGGER on performance_schema.setup_instruments to 'pfs_user_3'@localhost;
---replace_result '\'setup_instruments' '\'SETUP_INSTRUMENTS'
--error ER_TABLEACCESS_DENIED_ERROR
-grant INSERT on performance_schema.SETUP_INSTRUMENTS to 'pfs_user_3'@localhost;
+grant INSERT on performance_schema.setup_instruments to 'pfs_user_3'@localhost;
---replace_result '\'setup_instruments' '\'SETUP_INSTRUMENTS'
--error ER_TABLEACCESS_DENIED_ERROR
-grant DELETE on performance_schema.SETUP_INSTRUMENTS to 'pfs_user_3'@localhost;
+grant DELETE on performance_schema.setup_instruments to 'pfs_user_3'@localhost;
-grant SELECT on performance_schema.SETUP_INSTRUMENTS to 'pfs_user_3'@localhost
+grant SELECT on performance_schema.setup_instruments to 'pfs_user_3'@localhost
with GRANT OPTION;
-grant UPDATE on performance_schema.SETUP_INSTRUMENTS to 'pfs_user_3'@localhost
+grant UPDATE on performance_schema.setup_instruments to 'pfs_user_3'@localhost
with GRANT OPTION;
--error ER_DBACCESS_DENIED_ERROR
-grant ALL on performance_schema.EVENTS_WAITS_CURRENT to 'pfs_user_3'@localhost
+grant ALL on performance_schema.events_waits_current to 'pfs_user_3'@localhost
with GRANT OPTION;
# will be ER_DBACCESS_DENIED_ERROR once .FRM are removed
-grant CREATE on performance_schema.EVENTS_WAITS_CURRENT to 'pfs_user_3'@localhost;
+grant CREATE on performance_schema.events_waits_current to 'pfs_user_3'@localhost;
# will be ER_DBACCESS_DENIED_ERROR once .FRM are removed
-grant DROP on performance_schema.EVENTS_WAITS_CURRENT to 'pfs_user_3'@localhost;
+grant DROP on performance_schema.events_waits_current to 'pfs_user_3'@localhost;
--error ER_DBACCESS_DENIED_ERROR
-grant REFERENCES on performance_schema.EVENTS_WAITS_CURRENT to 'pfs_user_3'@localhost;
+grant REFERENCES on performance_schema.events_waits_current to 'pfs_user_3'@localhost;
--error ER_DBACCESS_DENIED_ERROR
-grant INDEX on performance_schema.EVENTS_WAITS_CURRENT to 'pfs_user_3'@localhost;
+grant INDEX on performance_schema.events_waits_current to 'pfs_user_3'@localhost;
--error ER_DBACCESS_DENIED_ERROR
-grant ALTER on performance_schema.EVENTS_WAITS_CURRENT to 'pfs_user_3'@localhost;
+grant ALTER on performance_schema.events_waits_current to 'pfs_user_3'@localhost;
--error ER_DBACCESS_DENIED_ERROR
-grant CREATE VIEW on performance_schema.EVENTS_WAITS_CURRENT to 'pfs_user_3'@localhost;
+grant CREATE VIEW on performance_schema.events_waits_current to 'pfs_user_3'@localhost;
--error ER_DBACCESS_DENIED_ERROR
-grant SHOW VIEW on performance_schema.EVENTS_WAITS_CURRENT to 'pfs_user_3'@localhost;
+grant SHOW VIEW on performance_schema.events_waits_current to 'pfs_user_3'@localhost;
--error ER_DBACCESS_DENIED_ERROR
-grant TRIGGER on performance_schema.EVENTS_WAITS_CURRENT to 'pfs_user_3'@localhost;
+grant TRIGGER on performance_schema.events_waits_current to 'pfs_user_3'@localhost;
---replace_result '\'events_waits_current' '\'EVENTS_WAITS_CURRENT'
--error ER_TABLEACCESS_DENIED_ERROR
-grant INSERT on performance_schema.EVENTS_WAITS_CURRENT to 'pfs_user_3'@localhost;
+grant INSERT on performance_schema.events_waits_current to 'pfs_user_3'@localhost;
---replace_result '\'events_waits_current' '\'EVENTS_WAITS_CURRENT'
--error ER_TABLEACCESS_DENIED_ERROR
-grant UPDATE on performance_schema.EVENTS_WAITS_CURRENT to 'pfs_user_3'@localhost;
+grant UPDATE on performance_schema.events_waits_current to 'pfs_user_3'@localhost;
---replace_result '\'events_waits_current' '\'EVENTS_WAITS_CURRENT'
--error ER_TABLEACCESS_DENIED_ERROR
-grant DELETE on performance_schema.EVENTS_WAITS_CURRENT to 'pfs_user_3'@localhost;
+grant DELETE on performance_schema.events_waits_current to 'pfs_user_3'@localhost;
-grant SELECT on performance_schema.EVENTS_WAITS_CURRENT to 'pfs_user_3'@localhost
+grant SELECT on performance_schema.events_waits_current to 'pfs_user_3'@localhost
with GRANT OPTION;
--error ER_DBACCESS_DENIED_ERROR
-grant ALL on performance_schema.FILE_INSTANCES to 'pfs_user_3'@localhost
+grant ALL on performance_schema.file_instances to 'pfs_user_3'@localhost
with GRANT OPTION;
# will be ER_DBACCESS_DENIED_ERROR once .FRM are removed
-grant CREATE on performance_schema.FILE_INSTANCES to 'pfs_user_3'@localhost;
+grant CREATE on performance_schema.file_instances to 'pfs_user_3'@localhost;
# will be ER_DBACCESS_DENIED_ERROR once .FRM are removed
-grant DROP on performance_schema.FILE_INSTANCES to 'pfs_user_3'@localhost;
+grant DROP on performance_schema.file_instances to 'pfs_user_3'@localhost;
--error ER_DBACCESS_DENIED_ERROR
-grant REFERENCES on performance_schema.FILE_INSTANCES to 'pfs_user_3'@localhost;
+grant REFERENCES on performance_schema.file_instances to 'pfs_user_3'@localhost;
--error ER_DBACCESS_DENIED_ERROR
-grant INDEX on performance_schema.FILE_INSTANCES to 'pfs_user_3'@localhost;
+grant INDEX on performance_schema.file_instances to 'pfs_user_3'@localhost;
--error ER_DBACCESS_DENIED_ERROR
-grant ALTER on performance_schema.FILE_INSTANCES to 'pfs_user_3'@localhost;
+grant ALTER on performance_schema.file_instances to 'pfs_user_3'@localhost;
--error ER_DBACCESS_DENIED_ERROR
-grant CREATE VIEW on performance_schema.FILE_INSTANCES to 'pfs_user_3'@localhost;
+grant CREATE VIEW on performance_schema.file_instances to 'pfs_user_3'@localhost;
--error ER_DBACCESS_DENIED_ERROR
-grant SHOW VIEW on performance_schema.FILE_INSTANCES to 'pfs_user_3'@localhost;
+grant SHOW VIEW on performance_schema.file_instances to 'pfs_user_3'@localhost;
--error ER_DBACCESS_DENIED_ERROR
-grant TRIGGER on performance_schema.FILE_INSTANCES to 'pfs_user_3'@localhost;
+grant TRIGGER on performance_schema.file_instances to 'pfs_user_3'@localhost;
---replace_result '\'file_instances' '\'FILE_INSTANCES'
--error ER_TABLEACCESS_DENIED_ERROR
-grant INSERT on performance_schema.FILE_INSTANCES to 'pfs_user_3'@localhost;
+grant INSERT on performance_schema.file_instances to 'pfs_user_3'@localhost;
---replace_result '\'file_instances' '\'FILE_INSTANCES'
--error ER_TABLEACCESS_DENIED_ERROR
-grant UPDATE on performance_schema.FILE_INSTANCES to 'pfs_user_3'@localhost;
+grant UPDATE on performance_schema.file_instances to 'pfs_user_3'@localhost;
---replace_result '\'file_instances' '\'FILE_INSTANCES'
--error ER_TABLEACCESS_DENIED_ERROR
-grant DELETE on performance_schema.FILE_INSTANCES to 'pfs_user_3'@localhost;
+grant DELETE on performance_schema.file_instances to 'pfs_user_3'@localhost;
-grant SELECT on performance_schema.FILE_INSTANCES to 'pfs_user_3'@localhost
+grant SELECT on performance_schema.file_instances to 'pfs_user_3'@localhost
with GRANT OPTION;
# See bug#45354 LOCK TABLES is not a TABLE privilege
@@ -258,25 +250,20 @@ CREATE user pfs_user_4;
--connection pfs_user_4
--echo # Select as pfs_user_4 should fail without grant
---replace_result '\'events_waits_history' '\'EVENTS_WAITS_HISTORY'
--error ER_TABLEACCESS_DENIED_ERROR
-SELECT event_id FROM performance_schema.EVENTS_WAITS_HISTORY;
+SELECT event_id FROM performance_schema.events_waits_history;
---replace_result '\'events_waits_history_long' '\'EVENTS_WAITS_HISTORY_LONG'
--error ER_TABLEACCESS_DENIED_ERROR
-SELECT event_id FROM performance_schema.EVENTS_WAITS_HISTORY_LONG;
+SELECT event_id FROM performance_schema.events_waits_history_long;
---replace_result '\'events_waits_current' '\'EVENTS_WAITS_CURRENT'
--error ER_TABLEACCESS_DENIED_ERROR
-SELECT event_id FROM performance_schema.EVENTS_WAITS_CURRENT;
+SELECT event_id FROM performance_schema.events_waits_current;
---replace_result '\'events_waits_summary_by_instance' '\'EVENTS_WAITS_SUMMARY_BY_INSTANCE'
--error ER_TABLEACCESS_DENIED_ERROR
-SELECT event_name FROM performance_schema.EVENTS_WAITS_SUMMARY_BY_INSTANCE;
+SELECT event_name FROM performance_schema.events_waits_summary_by_instance;
---replace_result '\'file_summary_by_instance' '\'FILE_SUMMARY_BY_INSTANCE'
--error ER_TABLEACCESS_DENIED_ERROR
-SELECT event_name FROM performance_schema.FILE_SUMMARY_BY_INSTANCE;
+SELECT event_name FROM performance_schema.file_summary_by_instance;
--echo #
--echo # WL#4818, NFS3: Normal user does not have access to change what is
@@ -287,35 +274,28 @@ SELECT event_name FROM performance_schema.FILE_SUMMARY_BY_INSTANCE;
--echo # User pfs_user_4 should not be allowed to tweak instrumentation without
--echo # explicit grant
---replace_result '\'setup_instruments' '\'SETUP_INSTRUMENTS'
--error ER_TABLEACCESS_DENIED_ERROR
-UPDATE performance_schema.SETUP_INSTRUMENTS SET enabled = 'NO', timed = 'YES';
+UPDATE performance_schema.setup_instruments SET enabled = 'NO', timed = 'YES';
---replace_result '\'setup_instruments' '\'SETUP_INSTRUMENTS'
--error ER_TABLEACCESS_DENIED_ERROR
-UPDATE performance_schema.SETUP_INSTRUMENTS SET enabled = 'YES'
+UPDATE performance_schema.setup_instruments SET enabled = 'YES'
WHERE name LIKE 'wait/synch/mutex/%'
OR name LIKE 'wait/synch/rwlock/%';
---replace_result '\'setup_consumers' '\'SETUP_CONSUMERS'
--error ER_TABLEACCESS_DENIED_ERROR
-UPDATE performance_schema.SETUP_CONSUMERS SET enabled = 'YES';
+UPDATE performance_schema.setup_consumers SET enabled = 'YES';
---replace_result '\'setup_timers' '\'SETUP_TIMERS'
--error ER_TABLEACCESS_DENIED_ERROR
-UPDATE performance_schema.SETUP_TIMERS SET timer_name = 'TICK';
+UPDATE performance_schema.setup_timers SET timer_name = 'TICK';
---replace_result '\'events_waits_history_long' '\'EVENTS_WAITS_HISTORY_LONG'
--error ER_TABLEACCESS_DENIED_ERROR
-TRUNCATE TABLE performance_schema.EVENTS_WAITS_HISTORY_LONG;
+TRUNCATE TABLE performance_schema.events_waits_history_long;
---replace_result '\'events_waits_history' '\'EVENTS_WAITS_HISTORY'
--error ER_TABLEACCESS_DENIED_ERROR
-TRUNCATE TABLE performance_schema.EVENTS_WAITS_HISTORY;
+TRUNCATE TABLE performance_schema.events_waits_history;
---replace_result '\'events_waits_current' '\'EVENTS_WAITS_CURRENT'
--error ER_TABLEACCESS_DENIED_ERROR
-TRUNCATE TABLE performance_schema.EVENTS_WAITS_CURRENT;
+TRUNCATE TABLE performance_schema.events_waits_current;
--echo #
--echo # WL#4814, NFS1: Can use grants to give normal user access
@@ -325,29 +305,29 @@ TRUNCATE TABLE performance_schema.EVENTS_WAITS_CURRENT;
--connection default
--echo # Grant access to change tables with the root account
-GRANT UPDATE ON performance_schema.SETUP_CONSUMERS TO pfs_user_4;
-GRANT UPDATE ON performance_schema.SETUP_TIMERS TO pfs_user_4;
-GRANT UPDATE, SELECT ON performance_schema.SETUP_INSTRUMENTS TO pfs_user_4;
-GRANT DROP ON performance_schema.EVENTS_WAITS_CURRENT TO pfs_user_4;
-GRANT DROP ON performance_schema.EVENTS_WAITS_HISTORY TO pfs_user_4;
-GRANT DROP ON performance_schema.EVENTS_WAITS_HISTORY_LONG TO pfs_user_4;
+GRANT UPDATE ON performance_schema.setup_consumers TO pfs_user_4;
+GRANT UPDATE ON performance_schema.setup_timers TO pfs_user_4;
+GRANT UPDATE, SELECT ON performance_schema.setup_instruments TO pfs_user_4;
+GRANT DROP ON performance_schema.events_waits_current TO pfs_user_4;
+GRANT DROP ON performance_schema.events_waits_history TO pfs_user_4;
+GRANT DROP ON performance_schema.events_waits_history_long TO pfs_user_4;
--connection pfs_user_4
--echo # User pfs_user_4 should now be allowed to tweak instrumentation
-UPDATE performance_schema.SETUP_INSTRUMENTS SET enabled = 'NO', timed = 'YES';
+UPDATE performance_schema.setup_instruments SET enabled = 'NO', timed = 'YES';
-UPDATE performance_schema.SETUP_INSTRUMENTS SET enabled = 'YES'
+UPDATE performance_schema.setup_instruments SET enabled = 'YES'
WHERE name LIKE 'wait/synch/mutex/%'
OR name LIKE 'wait/synch/rwlock/%';
-UPDATE performance_schema.SETUP_CONSUMERS SET enabled = 'YES';
+UPDATE performance_schema.setup_consumers SET enabled = 'YES';
-UPDATE performance_schema.SETUP_TIMERS SET timer_name = 'TICK';
+UPDATE performance_schema.setup_timers SET timer_name = 'TICK';
-TRUNCATE TABLE performance_schema.EVENTS_WAITS_HISTORY_LONG;
-TRUNCATE TABLE performance_schema.EVENTS_WAITS_HISTORY;
-TRUNCATE TABLE performance_schema.EVENTS_WAITS_CURRENT;
+TRUNCATE TABLE performance_schema.events_waits_history_long;
+TRUNCATE TABLE performance_schema.events_waits_history;
+TRUNCATE TABLE performance_schema.events_waits_current;
--echo # Clean up
--disconnect pfs_user_4
@@ -356,7 +336,7 @@ TRUNCATE TABLE performance_schema.EVENTS_WAITS_CURRENT;
REVOKE ALL PRIVILEGES, GRANT OPTION FROM pfs_user_4;
DROP USER pfs_user_4;
flush privileges;
-UPDATE performance_schema.SETUP_INSTRUMENTS SET enabled = 'YES', timed = 'YES';
-UPDATE performance_schema.SETUP_CONSUMERS SET enabled = 'YES';
-UPDATE performance_schema.SETUP_TIMERS SET timer_name = 'CYCLE';
+UPDATE performance_schema.setup_instruments SET enabled = 'YES', timed = 'YES';
+UPDATE performance_schema.setup_consumers SET enabled = 'YES';
+UPDATE performance_schema.setup_timers SET timer_name = 'CYCLE';
diff --git a/mysql-test/suite/perfschema/t/query_cache.test b/mysql-test/suite/perfschema/t/query_cache.test
index a48704dc9d6..6e322434ae0 100644
--- a/mysql-test/suite/perfschema/t/query_cache.test
+++ b/mysql-test/suite/perfschema/t/query_cache.test
@@ -47,17 +47,17 @@ show status like "Qcache_queries_in_cache";
show status like "Qcache_inserts";
show status like "Qcache_hits";
-select spins from performance_schema.EVENTS_WAITS_CURRENT order by event_name limit 1;
+select spins from performance_schema.events_waits_current order by event_name limit 1;
-select name from performance_schema.SETUP_INSTRUMENTS order by name limit 1;
+select name from performance_schema.setup_instruments order by name limit 1;
show status like "Qcache_queries_in_cache";
show status like "Qcache_inserts";
show status like "Qcache_hits";
-select spins from performance_schema.EVENTS_WAITS_CURRENT order by event_name limit 1;
+select spins from performance_schema.events_waits_current order by event_name limit 1;
-select name from performance_schema.SETUP_INSTRUMENTS order by name limit 1;
+select name from performance_schema.setup_instruments order by name limit 1;
show status like "Qcache_queries_in_cache";
show status like "Qcache_inserts";
diff --git a/mysql-test/suite/perfschema/t/read_only.test b/mysql-test/suite/perfschema/t/read_only.test
index 73150207f66..98683e36327 100644
--- a/mysql-test/suite/perfschema/t/read_only.test
+++ b/mysql-test/suite/perfschema/t/read_only.test
@@ -16,8 +16,8 @@
# Tests for PERFORMANCE_SCHEMA
#
# Check that
-# - a regular user can not update SETUP_ tables under --read-only
-# - a user with SUPER privileges cam
+# - a regular user can not update setup_ tables under --read-only
+# - a user with SUPER privileges can
--source include/not_embedded.inc
--source include/have_perfschema.inc
@@ -43,9 +43,9 @@ connection con1;
select @@global.read_only;
show grants;
--disable_result_log
-select * from performance_schema.SETUP_INSTRUMENTS;
-update performance_schema.SETUP_INSTRUMENTS set enabled='NO';
-update performance_schema.SETUP_INSTRUMENTS set enabled='YES';
+select * from performance_schema.setup_instruments;
+update performance_schema.setup_instruments set enabled='NO';
+update performance_schema.setup_instruments set enabled='YES';
--enable_result_log
--echo connection default;
@@ -59,11 +59,11 @@ connection con1;
select @@global.read_only;
show grants;
--disable_result_log
-select * from performance_schema.SETUP_INSTRUMENTS;
+select * from performance_schema.setup_instruments;
--error ER_OPTION_PREVENTS_STATEMENT
-update performance_schema.SETUP_INSTRUMENTS set enabled='NO';
+update performance_schema.setup_instruments set enabled='NO';
--error ER_OPTION_PREVENTS_STATEMENT
-update performance_schema.SETUP_INSTRUMENTS set enabled='YES';
+update performance_schema.setup_instruments set enabled='YES';
--enable_result_log
--echo connection default;
@@ -79,9 +79,9 @@ connect (con1, localhost, pfsuser, , test);
select @@global.read_only;
show grants;
--disable_result_log
-select * from performance_schema.SETUP_INSTRUMENTS;
-update performance_schema.SETUP_INSTRUMENTS set enabled='NO';
-update performance_schema.SETUP_INSTRUMENTS set enabled='YES';
+select * from performance_schema.setup_instruments;
+update performance_schema.setup_instruments set enabled='NO';
+update performance_schema.setup_instruments set enabled='YES';
--enable_result_log
disconnect con1;
diff --git a/mysql-test/suite/perfschema/t/relaylog.test b/mysql-test/suite/perfschema/t/relaylog.test
new file mode 100644
index 00000000000..68ba57dd502
--- /dev/null
+++ b/mysql-test/suite/perfschema/t/relaylog.test
@@ -0,0 +1,179 @@
+# Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; version 2 of the License.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software Foundation,
+# 51 Franklin Street, Suite 500, Boston, MA 02110-1335 USA
+
+# Tests for PERFORMANCE_SCHEMA
+
+--source include/have_log_bin.inc
+--source include/not_embedded.inc
+--source include/have_perfschema.inc
+--source include/master-slave.inc
+
+--disable_warnings
+drop table if exists test.t1;
+--sync_slave_with_master
+reset master;
+--enable_warnings
+
+create table test.t1(a int);
+drop table test.t1;
+
+--source include/show_binlog_events.inc
+
+# Notes
+#
+# The point of this test is to make sure code is properly instrumented,
+# where instruments have the proper key (binlog or relaylog),
+# it is not to dive into statistics for each instruments.
+# Different test execution sequence in different platforms do make the
+# results vary, making the test results very sensitive to changes.
+# To ensure robustness:
+# - log file rotation is limited to file .000001 and .000002
+# - statistics are normalized to "NONE" or "MANY"
+#
+
+connection master;
+-- echo "============ Performance schema on master ============"
+
+select
+ substring(file_name, locate("master-", file_name)) as FILE_NAME,
+ EVENT_NAME,
+ if (count_read > 0, "MANY", "NONE") as COUNT_READ,
+ if (count_write > 0,"MANY", "NONE") as COUNT_WRITE,
+ if (sum_number_of_bytes_read > 0, "MANY", "NONE") as SUM_NUMBER_OF_BYTES_READ,
+ if (sum_number_of_bytes_write > 0, "MANY", "NONE") as SUM_NUMBER_OF_BYTES_WRITE
+ from performance_schema.file_summary_by_instance
+ where file_name like "%master-%" order by file_name;
+
+select * from performance_schema.file_summary_by_instance
+ where file_name like "%slave-%" order by file_name;
+
+-- echo "Expect a master binlog + binlog_index"
+
+select
+ substring(file_name, locate("master-", file_name)) as FILE_NAME,
+ EVENT_NAME,
+ if (count_read > 0, "MANY", "NONE") as COUNT_READ,
+ if (count_write > 0,"MANY", "NONE") as COUNT_WRITE,
+ if (sum_number_of_bytes_read > 0, "MANY", "NONE") as SUM_NUMBER_OF_BYTES_READ,
+ if (sum_number_of_bytes_write > 0, "MANY", "NONE") as SUM_NUMBER_OF_BYTES_WRITE
+ from performance_schema.file_summary_by_instance
+ where event_name like "%binlog%" order by file_name;
+
+select
+ EVENT_NAME,
+ if (count_read > 0, "MANY", "NONE") as COUNT_READ,
+ if (count_write > 0,"MANY", "NONE") as COUNT_WRITE,
+ if (sum_number_of_bytes_read > 0, "MANY", "NONE") as SUM_NUMBER_OF_BYTES_READ,
+ if (sum_number_of_bytes_write > 0, "MANY", "NONE") as SUM_NUMBER_OF_BYTES_WRITE
+ from performance_schema.file_summary_by_event_name
+ where event_name like "%binlog%" order by event_name;
+
+select
+ EVENT_NAME,
+ if (count_star > 0, "MANY", "NONE") as COUNT_STAR
+ from performance_schema.events_waits_summary_global_by_event_name
+ where event_name like "%MYSQL_BIN_LOG%" order by event_name;
+
+-- echo "Expect no slave relay log"
+
+select * from performance_schema.file_summary_by_instance
+ where event_name like "%relaylog%" order by file_name;
+
+select * from performance_schema.file_summary_by_event_name
+ where event_name like "%relaylog%" order by event_name;
+
+select * from performance_schema.events_waits_summary_global_by_event_name
+ where event_name like "%MYSQL_RELAY_LOG%" order by event_name;
+
+sync_slave_with_master;
+-- echo "============ Performance schema on slave ============"
+
+select * from performance_schema.file_summary_by_instance
+ where file_name like "%master-%" order by file_name;
+
+select
+ substring(file_name, locate("slave-", file_name)) as FILE_NAME,
+ EVENT_NAME,
+ if (count_read > 0, "MANY", "NONE") as COUNT_READ,
+ if (count_write > 0,"MANY", "NONE") as COUNT_WRITE,
+ if (sum_number_of_bytes_read > 0, "MANY", "NONE") as SUM_NUMBER_OF_BYTES_READ,
+ if (sum_number_of_bytes_write > 0, "MANY", "NONE") as SUM_NUMBER_OF_BYTES_WRITE
+ from performance_schema.file_summary_by_instance
+ where file_name like "%slave-%"
+ and (file_name not like "%slave-relay-bin.0%"
+ or file_name like "%slave-relay-bin.000001"
+ or file_name like "%slave-relay-bin.000002")
+ order by file_name;
+
+-- echo "Expect a slave binlog + binlog_index"
+
+select
+ substring(file_name, locate("slave-", file_name)) as FILE_NAME,
+ EVENT_NAME,
+ if (count_read > 0, "MANY", "NONE") as COUNT_READ,
+ if (count_write > 0,"MANY", "NONE") as COUNT_WRITE,
+ if (sum_number_of_bytes_read > 0, "MANY", "NONE") as SUM_NUMBER_OF_BYTES_READ,
+ if (sum_number_of_bytes_write > 0, "MANY", "NONE") as SUM_NUMBER_OF_BYTES_WRITE
+ from performance_schema.file_summary_by_instance
+ where event_name like "%binlog%" order by file_name;
+
+select
+ EVENT_NAME,
+ if (count_read > 0, "MANY", "NONE") as COUNT_READ,
+ if (count_write > 0,"MANY", "NONE") as COUNT_WRITE,
+ if (sum_number_of_bytes_read > 0, "MANY", "NONE") as SUM_NUMBER_OF_BYTES_READ,
+ if (sum_number_of_bytes_write > 0, "MANY", "NONE") as SUM_NUMBER_OF_BYTES_WRITE
+ from performance_schema.file_summary_by_event_name
+ where event_name like "%binlog%" order by event_name;
+
+select
+ EVENT_NAME,
+ if (count_star > 0, "MANY", "NONE") as COUNT_STAR
+ from performance_schema.events_waits_summary_global_by_event_name
+ where event_name like "%MYSQL_BIN_LOG%" order by event_name;
+
+-- echo "Expect a slave relay log"
+
+select
+ substring(file_name, locate("slave-", file_name)) as FILE_NAME,
+ EVENT_NAME,
+ if (count_read > 0, "MANY", "NONE") as COUNT_READ,
+ if (count_write > 0,"MANY", "NONE") as COUNT_WRITE,
+ if (sum_number_of_bytes_read > 0, "MANY", "NONE") as SUM_NUMBER_OF_BYTES_READ,
+ if (sum_number_of_bytes_write > 0, "MANY", "NONE") as SUM_NUMBER_OF_BYTES_WRITE
+ from performance_schema.file_summary_by_instance
+ where event_name like "%relaylog%"
+ and (file_name not like "%slave-relay-bin.0%"
+ or file_name like "%slave-relay-bin.000001"
+ or file_name like "%slave-relay-bin.000002")
+ order by file_name;
+
+select
+ EVENT_NAME,
+ if (count_read > 0, "MANY", "NONE") as COUNT_READ,
+ if (count_write > 0,"MANY", "NONE") as COUNT_WRITE,
+ if (sum_number_of_bytes_read > 0, "MANY", "NONE") as SUM_NUMBER_OF_BYTES_READ,
+ if (sum_number_of_bytes_write > 0, "MANY", "NONE") as SUM_NUMBER_OF_BYTES_WRITE
+ from performance_schema.file_summary_by_event_name
+ where event_name like "%relaylog%" order by event_name;
+
+select
+ EVENT_NAME,
+ if (count_star > 0, "MANY", "NONE") as COUNT_STAR
+ from performance_schema.events_waits_summary_global_by_event_name
+ where event_name like "%MYSQL_RELAY_LOG%" order by event_name;
+
+--source include/stop_slave.inc
+
diff --git a/mysql-test/suite/perfschema/t/schema.test b/mysql-test/suite/perfschema/t/schema.test
index 727c4f5a755..32ee4a26676 100644
--- a/mysql-test/suite/perfschema/t/schema.test
+++ b/mysql-test/suite/perfschema/t/schema.test
@@ -25,21 +25,21 @@ use performance_schema;
show tables;
-show create table COND_INSTANCES;
-show create table EVENTS_WAITS_CURRENT;
-show create table EVENTS_WAITS_HISTORY;
-show create table EVENTS_WAITS_HISTORY_LONG;
-show create table EVENTS_WAITS_SUMMARY_BY_INSTANCE;
-show create table EVENTS_WAITS_SUMMARY_BY_THREAD_BY_EVENT_NAME;
-show create table EVENTS_WAITS_SUMMARY_GLOBAL_BY_EVENT_NAME;
-show create table FILE_INSTANCES;
-show create table FILE_SUMMARY_BY_EVENT_NAME;
-show create table FILE_SUMMARY_BY_INSTANCE;
-show create table MUTEX_INSTANCES;
-show create table PERFORMANCE_TIMERS;
-show create table RWLOCK_INSTANCES;
-show create table SETUP_CONSUMERS;
-show create table SETUP_INSTRUMENTS;
-show create table SETUP_TIMERS;
-show create table THREADS;
+show create table cond_instances;
+show create table events_waits_current;
+show create table events_waits_history;
+show create table events_waits_history_long;
+show create table events_waits_summary_by_instance;
+show create table events_waits_summary_by_thread_by_event_name;
+show create table events_waits_summary_global_by_event_name;
+show create table file_instances;
+show create table file_summary_by_event_name;
+show create table file_summary_by_instance;
+show create table mutex_instances;
+show create table performance_timers;
+show create table rwlock_instances;
+show create table setup_consumers;
+show create table setup_instruments;
+show create table setup_timers;
+show create table threads;
diff --git a/mysql-test/suite/perfschema/t/selects.test b/mysql-test/suite/perfschema/t/selects.test
index b673c896024..e8fd0827c53 100644
--- a/mysql-test/suite/perfschema/t/selects.test
+++ b/mysql-test/suite/perfschema/t/selects.test
@@ -22,7 +22,7 @@
# Make some data that we can work on:
-UPDATE performance_schema.SETUP_INSTRUMENTS SET enabled = 'YES', timed = 'YES';
+UPDATE performance_schema.setup_instruments SET enabled = 'YES', timed = 'YES';
--disable_warnings
DROP TABLE IF EXISTS t1;
@@ -35,7 +35,7 @@ INSERT INTO t1 (id) VALUES (1), (2), (3), (4), (5), (6), (7), (8);
--replace_column 2 [NUM_BYTES]
SELECT OPERATION, SUM(NUMBER_OF_BYTES) AS TOTAL
-FROM performance_schema.EVENTS_WAITS_HISTORY_LONG
+FROM performance_schema.events_waits_history_long
GROUP BY OPERATION
HAVING TOTAL IS NOT NULL
ORDER BY OPERATION
@@ -43,11 +43,11 @@ LIMIT 1;
# Sub SELECT
--replace_column 1 [EVENT_ID]
-SELECT EVENT_ID FROM performance_schema.EVENTS_WAITS_CURRENT
+SELECT EVENT_ID FROM performance_schema.events_waits_current
WHERE THREAD_ID IN
- (SELECT THREAD_ID FROM performance_schema.THREADS)
+ (SELECT THREAD_ID FROM performance_schema.threads)
AND EVENT_NAME IN
- (SELECT NAME FROM performance_schema.SETUP_INSTRUMENTS
+ (SELECT NAME FROM performance_schema.setup_instruments
WHERE NAME LIKE "wait/synch/%")
LIMIT 1;
@@ -55,9 +55,9 @@ LIMIT 1;
--replace_column 1 [EVENT_ID]
SELECT DISTINCT EVENT_ID
-FROM performance_schema.EVENTS_WAITS_CURRENT
-JOIN performance_schema.EVENTS_WAITS_HISTORY USING (EVENT_ID)
-JOIN performance_schema.EVENTS_WAITS_HISTORY_LONG USING (EVENT_ID)
+FROM performance_schema.events_waits_current
+JOIN performance_schema.events_waits_history USING (EVENT_ID)
+JOIN performance_schema.events_waits_history_long USING (EVENT_ID)
ORDER BY EVENT_ID
LIMIT 1;
@@ -65,21 +65,21 @@ LIMIT 1;
--replace_column 1 [THREAD_ID] 2 [EVENT_ID] 3 [EVENT_NAME] 4 [TIMER_WAIT]
SELECT t1.THREAD_ID, t2.EVENT_ID, t3.EVENT_NAME, t4.TIMER_WAIT
-FROM performance_schema.EVENTS_WAITS_HISTORY t1
-JOIN performance_schema.EVENTS_WAITS_HISTORY t2 USING (EVENT_ID)
-JOIN performance_schema.EVENTS_WAITS_HISTORY t3 ON (t2.THREAD_ID = t3.THREAD_ID)
-JOIN performance_schema.EVENTS_WAITS_HISTORY t4 ON (t3.EVENT_NAME = t4.EVENT_NAME)
+FROM performance_schema.events_waits_history t1
+JOIN performance_schema.events_waits_history t2 USING (EVENT_ID)
+JOIN performance_schema.events_waits_history t3 ON (t2.THREAD_ID = t3.THREAD_ID)
+JOIN performance_schema.events_waits_history t4 ON (t3.EVENT_NAME = t4.EVENT_NAME)
ORDER BY t1.EVENT_ID, t2.EVENT_ID
LIMIT 5;
# UNION
--replace_column 1 [THREAD_ID] 2 [EVENT_ID]
SELECT THREAD_ID, EVENT_ID FROM (
-SELECT THREAD_ID, EVENT_ID FROM performance_schema.EVENTS_WAITS_CURRENT
+SELECT THREAD_ID, EVENT_ID FROM performance_schema.events_waits_current
UNION
-SELECT THREAD_ID, EVENT_ID FROM performance_schema.EVENTS_WAITS_HISTORY
+SELECT THREAD_ID, EVENT_ID FROM performance_schema.events_waits_history
UNION
-SELECT THREAD_ID, EVENT_ID FROM performance_schema.EVENTS_WAITS_HISTORY_LONG
+SELECT THREAD_ID, EVENT_ID FROM performance_schema.events_waits_history_long
) t1 ORDER BY THREAD_ID, EVENT_ID
LIMIT 5;
@@ -93,14 +93,14 @@ DROP TABLE IF EXISTS t_event;
DROP EVENT IF EXISTS t_ps_event;
--enable_warnings
CREATE TABLE t_event AS
-SELECT EVENT_ID FROM performance_schema.EVENTS_WAITS_CURRENT
+SELECT EVENT_ID FROM performance_schema.events_waits_current
WHERE 1 = 2;
CREATE EVENT t_ps_event
ON SCHEDULE AT CURRENT_TIMESTAMP + INTERVAL 1 SECOND
DO INSERT INTO t_event
SELECT DISTINCT EVENT_ID
- FROM performance_schema.EVENTS_WAITS_CURRENT
- JOIN performance_schema.EVENTS_WAITS_HISTORY USING (EVENT_ID)
+ FROM performance_schema.events_waits_current
+ JOIN performance_schema.events_waits_history USING (EVENT_ID)
ORDER BY EVENT_ID
LIMIT 1;
@@ -116,7 +116,7 @@ delimiter |;
CREATE TRIGGER t_ps_trigger BEFORE INSERT ON t1
FOR EACH ROW BEGIN
SET NEW.c = (SELECT MAX(EVENT_ID)
- FROM performance_schema.EVENTS_WAITS_CURRENT);
+ FROM performance_schema.events_waits_current);
END;
|
@@ -136,17 +136,17 @@ DROP PROCEDURE IF EXISTS t_ps_proc;
--enable_warnings
delimiter |;
-CREATE PROCEDURE t_ps_proc(IN tid INT, OUT pid INT)
+CREATE PROCEDURE t_ps_proc(IN conid INT, OUT pid INT)
BEGIN
- SELECT id FROM performance_schema.THREADS
- WHERE THREAD_ID = tid INTO pid;
+ SELECT thread_id FROM performance_schema.threads
+ WHERE PROCESSLIST_ID = conid INTO pid;
END;
|
delimiter ;|
-CALL t_ps_proc(0, @p_id);
+CALL t_ps_proc(connection_id(), @p_id);
# FUNCTION
@@ -155,17 +155,17 @@ DROP FUNCTION IF EXISTS t_ps_proc;
--enable_warnings
delimiter |;
-CREATE FUNCTION t_ps_func(tid INT) RETURNS int
+CREATE FUNCTION t_ps_func(conid INT) RETURNS int
BEGIN
- return (SELECT id FROM performance_schema.THREADS
- WHERE THREAD_ID = tid);
+ return (SELECT thread_id FROM performance_schema.threads
+ WHERE PROCESSLIST_ID = conid);
END;
|
delimiter ;|
-SELECT t_ps_func(0) = @p_id;
+SELECT t_ps_func(connection_id()) = @p_id;
# We might reach this point too early which means the event scheduler has not
# execute our "t_ps_event". Therefore we poll till the record was inserted
diff --git a/mysql-test/suite/perfschema/t/server_init.test b/mysql-test/suite/perfschema/t/server_init.test
index cc461374a79..95d8be0e864 100644
--- a/mysql-test/suite/perfschema/t/server_init.test
+++ b/mysql-test/suite/perfschema/t/server_init.test
@@ -28,185 +28,173 @@ use performance_schema;
# Verify that these global mutexes have been properly initilized in mysys
-select count(name) from MUTEX_INSTANCES
+select count(name) from mutex_instances
where name like "wait/synch/mutex/mysys/THR_LOCK_threads";
-select count(name) from MUTEX_INSTANCES
+select count(name) from mutex_instances
where name like "wait/synch/mutex/mysys/THR_LOCK_malloc";
-select count(name) from MUTEX_INSTANCES
+select count(name) from mutex_instances
where name like "wait/synch/mutex/mysys/THR_LOCK_open";
-select count(name) from MUTEX_INSTANCES
+select count(name) from mutex_instances
where name like "wait/synch/mutex/mysys/THR_LOCK_isam";
-select count(name) from MUTEX_INSTANCES
+select count(name) from mutex_instances
where name like "wait/synch/mutex/mysys/THR_LOCK_myisam";
-select count(name) from MUTEX_INSTANCES
+select count(name) from mutex_instances
where name like "wait/synch/mutex/mysys/THR_LOCK_heap";
-select count(name) from MUTEX_INSTANCES
+select count(name) from mutex_instances
where name like "wait/synch/mutex/mysys/THR_LOCK_net";
-select count(name) from MUTEX_INSTANCES
+select count(name) from mutex_instances
where name like "wait/synch/mutex/mysys/THR_LOCK_charset";
-select count(name) from MUTEX_INSTANCES
- where name like "wait/synch/mutex/mysys/THR_LOCK_time";
-
# There are no global rwlock in mysys
# Verify that these global conditions have been properly initilized in mysys
-select count(name) from COND_INSTANCES
+select count(name) from cond_instances
where name like "wait/synch/cond/mysys/THR_COND_threads";
# Verify that these global mutexes have been properly initilized in sql
-select count(name) from MUTEX_INSTANCES
+select count(name) from mutex_instances
where name like "wait/synch/mutex/sql/LOCK_open";
-select count(name) from MUTEX_INSTANCES
+select count(name) from mutex_instances
where name like "wait/synch/mutex/sql/LOCK_thread_count";
-select count(name) from MUTEX_INSTANCES
+select count(name) from mutex_instances
where name like "wait/synch/mutex/sql/LOCK_status";
-select count(name) from MUTEX_INSTANCES
+select count(name) from mutex_instances
where name like "wait/synch/mutex/sql/LOCK_error_log";
-select count(name) from MUTEX_INSTANCES
+select count(name) from mutex_instances
where name like "wait/synch/mutex/sql/LOCK_delayed_insert";
-select count(name) from MUTEX_INSTANCES
+select count(name) from mutex_instances
where name like "wait/synch/mutex/sql/LOCK_uuid_generator";
-select count(name) from MUTEX_INSTANCES
+select count(name) from mutex_instances
where name like "wait/synch/mutex/sql/LOCK_delayed_status";
-select count(name) from MUTEX_INSTANCES
+select count(name) from mutex_instances
where name like "wait/synch/mutex/sql/LOCK_delayed_create";
-select count(name) from MUTEX_INSTANCES
+select count(name) from mutex_instances
where name like "wait/synch/mutex/sql/LOCK_crypt";
-select count(name) from MUTEX_INSTANCES
+select count(name) from mutex_instances
where name like "wait/synch/mutex/sql/LOCK_slave_list";
-select count(name) from MUTEX_INSTANCES
+select count(name) from mutex_instances
where name like "wait/synch/mutex/sql/LOCK_active_mi";
-select count(name) from MUTEX_INSTANCES
+select count(name) from mutex_instances
where name like "wait/synch/mutex/sql/LOCK_manager";
-select count(name) from MUTEX_INSTANCES
- where name like "wait/synch/mutex/sql/LOCK_global_read_lock";
-
-select count(name) from MUTEX_INSTANCES
+select count(name) from mutex_instances
where name like "wait/synch/mutex/sql/LOCK_global_system_variables";
-select count(name) from MUTEX_INSTANCES
+select count(name) from mutex_instances
where name like "wait/synch/mutex/sql/LOCK_user_conn";
-select count(name) from MUTEX_INSTANCES
+select count(name) from mutex_instances
where name like "wait/synch/mutex/sql/LOCK_prepared_stmt_count";
-select count(name) from MUTEX_INSTANCES
+select count(name) from mutex_instances
where name like "wait/synch/mutex/sql/LOCK_connection_count";
-select count(name) from MUTEX_INSTANCES
+select count(name) from mutex_instances
where name like "wait/synch/mutex/sql/LOCK_server_started";
-select count(name) from MUTEX_INSTANCES
+select count(name) from mutex_instances
where name like "wait/synch/mutex/sql/LOCK_rpl_status";
# LOG_INFO object are created on demand, and are not global.
-# select count(name) from MUTEX_INSTANCES
+# select count(name) from mutex_instances
# where name like "wait/synch/mutex/sql/LOG_INFO::lock";
-select count(name) from MUTEX_INSTANCES
+select count(name) from mutex_instances
where name like "wait/synch/mutex/sql/Query_cache::structure_guard_mutex";
# The event scheduler may be disabled
-# select count(name) from MUTEX_INSTANCES
+# select count(name) from mutex_instances
# where name like "wait/synch/mutex/sql/Event_scheduler::LOCK_scheduler_state";
-select count(name) from MUTEX_INSTANCES
- where name like "wait/synch/mutex/sql/LOCK_event_metadata";
-
-select count(name) from MUTEX_INSTANCES
+select count(name) from mutex_instances
where name like "wait/synch/mutex/sql/LOCK_event_queue";
-select count(name) from MUTEX_INSTANCES
+select count(name) from mutex_instances
where name like "wait/synch/mutex/sql/LOCK_user_locks";
-select count(name) from MUTEX_INSTANCES
+select count(name) from mutex_instances
where name like "wait/synch/mutex/sql/Cversion_lock";
-select count(name) from MUTEX_INSTANCES
+select count(name) from mutex_instances
where name like "wait/synch/mutex/sql/LOCK_audit_mask";
-select count(name) from MUTEX_INSTANCES
+select count(name) from mutex_instances
where name like "wait/synch/mutex/sql/LOCK_xid_cache";
-select count(name) from MUTEX_INSTANCES
+select count(name) from mutex_instances
where name like "wait/synch/mutex/sql/LOCK_plugin";
# Not a global variable, may be destroyed already.
-# select count(name) from MUTEX_INSTANCES
+# select count(name) from mutex_instances
# where name like "wait/synch/mutex/sql/LOCK_gdl";
-select count(name) from MUTEX_INSTANCES
+select count(name) from mutex_instances
where name like "wait/synch/mutex/sql/tz_LOCK";
# Verify that these global rwlocks have been properly initilized in sql
-select count(name) from RWLOCK_INSTANCES
+select count(name) from rwlock_instances
where name like "wait/synch/rwlock/sql/LOCK_grant";
-select count(name) from RWLOCK_INSTANCES
+select count(name) from rwlock_instances
where name like "wait/synch/rwlock/sql/LOCK_sys_init_connect";
-select count(name) from RWLOCK_INSTANCES
+select count(name) from rwlock_instances
where name like "wait/synch/rwlock/sql/LOCK_sys_init_slave";
-select count(name) from RWLOCK_INSTANCES
+select count(name) from rwlock_instances
where name like "wait/synch/rwlock/sql/LOCK_system_variables_hash";
# Verify that these global conditions have been properly initilized in sql
-select count(name) from COND_INSTANCES
+select count(name) from cond_instances
where name like "wait/synch/cond/sql/COND_server_started";
-select count(name) from COND_INSTANCES
+select count(name) from cond_instances
where name like "wait/synch/cond/sql/COND_refresh";
-select count(name) from COND_INSTANCES
+select count(name) from cond_instances
where name like "wait/synch/cond/sql/COND_thread_count";
-select count(name) from COND_INSTANCES
+select count(name) from cond_instances
where name like "wait/synch/cond/sql/COND_manager";
-select count(name) from COND_INSTANCES
- where name like "wait/synch/cond/sql/COND_global_read_lock";
-
-select count(name) from COND_INSTANCES
+select count(name) from cond_instances
where name like "wait/synch/cond/sql/COND_thread_cache";
-select count(name) from COND_INSTANCES
+select count(name) from cond_instances
where name like "wait/synch/cond/sql/COND_flush_thread_cache";
-select count(name) from COND_INSTANCES
+select count(name) from cond_instances
where name like "wait/synch/cond/sql/COND_rpl_status";
-select count(name) from COND_INSTANCES
+select count(name) from cond_instances
where name like "wait/synch/cond/sql/Query_cache::COND_cache_status_changed";
# The event scheduler may be disabled
-# select count(name) from COND_INSTANCES
+# select count(name) from cond_instances
# where name like "wait/synch/cond/sql/Event_scheduler::COND_state";
-select count(name) from COND_INSTANCES
+select count(name) from cond_instances
where name like "wait/synch/cond/sql/COND_queue_state";
diff --git a/mysql-test/suite/perfschema/t/start_server_no_cond_class.test b/mysql-test/suite/perfschema/t/start_server_no_cond_class.test
index 34ff61c358e..da75306c2ca 100644
--- a/mysql-test/suite/perfschema/t/start_server_no_cond_class.test
+++ b/mysql-test/suite/perfschema/t/start_server_no_cond_class.test
@@ -23,7 +23,7 @@
# Expect no classes
show variables like "performance_schema_max_cond_classes";
-select count(*) from performance_schema.SETUP_INSTRUMENTS
+select count(*) from performance_schema.setup_instruments
where name like "wait/synch/cond/%";
# We lost all the classes
@@ -31,7 +31,7 @@ select variable_value > 0 from information_schema.global_status
where variable_name like 'PERFORMANCE_SCHEMA_COND_CLASSES_LOST';
# Expect no instances
-select count(*) from performance_schema.COND_INSTANCES;
+select count(*) from performance_schema.cond_instances;
# Expect no instances lost
show status like "performance_schema_cond_instances_lost";
diff --git a/mysql-test/suite/perfschema/t/start_server_no_cond_inst.test b/mysql-test/suite/perfschema/t/start_server_no_cond_inst.test
index fe2177adb82..eb77d76b70e 100644
--- a/mysql-test/suite/perfschema/t/start_server_no_cond_inst.test
+++ b/mysql-test/suite/perfschema/t/start_server_no_cond_inst.test
@@ -23,7 +23,7 @@
# Expect classes
show variables like "performance_schema_max_cond_classes";
-select count(*) > 0 from performance_schema.SETUP_INSTRUMENTS
+select count(*) > 0 from performance_schema.setup_instruments
where name like "wait/synch/cond/%";
# Expect no class lost
@@ -32,7 +32,7 @@ show status like "performance_schema_cond_classes_lost";
# Expect no instances
show variables like "performance_schema_max_cond_instances";
-select count(*) from performance_schema.COND_INSTANCES;
+select count(*) from performance_schema.cond_instances;
# Expect instances lost
select variable_value > 0 from information_schema.global_status
diff --git a/mysql-test/suite/perfschema/t/start_server_no_file_class.test b/mysql-test/suite/perfschema/t/start_server_no_file_class.test
index ca84fbbdcf2..03180dae01e 100644
--- a/mysql-test/suite/perfschema/t/start_server_no_file_class.test
+++ b/mysql-test/suite/perfschema/t/start_server_no_file_class.test
@@ -23,7 +23,7 @@
# Expect no classes
show variables like "performance_schema_max_file_classes";
-select count(*) from performance_schema.SETUP_INSTRUMENTS
+select count(*) from performance_schema.setup_instruments
where name like "wait/io/file/%";
# We lost all the classes
@@ -31,7 +31,7 @@ select variable_value > 0 from information_schema.global_status
where variable_name like 'PERFORMANCE_SCHEMA_FILE_CLASSES_LOST';
# Expect no instances
-select count(*) from performance_schema.FILE_INSTANCES;
+select count(*) from performance_schema.file_instances;
# Expect no instances lost
show status like "performance_schema_file_instances_lost";
diff --git a/mysql-test/suite/perfschema/t/start_server_no_file_inst.test b/mysql-test/suite/perfschema/t/start_server_no_file_inst.test
index dbbba7bbe4a..faa5e97a853 100644
--- a/mysql-test/suite/perfschema/t/start_server_no_file_inst.test
+++ b/mysql-test/suite/perfschema/t/start_server_no_file_inst.test
@@ -23,7 +23,7 @@
# Expect classes
show variables like "performance_schema_max_file_classes";
-select count(*) > 0 from performance_schema.SETUP_INSTRUMENTS
+select count(*) > 0 from performance_schema.setup_instruments
where name like "wait/io/file/%";
# Expect no class lost
@@ -32,7 +32,7 @@ show status like "performance_schema_file_classes_lost";
# Expect no instances
show variables like "performance_schema_max_file_instances";
-select count(*) from performance_schema.FILE_INSTANCES;
+select count(*) from performance_schema.file_instances;
# Expect instances lost
select variable_value > 0 from information_schema.global_status
diff --git a/mysql-test/suite/perfschema/t/start_server_no_mutex_class.test b/mysql-test/suite/perfschema/t/start_server_no_mutex_class.test
index 142e150ede6..79bf3d52bc5 100644
--- a/mysql-test/suite/perfschema/t/start_server_no_mutex_class.test
+++ b/mysql-test/suite/perfschema/t/start_server_no_mutex_class.test
@@ -23,7 +23,7 @@
# Expect no classes
show variables like "performance_schema_max_mutex_classes";
-select count(*) from performance_schema.SETUP_INSTRUMENTS
+select count(*) from performance_schema.setup_instruments
where name like "wait/synch/mutex/%";
# We lost all the classes
@@ -31,7 +31,7 @@ select variable_value > 0 from information_schema.global_status
where variable_name like 'PERFORMANCE_SCHEMA_MUTEX_CLASSES_LOST';
# Expect no instances
-select count(*) from performance_schema.MUTEX_INSTANCES;
+select count(*) from performance_schema.mutex_instances;
# Expect no instances lost
show status like "performance_schema_mutex_instances_lost";
diff --git a/mysql-test/suite/perfschema/t/start_server_no_mutex_inst.test b/mysql-test/suite/perfschema/t/start_server_no_mutex_inst.test
index 5a03251d97a..32c0a02b642 100644
--- a/mysql-test/suite/perfschema/t/start_server_no_mutex_inst.test
+++ b/mysql-test/suite/perfschema/t/start_server_no_mutex_inst.test
@@ -23,7 +23,7 @@
# Expect classes
show variables like "performance_schema_max_mutex_classes";
-select count(*) > 0 from performance_schema.SETUP_INSTRUMENTS
+select count(*) > 0 from performance_schema.setup_instruments
where name like "wait/synch/mutex/%";
# Expect no class lost
@@ -32,7 +32,7 @@ show status like "performance_schema_mutex_classes_lost";
# Expect no instances
show variables like "performance_schema_max_mutex_instances";
-select count(*) from performance_schema.MUTEX_INSTANCES;
+select count(*) from performance_schema.mutex_instances;
# Expect instances lost
select variable_value > 0 from information_schema.global_status
diff --git a/mysql-test/suite/perfschema/t/start_server_no_rwlock_class.test b/mysql-test/suite/perfschema/t/start_server_no_rwlock_class.test
index e4dfe121fcf..10780b59fbe 100644
--- a/mysql-test/suite/perfschema/t/start_server_no_rwlock_class.test
+++ b/mysql-test/suite/perfschema/t/start_server_no_rwlock_class.test
@@ -23,7 +23,7 @@
# Expect no classes
show variables like "performance_schema_max_rwlock_classes";
-select count(*) from performance_schema.SETUP_INSTRUMENTS
+select count(*) from performance_schema.setup_instruments
where name like "wait/synch/rwlock/%";
# We lost all the classes
@@ -31,7 +31,7 @@ select variable_value > 0 from information_schema.global_status
where variable_name like 'PERFORMANCE_SCHEMA_RWLOCK_CLASSES_LOST';
# Expect no instances
-select count(*) from performance_schema.RWLOCK_INSTANCES;
+select count(*) from performance_schema.rwlock_instances;
# Expect no instances lost
show status like "performance_schema_rwlock_instances_lost";
diff --git a/mysql-test/suite/perfschema/t/start_server_no_rwlock_inst.test b/mysql-test/suite/perfschema/t/start_server_no_rwlock_inst.test
index 1d79d2d3991..2ba2ebcdd4b 100644
--- a/mysql-test/suite/perfschema/t/start_server_no_rwlock_inst.test
+++ b/mysql-test/suite/perfschema/t/start_server_no_rwlock_inst.test
@@ -23,7 +23,7 @@
# Expect classes
show variables like "performance_schema_max_rwlock_classes";
-select count(*) > 0 from performance_schema.SETUP_INSTRUMENTS
+select count(*) > 0 from performance_schema.setup_instruments
where name like "wait/synch/rwlock/%";
# Expect no class lost
@@ -32,7 +32,7 @@ show status like "performance_schema_rwlock_classes_lost";
# Expect no instances
show variables like "performance_schema_max_rwlock_instances";
-select count(*) from performance_schema.RWLOCK_INSTANCES;
+select count(*) from performance_schema.rwlock_instances;
# Expect instances lost
select variable_value > 0 from information_schema.global_status
diff --git a/mysql-test/suite/perfschema/t/start_server_no_thread_class.test b/mysql-test/suite/perfschema/t/start_server_no_thread_class.test
index 1ed0fecb538..df825ede637 100644
--- a/mysql-test/suite/perfschema/t/start_server_no_thread_class.test
+++ b/mysql-test/suite/perfschema/t/start_server_no_thread_class.test
@@ -23,7 +23,7 @@
# Expect no classes
show variables like "performance_schema_max_thread_classes";
-select count(*) from performance_schema.SETUP_INSTRUMENTS
+select count(*) from performance_schema.setup_instruments
where name like "thread/%";
# We lost all the classes
@@ -31,7 +31,7 @@ select variable_value > 0 from information_schema.global_status
where variable_name like 'PERFORMANCE_SCHEMA_THREAD_CLASSES_LOST';
# Expect no instances
-select count(*) from performance_schema.THREADS;
+select count(*) from performance_schema.threads;
# Expect no instances lost
show status like "performance_schema_thread_instances_lost";
diff --git a/mysql-test/suite/perfschema/t/start_server_no_thread_inst.test b/mysql-test/suite/perfschema/t/start_server_no_thread_inst.test
index 489f814ba10..150886d01f9 100644
--- a/mysql-test/suite/perfschema/t/start_server_no_thread_inst.test
+++ b/mysql-test/suite/perfschema/t/start_server_no_thread_inst.test
@@ -24,7 +24,7 @@
show variables like "performance_schema_max_thread_classes";
# Not observable yet
-# select count(*) > 0 from performance_schema.SETUP_INSTRUMENTS
+# select count(*) > 0 from performance_schema.setup_instruments
# where name like "thread/%";
# Expect no class lost
@@ -33,7 +33,7 @@ show status like "performance_schema_thread_classes_lost";
# Expect no instances
show variables like "performance_schema_max_thread_instances";
-select count(*) from performance_schema.THREADS;
+select count(*) from performance_schema.threads;
# Expect instances lost
select variable_value > 0 from information_schema.global_status
diff --git a/mysql-test/suite/perfschema/t/tampered_perfschema_table1.test b/mysql-test/suite/perfschema/t/tampered_perfschema_table1.test
index be079bacfbf..741b41ec46b 100644
--- a/mysql-test/suite/perfschema/t/tampered_perfschema_table1.test
+++ b/mysql-test/suite/perfschema/t/tampered_perfschema_table1.test
@@ -27,18 +27,18 @@
--source include/not_embedded.inc
--source include/have_perfschema.inc
-# The message prints 'mysql.SETUP_INSTRUMENTS'
-# instead of 'performance_schema.SETUP_INSTRUMENTS',
+# The message prints 'mysql.setup_instruments'
+# instead of 'performance_schema.setup_instruments',
# due to Bug#46792
call mtr.add_suppression(
-"Column count of mysql.SETUP_INSTRUMENTS is wrong. "
+"Column count of mysql.setup_instruments is wrong. "
"Expected 4, found 3. The table is probably corrupted");
--error ER_WRONG_NATIVE_TABLE_STRUCTURE
-select * from performance_schema.SETUP_INSTRUMENTS limit 1;
+select * from performance_schema.setup_instruments limit 1;
--disable_result_log
-select * from performance_schema.SETUP_CONSUMERS limit 1;
+select * from performance_schema.setup_consumers limit 1;
--enable_result_log
diff --git a/mysql-test/suite/perfschema/t/thread_cache.test b/mysql-test/suite/perfschema/t/thread_cache.test
index 5560f66babb..e839552ed19 100644
--- a/mysql-test/suite/perfschema/t/thread_cache.test
+++ b/mysql-test/suite/perfschema/t/thread_cache.test
@@ -20,6 +20,8 @@
# Setup
+flush status;
+
SET @saved_thread_cache_size = @@global.thread_cache_size;
set global thread_cache_size = 0;
@@ -30,17 +32,17 @@ connect (con1, localhost, root, , );
let $con1_ID=`select connection_id()`;
-let $con1_THREAD_ID=`select thread_id from performance_schema.THREADS
- where ID = connection_id()`;
+let $con1_THREAD_ID=`select thread_id from performance_schema.threads
+ where PROCESSLIST_ID = connection_id()`;
connect (con2, localhost, root, , );
let $con2_ID=`select connection_id()`;
-let $con2_THREAD_ID=`select thread_id from performance_schema.THREADS
- where ID = connection_id()`;
+let $con2_THREAD_ID=`select thread_id from performance_schema.threads
+ where PROCESSLIST_ID = connection_id()`;
-connection default;
+--connection default
--disable_query_log
eval select ($con2_ID - $con1_ID) into @id_increment;
@@ -52,19 +54,33 @@ select @id_increment;
# Expect 1, THREAD_ID is incremented for each new connection
select @thread_id_increment;
-disconnect con2;
+--disconnect con2
+
+--connection default
+
+# Wait for the disconnect con2 to complete
+let $wait_condition=
+ select count(*) = 2 from performance_schema.threads
+ where name like "thread/sql/one_connection";
+--source include/wait_condition.inc
connect (con3, localhost, root, , );
let $con3_ID=`select connection_id()`;
-let $con3_THREAD_ID=`select thread_id from performance_schema.THREADS
- where ID = connection_id()`;
+let $con3_THREAD_ID=`select thread_id from performance_schema.threads
+ where PROCESSLIST_ID = connection_id()`;
+
+--disconnect con3
+--disconnect con1
-disconnect con3;
-disconnect con1;
+--connection default
-connection default;
+# Wait for the disconnect con1 and con3 to complete
+let $wait_condition=
+ select count(*) = 1 from performance_schema.threads
+ where name like "thread/sql/one_connection";
+--source include/wait_condition.inc
--disable_query_log
eval select ($con3_ID - $con2_ID) into @id_increment;
@@ -82,17 +98,17 @@ connect (con1, localhost, root, , );
let $con1_ID=`select connection_id()`;
-let $con1_THREAD_ID=`select thread_id from performance_schema.THREADS
- where ID = connection_id()`;
+let $con1_THREAD_ID=`select thread_id from performance_schema.threads
+ where PROCESSLIST_ID = connection_id()`;
connect (con2, localhost, root, , );
let $con2_ID=`select connection_id()`;
-let $con2_THREAD_ID=`select thread_id from performance_schema.THREADS
- where ID = connection_id()`;
+let $con2_THREAD_ID=`select thread_id from performance_schema.threads
+ where PROCESSLIST_ID = connection_id()`;
-connection default;
+--connection default
--disable_query_log
eval select ($con2_ID - $con1_ID) into @id_increment;
@@ -102,19 +118,33 @@ eval select ($con2_THREAD_ID - $con1_THREAD_ID) into @thread_id_increment;
select @id_increment;
select @thread_id_increment;
-disconnect con2;
+--disconnect con2
+
+--connection default
+
+# Wait for the disconnect con2 to complete
+let $wait_condition=
+ select count(*) = 2 from performance_schema.threads
+ where name like "thread/sql/one_connection";
+--source include/wait_condition.inc
connect (con3, localhost, root, , );
let $con3_ID=`select connection_id()`;
-let $con3_THREAD_ID=`select thread_id from performance_schema.THREADS
- where ID = connection_id()`;
+let $con3_THREAD_ID=`select thread_id from performance_schema.threads
+ where PROCESSLIST_ID = connection_id()`;
-disconnect con3;
-disconnect con1;
+--disconnect con3
+--disconnect con1
-connection default;
+--connection default
+
+# Wait for the disconnect con1 and con3 to complete
+let $wait_condition=
+ select count(*) = 1 from performance_schema.threads
+ where name like "thread/sql/one_connection";
+--source include/wait_condition.inc
--disable_query_log
eval select ($con3_ID - $con2_ID) into @id_increment;
@@ -132,3 +162,5 @@ select @thread_id_increment;
set global thread_cache_size = @saved_thread_cache_size;
+show status like "performance_schema_thread%";
+