| 1 |
--disable_query_log |
| 2 |
call mtr.add_suppression("\\[ERROR\\] .* Encryption can't find master key, please check the keyring is loaded."); |
| 3 |
call mtr.add_suppression("\\[ERROR\\] .* Can't set undo tablespace 'innodb_undo_001' to be encrypted"); |
| 4 |
--enable_query_log |
| 5 |
|
| 6 |
SET @start_global_value = @@global.innodb_undo_log_encrypt; |
| 7 |
SELECT @start_global_value; |
| 8 |
|
| 9 |
# |
| 10 |
# exists as global only |
| 11 |
# |
| 12 |
select @@global.innodb_undo_log_encrypt in (0, 1); |
| 13 |
select @@global.innodb_undo_log_encrypt; |
| 14 |
--error ER_INCORRECT_GLOBAL_LOCAL_VAR |
| 15 |
select @@session.innodb_undo_log_encrypt; |
| 16 |
show global variables like 'innodb_undo_log_encrypt'; |
| 17 |
show session variables like 'innodb_undo_log_encrypt'; |
| 18 |
--disable_warnings |
| 19 |
select * from performance_schema.global_variables where variable_name='innodb_undo_log_encrypt'; |
| 20 |
select * from performance_schema.session_variables where variable_name='innodb_undo_log_encrypt'; |
| 21 |
--enable_warnings |
| 22 |
|
| 23 |
# |
| 24 |
# show that it's writable |
| 25 |
# |
| 26 |
set global innodb_undo_log_encrypt=1; |
| 27 |
--sleep 2 |
| 28 |
select @@global.innodb_undo_log_encrypt; |
| 29 |
--disable_warnings |
| 30 |
select * from performance_schema.global_variables where variable_name='innodb_undo_log_encrypt'; |
| 31 |
select * from performance_schema.session_variables where variable_name='innodb_undo_log_encrypt'; |
| 32 |
--enable_warnings |
| 33 |
set @@global.innodb_undo_log_encrypt=0; |
| 34 |
select @@global.innodb_undo_log_encrypt; |
| 35 |
--disable_warnings |
| 36 |
select * from performance_schema.global_variables where variable_name='innodb_undo_log_encrypt'; |
| 37 |
select * from performance_schema.session_variables where variable_name='innodb_undo_log_encrypt'; |
| 38 |
--enable_warnings |
| 39 |
--error ER_GLOBAL_VARIABLE |
| 40 |
set session innodb_undo_log_encrypt='some'; |
| 41 |
--error ER_GLOBAL_VARIABLE |
| 42 |
set @@session.innodb_undo_log_encrypt='some'; |
| 43 |
|
| 44 |
# |
| 45 |
# incorrect types |
| 46 |
# |
| 47 |
--error ER_WRONG_TYPE_FOR_VAR |
| 48 |
set global innodb_undo_log_encrypt=1.1; |
| 49 |
--error ER_WRONG_VALUE_FOR_VAR |
| 50 |
set global innodb_undo_log_encrypt='foo'; |
| 51 |
--error ER_WRONG_VALUE_FOR_VAR |
| 52 |
set global innodb_undo_log_encrypt=-2; |
| 53 |
--error ER_WRONG_TYPE_FOR_VAR |
| 54 |
set global innodb_undo_log_encrypt=1e1; |
| 55 |
--error ER_WRONG_VALUE_FOR_VAR |
| 56 |
set global innodb_undo_log_encrypt=2; |
| 57 |
|
| 58 |
# |
| 59 |
# Cleanup |
| 60 |
# |
| 61 |
|
| 62 |
SET @@global.innodb_undo_log_encrypt = @start_global_value; |
| 63 |
SELECT @@global.innodb_undo_log_encrypt; |