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

New warning messages are unreadable

    XMLWordPrintable

Details

    Description

      MDEV-6697 introduced a bunch of new warning messages, many of which are totally confusing. No matter how hard I try, I cannot understand what they mean, it's very frustrating.

      create table t1(a int not null primary key, b int, key(b)) engine=innodb;
      alter table t1 add foreign key(a,b) references t1(a);
       
      Warning	150	Alter  table `test`.`t1` with foreign key constraint failed. Foreign key constraint parse error in foreign key(a,b) references t1(a) close to ). Too few referenced columns, you have 1 when you should have 2.

      What close to what? What does the right bracket relate to?
      Error in foreign key? Error in references?

      create table t1(a int not null primary key, b int, key(b)) engine=innodb;
      alter table t1 add foreign key(a) references t1(a,b);
       
      | Warning |  150 | Alter  table `test`.`t1` with foreign key constraint failed. Foreign key constraint parse error in foreign key(a) references t1(a,b) close to ). Too few referenced columns, you have 2 when you should have 1. |

      How can it be too few if I have more than I should have?

      create temporary table t2(a int, foreign key(a) references t1(a)) engine=innodb;
      ...
      | Warning |  150 | Create  table `tmp`.`t2` with foreign key constraint failed. Referenced table `tmp`.`t1` not found in the data dictionary close to foreign key(a) references t1(a)) engine=innodb. |

      Again, what close to what? Data dictionary to foreign keys? Referenced table to foreign keys?
      And I never referenced `tmp`.`t1` – yes, I can guess why it appeared there, but it's still wrong.

      ...

      Attachments

        Activity

          People

            jplindst Jan Lindström (Inactive)
            elenst Elena Stepanova
            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.