SET @start_global_value = @@global.aria_max_sort_file_size;
select @@global.aria_max_sort_file_size;
@@global.aria_max_sort_file_size
9223372036853727232
select @@session.aria_max_sort_file_size;
ERROR HY000: Variable 'aria_max_sort_file_size' is a GLOBAL variable
show global variables like 'aria_max_sort_file_size';
Variable_name	Value
aria_max_sort_file_size	9223372036853727232
show session variables like 'aria_max_sort_file_size';
Variable_name	Value
aria_max_sort_file_size	9223372036853727232
select * from information_schema.global_variables where variable_name='aria_max_sort_file_size';
VARIABLE_NAME	VARIABLE_VALUE
ARIA_MAX_SORT_FILE_SIZE	9223372036853727232
select * from information_schema.session_variables where variable_name='aria_max_sort_file_size';
VARIABLE_NAME	VARIABLE_VALUE
ARIA_MAX_SORT_FILE_SIZE	9223372036853727232
set global aria_max_sort_file_size=1024*1024*10;
select @@global.aria_max_sort_file_size;
@@global.aria_max_sort_file_size
10485760
set session aria_max_sort_file_size=1;
ERROR HY000: Variable 'aria_max_sort_file_size' is a GLOBAL variable and should be set with SET GLOBAL
set global aria_max_sort_file_size=1.1;
ERROR 42000: Incorrect argument type to variable 'aria_max_sort_file_size'
set global aria_max_sort_file_size=1e1;
ERROR 42000: Incorrect argument type to variable 'aria_max_sort_file_size'
set global aria_max_sort_file_size="foo";
ERROR 42000: Incorrect argument type to variable 'aria_max_sort_file_size'
set global aria_max_sort_file_size=1;
Warnings:
Warning	1292	Truncated incorrect aria_max_sort_file_size value: '1'
select @@global.aria_max_sort_file_size;
@@global.aria_max_sort_file_size
0
set global aria_max_sort_file_size=@@global.aria_max_sort_file_size + 1024*1024 - 1;
Warnings:
Warning	1292	Truncated incorrect aria_max_sort_file_size value: '1048575'
select @@global.aria_max_sort_file_size;
@@global.aria_max_sort_file_size
0
set global aria_max_sort_file_size=@@global.aria_max_sort_file_size + 1024*1024;
select @@global.aria_max_sort_file_size;
@@global.aria_max_sort_file_size
1048576
set global aria_max_sort_file_size=cast(-1 as unsigned int);
Warnings:
Note	1105	Cast to unsigned converted negative integer to it's positive complement
Note	1105	Cast to unsigned converted negative integer to it's positive complement
Warning	1292	Truncated incorrect aria_max_sort_file_size value: '18446744073709551615'
select @@global.aria_max_sort_file_size;
@@global.aria_max_sort_file_size
9223372036853727232
SET @@global.aria_max_sort_file_size = @start_global_value;
