diff --git a/source/libs/parser/src/parInsert.c b/source/libs/parser/src/parInsert.c index 64488eda61f06fe1ae0ce7af7279672f3f61227a..69545fa67a636ddfeb43d4251b1afa72da6fc659 100644 --- a/source/libs/parser/src/parInsert.c +++ b/source/libs/parser/src/parInsert.c @@ -1032,7 +1032,7 @@ static int32_t storeTableMeta(SInsertParseContext* pCxt, SHashObj* pHash, int32_ CHECK_CODE(getTableVgroup(pCxt, tbNo, pTableName, &vg)); CHECK_CODE(taosHashPut(pCxt->pVgroupsHashObj, (const char*)&vg.vgId, sizeof(vg.vgId), (char*)&vg, sizeof(vg))); - pMeta->uid = 0; + pMeta->uid = tbNo; pMeta->vgId = vg.vgId; pMeta->tableType = TSDB_CHILD_TABLE; diff --git a/source/libs/parser/src/parUtil.c b/source/libs/parser/src/parUtil.c index de4f70d3f3f086512c0ef34d993b9aeae65bb5a4..17e78e78061b69c9eff64ad6a5802369fefaf62d 100644 --- a/source/libs/parser/src/parUtil.c +++ b/source/libs/parser/src/parUtil.c @@ -746,6 +746,9 @@ int32_t putMetaDataToCacheForInsert(const SMetaData* pMetaData, SParseMetaCache* int32_t ndbs = taosArrayGetSize(pMetaData->pUser); for (int32_t i = 0; i < ndbs; ++i) { SMetaRes* pRes = taosArrayGet(pMetaData->pUser, i); + if (TSDB_CODE_SUCCESS != pRes->code) { + return pRes->code; + } if (!(*(bool*)pRes->pRes)) { return TSDB_CODE_PAR_PERMISSION_DENIED; }