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

Misleading error message in error log upon failed table creation

    XMLWordPrintable

Details

    Description

      Execution of

      CREATE TABLE t1 (a INT AS (a)) ENGINE=InnoDB;
      

      expectedly fails, in 10.2+ with

      ERROR 4029 (01000): Expression for field `a` is refering to uninitialized field `a`
      

      and no table is created.
      However, an error is written to the error log

      2019-01-17  2:01:21 140595305703168 [ERROR] mysqld: Incorrect information in file: './test/t1.frm'
      

      The error is unnecessary alarming, as it suggests database corruption.

      I don't suppose there should be any error in the log at all, since no harm is done, it's just a regular failed attempt to create a table. But if we do want to write in in the error log on whatever reason, let it be the same ER_EXPRESSION_REFERS_TO_UNINIT_FIELD as returned to the user.

      Attachments

        Issue Links

          Activity

            People

              midenok Aleksey Midenkov
              elenst Elena Stepanova
              Votes:
              0 Vote for this issue
              Watchers:
              7 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.