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
{
if (!delegate.getAutoCommit()) {
delegate.rollback();
}
if (isReadOnlyDirty) {
delegate.setReadOnly(parentPool.isReadOnly);
}
@ -194,6 +190,10 @@ public abstract class ConnectionProxy implements IHikariConnectionProxy
}
try {
if (!delegate.getAutoCommit()) {
delegate.rollback();
}
if (isAnythingDirty) {
resetConnectionState();
}

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

Loading…
Cancel
Save