SET @start_global_value = @@global.deadlock_timeout_long;
select @@global.deadlock_timeout_long;
@@global.deadlock_timeout_long
50000000
select @@session.deadlock_timeout_long;
@@session.deadlock_timeout_long
50000000
show global variables like 'deadlock_timeout_long';
Variable_name	Value
deadlock_timeout_long	50000000
show session variables like 'deadlock_timeout_long';
Variable_name	Value
deadlock_timeout_long	50000000
select * from information_schema.global_variables where variable_name='deadlock_timeout_long';
VARIABLE_NAME	VARIABLE_VALUE
DEADLOCK_TIMEOUT_LONG	50000000
select * from information_schema.session_variables where variable_name='deadlock_timeout_long';
VARIABLE_NAME	VARIABLE_VALUE
DEADLOCK_TIMEOUT_LONG	50000000
set global deadlock_timeout_long=10;
select @@global.deadlock_timeout_long;
@@global.deadlock_timeout_long
10
set session deadlock_timeout_long=10;
select @@session.deadlock_timeout_long;
@@session.deadlock_timeout_long
10
set global deadlock_timeout_long=1.1;
ERROR 42000: Incorrect argument type to variable 'deadlock_timeout_long'
set session deadlock_timeout_long=1e1;
ERROR 42000: Incorrect argument type to variable 'deadlock_timeout_long'
set global deadlock_timeout_long="foo";
ERROR 42000: Incorrect argument type to variable 'deadlock_timeout_long'
set global deadlock_timeout_long=0;
select @@global.deadlock_timeout_long;
@@global.deadlock_timeout_long
0
set session deadlock_timeout_long=cast(-1 as unsigned int);
Warnings:
Note	1105	Cast to unsigned converted negative integer to it's positive complement
Warning	1292	Truncated incorrect deadlock_timeout_long value: '18446744073709551615'
select @@session.deadlock_timeout_long;
@@session.deadlock_timeout_long
4294967295
SET @@global.deadlock_timeout_long = @start_global_value;
