From e1508436f4bcec4500047cee4d341db3779a466c Mon Sep 17 00:00:00 2001 From: Xiaoyu Wang Date: Fri, 12 Aug 2022 16:47:42 +0800 Subject: [PATCH] enh: insert client optimize --- source/libs/parser/src/parInsert.c | 2 +- source/libs/parser/src/parUtil.c | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/source/libs/parser/src/parInsert.c b/source/libs/parser/src/parInsert.c index 64488eda61..69545fa67a 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 de4f70d3f3..17e78e7806 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; } -- GitLab