| 1 |
SET @start_global_value = @@global.innodb_strict_mode; |
| 2 |
SELECT @start_global_value; |
| 3 |
@start_global_value |
| 4 |
1 |
| 5 |
Valid values are 'ON' and 'OFF' |
| 6 |
select @@global.innodb_strict_mode in (0, 1); |
| 7 |
@@global.innodb_strict_mode in (0, 1) |
| 8 |
1 |
| 9 |
select @@global.innodb_strict_mode; |
| 10 |
@@global.innodb_strict_mode |
| 11 |
1 |
| 12 |
select @@session.innodb_strict_mode in (0, 1); |
| 13 |
@@session.innodb_strict_mode in (0, 1) |
| 14 |
1 |
| 15 |
select @@session.innodb_strict_mode; |
| 16 |
@@session.innodb_strict_mode |
| 17 |
1 |
| 18 |
show global variables like 'innodb_strict_mode'; |
| 19 |
Variable_name Value |
| 20 |
innodb_strict_mode ON |
| 21 |
show session variables like 'innodb_strict_mode'; |
| 22 |
Variable_name Value |
| 23 |
innodb_strict_mode ON |
| 24 |
select * from performance_schema.global_variables where variable_name='innodb_strict_mode'; |
| 25 |
VARIABLE_NAME VARIABLE_VALUE |
| 26 |
innodb_strict_mode ON |
| 27 |
select * from performance_schema.session_variables where variable_name='innodb_strict_mode'; |
| 28 |
VARIABLE_NAME VARIABLE_VALUE |
| 29 |
innodb_strict_mode ON |
| 30 |
set global innodb_strict_mode='OFF'; |
| 31 |
set session innodb_strict_mode='OFF'; |
| 32 |
select @@global.innodb_strict_mode; |
| 33 |
@@global.innodb_strict_mode |
| 34 |
0 |
| 35 |
select @@session.innodb_strict_mode; |
| 36 |
@@session.innodb_strict_mode |
| 37 |
0 |
| 38 |
select * from performance_schema.global_variables where variable_name='innodb_strict_mode'; |
| 39 |
VARIABLE_NAME VARIABLE_VALUE |
| 40 |
innodb_strict_mode OFF |
| 41 |
select * from performance_schema.session_variables where variable_name='innodb_strict_mode'; |
| 42 |
VARIABLE_NAME VARIABLE_VALUE |
| 43 |
innodb_strict_mode OFF |
| 44 |
set @@global.innodb_strict_mode=1; |
| 45 |
set @@session.innodb_strict_mode=1; |
| 46 |
select @@global.innodb_strict_mode; |
| 47 |
@@global.innodb_strict_mode |
| 48 |
1 |
| 49 |
select @@session.innodb_strict_mode; |
| 50 |
@@session.innodb_strict_mode |
| 51 |
1 |
| 52 |
select * from performance_schema.global_variables where variable_name='innodb_strict_mode'; |
| 53 |
VARIABLE_NAME VARIABLE_VALUE |
| 54 |
innodb_strict_mode ON |
| 55 |
select * from performance_schema.session_variables where variable_name='innodb_strict_mode'; |
| 56 |
VARIABLE_NAME VARIABLE_VALUE |
| 57 |
innodb_strict_mode ON |
| 58 |
set global innodb_strict_mode=0; |
| 59 |
set session innodb_strict_mode=0; |
| 60 |
select @@global.innodb_strict_mode; |
| 61 |
@@global.innodb_strict_mode |
| 62 |
0 |
| 63 |
select @@session.innodb_strict_mode; |
| 64 |
@@session.innodb_strict_mode |
| 65 |
0 |
| 66 |
select * from performance_schema.global_variables where variable_name='innodb_strict_mode'; |
| 67 |
VARIABLE_NAME VARIABLE_VALUE |
| 68 |
innodb_strict_mode OFF |
| 69 |
select * from performance_schema.session_variables where variable_name='innodb_strict_mode'; |
| 70 |
VARIABLE_NAME VARIABLE_VALUE |
| 71 |
innodb_strict_mode OFF |
| 72 |
set @@global.innodb_strict_mode='ON'; |
| 73 |
set @@session.innodb_strict_mode='ON'; |
| 74 |
select @@global.innodb_strict_mode; |
| 75 |
@@global.innodb_strict_mode |
| 76 |
1 |
| 77 |
select @@session.innodb_strict_mode; |
| 78 |
@@session.innodb_strict_mode |
| 79 |
1 |
| 80 |
select * from performance_schema.global_variables where variable_name='innodb_strict_mode'; |
| 81 |
VARIABLE_NAME VARIABLE_VALUE |
| 82 |
innodb_strict_mode ON |
| 83 |
select * from performance_schema.session_variables where variable_name='innodb_strict_mode'; |
| 84 |
VARIABLE_NAME VARIABLE_VALUE |
| 85 |
innodb_strict_mode ON |
| 86 |
set global innodb_strict_mode=1.1; |
| 87 |
ERROR 42000: Incorrect argument type to variable 'innodb_strict_mode' |
| 88 |
set session innodb_strict_mode=1.1; |
| 89 |
ERROR 42000: Incorrect argument type to variable 'innodb_strict_mode' |
| 90 |
set global innodb_strict_mode=1e1; |
| 91 |
ERROR 42000: Incorrect argument type to variable 'innodb_strict_mode' |
| 92 |
set session innodb_strict_mode=1e1; |
| 93 |
ERROR 42000: Incorrect argument type to variable 'innodb_strict_mode' |
| 94 |
set global innodb_strict_mode=2; |
| 95 |
ERROR 42000: Variable 'innodb_strict_mode' can't be set to the value of '2' |
| 96 |
set session innodb_strict_mode=2; |
| 97 |
ERROR 42000: Variable 'innodb_strict_mode' can't be set to the value of '2' |
| 98 |
set global innodb_strict_mode='AUTO'; |
| 99 |
ERROR 42000: Variable 'innodb_strict_mode' can't be set to the value of 'AUTO' |
| 100 |
set session innodb_strict_mode='AUTO'; |
| 101 |
ERROR 42000: Variable 'innodb_strict_mode' can't be set to the value of 'AUTO' |
| 102 |
set global innodb_strict_mode=-3; |
| 103 |
ERROR 42000: Variable 'innodb_strict_mode' can't be set to the value of '-3' |
| 104 |
set session innodb_strict_mode=-7; |
| 105 |
ERROR 42000: Variable 'innodb_strict_mode' can't be set to the value of '-7' |
| 106 |
select @@global.innodb_strict_mode; |
| 107 |
@@global.innodb_strict_mode |
| 108 |
1 |
| 109 |
select @@session.innodb_strict_mode; |
| 110 |
@@session.innodb_strict_mode |
| 111 |
1 |
| 112 |
select * from performance_schema.global_variables where variable_name='innodb_strict_mode'; |
| 113 |
VARIABLE_NAME VARIABLE_VALUE |
| 114 |
innodb_strict_mode ON |
| 115 |
select * from performance_schema.session_variables where variable_name='innodb_strict_mode'; |
| 116 |
VARIABLE_NAME VARIABLE_VALUE |
| 117 |
innodb_strict_mode ON |
| 118 |
CREATE USER foo, bar; |
| 119 |
GRANT SESSION_VARIABLES_ADMIN ON *.* TO bar; |
| 120 |
SELECT @@session.innodb_strict_mode; |
| 121 |
@@session.innodb_strict_mode |
| 122 |
1 |
| 123 |
SET @@session.innodb_strict_mode = 'OFF'; |
| 124 |
ERROR 42000: Access denied; you need (at least one of) the SYSTEM_VARIABLES_ADMIN or SESSION_VARIABLES_ADMIN privilege(s) for this operation |
| 125 |
SELECT @@session.innodb_strict_mode; |
| 126 |
@@session.innodb_strict_mode |
| 127 |
1 |
| 128 |
SET @@session.innodb_strict_mode = 'OFF'; |
| 129 |
SET @@session.innodb_strict_mode = 1; |
| 130 |
SET @@session.innodb_strict_mode = FALSE; |
| 131 |
SELECT @@session.innodb_strict_mode; |
| 132 |
@@session.innodb_strict_mode |
| 133 |
0 |
| 134 |
SET @@global.innodb_strict_mode = FALSE; |
| 135 |
ERROR 42000: Access denied; you need (at least one of) the SUPER or SYSTEM_VARIABLES_ADMIN privilege(s) for this operation |
| 136 |
SET @@session.innodb_table_locks = -1; |
| 137 |
ERROR 42000: Variable 'innodb_table_locks' can't be set to the value of '-1' |
| 138 |
SET @@session.innodb_table_locks = 'STR'; |
| 139 |
ERROR 42000: Variable 'innodb_table_locks' can't be set to the value of 'STR' |
| 140 |
DROP USER foo, bar; |
| 141 |
SET @@global.innodb_strict_mode = @start_global_value; |
| 142 |
SELECT @@global.innodb_strict_mode; |
| 143 |
@@global.innodb_strict_mode |
| 144 |
1 |