提交 5711572b 编写于 作者: wmmhello's avatar wmmhello

fix:error for destroy

上级 a4d03b43
...@@ -1952,7 +1952,7 @@ void smlClearInfo(void *data) { ...@@ -1952,7 +1952,7 @@ void smlClearInfo(void *data) {
NodeList *tmp = info->childTables; NodeList *tmp = info->childTables;
while (tmp) { while (tmp) {
if(tmp->data.used){ if(tmp->data.used){
smlDestroySTableMeta((SSmlSTableMeta *)(tmp->data.value)); smlDestroyTableInfo((SSmlTableInfo *)(tmp->data.value));
tmp->data.used = false; tmp->data.used = false;
} }
tmp = tmp->next; tmp = tmp->next;
......
...@@ -1118,6 +1118,9 @@ int sml_ttl_Test() { ...@@ -1118,6 +1118,9 @@ int sml_ttl_Test() {
const char *sql[] = { const char *sql[] = {
"meters,location=California.LosAngeles,groupid=2 current=11.8,voltage=221,phase=\"2022-02-0210:22:22\" 1626006833739000000", "meters,location=California.LosAngeles,groupid=2 current=11.8,voltage=221,phase=\"2022-02-0210:22:22\" 1626006833739000000",
}; };
const char *sql1[] = {
"meters,location=California.LosAngeles,groupid=2 current=11.8,voltage=221,phase=\"2022-02-0210:22:22\" 1626006833339000000",
};
pRes = taos_query(taos, "use sml_db"); pRes = taos_query(taos, "use sml_db");
taos_free_result(pRes); taos_free_result(pRes);
...@@ -1127,6 +1130,11 @@ int sml_ttl_Test() { ...@@ -1127,6 +1130,11 @@ int sml_ttl_Test() {
printf("%s result1:%s\n", __FUNCTION__, taos_errstr(pRes)); printf("%s result1:%s\n", __FUNCTION__, taos_errstr(pRes));
taos_free_result(pRes); taos_free_result(pRes);
pRes = taos_schemaless_insert_ttl(taos, (char **)sql1, sizeof(sql1) / sizeof(sql1[0]), TSDB_SML_LINE_PROTOCOL, TSDB_SML_TIMESTAMP_NANO_SECONDS, 20);
printf("%s result1:%s\n", __FUNCTION__, taos_errstr(pRes));
taos_free_result(pRes);
pRes = taos_query(taos, "select `ttl` from information_schema.ins_tables where table_name='t_be97833a0e1f523fcdaeb6291d6fdf27'"); pRes = taos_query(taos, "select `ttl` from information_schema.ins_tables where table_name='t_be97833a0e1f523fcdaeb6291d6fdf27'");
printf("%s result2:%s\n", __FUNCTION__, taos_errstr(pRes)); printf("%s result2:%s\n", __FUNCTION__, taos_errstr(pRes));
TAOS_ROW row = taos_fetch_row(pRes); TAOS_ROW row = taos_fetch_row(pRes);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册