Uploaded image for project: 'MariaDB Connector/J'
  1. MariaDB Connector/J
  2. CONJ-199

allowMutliQueries breaks batch inserts with MySQL

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Fixed
    • 1.2.2
    • 1.3.0
    • Other
    • None
    • 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

      Attachments

        Activity

          People

            diego dupin Diego Dupin
            jeff jeff
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Git Integration

                Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.