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

DROP SERVER / ALTER SERVER under FLUSH TABLES WITH READ LOCK → assertion Diagnostics_area::set_ok_status (double-set of the diagnostics area)

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Duplicate
    • 11.8.8
    • N/A
    • N/A
    • None
    • Not for Release Notes

    Description

      On a debug build, in one session:
      CREATE SERVER v0 FOREIGN DATA WRAPPER mysql OPTIONS (HOST 'h');
      FLUSH TABLES WITH READ LOCK;
      DROP SERVER v0;
      Result:
      mariadbd: /home/mysql/mariadb/sql/sql_error.cc:357:
      void Diagnostics_area::set_ok_status(ulonglong, ulonglong,
      const char *):
      Assertion `!is_set() || (m_status == DA_OK_BULK &&
      is_bulk_op())' failed.
      … got signal 6 ;

      1. Diagnostics_area::set_ok_status(...) sql/sql_error.cc:357
      2. mysql_execute_command(THD*, bool)
        ALTER SERVER v0 OPTIONS (HOST 'h') instead of DROP SERVER
        triggers the same assertion.

      Preconditions (each matters):

      • The server must exist — DROP SERVER IF EXISTS <nonexistent>
        under the read lock does not crash (it bails before the write).
      • The global read lock is the trigger — without FLUSH TABLES
        WITH READ LOCK, DROP SERVER v0 succeeds.

      Attachments

        1. minreproduce.sql
          0.1 kB
          Xingwang Xiang
        2. minreproduce.sql.crashlog.txt
          6 kB
          Xingwang Xiang

        Issue Links

          Activity

            People

              Unassigned Unassigned
              v3rdant Xingwang Xiang
              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.