diff --git a/hibernate-core/src/main/java/org/hibernate/sql/results/jdbc/internal/DeferredResultSetAccess.java b/hibernate-core/src/main/java/org/hibernate/sql/results/jdbc/internal/DeferredResultSetAccess.java index 63890c84ab..a9c5e83667 100644 --- a/hibernate-core/src/main/java/org/hibernate/sql/results/jdbc/internal/DeferredResultSetAccess.java +++ b/hibernate-core/src/main/java/org/hibernate/sql/results/jdbc/internal/DeferredResultSetAccess.java @@ -241,7 +241,7 @@ public class DeferredResultSetAccess extends AbstractResultSetAccess { } finally { eventListenerManager.jdbcExecuteStatementEnd(); - sqlStatementLogger.logSlowQuery( preparedStatement, executeStartNanos, context() ); + sqlStatementLogger.logSlowQuery( finalSql, executeStartNanos, context() ); } skipRows( resultSet );