mirror of
https://git.openldap.org/openldap/openldap.git
synced 2024-12-21 03:10:25 +08:00
Set MDB_TXN_ERROR when inconsistent txn state
This commit is contained in:
parent
ffd2287b55
commit
ee5ba85565
@ -1495,7 +1495,7 @@ mdb_page_spill(MDB_cursor *m0, MDB_val *key, MDB_val *data)
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if ((rc = mdb_midl_append(&txn->mt_spill_pgs, dl[i].mid)))
|
if ((rc = mdb_midl_append(&txn->mt_spill_pgs, dl[i].mid)))
|
||||||
return rc;
|
goto done;
|
||||||
}
|
}
|
||||||
mdb_midl_sort(txn->mt_spill_pgs);
|
mdb_midl_sort(txn->mt_spill_pgs);
|
||||||
|
|
||||||
@ -1503,6 +1503,7 @@ mdb_page_spill(MDB_cursor *m0, MDB_val *key, MDB_val *data)
|
|||||||
|
|
||||||
mdb_cursorpages_mark(m0, P_DIRTY|P_KEEP);
|
mdb_cursorpages_mark(m0, P_DIRTY|P_KEEP);
|
||||||
|
|
||||||
|
done:
|
||||||
if (rc == 0) {
|
if (rc == 0) {
|
||||||
if (txn->mt_parent) {
|
if (txn->mt_parent) {
|
||||||
MDB_txn *tx2;
|
MDB_txn *tx2;
|
||||||
@ -1525,6 +1526,8 @@ mdb_page_spill(MDB_cursor *m0, MDB_val *key, MDB_val *data)
|
|||||||
txn->mt_dirty_room = MDB_IDL_UM_MAX - dl[0].mid;
|
txn->mt_dirty_room = MDB_IDL_UM_MAX - dl[0].mid;
|
||||||
}
|
}
|
||||||
txn->mt_flags |= MDB_TXN_SPILLS;
|
txn->mt_flags |= MDB_TXN_SPILLS;
|
||||||
|
} else {
|
||||||
|
txn->mt_flags |= MDB_TXN_ERROR;
|
||||||
}
|
}
|
||||||
return rc;
|
return rc;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user