oceanbase数据库开启回收站功能

obclient> SHOW VARIABLES LIKE ‘%recyclebin%‘;
+---------------+-------+
| Variable_name | Value |
+---------------+-------+
| recyclebin    | OFF   |
+---------------+-------+
1 row in set (0.01 sec)

obclient> SET @@RECYCLEBIN=ON;
Query OK, 0 rows affected (0.00 sec)

obclient> SHOW VARIABLES LIKE ‘%recyclebin%‘;
+---------------+-------+
| Variable_name | Value |
+---------------+-------+
| recyclebin    | ON    |
+---------------+-------+
1 row in set (0.00 sec)

obclient> SHOW RECYCLEBIN;
Empty set (0.01 sec)

obclient> CREATE TABLE test1 AS SELECT * FROM t1;
ERROR 1046 (3D000): No database selected
obclient> USE test;
Database changed
obclient> CREATE TABLE test1 AS SELECT * FROM t1;
Query OK, 1 row affected (0.13 sec)

obclient>
obclient>
obclient> SHOW VARIABLES LIKE ‘RECYCLEBIN‘
    ->
    -> ;
+---------------+-------+
| Variable_name | Value |
+---------------+-------+
| recyclebin    | ON    |
+---------------+-------+
1 row in set (0.01 sec)

obclient>
obclient>
obclient> SHOW RECYCLEBIN;
Empty set (0.00 sec)

obclient> DROP TABLE test1;
Query OK, 0 rows affected (0.02 sec)

obclient> SHOW RECYCLEBIN;
+--------------------------------+---------------+-------+----------------------------+
| OBJECT_NAME                    | ORIGINAL_NAME | TYPE  | CREATETIME                 |
+--------------------------------+---------------+-------+----------------------------+
| __recycle_$_3_1630659246143488 | test1         | TABLE | 2021-09-03 16:54:06.144186 |
+--------------------------------+---------------+-------+----------------------------+
1 row in set (0.01 sec)

obclient>

 

https://www.oceanbase.com/docs/oceanbase-database/oceanbase-database/V2.2.30/objects-supported-by-recycle-bin

oceanbase数据库开启回收站功能

上一篇:restTemple发送请求、上传文件(@LoadBalanced微服务调用及url调用)


下一篇:MySQL基础2——常用命令