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

Wrong content of DEFERRABILITY column in MariaDbDatabaseMetaData

Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Fixed
    • 2.0.1
    • 1.6.1, 2.0.2
    • metadata
    • None
    • Windows x64, JDK 1.8.121

    Description

      According to https://github.com/MariaDB/mariadb-connector-j/blob/master/src/main/java/org/mariadb/jdbc/MariaDbDatabaseMetaData.java , when querying for database Metadata in getExportedKeys(), getImportedKeys() and getCrossReference(), the driver always returns the constant value 6 (=importedKeyInitiallyImmediate). This implies that the constraint can actually be set into a deferred state (=checking at the end of the transaction, NOT disabling constraint checking altogether). AFAIK deferred constraints is a capability that MariaDB does not currently implements. This creates confusion in my application (and, consequently, an SQL syntax error when trying to put the constraint in a deferred state).

      Please change this value to the (IMHO) correct value of 7 (importedKeyNotDeferrable) so applications who rely on this information can behave correctly.

      Attachments

        Activity

          Wow, that was a lot faster than I expected. Thank you very much!

          andreas.buschka Andreas Buschka added a comment - Wow, that was a lot faster than I expected. Thank you very much!
          diego dupin Diego Dupin added a comment -

          Version will be released in a few days.
          meanwhile correction is available using 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.0.2-SNAPSHOT</version>
              </dependency>
          </dependencies>
          

          diego dupin Diego Dupin added a comment - Version will be released in a few days. meanwhile correction is available using 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.0 . 2 -SNAPSHOT</version> </dependency> </dependencies>

          People

            diego dupin Diego Dupin
            andreas.buschka Andreas Buschka
            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.