[R2DBC-11] Batching on statement use parameters not added Created: 2020-11-24 Updated: 2020-11-24 Resolved: 2020-11-24 |
|
| Status: | Closed |
| Project: | MariaDB Connector/R2DBC |
| Component/s: | batch |
| Affects Version/s: | 0.8.4-rc |
| Fix Version/s: | 1.0.0 |
| Type: | Bug | Priority: | Major |
| Reporter: | Diego Dupin | Assignee: | Diego Dupin |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | 1h | ||
| Time Spent: | 0.25d | ||
| Original Estimate: | 3h | ||
| Description |
|
from #8 The MariaDB implementation of batch inserts with prepared statements currently requires at least one statement to not be part of a batch when doing batch inserts with prepared statements otherwise an error such as the following occurs:
Looking at the validation logic in MariadbClientParameterizedQueryStatement it does this:
If you call add() for the last batch statement then all entries in parameters are null and they exist only in batchParameters. It seems to be that this check should only be executed if batchingParameters == null and the validation check should be moved inside the if statement. This differs to other implementations whereby you can call add() for each statement and execute them no problem. As a result of this I have to place a MariaDB specific hack into the code I am developing to allow batch inserts to execute across different implementations: |