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

disable BULK use when there isn't any parameter

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Fixed
    • None
    • 3.3.4, 3.4.2, 3.5.3
    • batch
    • None

    Description

      When batching and there is no parameter, Bulk must not be use
      example :

       try (PreparedStatement prep = sharedConn.prepareStatement("INSERT INTO t1 VALUES (NULL)")) {
                  for (int i = 0; i < 100; i++) {
                      prep.addBatch();
                  }
                  prep.executeBatch();
              }
      

      will result in Error: 1295-HY000: This command is not supported in the prepared statement protocol yet

      best solution would be using FOR loop : https://mariadb.com/kb/en/for/

      Attachments

        Activity

          People

            diego dupin Diego Dupin
            diego dupin Diego Dupin
            Votes:
            0 Vote for this issue
            Watchers:
            1 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.