TDengine icon indicating copy to clipboard operation
TDengine copied to clipboard

after recreating super table ,insert failed with RESTful

Open 651016236 opened this issue 2 years ago • 1 comments

Bug Description version: 3.0.1.0 创建超级表,使用restful插入数据正常,之后删除超级表,然后重新创建新的结构超级表,再使用restful接口插入数据提示sql错误 在taos命令行执行没有问题 CREATE STABLE pos.st_terminal (ts timestamp, status int) TAGS (terminal_no varchar(30), branch_id varchar(30), hardware_id varchar(50))

restful执行插入 INSERT INTO pos.CN05050001 USING pos.st_terminal TAGS('CN05050001', 'CN05050001', 'xxx:xx:xxx:xxx') VALUES(now, 1)

删除 DROP STABLE pos.st_terminal

CREATE STABLE pos.st_terminal (ts timestamp, status int, branch_id varchar(30), hardware_id varchar(50)) TAGS (terminal_no varchar(30))

restful执行插入 INSERT INTO pos.CN05050001 USING pos.st_terminal TAGS('CN05050001') VALUES(now, 1, 'CN05050001', 'xxx:xx:xxx:xxx')

错误提示: syntax error near ') values(now, 1, 'CN05050001', 'xxx:xx:xxx:xxx')'

目前解决办法,systemctl restart taosadapter解决问题

651016236 avatar Sep 19 '22 15:09 651016236

可以执行 reset query cache 再试试。进程里可能会有缓存旧的元数据。

yu285 avatar Sep 21 '22 02:09 yu285

程里可能会有缓存旧的元数据。

好的谢谢

651016236 avatar Sep 22 '22 05:09 651016236