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

assertion failure during server shutdown after executing show table status on a spider table

    XMLWordPrintable

Details

    Description

      probably affects other versions too.

      Testcase:

      10.11 7443ad1c8a8437a761e1a2d3ba53f7c0ba0dd3bb

      --disable_query_log
      --disable_result_log
      --source ../../t/test_init.inc
      --enable_result_log
      --enable_query_log
      evalp CREATE SERVER srv FOREIGN DATA WRAPPER mysql
      OPTIONS (SOCKET "$MASTER_1_MYSOCK", DATABASE 'test',user 'root');
      create table t2 (c int);
      create table t1 (c int) ENGINE=Spider
      COMMENT='WRAPPER "mysql", srv "srv",TABLE "t2"';
      show table status like "t1";
      shutdown;
      

      Failure output:

      2023-11-23 15:23:22 0 [Note] /home/ycp/source/mariadb-server/10.11/build/sql/mariadbd (initiated by: root[root] @ localhost []): Normal shutdown
      mariadbd: /home/ycp/source/mariadb-server/10.11/src/sql/sql_error.cc:457: void Diagnostics_area::set_error_status(uint, const char*, const char*, const Sql_user_condition_identity&, const Sql_condition*): Assertion `! is_set() || m_can_overwrite_status' failed.
      

      The failure happens when spider tries to close the connection

      Trace:

      Diagnostics_area::set_error_status > THD::raise_condition > my_message_sql > my_error > net_real_write > net_write_command > cli_advanced_command > server_mysql_close > spider_db_disconnect > spider_free_conn > spider_free_conn_from_trx > spider_rollback > spider_close_connection > THD::free_connection > unlink_thd

      However, if we add a connection-creating statement like select * from t1; or insert into t1 values (1); before or after the show status statement, then the failure does not occur.

      Attachments

        Activity

          People

            ycp Yuchen Pei
            ycp Yuchen Pei
            Votes:
            0 Vote for this issue
            Watchers:
            1 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.