mirror of
https://github.com/MariaDB/server.git
synced 2025-02-02 03:51:50 +01:00
add DbTxn::abort. closes #232
git-svn-id: file:///svn/tokudb@1439 c7de825b-a66e-492c-adef-691d508d4ae1
This commit is contained in:
parent
07424a4c64
commit
cd8355df8a
2 changed files with 8 additions and 0 deletions
|
@ -19,3 +19,10 @@ int DbTxn::commit (u_int32_t flags) {
|
||||||
the_txn=0; // So we don't touch it my mistake.
|
the_txn=0; // So we don't touch it my mistake.
|
||||||
return env->maybe_throw_error(ret);
|
return env->maybe_throw_error(ret);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int DbTxn::abort () {
|
||||||
|
DbEnv *env = (DbEnv*)the_txn->mgrp->api1_internal; // Must grab the env before committing the txn (because that releases the txn memory.)
|
||||||
|
int ret = the_txn->abort(the_txn);
|
||||||
|
the_txn=0; // So we don't touch it my mistake.
|
||||||
|
return env->maybe_throw_error(ret);
|
||||||
|
}
|
||||||
|
|
|
@ -161,6 +161,7 @@ class DbEnv {
|
||||||
class DbTxn {
|
class DbTxn {
|
||||||
public:
|
public:
|
||||||
int commit (u_int32_t /*flags*/);
|
int commit (u_int32_t /*flags*/);
|
||||||
|
int abort ();
|
||||||
|
|
||||||
virtual ~DbTxn();
|
virtual ~DbTxn();
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue