1SET @start_value = @@global.max_connections; 2SELECT @start_value; 3@start_value 4151 5'#--------------------FN_DYNVARS_074_01------------------------#' 6SET @@global.max_connections = 5000; 7SET @@global.max_connections = DEFAULT; 8SELECT @@global.max_connections; 9@@global.max_connections 10151 11'#---------------------FN_DYNVARS_074_02-------------------------#' 12SET @@global.max_connections = @start_value; 13SELECT @@global.max_connections = 151; 14@@global.max_connections = 151 151 16'#--------------------FN_DYNVARS_074_03------------------------#' 17SET @@global.max_connections = 100000; 18SELECT @@global.max_connections; 19@@global.max_connections 20100000 21SET @@global.max_connections = 99999; 22SELECT @@global.max_connections; 23@@global.max_connections 2499999 25SET @@global.max_connections = 65536; 26SELECT @@global.max_connections; 27@@global.max_connections 2865536 29SET @@global.max_connections = 1; 30SELECT @@global.max_connections; 31@@global.max_connections 321 33SET @@global.max_connections = 2; 34SELECT @@global.max_connections; 35@@global.max_connections 362 37'#--------------------FN_DYNVARS_074_04-------------------------#' 38SET @@global.max_connections = -1; 39Warnings: 40Warning 1292 Truncated incorrect max_connections value: '-1' 41SELECT @@global.max_connections; 42@@global.max_connections 431 44SET @@global.max_connections = 100000000000; 45Warnings: 46Warning 1292 Truncated incorrect max_connections value: '100000000000' 47SELECT @@global.max_connections; 48@@global.max_connections 49100000 50SET @@global.max_connections = 10000.01; 51ERROR 42000: Incorrect argument type to variable 'max_connections' 52SELECT @@global.max_connections; 53@@global.max_connections 54100000 55SET @@global.max_connections = -1024; 56Warnings: 57Warning 1292 Truncated incorrect max_connections value: '-1024' 58SELECT @@global.max_connections; 59@@global.max_connections 601 61SET @@global.max_connections = 0; 62Warnings: 63Warning 1292 Truncated incorrect max_connections value: '0' 64SELECT @@global.max_connections; 65@@global.max_connections 661 67SET @@global.max_connections = 100001; 68Warnings: 69Warning 1292 Truncated incorrect max_connections value: '100001' 70SELECT @@global.max_connections; 71@@global.max_connections 72100000 73SET @@global.max_connections = ON; 74ERROR 42000: Incorrect argument type to variable 'max_connections' 75SELECT @@global.max_connections; 76@@global.max_connections 77100000 78SET @@global.max_connections = 'test'; 79ERROR 42000: Incorrect argument type to variable 'max_connections' 80SELECT @@global.max_connections; 81@@global.max_connections 82100000 83SET @@global.max_connections = ' '; 84ERROR 42000: Incorrect argument type to variable 'max_connections' 85SELECT @@global.max_connections; 86@@global.max_connections 87100000 88'#-------------------FN_DYNVARS_074_05----------------------------#' 89SET @@session.max_connections = 4096; 90ERROR HY000: Variable 'max_connections' is a GLOBAL variable and should be set with SET GLOBAL 91SELECT @@session.max_connections; 92ERROR HY000: Variable 'max_connections' is a GLOBAL variable 93'#----------------------FN_DYNVARS_074_06------------------------#' 94SELECT @@global.max_connections = VARIABLE_VALUE 95FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES 96WHERE VARIABLE_NAME='max_connections'; 97@@global.max_connections = VARIABLE_VALUE 981 99SELECT @@max_connections = VARIABLE_VALUE 100FROM INFORMATION_SCHEMA.SESSION_VARIABLES 101WHERE VARIABLE_NAME='max_connections'; 102@@max_connections = VARIABLE_VALUE 1031 104'#---------------------FN_DYNVARS_074_07----------------------#' 105SET @@global.max_connections = TRUE; 106SELECT @@global.max_connections; 107@@global.max_connections 1081 109SET @@global.max_connections = FALSE; 110Warnings: 111Warning 1292 Truncated incorrect max_connections value: '0' 112SELECT @@global.max_connections; 113@@global.max_connections 1141 115'#---------------------FN_DYNVARS_074_08----------------------#' 116SET @@global.max_connections = 5000; 117SELECT @@max_connections = @@global.max_connections; 118@@max_connections = @@global.max_connections 1191 120'#---------------------FN_DYNVARS_074_09----------------------#' 121SET max_connections = 6000; 122ERROR HY000: Variable 'max_connections' is a GLOBAL variable and should be set with SET GLOBAL 123SELECT @@max_connections; 124@@max_connections 1255000 126SET local.max_connections = 7000; 127ERROR 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 'local.max_connections = 7000' at line 1 128SELECT local.max_connections; 129ERROR 42S02: Unknown table 'local' in field list 130SET global.max_connections = 8000; 131ERROR 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 'global.max_connections = 8000' at line 1 132SELECT global.max_connections; 133ERROR 42S02: Unknown table 'global' in field list 134SELECT max_connections = @@session.max_connections; 135ERROR 42S22: Unknown column 'max_connections' in 'field list' 136SET @@global.max_connections = @start_value; 137SELECT @@global.max_connections; 138@@global.max_connections 139151 140