|
| 1 | +################ mysql-test\t\enable_acl_cache_deadlock_detection.test ######## |
| 2 | +# # |
| 3 | +# Variable Name: enable_acl_cache_deadlock_detection # |
| 4 | +# Scope: Global # |
| 5 | +# # |
| 6 | +# Creation Date: 2021-04-13 # |
| 7 | +# # |
| 8 | +# # |
| 9 | +# Description:Test Cases of Dynamic System Variable # |
| 10 | +# enable_acl_cache_deadlock_detection that checks the behavior of # |
| 11 | +# this variable in the following ways # |
| 12 | +# * Default Value # |
| 13 | +# * Valid Value # |
| 14 | +# * Invalid value # |
| 15 | +# # |
| 16 | +############################################################################### |
| 17 | +SET @start_global_value = @@GLOBAL.enable_acl_cache_deadlock_detection; |
| 18 | +SELECT @start_global_value; |
| 19 | + |
| 20 | +######################################################################## |
| 21 | +# Display the DEFAULT value of enable_acl_cache_deadlock_detection # |
| 22 | +######################################################################## |
| 23 | + |
| 24 | +SET @@GLOBAL.enable_acl_cache_deadlock_detection = on; |
| 25 | +SET @@GLOBAL.enable_acl_cache_deadlock_detection = DEFAULT; |
| 26 | +select @@GLOBAL.enable_acl_cache_deadlock_detection; |
| 27 | + |
| 28 | +# FLUSH PRIVILEGES not required but just a quick check to see acl cache |
| 29 | +# is working properly |
| 30 | +FLUSH PRIVILEGES; |
| 31 | + |
| 32 | +SET @@GLOBAL.enable_acl_cache_deadlock_detection = off; |
| 33 | +SET @@GLOBAL.enable_acl_cache_deadlock_detection = DEFAULT; |
| 34 | +select @@GLOBAL.enable_acl_cache_deadlock_detection; |
| 35 | + |
| 36 | +# FLUSH PRIVILEGES not required but just a quick check to see acl cache |
| 37 | +# is working properly |
| 38 | +FLUSH PRIVILEGES; |
| 39 | + |
| 40 | +############################################################################### |
| 41 | +# change the value of enable_acl_cache_deadlock_detection to a valid value # |
| 42 | +############################################################################### |
| 43 | + |
| 44 | +SET @@GLOBAL.enable_acl_cache_deadlock_detection = on; |
| 45 | +select @@GLOBAL.enable_acl_cache_deadlock_detection; |
| 46 | + |
| 47 | +# FLUSH PRIVILEGES not required but just a quick check to see acl cache |
| 48 | +# is working properly |
| 49 | +FLUSH PRIVILEGES; |
| 50 | + |
| 51 | +SET @@GLOBAL.enable_acl_cache_deadlock_detection = off; |
| 52 | +select @@GLOBAL.enable_acl_cache_deadlock_detection; |
| 53 | + |
| 54 | +# FLUSH PRIVILEGES not required but just a quick check to see acl cache |
| 55 | +# is working properly |
| 56 | +FLUSH PRIVILEGES; |
| 57 | + |
| 58 | +############################################################################### |
| 59 | +# change the value of enable_acl_cache_deadlock_detection to an invalid value # |
| 60 | +############################################################################### |
| 61 | + |
| 62 | +--Error ER_WRONG_VALUE_FOR_VAR |
| 63 | +SET @@GLOBAL.enable_acl_cache_deadlock_detection = something; |
| 64 | +select @@GLOBAL.enable_acl_cache_deadlock_detection; |
| 65 | + |
| 66 | +--Error ER_WRONG_VALUE_FOR_VAR |
| 67 | +SET @@GLOBAL.enable_acl_cache_deadlock_detection = somethingelse; |
| 68 | +select @@GLOBAL.enable_acl_cache_deadlock_detection; |
| 69 | + |
| 70 | +############################### |
| 71 | +# Restore initial value # |
| 72 | +############################### |
| 73 | + |
| 74 | +SET @@GLOBAL.enable_acl_cache_deadlock_detection = @start_global_value; |
| 75 | +SELECT @@GLOBAL.enable_acl_cache_deadlock_detection; |
0 commit comments