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:
parent
f4d5ed5375
commit
34bdf07bc8
@ -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();
|
||||||
|
Loading…
Reference in New Issue
Block a user