Note
This variable is available starting with V2.1.
Description
block_encryption_mode specifies the encryption algorithm used in the aes_encrypt and aes_decrypt functions.
Privilege requirements
Query variables
Global level
systenant and all user tenants can use theSHOW VARIABLESstatement or theSYS.TENANT_VIRTUAL_GLOBAL_VARIABLEview (Oracle-compatible mode) and theinformation_schema.GLOBAL_VARIABLESview (MySQL-compatible mode) to view the value of global system variables.Session level
systenant and all user tenants can use theSHOW VARIABLESstatement or theSYS.TENANT_VIRTUAL_SESSION_VARIABLEview (Oracle-compatible mode) and theinformation_schema.SESSION_VARIABLESview (MySQL-compatible mode) to view the value of session system variables.
Modify variables
Global level
systenant can directly modify the value of global system variables.MySQL user tenants need to have the
SUPERorALTER SYSTEMprivilege to modify the value of global system variables.Oracle user tenants need to have the
ALTER SYSTEMprivilege to modify the value of global system variables.
Session level
systenant and all user tenants can directly modify the value of session system variables.
Attributes
| Attribute | Description |
|---|---|
| Type | Enum |
| Default value | aes-128-ecb |
| Value range |
|
| Scope |
|
| Modifiable | Yes. You can execute the SET statement to modify the value. |
Examples
Set the encryption algorithm used in the aes_encrypt and aes_decrypt functions to aes-128-ecb.
Global level
obclient> SET GLOBAL block_encryption_mode='aes-128-ecb';Session level
obclient> SET block_encryption_mode='aes-128-ecb';