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

Shrinking tablespace logic fails to handle error condition

    XMLWordPrintable

Details

    Description

      During shrinking of tablespace, InnoDB traverses all used extents.
      But it fails to handle the error during traversal.

      Following patch addresses the issue:

      diff --git a/storage/innobase/fsp/fsp0fsp.cc b/storage/innobase/fsp/fsp0fsp.cc
      index d0d406a0c1e..9aa101bb70d 100644
      --- a/storage/innobase/fsp/fsp0fsp.cc
      +++ b/storage/innobase/fsp/fsp0fsp.cc
      @@ -3465,10 +3465,10 @@ dberr_t fsp_traverse_extents(
         else
         {
           err= old_xdes_entry->insert(0, mtr);
      -    if (err) return err;
      -    if (threshold & (srv_page_size - 1))
      +    if (err == DB_SUCCESS && threshold & (srv_page_size - 1))
             err= old_xdes_entry->insert(
               xdes_calc_descriptor_page(0, threshold), mtr);
      +    if (err) return err;
         }
       
         buf_block_t *block= nullptr;
      

      Attachments

        Activity

          People

            thiru Thirunarayanan Balathandayuthapani
            thiru Thirunarayanan Balathandayuthapani
            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.