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

Double free of dict_foreign_t during instant ALTER TABLE

    XMLWordPrintable

Details

    Description

      ALTER TABLE of this kind crashes 10.4.7:

      ALTER TABLE myTable
      DROP FOREIGN KEY fk_1_field001,
      DROP FOREIGN KEY fk_2_field001,
      CHANGE id_field id_field_old INT(10) UNSIGNED NOT NULL,
      ADD id_field INT(10) UNSIGNED after id_field_old,
      CHANGE id_option id_option_old INT(10) UNSIGNED NOT NULL,
      ADD id_option INT(10) UNSIGNED after id_option_old;
      

      This is a part of the stack trace:

      bits/stl_tree.h:1203(std::_Rb_tree<dict_foreign_t*, dict_foreign_t*, std::_Identity<dict_foreign_t*>, dict_foreign_compare, ut_allocator<dict_foreign_t*, true> >::equal_
      range(dict_foreign_t* const&))[0x55db4ca14a69]
      bits/stl_tree.h:1756(std::_Rb_tree<dict_foreign_t*, dict_foreign_t*, std::_Identity<dict_foreign_t*>, dict_foreign_compare, ut_allocator<dict_foreign_t*, true> >::_M_era
      se_aux(std::_Rb_tree_const_iterator<dict_foreign_t*>, std::_Rb_tree_const_iterator<dict_foreign_t*>))[0x55db4ca0dbf4]
      bits/stl_set.h:582(std::set<dict_foreign_t*, dict_foreign_compare, ut_allocator<dict_foreign_t*, true> >::erase(dict_foreign_t* const&))[0x55db4c864729]
      handler/handler0alter.cc:9553(innobase_update_foreign_cache(ha_innobase_inplace_ctx*, THD*))[0x55db4c869670]
      handler/handler0alter.cc:11127(ha_innobase::commit_inplace_alter_table(TABLE*, Alter_inplace_info*, bool))[0x55db4c411555]
      
      

      I'll attach all the details later.

      Attachments

        Issue Links

          Activity

            People

              thiru Thirunarayanan Balathandayuthapani
              claudio.nanni Claudio Nanni
              Votes:
              0 Vote for this issue
              Watchers:
              3 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.