提交 552236d4 编写于 作者: S Shengliang Guan

TD-10431 user drop

上级 19d54f6f
......@@ -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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册