summaryrefslogtreecommitdiffstats
path: root/mysql-test/suite/perfschema/r/func_mutex.result
diff options
context:
space:
mode:
Diffstat (limited to 'mysql-test/suite/perfschema/r/func_mutex.result')
-rw-r--r--mysql-test/suite/perfschema/r/func_mutex.result139
1 files changed, 139 insertions, 0 deletions
diff --git a/mysql-test/suite/perfschema/r/func_mutex.result b/mysql-test/suite/perfschema/r/func_mutex.result
new file mode 100644
index 00000000..b5c5e33f
--- /dev/null
+++ b/mysql-test/suite/perfschema/r/func_mutex.result
@@ -0,0 +1,139 @@
+UPDATE performance_schema.setup_instruments SET enabled = 'NO', timed = 'YES';
+UPDATE performance_schema.setup_instruments SET enabled = 'YES'
+WHERE name LIKE 'wait/synch/mutex/%'
+ OR name LIKE 'wait/synch/rwlock/%';
+truncate table performance_schema.events_statements_summary_by_digest;
+flush status;
+select NAME from performance_schema.mutex_instances
+where NAME = 'wait/synch/mutex/mysys/THR_LOCK::mutex' GROUP BY NAME;
+NAME
+wait/synch/mutex/mysys/THR_LOCK::mutex
+select NAME from performance_schema.rwlock_instances
+where NAME = 'wait/synch/rwlock/sql/LOCK_grant' limit 1;
+NAME
+wait/synch/rwlock/sql/LOCK_grant
+DROP TABLE IF EXISTS t1;
+CREATE TABLE t1 (id INT PRIMARY KEY, b CHAR(100) DEFAULT 'initial value')
+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;
+SELECT * FROM t1 WHERE id = 1;
+id b
+1 initial value
+SET @before_count = (SELECT SUM(TIMER_WAIT)
+FROM performance_schema.events_waits_history_long
+WHERE (EVENT_NAME = 'wait/synch/mutex/mysys/THR_LOCK::mutex'));
+SELECT * FROM t1;
+id b
+1 initial value
+2 initial value
+3 initial value
+4 initial value
+5 initial value
+6 initial value
+7 initial value
+8 initial value
+SET @after_count = (SELECT SUM(TIMER_WAIT)
+FROM performance_schema.events_waits_history_long
+WHERE (EVENT_NAME = 'wait/synch/mutex/mysys/THR_LOCK::mutex'));
+SELECT IF((@after_count - @before_count) > 0, 'Success', 'Failure') test_fm1_timed;
+test_fm1_timed
+Success
+UPDATE performance_schema.setup_instruments SET enabled = 'NO'
+WHERE NAME = 'wait/synch/mutex/mysys/THR_LOCK::mutex';
+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;
+id b
+1 initial value
+SET @before_count = (SELECT SUM(TIMER_WAIT)
+FROM performance_schema.events_waits_history_long
+WHERE (EVENT_NAME = 'wait/synch/mutex/mysys/THR_LOCK::mutex'));
+SELECT * FROM t1;
+id b
+1 initial value
+2 initial value
+3 initial value
+4 initial value
+5 initial value
+6 initial value
+7 initial value
+8 initial value
+SET @after_count = (SELECT SUM(TIMER_WAIT)
+FROM performance_schema.events_waits_history_long
+WHERE (EVENT_NAME = 'wait/synch/mutex/mysys/THR_LOCK::mutex'));
+SELECT IF((COALESCE(@after_count, 0) - COALESCE(@before_count, 0)) = 0, 'Success', 'Failure') test_fm2_timed;
+test_fm2_timed
+Success
+TRUNCATE TABLE performance_schema.events_waits_history_long;
+TRUNCATE TABLE performance_schema.events_waits_history;
+TRUNCATE TABLE performance_schema.events_waits_current;
+show variables like "%not_found%";
+Variable_name Value
+SET @before_count = (SELECT SUM(TIMER_WAIT)
+FROM performance_schema.events_waits_history_long
+WHERE (EVENT_NAME = 'wait/synch/rwlock/sql/LOCK_system_variables_hash'));
+show variables like "%not_found%";
+Variable_name Value
+SET @after_count = (SELECT SUM(TIMER_WAIT)
+FROM performance_schema.events_waits_history_long
+WHERE (EVENT_NAME = 'wait/synch/rwlock/sql/LOCK_system_variables_hash'));
+SELECT IF((@after_count - @before_count) > 0, 'Success', 'Failure') test_fm1_rw_timed;
+test_fm1_rw_timed
+Success
+UPDATE performance_schema.setup_instruments SET enabled = 'NO'
+WHERE NAME = 'wait/synch/rwlock/sql/LOCK_system_variables_hash';
+TRUNCATE TABLE performance_schema.events_waits_history_long;
+TRUNCATE TABLE performance_schema.events_waits_history;
+TRUNCATE TABLE performance_schema.events_waits_current;
+show variables like "%not_found%";
+Variable_name Value
+SET @before_count = (SELECT SUM(TIMER_WAIT)
+FROM performance_schema.events_waits_history_long
+WHERE (EVENT_NAME = 'wait/synch/rwlock/sql/LOCK_system_variables_hash'));
+show variables like "%not_found%";
+Variable_name Value
+SET @after_count = (SELECT SUM(TIMER_WAIT)
+FROM performance_schema.events_waits_history_long
+WHERE (EVENT_NAME = 'LOCK_system_variables_hash'));
+SELECT IF((COALESCE(@after_count, 0) - COALESCE(@before_count, 0)) = 0, 'Success', 'Failure') test_fm2_rw_timed;
+test_fm2_rw_timed
+Success
+UPDATE performance_schema.setup_instruments SET enabled = 'YES';
+DROP TABLE t1;
+UPDATE performance_schema.setup_instruments SET enabled = 'YES', timed = 'YES';
+show global status like "performance_schema%";
+Variable_name Value
+Performance_schema_accounts_lost 0
+Performance_schema_cond_classes_lost 0
+Performance_schema_cond_instances_lost 0
+Performance_schema_digest_lost 0
+Performance_schema_file_classes_lost 0
+Performance_schema_file_handles_lost 0
+Performance_schema_file_instances_lost 0
+Performance_schema_hosts_lost 0
+Performance_schema_index_stat_lost 0
+Performance_schema_locker_lost 0
+Performance_schema_memory_classes_lost 0
+Performance_schema_metadata_lock_lost 0
+Performance_schema_mutex_classes_lost 0
+Performance_schema_mutex_instances_lost 0
+Performance_schema_nested_statement_lost 0
+Performance_schema_prepared_statements_lost 0
+Performance_schema_program_lost 0
+Performance_schema_rwlock_classes_lost 0
+Performance_schema_rwlock_instances_lost 0
+Performance_schema_session_connect_attrs_lost 0
+Performance_schema_socket_classes_lost 0
+Performance_schema_socket_instances_lost 0
+Performance_schema_stage_classes_lost 0
+Performance_schema_statement_classes_lost 0
+Performance_schema_table_handles_lost 0
+Performance_schema_table_instances_lost 0
+Performance_schema_table_lock_stat_lost 0
+Performance_schema_thread_classes_lost 0
+Performance_schema_thread_instances_lost 0
+Performance_schema_users_lost 0