【 使用环境 】开发 docker容器内
【 OB or 其他组件 】
【 使用版本 】3.1.1
【问题描述】按照文档创建回收站并已有闪回点 但使用闪回语句失败
【复现路径】
【附件及日志】推荐使用OceanBase敏捷诊断工具obdiag收集诊断信息,详情参见链接(右键跳转查看):
【 使用环境 】开发 docker容器内
【 OB or 其他组件 】
【 使用版本 】3.1.1
【问题描述】按照文档创建回收站并已有闪回点 但使用闪回语句失败
【复现路径】
【附件及日志】推荐使用OceanBase敏捷诊断工具obdiag收集诊断信息,详情参见链接(右键跳转查看):
(root@10.0.0.61:2883) [test]> create table t1(id bigint not null primary key , c1 varchar(50) ,c2 datetime default current_timestamp);
Query OK, 0 rows affected (0.146 sec)
(root@10.0.0.61:2883) [test]> drop table t1;
Query OK, 0 rows affected (0.037 sec)
(root@10.0.0.61:2883) [test]> show recyclebin;
+-----------------------------------------+---------------+-------+----------------------------+
| OBJECT_NAME | ORIGINAL_NAME | TYPE | CREATETIME |
+-----------------------------------------+---------------+-------+----------------------------+
| __recycle_$_1680747949_1712927306038016 | t1 | TABLE | 2024-04-12 21:08:26.112357 |
| __recycle_$_1680747949_1712927311323248 | t1 | TABLE | 2024-04-12 21:08:31.321736 |
+-----------------------------------------+---------------+-------+----------------------------+
2 rows in set (0.004 sec)
(root@10.0.0.61:2883) [test]> flashback table "__recycle_$_1680747949_1712927311323248" to before drop rename to t1;
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 '"__recycle_$_1680747949_1712927311323248" to before drop rename to t1' at line 1
(root@10.0.0.61:2883) [test]>
(root@10.0.0.61:2883) [test]> flashback table t1 to before drop rename to t1_new;
Query OK, 0 rows affected (0.187 sec)
(root@10.0.0.61:2883) [test]> desc t1_New;
+-------+-------------+------+-----+-------------------+-------+
| Field | Type | Null | Key | Default | Extra |
+-------+-------------+------+-----+-------------------+-------+
| id | bigint(20) | NO | PRI | NULL | |
| c1 | varchar(50) | YES | | NULL | |
| c2 | datetime | YES | | CURRENT_TIMESTAMP | |
+-------+-------------+------+-----+-------------------+-------+
3 rows in set (0.041 sec)