1SET @start_global_value = @@global.max_join_size; 2SELECT @start_global_value; 3@start_global_value 418446744073709551615 5select @@global.max_join_size; 6@@global.max_join_size 718446744073709551615 8select @@session.max_join_size; 9@@session.max_join_size 1018446744073709551615 11show global variables like 'max_join_size'; 12Variable_name Value 13max_join_size 18446744073709551615 14show session variables like 'max_join_size'; 15Variable_name Value 16max_join_size 18446744073709551615 17select * from information_schema.global_variables where variable_name='max_join_size'; 18VARIABLE_NAME VARIABLE_VALUE 19MAX_JOIN_SIZE 18446744073709551615 20select * from information_schema.session_variables where variable_name='max_join_size'; 21VARIABLE_NAME VARIABLE_VALUE 22MAX_JOIN_SIZE 18446744073709551615 23set global max_join_size=10; 24set session max_join_size=20; 25select @@global.max_join_size; 26@@global.max_join_size 2710 28select @@session.max_join_size; 29@@session.max_join_size 3020 31show global variables like 'max_join_size'; 32Variable_name Value 33max_join_size 10 34show session variables like 'max_join_size'; 35Variable_name Value 36max_join_size 20 37select * from information_schema.global_variables where variable_name='max_join_size'; 38VARIABLE_NAME VARIABLE_VALUE 39MAX_JOIN_SIZE 10 40select * from information_schema.session_variables where variable_name='max_join_size'; 41VARIABLE_NAME VARIABLE_VALUE 42MAX_JOIN_SIZE 20 43set global max_join_size=1.1; 44ERROR 42000: Incorrect argument type to variable 'max_join_size' 45set global max_join_size=1e1; 46ERROR 42000: Incorrect argument type to variable 'max_join_size' 47set global max_join_size="foo"; 48ERROR 42000: Incorrect argument type to variable 'max_join_size' 49select @@sql_big_selects; 50@@sql_big_selects 510 52set max_join_size=cast(-1 as unsigned int); 53Warnings: 54Note 1105 Cast to unsigned converted negative integer to it's positive complement 55select @@sql_big_selects; 56@@sql_big_selects 571 58set max_join_size=100; 59select @@sql_big_selects; 60@@sql_big_selects 610 62SET @@global.max_join_size = @start_global_value; 63SELECT @@global.max_join_size; 64@@global.max_join_size 6518446744073709551615 66