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

FK errors are hidden behind an obscure command

    XMLWordPrintable

Details

    • Bug
    • Status: Open (View Workflow)
    • Major
    • Resolution: Unresolved
    • 5.5(EOL), 10.1(EOL), 10.2(EOL), 10.3(EOL), 10.4(EOL)
    • 10.4(EOL)
    • None

    Description

      Whenever creating a foreign key fails, the server reports something like

      1005: Can't create table test.t3 (errno: 150 "Foreign key constraint is incorrectly formed")
      

      which is not very informative. One can get a much better understanding of an error by issuing SHOW ENGINE INNODB STATUS, if one knows to do it.

      But one shouldn't be required to. The error information should be returned when an error happens. For example, InnoDB could return a warning with, say, "There is no index in the referenced table where the referenced columns appear as the first columns" (may be slightly paraphrased, as appropriate for a warning message).

      It could still do its SHOW ENGINE INNODB STATUS, but returning a warning goes a long way towards helping users to understand the problem

      Attachments

        Issue Links

          Activity

            People

              marko Marko Mäkelä
              serg Sergei Golubchik
              Votes:
              1 Vote for this issue
              Watchers:
              3 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.