Details
- 
    
Bug
 - 
    Status: Closed (View Workflow)
 - 
    
Major
 - 
    Resolution: Fixed
 - 
    1.4.0, 1.3.7, 1.4.1, 1.4.2
 - 
    None
 - 
    Windows\linux connecting to MySQL 5.5.X
 
Description
When either by configuration of "useServerPrepStmts=false"
Or when MariaDbServerPreparedStatement.prepare has failed (the reason here does not matter , probably because of high load)
and the MariaDbConnection fallback is MariaDbClientPreparedStatement.
a query such as "INSERT INTO mytable VALUES (?,?) , (?,?)"
is broken down to the following query parts (using function createRewritableParts):
[0]  INSERT INTO mytable VALUES 
[1] (
[2] ,
[3] )
[4] ,(
[5] ,
[6] )
this results in the final query to be sent as:
INSERT INTO mytable VALUES ( param[0],param[1])param[3],(param[4],)
results in syntax error.
i have checked the older code of version 1.1.8 (before 1.3.0, and 1.1.8 is the version i used before)
in that version in class MySQLParameterizedQuery the createQueryParts
breaks down the query like this:
[0]  INSERT INTO mytable VALUES (
[1] ,
[2] ),(
[3] ,
[4] )
and then the query is sent correctly to the DB