1SET @start_value = @@global.max_prepared_stmt_count; 2SELECT @start_value; 3@start_value 416382 5'#--------------------FN_DYNVARS_081_01------------------------#' 6SET @@global.max_prepared_stmt_count = 5000; 7SET @@global.max_prepared_stmt_count = DEFAULT; 8SELECT @@global.max_prepared_stmt_count; 9@@global.max_prepared_stmt_count 1016382 11'#---------------------FN_DYNVARS_081_02-------------------------#' 12SET @@global.max_prepared_stmt_count = @start_value; 13SELECT @@global.max_prepared_stmt_count = 16382; 14@@global.max_prepared_stmt_count = 16382 151 16'#--------------------FN_DYNVARS_081_03------------------------#' 17SET @@global.max_prepared_stmt_count = 0; 18SELECT @@global.max_prepared_stmt_count; 19@@global.max_prepared_stmt_count 200 21SET @@global.max_prepared_stmt_count = 1; 22SELECT @@global.max_prepared_stmt_count; 23@@global.max_prepared_stmt_count 241 25SET @@global.max_prepared_stmt_count = 1048576; 26SELECT @@global.max_prepared_stmt_count; 27@@global.max_prepared_stmt_count 281048576 29SET @@global.max_prepared_stmt_count = 1048575; 30SELECT @@global.max_prepared_stmt_count; 31@@global.max_prepared_stmt_count 321048575 33SET @@global.max_prepared_stmt_count = 65535; 34SELECT @@global.max_prepared_stmt_count; 35@@global.max_prepared_stmt_count 3665535 37'#--------------------FN_DYNVARS_081_04-------------------------#' 38SET @@global.max_prepared_stmt_count = -1; 39Warnings: 40Warning 1292 Truncated incorrect max_prepared_stmt_count value: '-1' 41SELECT @@global.max_prepared_stmt_count; 42@@global.max_prepared_stmt_count 430 44SET @@global.max_prepared_stmt_count = 100000000000; 45Warnings: 46Warning 1292 Truncated incorrect max_prepared_stmt_count value: '100000000000' 47SELECT @@global.max_prepared_stmt_count; 48@@global.max_prepared_stmt_count 494294967295 50SET @@global.max_prepared_stmt_count = 10000.01; 51ERROR 42000: Incorrect argument type to variable 'max_prepared_stmt_count' 52SELECT @@global.max_prepared_stmt_count; 53@@global.max_prepared_stmt_count 544294967295 55SET @@global.max_prepared_stmt_count = -1024; 56Warnings: 57Warning 1292 Truncated incorrect max_prepared_stmt_count value: '-1024' 58SELECT @@global.max_prepared_stmt_count; 59@@global.max_prepared_stmt_count 600 61SET @@global.max_prepared_stmt_count = 4294967296; 62Warnings: 63Warning 1292 Truncated incorrect max_prepared_stmt_count value: '4294967296' 64SELECT @@global.max_prepared_stmt_count; 65@@global.max_prepared_stmt_count 664294967295 67SET @@global.max_prepared_stmt_count = 4294967295*1024; 68Warnings: 69Warning 1292 Truncated incorrect max_prepared_stmt_count value: '4398046510080' 70SELECT @@global.max_prepared_stmt_count; 71@@global.max_prepared_stmt_count 724294967295 73SET @@global.max_prepared_stmt_count = ON; 74ERROR 42000: Incorrect argument type to variable 'max_prepared_stmt_count' 75SELECT @@global.max_prepared_stmt_count; 76@@global.max_prepared_stmt_count 774294967295 78SET @@global.max_prepared_stmt_count = 'test'; 79ERROR 42000: Incorrect argument type to variable 'max_prepared_stmt_count' 80SELECT @@global.max_prepared_stmt_count; 81@@global.max_prepared_stmt_count 824294967295 83'#-------------------FN_DYNVARS_081_05----------------------------#' 84SET @@session.max_prepared_stmt_count = 4096; 85ERROR HY000: Variable 'max_prepared_stmt_count' is a GLOBAL variable and should be set with SET GLOBAL 86SELECT @@session.max_prepared_stmt_count; 87ERROR HY000: Variable 'max_prepared_stmt_count' is a GLOBAL variable 88'#----------------------FN_DYNVARS_081_06------------------------#' 89SELECT @@global.max_prepared_stmt_count = VARIABLE_VALUE 90FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES 91WHERE VARIABLE_NAME='max_prepared_stmt_count'; 92@@global.max_prepared_stmt_count = VARIABLE_VALUE 931 94SELECT @@max_prepared_stmt_count = VARIABLE_VALUE 95FROM INFORMATION_SCHEMA.SESSION_VARIABLES 96WHERE VARIABLE_NAME='max_prepared_stmt_count'; 97@@max_prepared_stmt_count = VARIABLE_VALUE 981 99'#---------------------FN_DYNVARS_081_07----------------------#' 100SET @@global.max_prepared_stmt_count = TRUE; 101SELECT @@global.max_prepared_stmt_count; 102@@global.max_prepared_stmt_count 1031 104SET @@global.max_prepared_stmt_count = FALSE; 105SELECT @@global.max_prepared_stmt_count; 106@@global.max_prepared_stmt_count 1070 108'#---------------------FN_DYNVARS_081_08----------------------#' 109SET @@global.max_prepared_stmt_count = 5000; 110SELECT @@max_prepared_stmt_count = @@global.max_prepared_stmt_count; 111@@max_prepared_stmt_count = @@global.max_prepared_stmt_count 1121 113'#---------------------FN_DYNVARS_081_09----------------------#' 114SET max_prepared_stmt_count = 6000; 115ERROR HY000: Variable 'max_prepared_stmt_count' is a GLOBAL variable and should be set with SET GLOBAL 116SELECT @@max_prepared_stmt_count; 117@@max_prepared_stmt_count 1185000 119SELECT local.max_prepared_stmt_count; 120ERROR 42S02: Unknown table 'local' in field list 121SELECT global.max_prepared_stmt_count; 122ERROR 42S02: Unknown table 'global' in field list 123SELECT max_prepared_stmt_count = @@session.max_prepared_stmt_count; 124ERROR 42S22: Unknown column 'max_prepared_stmt_count' in 'field list' 125SET @@global.max_prepared_stmt_count = @start_value; 126SELECT @@global.max_prepared_stmt_count; 127@@global.max_prepared_stmt_count 12816382 129