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

FK naming change breaks connector compatibility - revert default names from '1' to '<table>_ibfk_1'

    XMLWordPrintable

Details

    Description

      In 12.1 (MDEV-28933), FK names a now stored internally inside InnoDB as <schema><table><fkname>, not <schema><fkname>, new implementation is renaming user visible names, and I don't think it was strictly required, and may that be reverted ?

      The problem is that doing a quick check, that affect :

      • mariadb java connector
      • mariadb odbc connector
      • mariadb c++ connector
      • community .net connector
      • and the equivalent mysql connectors

      example of issue in connectors: new FK have now a name defaulting to '1' where is was like '<table>_ibfk_1'.

      Joins on I_S.KEY_COLUMN_USAGE and I_S.REFERENTIAL_CONSTRAINTS are actually done on CONSTRAINT_CATALOG, CONSTRAINT_SCHEMA, and CONSTRAINT_NAME ( not using TABLE_NAME). The problem is that with a default value of a simple integer, the joins will now retrieve lots of value that corresponds to other tables, making not corrected connectors completly wrong.

      So i wonder if default fk name can still be named like '<table>_ibfk_1' in place of '1'

      Attachments

        Issue Links

          Activity

            People

              ralf.gebhardt Ralf Gebhardt
              diego dupin Diego Dupin
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:

                Git Integration

                  Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.