mirror of
https://github.com/hibernate/hibernate-orm
synced 2025-02-20 10:07:17 +00:00
HHH-16713 Fix number of row counts check in BatchImpl
This commit is contained in:
parent
de5987b3b3
commit
9dca8f084b
@ -303,12 +303,11 @@ protected void performExecution() {
|
|||||||
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…
x
Reference in New Issue
Block a user