SET @start_global_value = @@global.max_length_for_sort_data;
SELECT @start_global_value;
@start_global_value
1024
SET @start_session_value = @@session.max_length_for_sort_data;
SELECT @start_session_value;
@start_session_value
1024
'#--------------------FN_DYNVARS_080_01-------------------------#'
SET @@global.max_length_for_sort_data = 1000;
SET @@global.max_length_for_sort_data = DEFAULT;
SELECT @@global.max_length_for_sort_data;
@@global.max_length_for_sort_data
1024
SET @@session.max_length_for_sort_data = 1000;
SET @@session.max_length_for_sort_data = DEFAULT;
SELECT @@session.max_length_for_sort_data;
@@session.max_length_for_sort_data
1024
'#--------------------FN_DYNVARS_080_02-------------------------#'
SET @@global.max_length_for_sort_data = DEFAULT;
SELECT @@global.max_length_for_sort_data = 1024;
@@global.max_length_for_sort_data = 1024
1
SET @@session.max_length_for_sort_data = DEFAULT;
SELECT @@session.max_length_for_sort_data = 1024;
@@session.max_length_for_sort_data = 1024
1
'#--------------------FN_DYNVARS_080_03-------------------------#'
SET @@global.max_length_for_sort_data = 4;
SELECT @@global.max_length_for_sort_data;
@@global.max_length_for_sort_data
4
SET @@global.max_length_for_sort_data = 5;
SELECT @@global.max_length_for_sort_data;
@@global.max_length_for_sort_data
5
SET @@global.max_length_for_sort_data = 8388608;
SELECT @@global.max_length_for_sort_data;
@@global.max_length_for_sort_data
8388608
SET @@global.max_length_for_sort_data = 8388607;
SELECT @@global.max_length_for_sort_data;
@@global.max_length_for_sort_data
8388607
SET @@global.max_length_for_sort_data = 65536;
SELECT @@global.max_length_for_sort_data;
@@global.max_length_for_sort_data
65536
'#--------------------FN_DYNVARS_080_04-------------------------#'
SET @@session.max_length_for_sort_data = 4;
SELECT @@session.max_length_for_sort_data;
@@session.max_length_for_sort_data
4
SET @@session.max_length_for_sort_data = 5;
SELECT @@session.max_length_for_sort_data;
@@session.max_length_for_sort_data
5
SET @@session.max_length_for_sort_data = 8388608;
SELECT @@session.max_length_for_sort_data;
@@session.max_length_for_sort_data
8388608
SET @@session.max_length_for_sort_data = 8388607;
SELECT @@session.max_length_for_sort_data;
@@session.max_length_for_sort_data
8388607
SET @@session.max_length_for_sort_data = 65536;
SELECT @@session.max_length_for_sort_data;
@@session.max_length_for_sort_data
65536
'#------------------FN_DYNVARS_080_05-----------------------#'
SET @@global.max_length_for_sort_data = -1024;
Warnings:
Warning	1292	Truncated incorrect max_length_for_sort_data value: '-1024'
SELECT @@global.max_length_for_sort_data;
@@global.max_length_for_sort_data
4
SET @@global.max_length_for_sort_data = 3;
Warnings:
Warning	1292	Truncated incorrect max_length_for_sort_data value: '3'
SELECT @@global.max_length_for_sort_data;
@@global.max_length_for_sort_data
4
SET @@global.max_length_for_sort_data = 8388609;
Warnings:
Warning	1292	Truncated incorrect max_length_for_sort_data value: '8388609'
SELECT @@global.max_length_for_sort_data;
@@global.max_length_for_sort_data
8388608
SET @@global.max_length_for_sort_data = 0;
Warnings:
Warning	1292	Truncated incorrect max_length_for_sort_data value: '0'
SELECT @@global.max_length_for_sort_data;
@@global.max_length_for_sort_data
4
SET @@global.max_length_for_sort_data = 65530.34;
ERROR 42000: Incorrect argument type to variable 'max_length_for_sort_data'
SELECT @@global.max_length_for_sort_data;
@@global.max_length_for_sort_data
4
SET @@global.max_length_for_sort_data = test;
ERROR 42000: Incorrect argument type to variable 'max_length_for_sort_data'
SELECT @@global.max_length_for_sort_data;
@@global.max_length_for_sort_data
4
SET @@session.max_length_for_sort_data = 8388610;
Warnings:
Warning	1292	Truncated incorrect max_length_for_sort_data value: '8388610'
SELECT @@session.max_length_for_sort_data;
@@session.max_length_for_sort_data
8388608
SET @@session.max_length_for_sort_data = -1;
Warnings:
Warning	1292	Truncated incorrect max_length_for_sort_data value: '-1'
SELECT @@session.max_length_for_sort_data;
@@session.max_length_for_sort_data
4
SET @@session.max_length_for_sort_data = 3;
Warnings:
Warning	1292	Truncated incorrect max_length_for_sort_data value: '3'
SELECT @@session.max_length_for_sort_data;
@@session.max_length_for_sort_data
4
SET @@session.max_length_for_sort_data = 0;
Warnings:
Warning	1292	Truncated incorrect max_length_for_sort_data value: '0'
SELECT @@session.max_length_for_sort_data;
@@session.max_length_for_sort_data
4
SET @@session.max_length_for_sort_data = 65530.34;
ERROR 42000: Incorrect argument type to variable 'max_length_for_sort_data'
SET @@session.max_length_for_sort_data = 10737418241;
Warnings:
Warning	1292	Truncated incorrect max_length_for_sort_data value: '10737418241'
SELECT @@session.max_length_for_sort_data;
@@session.max_length_for_sort_data
8388608
SET @@session.max_length_for_sort_data = test;
ERROR 42000: Incorrect argument type to variable 'max_length_for_sort_data'
SELECT @@session.max_length_for_sort_data;
@@session.max_length_for_sort_data
8388608
'#------------------FN_DYNVARS_080_06-----------------------#'
SELECT @@global.max_length_for_sort_data = VARIABLE_VALUE 
FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES 
WHERE VARIABLE_NAME='max_length_for_sort_data';
@@global.max_length_for_sort_data = VARIABLE_VALUE
1
'#------------------FN_DYNVARS_080_07-----------------------#'
SELECT @@session.max_length_for_sort_data = VARIABLE_VALUE 
FROM INFORMATION_SCHEMA.SESSION_VARIABLES 
WHERE VARIABLE_NAME='max_length_for_sort_data';
@@session.max_length_for_sort_data = VARIABLE_VALUE
1
'#------------------FN_DYNVARS_080_08-----------------------#'
SET @@global.max_length_for_sort_data = TRUE;
Warnings:
Warning	1292	Truncated incorrect max_length_for_sort_data value: '1'
SELECT @@global.max_length_for_sort_data;
@@global.max_length_for_sort_data
4
SET @@global.max_length_for_sort_data = FALSE;
Warnings:
Warning	1292	Truncated incorrect max_length_for_sort_data value: '0'
SELECT @@global.max_length_for_sort_data;
@@global.max_length_for_sort_data
4
'#---------------------FN_DYNVARS_080_09----------------------#'
SET @@global.max_length_for_sort_data = 2048;
SELECT @@max_length_for_sort_data = @@global.max_length_for_sort_data;
@@max_length_for_sort_data = @@global.max_length_for_sort_data
0
'#---------------------FN_DYNVARS_080_10----------------------#'
SET @@max_length_for_sort_data = 100000;
SELECT @@max_length_for_sort_data = @@local.max_length_for_sort_data;
@@max_length_for_sort_data = @@local.max_length_for_sort_data
1
SELECT @@local.max_length_for_sort_data = @@session.max_length_for_sort_data;
@@local.max_length_for_sort_data = @@session.max_length_for_sort_data
1
'#---------------------FN_DYNVARS_080_11----------------------#'
SET max_length_for_sort_data = 1024;
SELECT @@max_length_for_sort_data;
@@max_length_for_sort_data
1024
SELECT local.max_length_for_sort_data;
ERROR 42S02: Unknown table 'local' in field list
SELECT session.max_length_for_sort_data;
ERROR 42S02: Unknown table 'session' in field list
SELECT max_length_for_sort_data = @@session.max_length_for_sort_data;
ERROR 42S22: Unknown column 'max_length_for_sort_data' in 'field list'
SET @@global.max_length_for_sort_data = @start_global_value;
SELECT @@global.max_length_for_sort_data;
@@global.max_length_for_sort_data
1024
SET @@session.max_length_for_sort_data = @start_session_value;
SELECT @@session.max_length_for_sort_data;
@@session.max_length_for_sort_data
1024
