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.