1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119
|
#
# 2010-01-20 - OBN - Added check for variable value sameas I_S table
# after variable value change
#
SET @start_global_value = @@global.max_join_size;
SELECT @start_global_value;
#
# exists as global and session
#
select @@global.max_join_size;
select @@session.max_join_size;
show global variables like 'max_join_size';
show session variables like 'max_join_size';
--disable_warnings
select * from performance_schema.global_variables where variable_name='max_join_size';
select * from performance_schema.session_variables where variable_name='max_join_size';
--enable_warnings
#
# show that it's writable
#
set global max_join_size=10;
set session max_join_size=20;
select @@global.max_join_size;
select @@session.max_join_size;
# Using SQL_BIG_SELECT to ignore MAX_JOIN_SIZE.
SET SQL_BIG_SELECTS=1;
show global variables like 'max_join_size';
show session variables like 'max_join_size';
--disable_warnings
# Using SQL_BIG_SELECT to ignore MAX_JOIN_SIZE.
SET SQL_BIG_SELECTS=1;
select * from performance_schema.global_variables where variable_name='max_join_size';
select * from performance_schema.session_variables where variable_name='max_join_size';
--enable_warnings
#
# display default value of max_join_size
#
SET @@global.max_join_size = 1000;
SET @@global.max_join_size = DEFAULT;
SELECT @@global.max_join_size;
SET @@session.max_join_size = 1000;
SET @@session.max_join_size = DEFAULT;
SELECT @@session.max_join_size;
#
# verify the default value of max_join_size
#
SET @@global.max_join_size = DEFAULT;
SELECT @@global.max_join_size = 4294967295;
SET @@session.max_join_size = DEFAULT;
SELECT @@session.max_join_size = 4294967295;
#
# valid values
#
SET @@global.max_join_size = 1;
SELECT @@global.max_join_size;
SET @@global.max_join_size = 4294967295;
SELECT @@global.max_join_size;
SET @@session.max_join_size = 1;
SELECT @@session.max_join_size;
SET @@session.max_join_size = 4294967295;
SELECT @@session.max_join_size;
#
# out-of-bound values
#
SET @@global.max_join_size = 0;
SELECT @@global.max_join_size;
SET @@global.max_join_size = -1024;
SELECT @@global.max_join_size;
SET @@global.max_join_size = 114294967295;
SELECT @@global.max_join_size;
--Error ER_WRONG_TYPE_FOR_VAR
SET @@global.max_join_size = ' ';
SELECT @@global.max_join_size;
SET @@session.max_join_size = 0;
SELECT @@session.max_join_size;
SET @@session.max_join_size = -1024;
SELECT @@session.max_join_size;
SET @@session.max_join_size = 114294967295;
SELECT @@session.max_join_size;
--Error ER_WRONG_TYPE_FOR_VAR
SET @@session.max_join_size = ' ';
SELECT @@session.max_join_size;
#
# incorrect types
#
--error ER_WRONG_TYPE_FOR_VAR
set global max_join_size=1.1;
--error ER_WRONG_TYPE_FOR_VAR
set global max_join_size=1e1;
--error ER_WRONG_TYPE_FOR_VAR
set global max_join_size="foo";
#
# affects OPTION_BIG_SELECTS
#
select @@sql_big_selects;
set max_join_size=cast(-1 as unsigned int);
select @@sql_big_selects;
set max_join_size=100;
select @@sql_big_selects;
SET @@global.max_join_size = @start_global_value;
SELECT @@global.max_join_size;
|