[CONJ-199] allowMutliQueries breaks batch inserts with MySQL Created: 2015-09-16  Updated: 2015-11-02  Resolved: 2015-11-02

Status: Closed
Project: MariaDB Connector/J
Component/s: Other
Affects Version/s: 1.2.2
Fix Version/s: 1.3.0

Type: Bug Priority: Major
Reporter: jeff Assignee: Diego Dupin
Resolution: Fixed Votes: 0
Labels: None
Environment:

Linux, Java 1.7



 Description   

Enabling the allowMultiQueries option in the JDBC URL to execute multiple queries in one statement in MySQL breaks batch inserts of more than one statement. This works in MySQL Connector/J. I'm not sure if this happens when connecting to real MariaDB, but my guess is yes.

It spews out a syntax error like this:

org.mariadb.jdbc.internal.common.QueryException: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ';insert into example.usage (`event_uuid`) values ('abc')' at line 1

A self contained example that reproduces the problem is located here: https://github.com/ProjectMoon/mariadb-batch-insert-bug



 Comments   
Comment by Diego Dupin [ 2015-11-02 ]

fixed in 1.3.0

Generated at Thu Feb 08 03:13:54 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.