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
16select * from information_schema.session_variables where variable_name='extra_max_connections';
17VARIABLE_NAME	VARIABLE_VALUE
18EXTRA_MAX_CONNECTIONS	1
19set global extra_max_connections=1;
20select @@global.extra_max_connections;
21@@global.extra_max_connections
221
23set session extra_max_connections=1;
24ERROR HY000: Variable 'extra_max_connections' is a GLOBAL variable and should be set with SET GLOBAL
25set global extra_max_connections=1.1;
26ERROR 42000: Incorrect argument type to variable 'extra_max_connections'
27set global extra_max_connections=1e1;
28ERROR 42000: Incorrect argument type to variable 'extra_max_connections'
29set global extra_max_connections="foo";
30ERROR 42000: Incorrect argument type to variable 'extra_max_connections'
31set global extra_max_connections=0;
32Warnings:
33Warning	1292	Truncated incorrect extra_max_connections value: '0'
34select @@global.extra_max_connections;
35@@global.extra_max_connections
361
37set global extra_max_connections=cast(-1 as unsigned int);
38Warnings:
39Note	1105	Cast to unsigned converted negative integer to it's positive complement
40Warning	1292	Truncated incorrect extra_max_connections value: '18446744073709551615'
41select @@global.extra_max_connections;
42@@global.extra_max_connections
43100000
44SET @@global.extra_max_connections = @start_global_value;
45