Merge pull request #9645 from taosdata/feature/3.0_liaohj
[td-11818] add more check.
This commit is contained in:
commit
651210b596
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
|
@ -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));
|
||||
|
|
Loading…
Reference in New Issue