The recycle bin is a data dictionary table in principle. It stores information about database and table objects that are dropped by users.
Background
The behaviors of the recycle bin when you drop a database object are described as follows:
If the recycle bin is enabled, the object is moved to the recycle bin. You can find the dropped object in the recycle bin and restore or physically delete the object.
If the recycle bin is disabled, the object is not moved to the recycle bin.
The dropped database object in the recycle bin still occupies storage space. The occupied disk space is released after you manually purge the recycle bin or the system automatically deletes it.
Limitations
The recycle bin feature is supported in OceanBase Database V2.2.77 and later.
Objects supported by the recycle bin
In the current version, indexes, tables, and databases can be moved to the recycle bin. The recycle bin in different OceanBase Database tenant modes supports different objects.
For a MySQL user tenant, the recycle bin supports databases, tables, and indexes.
For an Oracle user tenant, the recycle bin supports tables and indexes.
When you directly drop an index, the index is not moved to the recycle bin. When you drop a table, indexes on the table are also moved to the recycle bin together with the table.
When database objects are restored by using the FLASHBACK command, the objects are restored in the sequence of databases > tables.
You cannot directly restore an index. When you restore a table, indexes on the table are restored together with the table.
You cannot query for or perform DML operations on objects in the recycle bin. Only two DDL operations are supported: PURGE and FLASHBACK.