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

Improve foreign keys warnings/errors

Details

    • 5.5.45, 10.1.7-1

    Description

      Hi guys, we should check if this should be merged or not from mysql
      http://bugs.mysql.com/bug.php?id=73757

      probably a document bug, or maybe not, just check to don't leave dba searching were is the erro, include a "create table report errors at show warnings about foreign keys" or something like this

      Attachments

        Issue Links

          Activity

            rspadim roberto spadim created issue -
            rspadim roberto spadim made changes -
            Field Original Value New Value
            Affects Version/s 10.0.13 [ 16300 ]
            Affects Version/s 10.1 [ 16100 ]
            serg Sergei Golubchik made changes -
            Affects Version/s 10.1 [ 16100 ]
            elenst Elena Stepanova made changes -
            elenst Elena Stepanova made changes -
            Labels upstream
            serg Sergei Golubchik made changes -
            Fix Version/s 10.1 [ 16100 ]
            serg Sergei Golubchik made changes -
            jplindst Jan Lindström (Inactive) made changes -
            Assignee Jan Lindström [ jplindst ]
            jplindst Jan Lindström (Inactive) made changes -
            Affects Version/s 10.0.13 [ 16300 ]
            Issue Type Bug [ 1 ] Task [ 3 ]
            jplindst Jan Lindström (Inactive) made changes -
            Fix Version/s 10.2 [ 14601 ]
            Fix Version/s 10.1 [ 16100 ]
            ratzpo Rasmus Johansson (Inactive) made changes -
            Workflow MariaDB v2 [ 53729 ] MariaDB v3 [ 66329 ]
            jplindst Jan Lindström (Inactive) made changes -
            Component/s Storage Engine - InnoDB [ 10129 ]
            Component/s Storage Engine - XtraDB [ 10135 ]
            jplindst Jan Lindström (Inactive) made changes -
            Summary increase foreign keys warnings/errors, maybe a doc problem Improve foreign keys warnings/errors
            jplindst Jan Lindström (Inactive) made changes -
            Fix Version/s 5.5 [ 15800 ]
            Fix Version/s 10.2 [ 14601 ]
            jplindst Jan Lindström (Inactive) made changes -
            Sprint 5.5.45 [ 9 ]
            jplindst Jan Lindström (Inactive) made changes -
            Rank Ranked lower
            jplindst Jan Lindström (Inactive) made changes -
            Status Open [ 1 ] In Progress [ 3 ]

            Fix on 5.7 seems to me unsatisfactory :

            mysql> create table t2(a int, constraint a foreign key a (a) references t1(a))engine=innodb;
            ERROR 1215 (HY000): Cannot add foreign key constraint
            mysql> show warnings\G
            *************************** 1. row ***************************
              Level: Warning
               Code: 150
            Message: Create table 'test/t2' with foreign key constraint failed. There is no index in the referenced table where the referenced columns appear as the first columns.

            This is unclear when there is more than one foreign key on table test/t2.

            jplindst Jan Lindström (Inactive) added a comment - Fix on 5.7 seems to me unsatisfactory : mysql> create table t2(a int, constraint a foreign key a (a) references t1(a))engine=innodb; ERROR 1215 (HY000): Cannot add foreign key constraint mysql> show warnings\G *************************** 1. row *************************** Level: Warning Code: 150 Message: Create table 'test/t2' with foreign key constraint failed. There is no index in the referenced table where the referenced columns appear as the first columns. This is unclear when there is more than one foreign key on table test/t2.

            I can't change actual error messages on GA product. However, I can add additional or improved error messages to show warnings.

            jplindst Jan Lindström (Inactive) added a comment - I can't change actual error messages on GA product. However, I can add additional or improved error messages to show warnings.
            serg Sergei Golubchik made changes -
            Sprint 5.5.45 [ 9 ] 5.5.45, 10.1.7-1 [ 9, 10 ]
            serg Sergei Golubchik made changes -
            Rank Ranked higher
            jplindst Jan Lindström (Inactive) made changes -
            Fix Version/s 5.5.45 [ 19405 ]
            Fix Version/s 5.5 [ 15800 ]
            Resolution Fixed [ 1 ]
            Status In Progress [ 3 ] Closed [ 6 ]
            serg Sergei Golubchik made changes -
            Workflow MariaDB v3 [ 66329 ] MariaDB v4 [ 132404 ]

            People

              jplindst Jan Lindström (Inactive)
              rspadim roberto spadim
              Votes:
              0 Vote for this issue
              Watchers:
              3 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.