From bec6cdf7846985cd9175412d3d151b91fb2db00c Mon Sep 17 00:00:00 2001 From: wangmm0220 Date: Tue, 7 Feb 2023 00:17:25 +0800 Subject: [PATCH] fix:clear hashmap if rerun schemaless --- source/client/src/clientSml.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/source/client/src/clientSml.c b/source/client/src/clientSml.c index caebc457b4..52a68943bd 100644 --- a/source/client/src/clientSml.c +++ b/source/client/src/clientSml.c @@ -1120,7 +1120,7 @@ SSmlHandle *smlBuildSmlInfo(TAOS *taos) { info->maxTagKVs = taosArrayInit(8, sizeof(SSmlKv)); info->preLineColKV = taosArrayInit(8, sizeof(SSmlKv)); - if (NULL == info->pVgHash) { + if (NULL == info->pVgHash || NULL == info->childTables || NULL == info->superTables) { uError("create SSmlHandle failed"); goto cleanup; } @@ -1299,6 +1299,9 @@ int32_t smlClearForRerun(SSmlHandle *info) { oneSTable = (SSmlSTableMeta **)taosHashIterate(info->superTables, oneSTable); } + taosHashClear(info->childTables); + taosHashClear(info->superTables); + if (!info->dataFormat) { if (unlikely(info->lines != NULL)) { uError("SML:0x%" PRIx64 " info->lines != NULL", info->id);