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

Uninitialized return value from ibuf_upgrade_needed()

    XMLWordPrintable

Details

    • Not for Release Notes

    Description

      While debugging MDEV-37949 I encountered an uninitialized value in ibuf_upgrade_needed(), in case we reach the goto func_exit at the very end. This would be fixed by the following:

      diff --git a/storage/innobase/ibuf/ibuf0ibuf.cc b/storage/innobase/ibuf/ibuf0ibuf.cc
      index 46f7f1f923e..85f61f58a72 100644
      --- a/storage/innobase/ibuf/ibuf0ibuf.cc
      +++ b/storage/innobase/ibuf/ibuf0ibuf.cc
      @@ -1028,7 +1028,7 @@ dberr_t ibuf_upgrade_needed()
         mtr_t mtr{nullptr};
         mtr.start();
         mtr.x_lock_space(fil_system.sys_space);
      -  dberr_t err;
      +  dberr_t err= DB_SUCCESS;
         const buf_block_t *header_page= recv_sys.recover(ibuf_header, &mtr, &err);
       
         if (!header_page)
      

      The test scenario involves setting two MDEV-37949 specific parameters, to force all log to be replayed, from the database initialization:

      mysql-test/mtr --parallel=auto --mysqld=--loose-innodb-log-{archive,recovery-start=12288} innodb.insert_into_empty
      

      Theoretically, this could affect an upgrade from 10.11 to 11.4 or later, or restart right after the server was killed during such an upgrade.

      Attachments

        Issue Links

          Activity

            People

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