mirror of
https://github.com/hibernate/hibernate-orm
synced 2025-02-12 06:04:49 +00:00
HHH-8983 log/clear Statement warnings on JdbcCoordinator#release
This commit is contained in:
parent
64acebb5a9
commit
2961f7df68
@ -523,6 +523,10 @@ protected void closeAll(Set<ResultSet> resultSets) {
|
||||
@SuppressWarnings({ "unchecked" })
|
||||
protected void close(Statement statement) {
|
||||
LOG.tracev( "Closing prepared statement [{0}]", statement );
|
||||
|
||||
// Important for Statement caching -- some DBs (especially Sybase) log warnings on every Statement under
|
||||
// certain situations.
|
||||
sqlExceptionHelper().logAndClearWarnings( statement );
|
||||
|
||||
if ( statement instanceof InvalidatableWrapper ) {
|
||||
final InvalidatableWrapper<Statement> wrapper = (InvalidatableWrapper<Statement>) statement;
|
||||
|
@ -268,6 +268,10 @@ public void walkWarnings(
|
||||
public void logAndClearWarnings(Connection connection) {
|
||||
handleAndClearWarnings( connection, STANDARD_WARNING_HANDLER );
|
||||
}
|
||||
|
||||
public void logAndClearWarnings(Statement statement) {
|
||||
handleAndClearWarnings( statement, STANDARD_WARNING_HANDLER );
|
||||
}
|
||||
|
||||
/**
|
||||
* General purpose handling of warnings associated with a JDBC {@link Connection}.
|
||||
|
Loading…
x
Reference in New Issue
Block a user