1SET @start_global_value = @@global.extra_max_connections;
2select @@global.extra_max_connections;
3@@global.extra_max_connections
41
5select @@session.extra_max_connections;
6ERROR HY000: Variable 'extra_max_connections' is a GLOBAL variable
7show global variables like 'extra_max_connections';
8Variable_name	Value
9extra_max_connections	1
10show session variables like 'extra_max_connections';
11Variable_name	Value
12extra_max_connections	1
13select * from information_schema.global_variables where variable_name='extra_max_connections';
14VARIABLE_NAME	VARIABLE_VALUE
15EXTRA_MAX_CONNECTIONS	1
16Warnings:
17Warning	1287	'INFORMATION_SCHEMA.GLOBAL_VARIABLES' is deprecated and will be removed in a future release. Please use performance_schema.global_variables instead
18select * from information_schema.session_variables where variable_name='extra_max_connections';
19VARIABLE_NAME	VARIABLE_VALUE
20EXTRA_MAX_CONNECTIONS	1
21Warnings:
22Warning	1287	'INFORMATION_SCHEMA.SESSION_VARIABLES' is deprecated and will be removed in a future release. Please use performance_schema.session_variables instead
23set global extra_max_connections=1;
24select @@global.extra_max_connections;
25@@global.extra_max_connections
261
27set session extra_max_connections=1;
28ERROR HY000: Variable 'extra_max_connections' is a GLOBAL variable and should be set with SET GLOBAL
29set global extra_max_connections=1.1;
30ERROR 42000: Incorrect argument type to variable 'extra_max_connections'
31set global extra_max_connections=1e1;
32ERROR 42000: Incorrect argument type to variable 'extra_max_connections'
33set global extra_max_connections="foo";
34ERROR 42000: Incorrect argument type to variable 'extra_max_connections'
35set global extra_max_connections=0;
36Warnings:
37Warning	1292	Truncated incorrect extra_max_connections value: '0'
38select @@global.extra_max_connections;
39@@global.extra_max_connections
401
41set global extra_max_connections=cast(-1 as unsigned int);
42Warnings:
43Warning	1292	Truncated incorrect extra_max_connections value: '18446744073709551615'
44select @@global.extra_max_connections;
45@@global.extra_max_connections
46100000
47SET @@global.extra_max_connections = @start_global_value;
48