TD-10431 user drop
This commit is contained in:
parent
19d54f6f37
commit
552236d4b0
|
@ -286,7 +286,7 @@ TEST_F(DndTestUser, AlterUser_01) {
|
|||
|
||||
SRpcMsg rpcMsg = {0};
|
||||
rpcMsg.pCont = pReq;
|
||||
rpcMsg.contLen = sizeof(SDropUserMsg);
|
||||
rpcMsg.contLen = sizeof(SAlterUserMsg);
|
||||
rpcMsg.msgType = TSDB_MSG_TYPE_ALTER_USER;
|
||||
|
||||
sendMsg(pClient, &rpcMsg);
|
||||
|
|
|
@ -263,7 +263,10 @@ static int32_t mndTransActionUpdate(SSdb *pSdb, STrans *pOldTrans, STrans *pNewT
|
|||
return 0;
|
||||
}
|
||||
|
||||
static int32_t trnGenerateTransId() { return 1; }
|
||||
static int32_t trnGenerateTransId() {
|
||||
static int32_t tmp = 0;
|
||||
return ++tmp;
|
||||
}
|
||||
|
||||
STrans *mndTransCreate(SMnode *pMnode, ETrnPolicy policy, void *rpcHandle) {
|
||||
STrans *pTrans = calloc(1, sizeof(STrans));
|
||||
|
|
|
@ -56,7 +56,8 @@ static int32_t sdbInsertRow(SSdb *pSdb, SHashObj *hash, SSdbRaw *pRaw, SSdbRow *
|
|||
if (pOldRow != NULL) {
|
||||
taosWUnLockLatch(pLock);
|
||||
sdbFreeRow(pRow);
|
||||
return TSDB_CODE_SDB_OBJ_ALREADY_THERE;
|
||||
terrno = TSDB_CODE_SDB_OBJ_ALREADY_THERE;
|
||||
return terrno;
|
||||
}
|
||||
|
||||
pRow->refCount = 1;
|
||||
|
@ -65,7 +66,8 @@ static int32_t sdbInsertRow(SSdb *pSdb, SHashObj *hash, SSdbRaw *pRaw, SSdbRow *
|
|||
if (taosHashPut(hash, pRow->pObj, keySize, &pRow, sizeof(void *)) != 0) {
|
||||
taosWUnLockLatch(pLock);
|
||||
sdbFreeRow(pRow);
|
||||
return TSDB_CODE_SDB_OBJ_ALREADY_THERE;
|
||||
terrno = TSDB_CODE_SDB_OBJ_ALREADY_THERE;
|
||||
return terrno;
|
||||
}
|
||||
|
||||
taosWUnLockLatch(pLock);
|
||||
|
@ -78,7 +80,8 @@ static int32_t sdbInsertRow(SSdb *pSdb, SHashObj *hash, SSdbRaw *pRaw, SSdbRow *
|
|||
taosHashRemove(hash, pRow->pObj, keySize);
|
||||
taosWUnLockLatch(pLock);
|
||||
sdbFreeRow(pRow);
|
||||
return code;
|
||||
terrno = code;
|
||||
return terrno;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -120,7 +123,8 @@ static int32_t sdbDeleteRow(SSdb *pSdb, SHashObj *hash, SSdbRaw *pRaw, SSdbRow *
|
|||
if (ppOldRow == NULL || *ppOldRow == NULL) {
|
||||
taosWUnLockLatch(pLock);
|
||||
sdbFreeRow(pRow);
|
||||
return TSDB_CODE_SDB_OBJ_NOT_THERE;
|
||||
terrno = TSDB_CODE_SDB_OBJ_NOT_THERE;
|
||||
return terrno;
|
||||
}
|
||||
SSdbRow *pOldRow = *ppOldRow;
|
||||
|
||||
|
|
Loading…
Reference in New Issue