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

row_discard_tablespace_for_mysql() can unlock data dictionary without locking data dictionary

    XMLWordPrintable

Details

    Description

      row_discard_tablespace_for_mysql() can call row_mysql_unlock_data_dictionary() without locking it.

      if (fts_exist)
        {     
          fts_optimize_remove_table(table);
          purge_sys.stop_FTS(*table);
          err= fts_lock_tables(trx, *table);
          if (err != DB_SUCCESS)
          {
      rollback:
            if (fts_exist)
            {
              purge_sys.resume_FTS();
              fts_optimize_add_table(table);
            } 
            trx->rollback();
            row_mysql_unlock_data_dictionary(trx);
            return err;
          }
        }
       
        row_mysql_lock_data_dictionary(trx);
        trx->op_info = "discarding tablespace";
        trx->dict_operation= true;
       
        /* We serialize data dictionary operations with dict_sys.latch:
        this is to avoid deadlocks during data dictionary operations */
       
        err= row_discard_tablespace_foreign_key_checks(trx, table);
        if (err != DB_SUCCESS)
          goto rollback;
      

      Attachments

        Issue Links

          Activity

            People

              thiru Thirunarayanan Balathandayuthapani
              thiru Thirunarayanan Balathandayuthapani
              Votes:
              0 Vote for this issue
              Watchers:
              1 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.