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

innodb_force_recovery=5 displays bogus warnings about too new transaction identifier

Details

    Description

      With MDEV-15132 in MariaDB 10.3.5, InnoDB no longer writes the transaction identifier to the TRX_SYS page. The information is only written to undo log headers. Because the setting innodb_force_recovery=5 will skip reading any undo logs, the maximum transaction identifier cannot be determined.

      Because of this, the following kind of warning messages are bogus and should be suppressed when running with innodb_force_recovery set to 5 or 6:

      CURRENT_TEST: innodb.innodb_force_recovery
      --- /usr/share/mysql-test/suite/innodb/r/innodb_force_recovery.result	2018-02-24 20:33:04.000000000 +0000
      +++ /dev/shm/var/1/log/innodb_force_recovery.reject	2018-02-25 00:10:34.038752342 +0000
      @@ -34,7 +34,8 @@
       # Restart the server with innodb_force_recovery as 5.
       select * from t2;
       f1	f2
      -1	2
      +Warnings:
      +Warning	1642	InnoDB: Transaction id in a record of table `test`.`t2` is newer than system-wide maximum.
       insert into t2 values(2, 3);
       ERROR HY000: Running in read-only mode
       alter table t2 add f3 int not null, algorithm=copy;
       
      mysqltest: Result length mismatch
      

      Attachments

        Issue Links

          Activity

            An appropriate fix would seem to be to use the READ UNCOMMITTED isolation level when innodb_force_recovery is set to 5 or more, regardless of the user-specified transaction isolation level. Since MariaDB 10.2 (along with upstream MySQL 5.7), InnoDB already does this for innodb_read_only=1.

            marko Marko Mäkelä added a comment - An appropriate fix would seem to be to use the READ UNCOMMITTED isolation level when innodb_force_recovery is set to 5 or more, regardless of the user-specified transaction isolation level. Since MariaDB 10.2 (along with upstream MySQL 5.7), InnoDB already does this for innodb_read_only=1 .

            People

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