diff --git a/source/libs/catalog/src/catalog.c b/source/libs/catalog/src/catalog.c index 3b26f8b9efaf1cc1c17806729dc1d777e91186d4..d84d126b67b4d79c8f00607888538ba6110f68c6 100644 --- a/source/libs/catalog/src/catalog.c +++ b/source/libs/catalog/src/catalog.c @@ -310,12 +310,12 @@ int32_t ctgGetVgInfoFromHashValue(SDBVgroupInfo *dbInfo, const SName *pTableName } if (NULL == vgInfo) { - ctgError("no hash range found for hashvalue[%u]", hashValue); + ctgError("no hash range found for hashvalue [%u], numOfVgId:%d", hashValue, taosHashGetSize(dbInfo->vgInfo)); void *pIter1 = taosHashIterate(dbInfo->vgInfo, NULL); while (pIter1) { vgInfo = pIter1; - ctgError("valid range:[%d, %d], vgId:%d", vgInfo->hashBegin, vgInfo->hashEnd, vgInfo->vgId); + ctgError("valid range:[%u, %u], vgId:%d", vgInfo->hashBegin, vgInfo->hashEnd, vgInfo->vgId); pIter1 = taosHashIterate(dbInfo->vgInfo, pIter1); } @@ -325,7 +325,6 @@ int32_t ctgGetVgInfoFromHashValue(SDBVgroupInfo *dbInfo, const SName *pTableName *pVgroup = *vgInfo; _return: - CTG_RET(TSDB_CODE_SUCCESS); } diff --git a/source/libs/parser/src/dCDAstProcess.c b/source/libs/parser/src/dCDAstProcess.c index e944fb01bdf5615cc4c04b5cee4bf1e937d76142..efe76700896b37219f0eaccb7bcaee358e9223de 100644 --- a/source/libs/parser/src/dCDAstProcess.c +++ b/source/libs/parser/src/dCDAstProcess.c @@ -626,11 +626,12 @@ static int32_t doBuildSingleTableBatchReq(SName* pTableName, SArray* pColumns, S int32_t doCheckAndBuildCreateTableReq(SCreateTableSql* pCreateTable, SParseBasicCtx* pCtx, SMsgBuf* pMsgBuf, char** pOutput, int32_t* len) { SArray* pBufArray = NULL; + int32_t code = 0; // it is a sql statement to create a normal table if (pCreateTable->childTableInfo == NULL) { assert(taosArrayGetSize(pCreateTable->colInfo.pColumns) > 0 && pCreateTable->colInfo.pTagColumns == NULL); - int32_t code = doCheckForCreateTable(pCreateTable, pMsgBuf); + code = doCheckForCreateTable(pCreateTable, pMsgBuf); if (code != TSDB_CODE_SUCCESS) { return code; } @@ -659,7 +660,10 @@ int32_t doCheckAndBuildCreateTableReq(SCreateTableSql* pCreateTable, SParseBasic destroyCreateTbReqBatch(&tbatch); } else { // it is a child table, created according to a super table - doCheckAndBuildCreateCTableReq(pCreateTable, pCtx, pMsgBuf, &pBufArray); + code = doCheckAndBuildCreateCTableReq(pCreateTable, pCtx, pMsgBuf, &pBufArray); + if (code != 0) { + return code; + } } SVnodeModifOpStmtInfo* pStmtInfo = calloc(1, sizeof(SVnodeModifOpStmtInfo));