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

Unexpected ER_ERROR_EVALUATING_EXPRESSION warning upon dropping database with a bad table

    XMLWordPrintable

Details

    Description

      Here is the essential part of main.drop_debug test:

      DROP DATABASE IF EXISTS db;
      CREATE DATABASE db;
      CREATE TABLE db.t1(a INT);
      SET SESSION debug_dbug= "+d,bug43138";
      DROP DATABASE db;
      SHOW WARNINGS;
      SET SESSION debug_dbug= "-d,bug43138";
      

      It is expected to produce a warning ER_BAD_TABLE_ERROR, and so it does:

      +-------+------+--------------------+
      | Level | Code | Message            |
      +-------+------+--------------------+
      | Error | 1051 | Unknown table 't1' |
      +-------+------+--------------------+
      1 row in set (0.00 sec)
      

      But if I add FLUSH TABLES, it starts producing an extra warning:

      FLUSH TABLES;
      DROP DATABASE IF EXISTS db;
      CREATE DATABASE db;
      CREATE TABLE db.t1(a INT);
      SET SESSION debug_dbug= "+d,bug43138";
      DROP DATABASE db;
      SHOW WARNINGS;
      

      +-------+------+---------------------------------------------------------------+
      | Level | Code | Message                                                       |
      +-------+------+---------------------------------------------------------------+
      | Error | 1051 | Unknown table 't1'                                            |
      | Error | 4027 | Got an error evaluating stored expression current_timestamp() |
      +-------+------+---------------------------------------------------------------+
      2 rows in set (0.00 sec)
      

      Apparently it has something to do with virtual columns, although I don't know how they get involved here.

      I can deal with the test if the result is expected, but it looks weird, so I need a confirmation.

      Not reproducible on 10.0 and 10.1.

      Attachments

        Activity

          People

            serg Sergei Golubchik
            elenst Elena Stepanova
            Votes:
            0 Vote for this issue
            Watchers:
            2 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.