db is null

This commit is contained in:
dmchen 2023-12-13 01:04:34 +00:00
parent 71020e4812
commit e9cf639adb
1 changed files with 0 additions and 20 deletions

View File

@ -261,26 +261,6 @@ static int32_t mndProcessRetrieveSysTableReq(SRpcMsg *pReq) {
} else { } else {
memcpy(pReq->info.conn.user, TSDB_DEFAULT_USER, strlen(TSDB_DEFAULT_USER) + 1); memcpy(pReq->info.conn.user, TSDB_DEFAULT_USER, strlen(TSDB_DEFAULT_USER) + 1);
} }
SUserObj *pUser = mndAcquireUser(pMnode, pReq->info.conn.user);
if (pUser == NULL) {
return -1;
}
if (pUser->superUser) {
return -1;
}
if (!pUser->enable) {
terrno = TSDB_CODE_MND_USER_DISABLED;
return -1;
}
if (pUser->sysInfo) {
return -1;
}
if (retrieveReq.db[0] && mndCheckShowPrivilege(pMnode, pReq->info.conn.user, pShow->type, retrieveReq.db) != 0) { if (retrieveReq.db[0] && mndCheckShowPrivilege(pMnode, pReq->info.conn.user, pShow->type, retrieveReq.db) != 0) {
return -1; return -1;
} }