HHH-16713 Fix number of row counts check in BatchImpl
This commit is contained in:
parent
de5987b3b3
commit
9dca8f084b
|
@ -303,12 +303,11 @@ public class BatchImpl implements Batch {
|
|||
private void checkRowCounts(int[] rowCounts, PreparedStatementDetails statementDetails) throws SQLException, HibernateException {
|
||||
final int numberOfRowCounts = rowCounts.length;
|
||||
if ( batchPosition != 0 ) {
|
||||
final int expectedNumberOfCounts = batchPosition / getStatementGroup().getNumberOfStatements();
|
||||
if ( numberOfRowCounts != expectedNumberOfCounts ) {
|
||||
if ( numberOfRowCounts != batchPosition ) {
|
||||
JDBC_MESSAGE_LOGGER.unexpectedRowCounts(
|
||||
statementDetails.getMutatingTableDetails().getTableName(),
|
||||
numberOfRowCounts,
|
||||
expectedNumberOfCounts
|
||||
batchPosition
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue