mirror of
https://github.com/MariaDB/server.git
synced 2025-11-28 17:36:30 +03:00
MDEV-7399: Add support for INFORMATION_SCHEMA.INNODB_MUTEXES
MDEV-7618: Improve semaphore instrumentation
Introduced two new information schema tables to monitor mutex waits
and semaphore waits. Added a new configuration variable
innodb_intrument_semaphores to add thread_id, file name and
line of current holder of mutex/rw_lock.
27 lines
882 B
Plaintext
27 lines
882 B
Plaintext
# Establish connection con1 (user=root)
|
|
# Establish connection con2 (user=root)
|
|
drop table if exists t1;
|
|
# Switch to connection con1
|
|
create table t1 (id integer, x integer) engine = InnoDB;
|
|
insert into t1 values(0, 0);
|
|
set DEBUG_DBUG='+d,fatal-semaphore-timeout';
|
|
set autocommit=0;
|
|
# Sending query on con1,
|
|
# the session will hold lock table mutex and sleep
|
|
SELECT * from t1 where id = 0 FOR UPDATE;
|
|
# Switch to connection con2
|
|
set autocommit=0;
|
|
# Sending query on con2,
|
|
# the session will be blocked on the lock table mutex and
|
|
# thus be put into sync arry
|
|
SELECT * from t1 where id = 0 FOR UPDATE;
|
|
# Switched to the default connection
|
|
# Waitting for mysqld to crash
|
|
# Mysqld crash was detected
|
|
# Waitting for reconnect after mysqld restarts
|
|
# Reconnected after mysqld was successfully restarted
|
|
# Cleaning up before exit
|
|
set DEBUG_DBUG=NULL;
|
|
drop table if exists t1;
|
|
# Clean exit
|