提交 629c8768 编写于 作者: M Minglei Jin

fix/txnId: wrap around INT64_MAX

上级 7902b7aa
......@@ -104,6 +104,9 @@ int32_t tdbBegin(TDB *pDb, TXN **ppTxn, void *(*xMalloc)(void *, size_t), void (
SPager *pPager;
int ret;
int64_t txnId = ++pDb->txnId;
if (txnId == INT64_MAX) {
pDb->txnId = 0;
}
TXN *pTxn = tdbOsCalloc(1, sizeof(*pTxn));
if (!pTxn) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册