diff options
Diffstat (limited to 'src/db/db_cds.c')
-rw-r--r-- | src/db/db_cds.c | 22 |
1 files changed, 19 insertions, 3 deletions
diff --git a/src/db/db_cds.c b/src/db/db_cds.c index 185d5487..d3cc990a 100644 --- a/src/db/db_cds.c +++ b/src/db/db_cds.c @@ -1,7 +1,7 @@ /*- * See the file LICENSE for redistribution information. * - * Copyright (c) 2000, 2012 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2000, 2015 Oracle and/or its affiliates. All rights reserved. * * $Id$ */ @@ -43,7 +43,15 @@ static int __cdsgroup_abort(txn) DB_TXN *txn; { - return (__cdsgroup_notsup(txn->mgrp->env, "abort")); + ENV *env; + + env = txn->mgrp->env; + /* + * As the txn handle can not be used any more, we call + * __cdsgroup_commit to release the lock and destroy the handle. + */ + (void)__cdsgroup_commit(txn, 0); + return (__cdsgroup_notsup(env, "abort")); } static int @@ -83,8 +91,16 @@ static int __cdsgroup_discard(txn, flags) DB_TXN *txn; u_int32_t flags; { + ENV *env; + COMPQUIET(flags, 0); - return (__cdsgroup_notsup(txn->mgrp->env, "discard")); + env = txn->mgrp->env; + /* + * As the txn handle can not be used any more, we call + * __cdsgroup_commit to release the lock and destroy the handle. + */ + (void)__cdsgroup_commit(txn, 0); + return (__cdsgroup_notsup(env, "discard")); } static u_int32_t __cdsgroup_id(txn) |