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

mysqld_upgrade --check-if-upgrade-is-needed leaks files

Details

    Description

      Hi,

      we discovered that mysql_upgrade with check-if-upgrade-is-needed leaks files under the tmp directory. It will like always create the mysql_upgrade-****** defaults-file but never clean it up.

      should easily be fixable by something like that:

        if (opt_check_upgrade)
          free_used_memory();
          exit(upgrade_already_done(0) == 0);
      

      see code

      Attachments

        Activity

          croser Christian Roser created issue -
          croser Christian Roser made changes -
          Field Original Value New Value
          Description Hi,

          we discovered that mysql_upgrade with {{--check-if-upgrade-is-needed}} leaks files under the tmp directory. It will like always create the {{mysql_upgrade-******}} defaults-file but never clean it up.

          should easily be fixable by something like that:
          {code}
            if (opt_check_upgrade)
              free_used_memory();
              exit(upgrade_already_done(0) == 0);
          {code}
          see [code|https://github.com/MariaDB/server/blob/ffc088634101e73d6191133deffa86b1e2e96ced/client/mysql_upgrade.c#L1484]
          Hi,

          we discovered that mysql_upgrade with {{check-if-upgrade-is-needed}} leaks files under the tmp directory. It will like always create the {{mysql_upgrade-******}} defaults-file but never clean it up.

          should easily be fixable by something like that:
          {code}
            if (opt_check_upgrade)
              free_used_memory();
              exit(upgrade_already_done(0) == 0);
          {code}
          see [code|https://github.com/MariaDB/server/blob/ffc088634101e73d6191133deffa86b1e2e96ced/client/mysql_upgrade.c#L1484]
          danblack Daniel Black made changes -
          Labels Papercut beginner-friendly

          I'd like to work on this issue.

          ultravoilet26 Gulshan Kumar Prasad added a comment - I'd like to work on this issue.
          hsser Sisi Huang added a comment - https://github.com/MariaDB/server/pull/2940
          danblack Daniel Black added a comment -

          Thank you hsser

          danblack Daniel Black added a comment - Thank you hsser
          danblack Daniel Black made changes -
          issue.field.resolutiondate 2023-12-19 08:31:01.0 2023-12-19 08:31:01.155
          danblack Daniel Black made changes -
          Fix Version/s 10.4.33 [ 29516 ]
          Assignee Daniel Black [ danblack ]
          Resolution Fixed [ 1 ]
          Status Open [ 1 ] Closed [ 6 ]
          JIraAutomate JiraAutomate made changes -
          Fix Version/s 10.5.24 [ 29517 ]
          Fix Version/s 10.6.17 [ 29518 ]
          Fix Version/s 10.11.7 [ 29519 ]
          Fix Version/s 11.0.5 [ 29520 ]
          Fix Version/s 11.1.4 [ 29024 ]
          Fix Version/s 11.2.3 [ 29521 ]

          People

            danblack Daniel Black
            croser Christian Roser
            Votes:
            0 Vote for this issue
            Watchers:
            5 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.