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

InnoDB dictionary recovery wrongly uses READ UNCOMMITTED isolation level instead of READ COMMITTED

    XMLWordPrintable

Details

    Description

      The following patch tries to do extra checkpoint in fil_rename_tablespace(). This lead
      to fail to write few tablespace file name during fil_names_clear().

      diff --git a/storage/innobase/fil/fil0fil.cc b/storage/innobase/fil/fil0fil.cc
      index 681cee32fd5..0b6e4764d98 100644
      --- a/storage/innobase/fil/fil0fil.cc
      +++ b/storage/innobase/fil/fil0fil.cc
      @@ -1918,6 +1918,7 @@ fil_rename_tablespace(
              ut_ad(strchr(new_file_name, '/'));
       
              if (!recv_recovery_is_on()) {
      +               log_make_checkpoint();
                      mysql_mutex_lock(&log_sys.mutex);
              }
      

      The following test case were failing in 10.6:

      innodb.innodb-alter-tempfile
      CURRENT_TEST: innodb.innodb-alter-tempfile
      mysqltest: At line 45: query 'show create table t1' failed: ER_GET_ERRNO (1030): Got error 194 "Tablespace is missing for a table" from storage engine InnoDB
       
      innodb.alter_crash 'innodb'              w4 [ fail ]
              Test ended at 2021-12-12 10:22:42
       
      CURRENT_TEST: innodb.alter_crash
      mysqltest: At line 125: query 'INSERT INTO t2 VALUES (5,6),(7,8)' failed: ER_GET_ERRNO (1030): Got error 194 "Tablespace is missing for a table" from storage engine InnoDB
       
      innodb.instant_alter_crash 'innodb'      w5 [ fail ]
              Test ended at 2021-12-12 10:23:28
       
      CURRENT_TEST: innodb.instant_alter_crash
      mysqltest: At line 200: query 'SHOW CREATE TABLE t3' failed: ER_GET_ERRNO (1030): Got error 194 "Tablespace is missing for a table" from storage engine InnoDB
       
      innodb.truncate_crash 'innodb'           w4 [ fail ]
              Test ended at 2021-12-12 10:24:16
       
      CURRENT_TEST: innodb.truncate_crash
      mysqltest: At line 21: query 'SELECT COUNT(*) FROM t1' failed: ER_GET_ERRNO (1030): Got error 194 "Tablespace is missing for a table" from storage engine InnoDB
      
      

      Attachments

        1. data.tar.xz
          4.74 MB
          Marko Mäkelä

        Issue Links

          Activity

            People

              marko Marko Mäkelä
              thiru Thirunarayanan Balathandayuthapani
              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.