From 4e1678daca86af018fb4921a15e87ec28dbaacd1 Mon Sep 17 00:00:00 2001 From: Marc Alff Date: Wed, 3 Nov 2010 16:42:33 +0100 Subject: Bug#57609 performance_schema does not work with lower_case_table_names Before this fix, the performance schema tables were defined in UPPERCASE. This was incompatible with the lowercase_table_names option, and caused issues with the install / upgrade process, when changing the lower case table names setting *after* the install or upgrade. With this fix, all performance schema tables are exposed with lowercase names. As a result, the name of the performance schema table is always lowercase, no matter how / if / when the lowercase_table_names setting if changed. --- mysql-test/suite/perfschema/t/func_mutex.test | 48 +++++++++++++-------------- 1 file changed, 24 insertions(+), 24 deletions(-) (limited to 'mysql-test/suite/perfschema/t/func_mutex.test') diff --git a/mysql-test/suite/perfschema/t/func_mutex.test b/mysql-test/suite/perfschema/t/func_mutex.test index 98cb905c67c..31d81e4b004 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,41 +89,41 @@ 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; -- cgit v1.2.1