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

SET GLOBAL innodb_log_file_size is not crash safe

    XMLWordPrintable

Details

    Description

      MDEV-33894 included an inadvertent change that causes SET GLOBAL innodb_log_file_size to write incorrect data to the being-resized log file (ib_logfile101). This does not affect the memory mapped log implementation on 64-bit Linux systems (when the log is stored in a mount -o dax file system or in /dev/shm). As far as I can tell, the fix should be this simple:

      diff --git a/storage/innobase/log/log0log.cc b/storage/innobase/log/log0log.cc
      index 93f8db6bfc0..84219dbc830 100644
      --- a/storage/innobase/log/log0log.cc
      +++ b/storage/innobase/log/log0log.cc
      @@ -804,7 +804,7 @@ void log_t::resize_write_buf(size_t length) noexcept
         }
       
         ut_a(os_file_write_func(IORequestWrite, "ib_logfile101", resize_log.m_file,
      -                          buf, offset, length) == DB_SUCCESS);
      +                          resize_flush_buf, offset, length) == DB_SUCCESS);
       }
       
       /** Write buf to ib_logfile0.
      

      Attachments

        Issue Links

          Activity

            People

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