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

Wrong content of DEFERRABILITY column in MariaDbDatabaseMetaData

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.0.1
    • Fix Version/s: 1.6.1, 2.0.2
    • Component/s: metadata
    • Labels:
      None
    • Environment:
      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

            People

            Assignee:
            diego dupin Diego Dupin
            Reporter:
            andreas.buschka Andreas Buschka
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: