# set session SET @start_global_value = @@global.log_slow_verbosity; select @@global.log_slow_verbosity = @@session.log_slow_verbosity; SET @@global.log_slow_verbosity="",@@session.log_slow_verbosity=""; # # exists as global only # show global variables like 'log_slow_verbosity'; show session variables like 'log_slow_verbosity'; select * from information_schema.global_variables where variable_name='log_slow_verbosity'; select * from information_schema.session_variables where variable_name='log_slow_verbosity'; # # show that it's writable # set global log_slow_verbosity=1; select @@global.log_slow_verbosity; set session log_slow_verbosity=1; select @@session.log_slow_verbosity; # # all valid values # set session log_slow_verbosity=1; select @@session.log_slow_verbosity; set session log_slow_verbosity=2; select @@session.log_slow_verbosity; set session log_slow_verbosity=3; select @@session.log_slow_verbosity; set session log_slow_verbosity=4; select @@session.log_slow_verbosity; set session log_slow_verbosity=5; select @@session.log_slow_verbosity; set session log_slow_verbosity=6; select @@session.log_slow_verbosity; set session log_slow_verbosity=7; select @@session.log_slow_verbosity; set session log_slow_verbosity=8; select @@session.log_slow_verbosity; set session log_slow_verbosity=16; select @@session.log_slow_verbosity; set session log_slow_verbosity=32; select @@session.log_slow_verbosity; set session log_slow_verbosity='innodb'; select @@session.log_slow_verbosity; set session log_slow_verbosity='query_plan'; select @@session.log_slow_verbosity; set session log_slow_verbosity='innodb,query_plan'; select @@session.log_slow_verbosity; set session log_slow_verbosity='explain'; select @@session.log_slow_verbosity; set session log_slow_verbosity='innodb,query_plan,explain,engine,warnings,full'; select @@session.log_slow_verbosity; set session log_slow_verbosity=''; select @@session.log_slow_verbosity; # # incorrect types/values # --error ER_WRONG_TYPE_FOR_VAR set session log_slow_verbosity=1.1; --error ER_WRONG_TYPE_FOR_VAR set session log_slow_verbosity=1e1; --error ER_WRONG_VALUE_FOR_VAR set session log_slow_verbosity="foo"; --error ER_WRONG_VALUE_FOR_VAR set session log_slow_verbosity=64; SET @@global.log_slow_verbosity = @start_global_value;