[CONJ-740] client-side failure to parse PreparedStatement with placeholders and escape characters Created: 2019-10-17 Updated: 2020-03-06 Resolved: 2020-03-06 |
|
| Status: | Closed |
| Project: | MariaDB Connector/J |
| Component/s: | configuration |
| Affects Version/s: | 2.3.0 |
| Fix Version/s: | 2.4.0 |
| Type: | Bug | Priority: | Major |
| Reporter: | Dave Schumann | Assignee: | Diego Dupin |
| Resolution: | Duplicate | Votes: | 0 |
| Labels: | None | ||
| Attachments: |
|
||||||||
| Issue Links: |
|
||||||||
| Description |
|
We receive SQL syntax errors for valid INSERT statements that mix escape characters, quote characters, and placeholders (?). For example, given a table:
The following will produce a syntax error, when executed as a PreparedStatement:
Example code is attached. We know there is client-side code to parse PreparedStatement SQL for purposes such as rolling multiple INSERTs together with UNION; our guess is that that code does not correctly parse this, and sends invalid SQL to the server. |
| Comments |
| Comment by Alexei Olkhovskii [ 2019-10-18 ] |
|
The issue does not occur in the latest driver version The fix commit likely was https://github.com/MariaDB/mariadb-connector-j/commit/013a3352082f97b7bc06bdef4c355a2c238a28ad#diff-3dbafe7ad6021b022d295910262aead4 |
| Comment by Diego Dupin [ 2020-03-06 ] |
|
Closing since dupplicate of |