From 288bd10c3d254da8e001893d4fc2b38e448e57d4 Mon Sep 17 00:00:00 2001 From: xsren <285808407@qq.com> Date: Mon, 19 Aug 2024 18:58:07 +0800 Subject: [PATCH] asset: command.c --- source/libs/command/src/command.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/source/libs/command/src/command.c b/source/libs/command/src/command.c index 11ddc89d4c..e3a6168bab 100644 --- a/source/libs/command/src/command.c +++ b/source/libs/command/src/command.c @@ -740,11 +740,14 @@ static int32_t setCreateViewResultIntoDataBlock(SSDataBlock* pBlock, SShowCreate SColumnInfoData* pCol2 = taosArrayGet(pBlock->pDataBlock, 1); char* buf2 = taosMemoryMalloc(SHOW_CREATE_VIEW_RESULT_FIELD2_LEN); if (NULL == buf2) { - QRY_ERR_RET(TSDB_CODE_OUT_OF_MEMORY); + return terrno; } SViewMeta* pMeta = pStmt->pViewMeta; - ASSERT(pMeta); + if(NULL == pMeta) { + qError("exception: view meta is null"); + return TSDB_CODE_APP_ERROR; + } snprintf(varDataVal(buf2), SHOW_CREATE_VIEW_RESULT_FIELD2_LEN - VARSTR_HEADER_SIZE, "CREATE VIEW `%s`.`%s` AS %s", pStmt->dbName, pStmt->viewName, pMeta->querySql); int32_t len = strlen(varDataVal(buf2));