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

Implement databaseTerm option

    XMLWordPrintable

Details

    Description

      SQL defined catalog and schema.

      MariaDB doesn't support catalog, using a constant catalog 'def'.
      see for example `select t.TABLE_CATALOG, t.TABLE_SCHEMA, t.TABLE_NAME from information_schema.tables t`;

      +---------------+----------------------------------------+------------------------------------------------------+
      | TABLE_CATALOG | TABLE_SCHEMA                           | TABLE_NAME                                           |
      +---------------+----------------------------------------+------------------------------------------------------+
      | def           | information_schema                     | ALL_PLUGINS                                          |
      | def           | information_schema                     | APPLICABLE_ROLES                                     |
      | def           | information_schema                     | CHARACTER_SETS                                       |
      ...
      

      historically in jdbc driver, connection.catalog has been use, while schema is not (connection.getSchema() return null while connection.setSchema() doesn't do any action (and same thing in all metadata methods using catalog and schema). The good use in JDBC driver would be to use schema while not using catalog.

      mysql driver has a new option since 8.0.17 `databaseTerm` that default using historical catalog, but permiting if set to 'SCHEMA' to change to expected schema, ignoring catalog. One curious thing is returning "CATALOG" for DatabaseMetaData.getCatalogTerm() even if CATALOG is not supported in mysql.

      metadata getSchemaTerm() must change accordingly

      Attachments

        Issue Links

          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.