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

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

        Issue Links

          Activity

            thiru Thirunarayanan Balathandayuthapani created issue -
            marko Marko Mäkelä made changes -
            Field Original Value New Value
            marko Marko Mäkelä made changes -
            thiru Thirunarayanan Balathandayuthapani made changes -
            Status Open [ 1 ] In Progress [ 3 ]
            thiru Thirunarayanan Balathandayuthapani made changes -
            Status In Progress [ 3 ] Stalled [ 10000 ]
            thiru Thirunarayanan Balathandayuthapani made changes -
            marko Marko Mäkelä made changes -
            thiru Thirunarayanan Balathandayuthapani made changes -
            Assignee Thirunarayanan Balathandayuthapani [ thiru ] Marko Mäkelä [ marko ]
            marko Marko Mäkelä made changes -
            Status Stalled [ 10000 ] In Progress [ 3 ]
            marko Marko Mäkelä made changes -
            Attachment data.tar.xz [ 62550 ]
            marko Marko Mäkelä made changes -
            issue.field.resolutiondate 2022-03-28 06:13:32.0 2022-03-28 06:13:32.169
            marko Marko Mäkelä made changes -
            Fix Version/s 10.6.8 [ 27506 ]
            Fix Version/s 10.7.4 [ 27504 ]
            Fix Version/s 10.8.3 [ 27502 ]
            Fix Version/s 10.9.1 [ 27114 ]
            Fix Version/s 10.6 [ 24028 ]
            Fix Version/s 10.7 [ 24805 ]
            Resolution Fixed [ 1 ]
            Status In Progress [ 3 ] Closed [ 6 ]
            marko Marko Mäkelä made changes -
            Summary InnoDB fails to recover when extra checkpoint during fil_rename_tablespace() InnoDB dictionary recovery wrongly uses READ UNCOMMITTED isolation level instead of READ COMMITTED
            marko Marko Mäkelä made changes -
            marko Marko Mäkelä made changes -
            marko Marko Mäkelä made changes -
            marko Marko Mäkelä made changes -

            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.