Uploaded image for project: 'MariaDB Server'
  1. MariaDB Server
  2. MDEV-19990

JOIN USING not behaving like 'equals'

    XMLWordPrintable

Details

    Description

      Since 10.3 (I believe), the following query returns EMPTY set:

      SELECT k.TABLE_NAME, k.COLUMN_NAME, k.CONSTRAINT_NAME, k.REFERENCED_TABLE_NAME, k.REFERENCED_COLUMN_NAME, r.DELETE_RULE, r.UPDATE_RULE FROM information_schema.REFERENTIAL_CONSTRAINTS r JOIN information_schema.KEY_COLUMN_USAGE k USING (CONSTRAINT_CATALOG, CONSTRAINT_SCHEMA, CONSTRAINT_NAME)
      

      But if I expand the USING into 'equals', it returns proper results:

      SELECT k.TABLE_NAME, k.COLUMN_NAME, k.CONSTRAINT_NAME, k.REFERENCED_TABLE_NAME, k.REFERENCED_COLUMN_NAME, r.DELETE_RULE, r.UPDATE_RULE FROM information_schema.REFERENTIAL_CONSTRAINTS r JOIN information_schema.KEY_COLUMN_USAGE k on r.CONSTRAINT_CATALOG = k.CONSTRAINT_CATALOG and r.CONSTRAINT_SCHEMA = k.CONSTRAINT_SCHEMA and r.CONSTRAINT_NAME = k.CONSTRAINT_NAME
      

      Tried with "root" and local user.
      Before, it was always returning results with USING.

      I would expect that USING works exactly the same with 'equals' ?

      Attachments

        Issue Links

          Activity

            People

              varun Varun Gupta (Inactive)
              nunop Nuno
              Votes:
              1 Vote for this issue
              Watchers:
              6 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.