[CONJ-1106] executeBatch() uses same sequence for all records Created: 2023-08-31 Updated: 2023-09-06 Resolved: 2023-09-06 |
|
| Status: | Closed |
| Project: | MariaDB Connector/J |
| Component/s: | batch |
| Affects Version/s: | 3.2.0, 3.1.4 |
| Fix Version/s: | N/A |
| Type: | Bug | Priority: | Major |
| Reporter: | Francisco Canovas Camino | Assignee: | Diego Dupin |
| Resolution: | Duplicate | Votes: | 1 |
| Labels: | None | ||
| Attachments: |
|
||||||||
| Issue Links: |
|
||||||||
| Description |
|
We use the driver of mariadb to do a batch insert with the following query:
We use a sequence for one of the values:
What we found out, is that when the insert is done we see that the three records we are inserting in batch mode, have the same sequence value. Find attached the file. This does not happen with the version 2.7.10 (we have confirmed it), it is happening from 3.0.3 above. |
| Comments |
| Comment by Diego Dupin [ 2023-08-31 ] | |
|
it seems related to https://jira.mariadb.org/projects/MDEV/issues/MDEV-23864
and please vote for MDEV-23864 reolution | |
| Comment by Julio Gomez [ 2023-09-04 ] | |
|
@diego.dupin I am not sure if that's the same as MDEV-23864, because with the same MariaDB server instance, the 2.7.x JDBC driver (maven coordinates: org.mariadb.jdbc:mariadb-java-client:2.7.x) works OK with the aforementioned operation but with 3.x driver (maven coordinates: org.mariadb.jdbc:mariadb-java-client:3.x.y) it does not work as expected. So I guess it's not a server-related issue or it's not a server-only related issue. This is affecting our productive projects. | |
| Comment by Diego Dupin [ 2023-09-04 ] | |
|
In 2.7.x version, option `useBulkStmts` default to false, so doesn't use BULK and MDEV-23864. | |
| Comment by Julio Gomez [ 2023-09-05 ] | |
|
Thanks for your explanation @Diego Dupin. It's clear now. Any estimate for the bugfix? | |
| Comment by Diego Dupin [ 2023-09-06 ] | |
|
That's a server side issue, better ask on MDEV or propose a fix for that |