mdbx: fix mdbg_canary_put().

Change-Id: I36917a686b28405ed7ecd07dbeb1b4d517720410
This commit is contained in:
Leo Yuriev 2017-04-23 18:59:16 +03:00
parent 1bddc9dcbc
commit ce9c4acea6

View File

@ -9787,7 +9787,12 @@ int mdbx_canary_put(MDB_txn *txn, const mdbx_canary *canary) {
txn->mt_canary.z = canary->z;
}
txn->mt_canary.v = txn->mt_txnid;
txn->mt_flags |= MDB_TXN_DIRTY;
if ((txn->mt_flags & MDB_TXN_DIRTY) == 0) {
MDB_env *env = txn->mt_env;
txn->mt_flags |= MDB_TXN_DIRTY;
env->me_sync_pending += env->me_psize;
}
return MDB_SUCCESS;
}