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