[CONJ-598] UpdateCount for prepared statements retrieved after closing the statement Created: 2018-04-30 Updated: 2021-02-25 Resolved: 2021-02-25 |
|
| Status: | Closed |
| Project: | MariaDB Connector/J |
| Component/s: | batch |
| Affects Version/s: | 2.2.3, 1.7.3 |
| Fix Version/s: | N/A |
| Type: | Bug | Priority: | Major |
| Reporter: | Robert Borys | Assignee: | Diego Dupin |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Description |
|
Look at: org.mariadb.jdbc.MariaDbPreparedStatementClient#executeBatch():
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(). |
| Comments |
| Comment by Diego Dupin [ 2021-02-08 ] |
|
Long time after task creation, but could you indicate the connection string option ? |
| Comment by Robert Borys [ 2021-02-20 ] |
|
Hello. Unfortunately, I can't remember and I don't have access to affected code anymore. As far as I remember we solved our issue by switching to MySQL Connector/J 8.0.x. |
| Comment by Diego Dupin [ 2021-02-25 ] |
|
too bad. closing issue then, since not reproduced |