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

Statement.getMoreResults() incorrect after CREATE TABLE multiquery

Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Fixed
    • 2.0.2, 2.1.2
    • 2.2.0, 1.7.0
    • Other
    • None
    • Ubuntu 17.04
      MariaDB Server 10.2.8

    Description

      After a query containing multiple CREATE TABLE statements Statement.getMoreResults() returns true
      for second result (indicating the result is a result set) and Statement.getResultSet() then returns null. The getMoreResults() should be false and a getUpdateCount() should then return 0 (indicating an update count of 0 is the result).

      The attached program demonstrates the bug. Correct output should show two update counts of zero. Actual output shows an update count of zero followed by a result set which is null.

      Attached program works correctly with mysql-connector-java-5.1.42.

      The problem also occurs for DROP TABLE statements.

      Attachments

        Issue Links

          Activity

            diego dupin Diego Dupin added a comment -

            correction done in 2.2.0-SNAPSHOT and 1.6.6-SNAPSHOT :

            <repositories>
                <repository>
                    <id>sonatype-nexus-snapshots</id>
                    <name>Sonatype Nexus Snapshots</name>
                    <url>https://oss.sonatype.org/content/repositories/snapshots</url>
                </repository>
            </repositories>
             
            <dependencies>
                <dependency>
                    <groupId>org.mariadb.jdbc</groupId>
                    <artifactId>mariadb-java-client</artifactId>
                    <version>2.2.0-SNAPSHOT</version>
                </dependency>
            </dependencies>
            

            diego dupin Diego Dupin added a comment - correction done in 2.2.0-SNAPSHOT and 1.6.6-SNAPSHOT : <repositories> <repository> <id>sonatype-nexus-snapshots</id> <name>Sonatype Nexus Snapshots</name> <url>https: //oss.sonatype.org/content/repositories/snapshots</url> </repository> </repositories> <dependencies> <dependency> <groupId>org.mariadb.jdbc</groupId> <artifactId>mariadb-java-client</artifactId> <version> 2.2 . 0 -SNAPSHOT</version> </dependency> </dependencies>

            People

              diego dupin Diego Dupin
              colin.chambers Colin Chambers
              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.