Don't skip rollback just because nothing is dirty.

pull/192/head
Brett Wooldridge 11 years ago
parent f3e474d209
commit 98cbc3b36d

@ -147,10 +147,6 @@ public abstract class ConnectionProxy implements IHikariConnectionProxy
private final void resetConnectionState() throws SQLException private final void resetConnectionState() throws SQLException
{ {
if (!delegate.getAutoCommit()) {
delegate.rollback();
}
if (isReadOnlyDirty) { if (isReadOnlyDirty) {
delegate.setReadOnly(parentPool.isReadOnly); delegate.setReadOnly(parentPool.isReadOnly);
} }
@ -194,6 +190,10 @@ public abstract class ConnectionProxy implements IHikariConnectionProxy
} }
try { try {
if (!delegate.getAutoCommit()) {
delegate.rollback();
}
if (isAnythingDirty) { if (isAnythingDirty) {
resetConnectionState(); resetConnectionState();
} }

@ -147,10 +147,6 @@ public abstract class ConnectionProxy implements IHikariConnectionProxy
private final void resetConnectionState() throws SQLException private final void resetConnectionState() throws SQLException
{ {
if (!delegate.getAutoCommit()) {
delegate.rollback();
}
if (isReadOnlyDirty) { if (isReadOnlyDirty) {
delegate.setReadOnly(parentPool.isReadOnly); delegate.setReadOnly(parentPool.isReadOnly);
} }
@ -194,6 +190,10 @@ public abstract class ConnectionProxy implements IHikariConnectionProxy
} }
try { try {
if (!delegate.getAutoCommit()) {
delegate.rollback();
}
if (isAnythingDirty) { if (isAnythingDirty) {
resetConnectionState(); resetConnectionState();
} }

Loading…
Cancel
Save