mirror of
https://github.com/MariaDB/server.git
synced 2025-08-30 11:22:14 +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.
46 lines
1.4 KiB
Plaintext
46 lines
1.4 KiB
Plaintext
#
|
|
# innodb_instrument_semaphores
|
|
#
|
|
# save the initial value
|
|
SET @innodb_instrument_semaphores_global_saved = @@global.innodb_instrument_semaphores;
|
|
# default
|
|
SELECT @@global.innodb_instrument_semaphores;
|
|
@@global.innodb_instrument_semaphores
|
|
0
|
|
|
|
# scope
|
|
SELECT @@session.innodb_instrument_semaphores;
|
|
ERROR HY000: Variable 'innodb_instrument_semaphores' is a GLOBAL variable
|
|
SET @@global.innodb_instrument_semaphores=OFF;
|
|
SELECT @@global.innodb_instrument_semaphores;
|
|
@@global.innodb_instrument_semaphores
|
|
0
|
|
SET @@global.innodb_instrument_semaphores=ON;
|
|
SELECT @@global.innodb_instrument_semaphores;
|
|
@@global.innodb_instrument_semaphores
|
|
1
|
|
|
|
# valid values
|
|
SET @@global.innodb_instrument_semaphores='OFF';
|
|
SELECT @@global.innodb_instrument_semaphores;
|
|
@@global.innodb_instrument_semaphores
|
|
0
|
|
SET @@global.innodb_instrument_semaphores=ON;
|
|
SELECT @@global.innodb_instrument_semaphores;
|
|
@@global.innodb_instrument_semaphores
|
|
1
|
|
SET @@global.innodb_instrument_semaphores=default;
|
|
SELECT @@global.innodb_instrument_semaphores;
|
|
@@global.innodb_instrument_semaphores
|
|
0
|
|
|
|
# invalid values
|
|
SET @@global.innodb_instrument_semaphores=NULL;
|
|
ERROR 42000: Variable 'innodb_instrument_semaphores' can't be set to the value of 'NULL'
|
|
SET @@global.innodb_instrument_semaphores='junk';
|
|
ERROR 42000: Variable 'innodb_instrument_semaphores' can't be set to the value of 'junk'
|
|
|
|
# restore the initial value
|
|
SET @@global.innodb_instrument_semaphores = @innodb_instrument_semaphores_global_saved;
|
|
# End of test
|