diff --git a/source/client/src/clientSml.c b/source/client/src/clientSml.c index 14d0534e18..546f5af154 100644 --- a/source/client/src/clientSml.c +++ b/source/client/src/clientSml.c @@ -1952,7 +1952,7 @@ void smlClearInfo(void *data) { NodeList *tmp = info->childTables; while (tmp) { if(tmp->data.used){ - smlDestroySTableMeta((SSmlSTableMeta *)(tmp->data.value)); + smlDestroyTableInfo((SSmlTableInfo *)(tmp->data.value)); tmp->data.used = false; } tmp = tmp->next; diff --git a/utils/test/c/sml_test.c b/utils/test/c/sml_test.c index 47b7adbf18..f3bb64d328 100644 --- a/utils/test/c/sml_test.c +++ b/utils/test/c/sml_test.c @@ -1118,6 +1118,9 @@ int sml_ttl_Test() { const char *sql[] = { "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"); taos_free_result(pRes); @@ -1127,6 +1130,11 @@ int sml_ttl_Test() { printf("%s result1:%s\n", __FUNCTION__, taos_errstr(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'"); printf("%s result2:%s\n", __FUNCTION__, taos_errstr(pRes)); TAOS_ROW row = taos_fetch_row(pRes);