mirror of
https://git.openldap.org/openldap/openldap.git
synced 2025-12-20 22:59:34 -05:00
txn_commit must abort txn before returning errors
Fix for failure when committing a txn that is a child of some parent txn.
This commit is contained in:
parent
1c8de1883c
commit
3d6b924c25
2 changed files with 4 additions and 1 deletions
|
|
@ -1737,8 +1737,10 @@ mdb_txn_commit(MDB_txn *txn)
|
|||
}
|
||||
x = dst[0].mid;
|
||||
for (; y<=src[0].mid; y++) {
|
||||
if (++x >= MDB_IDL_UM_MAX)
|
||||
if (++x >= MDB_IDL_UM_MAX) {
|
||||
mdb_txn_abort(txn);
|
||||
return ENOMEM;
|
||||
}
|
||||
dst[x] = src[y];
|
||||
}
|
||||
dst[0].mid = x;
|
||||
|
|
|
|||
|
|
@ -530,6 +530,7 @@ int mdb_txn_begin(MDB_env *env, MDB_txn *parent, unsigned int flags, MDB_txn **
|
|||
* <li>EINVAL - an invalid parameter was specified.
|
||||
* <li>ENOSPC - no more disk space.
|
||||
* <li>EIO - a low-level I/O error occurred while writing.
|
||||
* <li>ENOMEM - the transaction is nested and could not be merged into its parent.
|
||||
* </ul>
|
||||
*/
|
||||
int mdb_txn_commit(MDB_txn *txn);
|
||||
|
|
|
|||
Loading…
Reference in a new issue