# # 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