mirror of
https://github.com/dbeaver/cloudbeaver.git
synced 2026-09-24 16:04:36 +08:00
CB-1150 Data update: do rollback on error
This commit is contained in:
+5
@@ -300,6 +300,11 @@ public class WebSQLProcessor {
|
||||
if (txnManager != null && txnManager.isSupportsTransactions()) {
|
||||
txnManager.commit(session);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
if (txnManager != null && txnManager.isSupportsTransactions()) {
|
||||
txnManager.rollback(session, null);
|
||||
}
|
||||
throw new DBCException("Error persisting data changes", e);
|
||||
} finally {
|
||||
if (revertToAutoCommit) {
|
||||
txnManager.setAutoCommit(monitor, true);
|
||||
|
||||
Reference in New Issue
Block a user