From 878ab262e679f32f4bb7c743f2863b82502888a1 Mon Sep 17 00:00:00 2001 From: slzhou Date: Thu, 23 Nov 2023 16:26:17 +0800 Subject: [PATCH] fix: show compact detail --- source/client/src/clientMsgHandler.c | 4 ++-- source/libs/nodes/src/nodesUtilFuncs.c | 1 + source/libs/parser/src/parTranslater.c | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/source/client/src/clientMsgHandler.c b/source/client/src/clientMsgHandler.c index 9ccf1cb80d..a727113186 100644 --- a/source/client/src/clientMsgHandler.c +++ b/source/client/src/clientMsgHandler.c @@ -553,8 +553,8 @@ static int32_t buildCompactDbBlock(SCompactDbRsp* pRsp, SSDataBlock** block) { infoData.info.bytes = COMPACT_DB_RESULT_FIELD1_LEN; taosArrayPush(pBlock->pDataBlock, &infoData); - infoData.info.type = TSDB_DATA_TYPE_BIGINT; - infoData.info.bytes = tDataTypes[TSDB_DATA_TYPE_BIGINT].bytes; + infoData.info.type = TSDB_DATA_TYPE_INT; + infoData.info.bytes = tDataTypes[TSDB_DATA_TYPE_INT].bytes; taosArrayPush(pBlock->pDataBlock, &infoData); infoData.info.type = TSDB_DATA_TYPE_VARCHAR; diff --git a/source/libs/nodes/src/nodesUtilFuncs.c b/source/libs/nodes/src/nodesUtilFuncs.c index 04da00d7d9..a24c0497d0 100644 --- a/source/libs/nodes/src/nodesUtilFuncs.c +++ b/source/libs/nodes/src/nodesUtilFuncs.c @@ -1094,6 +1094,7 @@ void nodesDestroyNode(SNode* pNode) { case QUERY_NODE_SHOW_COMPACT_DETAILS_STMT: { SShowCompactDetailsStmt* pStmt = (SShowCompactDetailsStmt*)pNode; nodesDestroyNode(pStmt->pCompactId); + break; } case QUERY_NODE_SHOW_CREATE_DATABASE_STMT: taosMemoryFreeClear(((SShowCreateDatabaseStmt*)pNode)->pCfg); diff --git a/source/libs/parser/src/parTranslater.c b/source/libs/parser/src/parTranslater.c index ccdddb92ef..958d573941 100644 --- a/source/libs/parser/src/parTranslater.c +++ b/source/libs/parser/src/parTranslater.c @@ -8761,7 +8761,7 @@ static int32_t extractCompactDbResultSchema(int32_t* numOfCols, SSchema** pSchem (*pSchema)[2].type = TSDB_DATA_TYPE_BINARY; (*pSchema)[2].bytes = COMPACT_DB_RESULT_FIELD3_LEN; - strcpy((*pSchema)[2].name, "scope"); + strcpy((*pSchema)[2].name, "reason"); return TSDB_CODE_SUCCESS; }