1SET @start_global_value = @@global.sql_max_join_size;
2SELECT @start_global_value;
3@start_global_value
418446744073709551615
5select @@global.sql_max_join_size;
6@@global.sql_max_join_size
718446744073709551615
8select @@session.sql_max_join_size;
9@@session.sql_max_join_size
1018446744073709551615
11show global variables like 'sql_max_join_size';
12Variable_name	Value
13sql_max_join_size	18446744073709551615
14show session variables like 'sql_max_join_size';
15Variable_name	Value
16sql_max_join_size	18446744073709551615
17select * from information_schema.global_variables where variable_name='sql_max_join_size';
18VARIABLE_NAME	VARIABLE_VALUE
19SQL_MAX_JOIN_SIZE	18446744073709551615
20select * from information_schema.session_variables where variable_name='sql_max_join_size';
21VARIABLE_NAME	VARIABLE_VALUE
22SQL_MAX_JOIN_SIZE	18446744073709551615
23set global sql_max_join_size=10;
24Warnings:
25Warning	1287	'@@sql_max_join_size' is deprecated and will be removed in a future release. Please use '@@max_join_size' instead
26set session sql_max_join_size=20;
27Warnings:
28Warning	1287	'@@sql_max_join_size' is deprecated and will be removed in a future release. Please use '@@max_join_size' instead
29select @@global.sql_max_join_size;
30@@global.sql_max_join_size
3110
32select @@session.sql_max_join_size;
33@@session.sql_max_join_size
3420
35show global variables like 'sql_max_join_size';
36Variable_name	Value
37sql_max_join_size	10
38show session variables like 'sql_max_join_size';
39Variable_name	Value
40sql_max_join_size	20
41select * from information_schema.global_variables where variable_name='sql_max_join_size';
42VARIABLE_NAME	VARIABLE_VALUE
43SQL_MAX_JOIN_SIZE	10
44select * from information_schema.session_variables where variable_name='sql_max_join_size';
45VARIABLE_NAME	VARIABLE_VALUE
46SQL_MAX_JOIN_SIZE	20
47set global sql_max_join_size=1.1;
48ERROR 42000: Incorrect argument type to variable 'sql_max_join_size'
49set global sql_max_join_size=1e1;
50ERROR 42000: Incorrect argument type to variable 'sql_max_join_size'
51set global sql_max_join_size="foo";
52ERROR 42000: Incorrect argument type to variable 'sql_max_join_size'
53select @@sql_big_selects;
54@@sql_big_selects
550
56set sql_max_join_size=cast(-1 as unsigned int);
57Warnings:
58Warning	1287	'@@sql_max_join_size' is deprecated and will be removed in a future release. Please use '@@max_join_size' instead
59Note	1105	Cast to unsigned converted negative integer to it's positive complement
60select @@sql_big_selects;
61@@sql_big_selects
621
63set sql_max_join_size=100;
64Warnings:
65Warning	1287	'@@sql_max_join_size' is deprecated and will be removed in a future release. Please use '@@max_join_size' instead
66select @@sql_big_selects;
67@@sql_big_selects
680
69SET @@global.sql_max_join_size = @start_global_value;
70Warnings:
71Warning	1287	'@@sql_max_join_size' is deprecated and will be removed in a future release. Please use '@@max_join_size' instead
72SELECT @@global.sql_max_join_size;
73@@global.sql_max_join_size
7418446744073709551615
75