From ad35a67f2fba26ca02c7440d4ab5cca070e55641 Mon Sep 17 00:00:00 2001 From: dapan1121 Date: Tue, 30 Aug 2022 11:30:43 +0800 Subject: [PATCH 1/2] fix: add table comment in show create table result --- source/libs/command/src/command.c | 1 + 1 file changed, 1 insertion(+) diff --git a/source/libs/command/src/command.c b/source/libs/command/src/command.c index 7d259fe06c..18d839e109 100644 --- a/source/libs/command/src/command.c +++ b/source/libs/command/src/command.c @@ -471,6 +471,7 @@ static int32_t setCreateTBResultIntoDataBlock(SSDataBlock* pBlock, SDbCfgInfo* p len += sprintf(buf2 + VARSTR_HEADER_SIZE, "CREATE TABLE `%s` (", tbName); appendColumnFields(buf2, &len, pCfg); len += sprintf(buf2 + VARSTR_HEADER_SIZE + len, ")"); + appendTableOptions(buf2, &len, pDbCfg, pCfg); } varDataLen(buf2) = len; From 254d16667c673e79df0c3353a8fcd13461957f01 Mon Sep 17 00:00:00 2001 From: dapan1121 Date: Tue, 30 Aug 2022 14:19:02 +0800 Subject: [PATCH 2/2] fix: no memory free in parser for stmt --- source/libs/parser/src/parInsert.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/source/libs/parser/src/parInsert.c b/source/libs/parser/src/parInsert.c index 56fbafe76d..049d1ef545 100644 --- a/source/libs/parser/src/parInsert.c +++ b/source/libs/parser/src/parInsert.c @@ -1669,6 +1669,10 @@ int32_t parseInsertSql(SParseContext* pContext, SQuery** pQuery, SParseMetaCache pDb = taosHashIterate(context.pDbFNameHashObj, pDb); } } + if (pContext->pStmtCb) { + context.pVgroupsHashObj = NULL; + context.pTableBlockHashObj = NULL; + } destroyInsertParseContext(&context); return code; }