Patch from Charlie to always commit if auto-commit is off.
This commit is contained in:
@@ -563,8 +563,10 @@ public class PersistenceContext
|
|||||||
stmt.close();
|
stmt.close();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// if auto-commit is off and this is a write operation, push it through
|
// Always commit if auto-commit is off. If the read-only operation managed to
|
||||||
if (!isReadOnly && !conn.getAutoCommit()) {
|
// acquire some locks, this will release them. Also, we've seen a MySQL bug where
|
||||||
|
// not committing after a select causes later selects to see stale results.
|
||||||
|
if (!conn.getAutoCommit()) {
|
||||||
conn.commit();
|
conn.commit();
|
||||||
}
|
}
|
||||||
// note the time it took to invoke this operation
|
// note the time it took to invoke this operation
|
||||||
|
|||||||
Reference in New Issue
Block a user