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

Metadata getPrimaryKeys using like in place of strict equality

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Fixed
    • None
    • 3.3.2
    • metadata
    • None

    Description

      created after https://jira.mariadb.org/browse/MDEV-32915.

      Javadoc indicate that parameters must be :
      Parameters:

      • catalog - a catalog name; must match the catalog name as it is stored in the database; "" retrieves those without a catalog; null means that the catalog name should not be used to narrow the search
      • schema - a schema name; must match the schema name as it is stored in the database; "" retrieves those without a schema; null means that the schema name should not be used to narrow the search
      • table - a table name; must match the table name as it is stored in the database
        But current implementation does do a pattern equality, so TABLE LIKE '<table>'. Table containing "_" will then do a pattern matching search in place of equality

      At the same time, query can be improved, using INFORMATION_SCHEMA.STATISTICS table only. INFORMATION_SCHEMA.COLUMNS is redondant, since we can rely on INDEX_NAME='PRIMARY' to identify primary keys (user cannot create a non primary index with name 'PRIMARY')

      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.