Details
-
Bug
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Fixed
-
2.2.3, 1.7.3
-
None
Description
Look at: org.mariadb.jdbc.MariaDbPreparedStatementClient#executeBatch():
executeInternalBatch(size);
|
results.commandEnd();
|
return results.getCmdInformation().getUpdateCounts(); |
Calling commandEnd() before getUpdateCounts() (for CmdInformationBatch) causes the latter returning a value like [-2, -2, -2, ...] so no actual count is returned. But when you change the order (getUpdateCounts() before commandEnd()) then the first element of returned array contains actual update count.
I'm not sure whether that change would lead to other problems.
A similar situation is in executeLargeBatch().