Note
This variable is available starting with V2.1.
Description
recyclebin specifies whether to enable the recycle bin.
Privilege requirements
Query variables
Global level
systenant and all user tenants can execute theSHOW VARIABLESstatement or query theSYS.TENANT_VIRTUAL_GLOBAL_VARIABLEview (Oracle mode) or theinformation_schema.GLOBAL_VARIABLESview (MySQL mode) to obtain the value of a global system variable.Session level
systenant and all user tenants can execute theSHOW VARIABLESstatement or query theSYS.TENANT_VIRTUAL_SESSION_VARIABLEview (Oracle mode) or theinformation_schema.SESSION_VARIABLESview (MySQL mode) to obtain the value of a session system variable.
Modify variables
Global level
systenant can directly modify the value of a global system variable.MySQL user tenants must have the
SUPERorALTER SYSTEMprivilege to modify the value of a global system variable.Oracle user tenants must have the
ALTER SYSTEMprivilege to modify the value of a global system variable.
Session level
systenant and all user tenants can directly modify the value of a session system variable.
Attributes
| Attribute | Description |
|---|---|
| Type | Bool |
| Default value | OFF |
| Value range | |
| Scope |
|
| Modifiable | Yes. You can execute the SET statement to modify the value. |
Usage notes
If you enable the recycle bin (recyclebin is set to ON), the deleted tables and their dependent objects will be placed in the recycle bin. If you disable the recycle bin (recyclebin is set to OFF), the deleted tables and their dependent objects will be directly deleted without being placed in the recycle bin.
Examples
Enable the recycle bin.
Session level
obclient> SET recyclebin = ON;Global level
obclient> SET GLOBAL recyclebin = ON;
References
For more information about recycle bin operations, see the following topics: