Skip to content

Commit 37bd702

Browse files
committed
fix: auth may miss cache when check use db for insert
1 parent 2374597 commit 37bd702

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

source/libs/parser/src/parInsertSql.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4372,7 +4372,7 @@ static int32_t checkAuthUseDb(SParseContext* pCxt, SName* pTbName, bool isAudit)
43724372
.requestId = pCxt->requestId,
43734373
.requestObjRefId = pCxt->requestRid,
43744374
.mgmtEps = pCxt->mgmtEpSet};
4375-
code = catalogChkAuth(pCxt->pCatalog, &conn, &authInfo, &authRes);
4375+
code = catalogChkAuth(pCxt->pCatalog, &conn, &authInfo, &authRes); // cache used firstly inside the function
43764376
if (TSDB_CODE_SUCCESS == code && !authRes.pass[AUTH_RES_BASIC]) {
43774377
code = TSDB_CODE_PAR_PERMISSION_DENIED;
43784378
}

0 commit comments

Comments
 (0)