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

InnoDB should and can be more specific with errno: 168 "Unknown (generic) error from engine". The output for MyISAM, Aria and RocksDB can also be improved.

    XMLWordPrintable

Details

    Description

      In some cases (see MDEV-19449 or upstream https://bugs.mysql.com/bug.php?id=86253 for examples) InnoDB returns error 168 to the user with a generic error message that is not useful at all, while in error log it produces way more specific messages pointing out the root cause. Consider this test case from upstream bug mentioned above:

      MariaDB [test]> drop table t1;
      Query OK, 0 rows affected (0.416 sec)
       
      MariaDB [test]> CREATE TABLE t1(c1 INT KEY,old1 DOUBLE,new1 DOUBLE,old2 DOUBLE,new2 DOUBLE);
      Query OK, 0 rows affected (2.031 sec)
       
      MariaDB [test]> RENAME TABLE t1 TO doesnotexist.t1;
      ERROR 1025 (HY000): Error on rename of '.\test\t1' to '.\doesnotexist\t1' (errno: 168 "Unknown (generic) error from engine")
      

      The error says nothing to the user about the reason of the problem. In the error log we see:

      2019-06-24 19:08:58 9 [ERROR] InnoDB: Operating system error number 3 in a file operation.
      2019-06-24 19:08:58 9 [ERROR] InnoDB: The error means the system cannot find the path specified.
      2019-06-24 19:08:58 9 [ERROR] InnoDB: File .\test\t1.ibd: 'rename' returned OS error 203.
      

      that is way more specific. I think that returning a generic "Unknown" error when the reason for the error is well known is wrong.

      Attachments

        Issue Links

          Activity

            People

              vlad.lesin Vladislav Lesin
              valerii Valerii Kravchuk
              Votes:
              1 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.