flashback语法报错

【产品名称】

oceanbase 社区版

【产品版本】

3.1.0-2

【问题描述】

MySQL [test]> drop table if exists t1;

Query OK, 0 rows affected (0.019 sec)

MySQL [test]> create table t1(id bigint not null primary key, gmt_create datetime not null default current_timestamp);

Query OK, 0 rows affected (0.052 sec)

MySQL [test]> insert into t1(id) values(1),(2),(3);

Query OK, 3 rows affected (0.017 sec)

Records: 3 Duplicates: 0 Warnings: 0

MySQL [test]> select * from t1;

+----+---------------------+

| id | gmt_create |

+----+---------------------+

| 1 | 2021-07-01 14:26:54 |

| 2 | 2021-07-01 14:26:54 |

| 3 | 2021-07-01 14:26:54 |

+----+---------------------+

3 rows in set (0.003 sec)

MySQL [test]>

MySQL [test]> drop table t1;

Query OK, 0 rows affected (0.335 sec)

MySQL [test]>

MySQL [test]> show recyclebin\G

*************************** 1. row ***************************

OBJECT_NAME: _recycle$_1_1625034923945816

ORIGINAL_NAME: test

TYPE: TABLE

CREATETIME: 2021-06-30 14:35:23.946299

*************************** 2. row ***************************

OBJECT_NAME: _recycle$_1_1625120090213008

ORIGINAL_NAME: test2

TYPE: TABLE

CREATETIME: 2021-07-01 14:14:50.213526

*************************** 3. row ***************************

OBJECT_NAME: _recycle$_1_1625120503498128

ORIGINAL_NAME: t1

TYPE: TABLE

CREATETIME: 2021-07-01 14:21:43.497126

*************************** 4. row ***************************

OBJECT_NAME: _recycle$_1_1625120614516416

ORIGINAL_NAME: t1

TYPE: TABLE

CREATETIME: 2021-07-01 14:23:34.517571

*************************** 5. row ***************************

OBJECT_NAME: _recycle$_1_1625120802800608

ORIGINAL_NAME: t1

TYPE: TABLE

CREATETIME: 2021-07-01 14:26:42.800029

*************************** 6. row ***************************

OBJECT_NAME: _recycle$_1_1625120821149376

ORIGINAL_NAME: t1

TYPE: TABLE

CREATETIME: 2021-07-01 14:27:01.148214

6 rows in set (0.026 sec)

MySQL [test]> flashback table _recycle$_1_1625120821149376 to before drop rename to t3;

ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your OceanBase version for the right syntax to use near 'flashback table _recycle$_1_1625120821149376 to before drop rename to t3' at line 1

之前在钉钉群里咨询过,社区版不支持闪回,一起期待后续能开源这部分功能。

您好,目前社区版本OceanBase具备回收站功能,可以存储您所drop掉的表,但是不具备flashback恢复功能。