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

Batched statements with rewriteBatchedStatements that end with a semicolon fails

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Minor
    • Resolution: Fixed
    • 1.2.3
    • 1.3.0
    • Other
    • None
    • Windows 2012 64-bit as well as Ubuntu

    Description

      The code below will throw issues with any versions above 1.1.7, including 1.2.3 when rewriteBatchedStatements=true

      public static void main(String[] args) throws SQLException {
              MariaDB db = new MariaDB();
              Connection conn = db.getConnection();
              Statement sqlInsert = conn.createStatement();
              for (int i = 0; i < 100; i++) {
                  sqlInsert.addBatch("insert into prep (text) values ('This is a test"+ i +"');");
              }        
              sqlInsert.executeBatch();
              conn.commit();
          }

      Attachments

        Issue Links

          Activity

            People

              diego dupin Diego Dupin
              mtamassia Marcelo Tamassia
              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.