5
0
mirror of https://github.com/apache/sqoop.git synced 2025-05-04 05:51:17 +08:00

SQOOP-928: PostgresqlManager should rollback any pending changes instead of commit when closing connections

(Venkat Ranganathan via Jarek Jarcec Cecho)
This commit is contained in:
Jarek Jarcec Cecho 2013-03-04 19:11:46 -08:00
parent f4d5ed5375
commit 34bdf07bc8

View File

@ -96,7 +96,7 @@ protected String escapeIdentifier(String identifier) {
@Override @Override
public void close() throws SQLException { public void close() throws SQLException {
if (this.hasOpenConnection()) { if (this.hasOpenConnection()) {
this.getConnection().commit(); // Commit any changes made thus far. this.getConnection().rollback(); // rollback any pending changes.
} }
super.close(); super.close();