diff options
-rw-r--r-- | libdbpp/tablepatch.cpp | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/libdbpp/tablepatch.cpp b/libdbpp/tablepatch.cpp index 114a2b4..f902739 100644 --- a/libdbpp/tablepatch.cpp +++ b/libdbpp/tablepatch.cpp @@ -5,7 +5,6 @@ #include "sqlWriter.h" #include <buffer.h> #include <safeMapFind.h> -#include <scopeExit.h> #include <boost/algorithm/string/join.hpp> DB::TablePatch::TablePatch() : @@ -24,12 +23,7 @@ DB::Connection::patchTable(TablePatch * tp) if (!inTx()) { throw TransactionRequired(); } - auto savepointName = stringbf("TablePatch_%p_%d", tp, getpid()); - savepoint(savepointName); - AdHoc::ScopeExit _(AdHoc::ScopeExit::Event(), - [this, savepointName](){ releaseSavepoint(savepointName); }, - [this, savepointName](){ rollbackToSavepoint(savepointName); } - ); + TransactionScope tx(this); return { patchDeletes(tp), patchUpdates(tp), |