HHH-13695 DDL export forgets to close a Statement
(cherry picked from commit b4a8052a15
)
This commit is contained in:
parent
0e43942b77
commit
f35229d19a
|
@ -86,6 +86,15 @@ public class GenerationTargetToDatabase implements GenerationTarget {
|
|||
|
||||
@Override
|
||||
public void release() {
|
||||
if ( jdbcStatement != null ) {
|
||||
try {
|
||||
jdbcStatement.close();
|
||||
jdbcStatement = null;
|
||||
}
|
||||
catch (SQLException e) {
|
||||
throw ddlTransactionIsolator.getJdbcContext().getSqlExceptionHelper().convert( e, "Unable to close JDBC Statement after DDL execution" );
|
||||
}
|
||||
}
|
||||
if ( releaseAfterUse ) {
|
||||
ddlTransactionIsolator.release();
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue