[CONJ-1135] MariaDB Java Client 3.3.1 - Java batched insrt on duplicate key does not work properly Created: 2023-12-07 Updated: 2023-12-13 Resolved: 2023-12-13 |
|
| Status: | Closed |
| Project: | MariaDB Connector/J |
| Component/s: | batch |
| Affects Version/s: | None |
| Fix Version/s: | 3.3.2 |
| Type: | Bug | Priority: | Major |
| Reporter: | Teodor Mysko | Assignee: | Diego Dupin |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Issue Links: |
|
||||||||||||
| Description |
|
Hi, this issue might be related to System setup
IssueI'm trying to do a batch query with INSERT ON DUPLICATE KEY UPDATE statement and when inserting more than one row into a table where all keys already exist then the update performed properly but executeBatch() returns an array where all values are -2 instead of 2: However, if I insert only one row with the existing key then I get the correct value of 2. In the case where all rows are new one works properly, and value 1 is returned for each row. I've tried ?useBulkStmts=false&useBulkStmtsForInserts=true and ?useBulkStmts=true&useBulkStmtsForInserts=true and got the same result. Is it supposed to work like that? To me it seems like a bug, I can not distinguish updates from inserts in this case. To summarize:
|
| Comments |
| Comment by Diego Dupin [ 2023-12-13 ] |
|
Thanks for reporting this issue. |