SET @start_value = @@global.binlog_cache_size;
SELECT @start_value;
@start_value
32768
'#--------------------FN_DYNVARS_006_01------------------------#'
SET @@global.binlog_cache_size = 100;
Warnings:
Warning	1292	Truncated incorrect binlog_cache_size value: '100'
SET @@global.binlog_cache_size = DEFAULT;
SELECT @@global.binlog_cache_size;
@@global.binlog_cache_size
32768
'#---------------------FN_DYNVARS_006_02-------------------------#'
SET @@global.binlog_cache_size = @start_value;
SELECT @@global.binlog_cache_size = 32768;
@@global.binlog_cache_size = 32768
1
'#--------------------FN_DYNVARS_006_03------------------------#'
SET @@global.binlog_cache_size = 4096;
SELECT @@global.binlog_cache_size;
@@global.binlog_cache_size
4096
SET @@global.binlog_cache_size = 4294967295;
Warnings:
Warning	1292	Truncated incorrect binlog_cache_size value: '4294967295'
SELECT @@global.binlog_cache_size;
@@global.binlog_cache_size
4294963200
SET @@global.binlog_cache_size = 10000;
Warnings:
Warning	1292	Truncated incorrect binlog_cache_size value: '10000'
SELECT @@global.binlog_cache_size;
@@global.binlog_cache_size
8192
SET @@global.binlog_cache_size = 21221204;
Warnings:
Warning	1292	Truncated incorrect binlog_cache_size value: '21221204'
SELECT @@global.binlog_cache_size;
@@global.binlog_cache_size
21217280
'Bug: Invalid values are coming in variable on assigning valid values'
'#--------------------FN_DYNVARS_006_04-------------------------#'
SET @@global.binlog_cache_size = 1024;
Warnings:
Warning	1292	Truncated incorrect binlog_cache_size value: '1024'
SELECT @@global.binlog_cache_size;
@@global.binlog_cache_size
4096
SET @@global.binlog_cache_size = 10000.01;
ERROR 42000: Incorrect argument type to variable 'binlog_cache_size'
SET @@global.binlog_cache_size = -1024;
Warnings:
Warning	1292	Truncated incorrect binlog_cache_size value: '-1024'
SELECT @@global.binlog_cache_size;
@@global.binlog_cache_size
4096
SET @@global.binlog_cache_size = 42949672950;
Warnings:
Warning	1292	Truncated incorrect binlog_cache_size value: '42949672950'
SELECT @@global.binlog_cache_size;
@@global.binlog_cache_size
42949668864
'Bug: Errors are not coming on assigning invalid values to variable'
SET @@global.binlog_cache_size = ON;
ERROR 42000: Incorrect argument type to variable 'binlog_cache_size'
SET @@global.binlog_cache_size = 'test';
ERROR 42000: Incorrect argument type to variable 'binlog_cache_size'
'#-------------------FN_DYNVARS_006_05----------------------------#'
SET @@session.binlog_cache_size = 0;
ERROR HY000: Variable 'binlog_cache_size' is a GLOBAL variable and should be set with SET GLOBAL
'#----------------------FN_DYNVARS_006_06------------------------#'
SELECT @@global.binlog_cache_size = VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES WHERE VARIABLE_NAME='binlog_cache_size';
@@global.binlog_cache_size = VARIABLE_VALUE
1
'#---------------------FN_DYNVARS_006_07----------------------#'
SET @@global.binlog_cache_size = TRUE;
Warnings:
Warning	1292	Truncated incorrect binlog_cache_size value: '1'
SELECT @@global.binlog_cache_size;
@@global.binlog_cache_size
4096
SET @@global.binlog_cache_size = FALSE;
Warnings:
Warning	1292	Truncated incorrect binlog_cache_size value: '0'
SELECT @@global.binlog_cache_size;
@@global.binlog_cache_size
4096
'Bug: Errors are not coming on assigning TRUE/FALSE to variable'
'#---------------------FN_DYNVARS_006_08----------------------#'
SET @@global.binlog_cache_size = 1;
Warnings:
Warning	1292	Truncated incorrect binlog_cache_size value: '1'
SELECT @@binlog_cache_size = @@global.binlog_cache_size;
@@binlog_cache_size = @@global.binlog_cache_size
1
'#---------------------FN_DYNVARS_006_09----------------------#'
SET binlog_cache_size = 1;
ERROR HY000: Variable 'binlog_cache_size' is a GLOBAL variable and should be set with SET GLOBAL
SET global.binlog_cache_size = 1;
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'binlog_cache_size = 1' at line 1
SELECT global.binlog_cache_size;
ERROR 42S02: Unknown table 'global' in field list
SELECT binlog_cache_size = @@session.binlog_cache_size;
ERROR 42S22: Unknown column 'binlog_cache_size' in 'field list'
SET @@global.binlog_cache_size = @start_value;
SELECT @@global.binlog_cache_size;
@@global.binlog_cache_size
32768
