Commit e28d9c15 authored by Marko Mäkelä's avatar Marko Mäkelä

MDEV-24167 fixup: Improve perfschema.sxlock_func test

parent cde525f9
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/sxlock/%'; WHERE name like 'wait/synch/sxlock/%';
SELECT DISTINCT name FROM performance_schema.setup_instruments
WHERE name LIKE 'wait/synch/rwlock/innodb%'
AND name!='wait/synch/rwlock/innodb/btr_search_latch' ORDER BY name;
name
wait/synch/rwlock/innodb/dict_operation_lock
wait/synch/rwlock/innodb/fil_space_latch
wait/synch/rwlock/innodb/trx_i_s_cache_lock
wait/synch/rwlock/innodb/trx_purge_latch
TRUNCATE TABLE performance_schema.events_waits_history_long; TRUNCATE TABLE performance_schema.events_waits_history_long;
TRUNCATE TABLE performance_schema.events_waits_history; TRUNCATE TABLE performance_schema.events_waits_history;
TRUNCATE TABLE performance_schema.events_waits_current; TRUNCATE TABLE performance_schema.events_waits_current;
...@@ -8,18 +16,11 @@ select name from performance_schema.setup_instruments ...@@ -8,18 +16,11 @@ select name from performance_schema.setup_instruments
where name like "wait/synch/sxlock/%" order by name; where name like "wait/synch/sxlock/%" order by name;
name name
wait/synch/sxlock/innodb/index_tree_rw_lock wait/synch/sxlock/innodb/index_tree_rw_lock
select name from performance_schema.rwlock_instances SELECT DISTINCT name FROM performance_schema.rwlock_instances
where name in WHERE name LIKE 'wait/synch/sxlock/innodb/%'
( ORDER BY name;
'wait/synch/sxlock/innodb/btr_search_latch',
'wait/synch/sxlock/innodb/checkpoint_lock',
'wait/synch/sxlock/innodb/dict_operation_lock',
'wait/synch/sxlock/innodb/trx_i_s_cache_lock',
'wait/synch/sxlock/innodb/trx_purge_latch'
)
order by name;
name name
drop table if exists t1; wait/synch/sxlock/innodb/index_tree_rw_lock
create table t1(a int) engine=innodb; create table t1(a int) engine=innodb;
begin; begin;
insert into t1 values (1), (2), (3); insert into t1 values (1), (2), (3);
......
...@@ -11,6 +11,10 @@ UPDATE performance_schema.setup_instruments SET enabled = 'NO', timed = 'YES'; ...@@ -11,6 +11,10 @@ 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/sxlock/%'; WHERE name like 'wait/synch/sxlock/%';
SELECT DISTINCT name FROM performance_schema.setup_instruments
WHERE name LIKE 'wait/synch/rwlock/innodb%'
AND name!='wait/synch/rwlock/innodb/btr_search_latch' ORDER BY name;
TRUNCATE TABLE performance_schema.events_waits_history_long; TRUNCATE TABLE performance_schema.events_waits_history_long;
TRUNCATE TABLE performance_schema.events_waits_history; TRUNCATE TABLE performance_schema.events_waits_history;
TRUNCATE TABLE performance_schema.events_waits_current; TRUNCATE TABLE performance_schema.events_waits_current;
...@@ -20,23 +24,12 @@ select name from performance_schema.setup_instruments ...@@ -20,23 +24,12 @@ select name from performance_schema.setup_instruments
where name like "wait/synch/sxlock/%" order by name; where name like "wait/synch/sxlock/%" order by name;
# Check some SX-locks instances are instrumented # Check some SX-locks instances are instrumented
select name from performance_schema.rwlock_instances SELECT DISTINCT name FROM performance_schema.rwlock_instances
where name in WHERE name LIKE 'wait/synch/sxlock/innodb/%'
( ORDER BY name;
'wait/synch/sxlock/innodb/btr_search_latch',
'wait/synch/sxlock/innodb/checkpoint_lock',
'wait/synch/sxlock/innodb/dict_operation_lock',
'wait/synch/sxlock/innodb/trx_i_s_cache_lock',
'wait/synch/sxlock/innodb/trx_purge_latch'
)
order by name;
# Some Innodb payload, to produce data # Some Innodb payload, to produce data
--disable_warnings
drop table if exists t1;
--enable_warnings
create table t1(a int) engine=innodb; create table t1(a int) engine=innodb;
begin; begin;
insert into t1 values (1), (2), (3); insert into t1 values (1), (2), (3);
......
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