Commit e5f925b0 authored by Marc Alff's avatar Marc Alff

Bug#14100113 - PERFSCHEMA.FUNC_MUTEX FAILS WITH RESULT CONTENT MISMATCH OCCASIONALLY ON PB2

Improved the robustness of the func_mutex test.
parent b1436762
...@@ -2,6 +2,15 @@ UPDATE performance_schema.setup_instruments SET enabled = 'NO', timed = 'YES'; ...@@ -2,6 +2,15 @@ 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/%' WHERE name LIKE 'wait/synch/mutex/%'
OR name LIKE 'wait/synch/rwlock/%'; OR name LIKE 'wait/synch/rwlock/%';
flush status;
select NAME from performance_schema.mutex_instances
where NAME = 'wait/synch/mutex/sql/LOCK_open';
NAME
wait/synch/mutex/sql/LOCK_open
select NAME from performance_schema.rwlock_instances
where NAME = 'wait/synch/rwlock/sql/LOCK_grant';
NAME
wait/synch/rwlock/sql/LOCK_grant
DROP TABLE IF EXISTS t1; DROP TABLE IF EXISTS t1;
CREATE TABLE t1 (id INT PRIMARY KEY, b CHAR(100) DEFAULT 'initial value') CREATE TABLE t1 (id INT PRIMARY KEY, b CHAR(100) DEFAULT 'initial value')
ENGINE=MyISAM; ENGINE=MyISAM;
...@@ -112,3 +121,19 @@ test_fm2_rw_timed ...@@ -112,3 +121,19 @@ test_fm2_rw_timed
Success Success
UPDATE performance_schema.setup_instruments SET enabled = 'YES'; UPDATE performance_schema.setup_instruments SET enabled = 'YES';
DROP TABLE t1; DROP TABLE t1;
show status like "performance_schema%";
Variable_name Value
Performance_schema_cond_classes_lost 0
Performance_schema_cond_instances_lost 0
Performance_schema_file_classes_lost 0
Performance_schema_file_handles_lost 0
Performance_schema_file_instances_lost 0
Performance_schema_locker_lost 0
Performance_schema_mutex_classes_lost 0
Performance_schema_mutex_instances_lost 0
Performance_schema_rwlock_classes_lost 0
Performance_schema_rwlock_instances_lost 0
Performance_schema_table_handles_lost 0
Performance_schema_table_instances_lost 0
Performance_schema_thread_classes_lost 0
Performance_schema_thread_instances_lost 0
...@@ -13,6 +13,15 @@ UPDATE performance_schema.setup_instruments SET enabled = 'YES' ...@@ -13,6 +13,15 @@ UPDATE performance_schema.setup_instruments SET enabled = 'YES'
WHERE name LIKE 'wait/synch/mutex/%' WHERE name LIKE 'wait/synch/mutex/%'
OR name LIKE 'wait/synch/rwlock/%'; OR name LIKE 'wait/synch/rwlock/%';
# reset lost counters
flush status;
# Make sure objects are instrumented
select NAME from performance_schema.mutex_instances
where NAME = 'wait/synch/mutex/sql/LOCK_open';
select NAME from performance_schema.rwlock_instances
where NAME = 'wait/synch/rwlock/sql/LOCK_grant';
--disable_warnings --disable_warnings
DROP TABLE IF EXISTS t1; DROP TABLE IF EXISTS t1;
--enable_warnings --enable_warnings
...@@ -116,3 +125,7 @@ SELECT IF((COALESCE(@after_count, 0) - COALESCE(@before_count, 0)) = 0, 'Success ...@@ -116,3 +125,7 @@ SELECT IF((COALESCE(@after_count, 0) - COALESCE(@before_count, 0)) = 0, 'Success
# Clean-up. # Clean-up.
UPDATE performance_schema.setup_instruments SET enabled = 'YES'; UPDATE performance_schema.setup_instruments SET enabled = 'YES';
DROP TABLE t1; DROP TABLE t1;
# In case of failure, will indicate the root cause
show status like "performance_schema%";
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment