Details

    Description

      I think it is a good idea to have a way to shrink ibdata1 file when innodb_file_per_table is ON.
      Maybe not online, but an offline tool to do that.

      Attachments

        Issue Links

          Activity

            danblack Daniel Black added a comment -

            In the commit 3b4b512d8e42bb3d33cf78789754cd10ff310646, Marko made the comment:

            To truncate such "contaminated" or "bloated" undo log tablespaces (when using innodb_undo_tablespaces=2 or more) you can execute the following SQL:

                
                BEGIN;INSERT mysql.innodb_table_stats VALUES('','',DEFAULT,0,0,0);ROLLBACK;
                SET GLOBAL innodb_undo_log_truncate=ON, innodb_fast_shutdown=0;
                SHUTDOWN;
            

            The first line creates a dummy InnoDB transaction, to ensure that there will be some history to be purged during shutdown and that the undo tablespaces will be truncated.

            Sure, its not the full ibdata1 space, but might be what you need.

            danblack Daniel Black added a comment - In the commit 3b4b512d8e42bb3d33cf78789754cd10ff310646, Marko made the comment: To truncate such "contaminated" or "bloated" undo log tablespaces (when using innodb_undo_tablespaces=2 or more) you can execute the following SQL: BEGIN ; INSERT mysql.innodb_table_stats VALUES ( '' , '' , DEFAULT ,0,0,0); ROLLBACK ; SET GLOBAL innodb_undo_log_truncate= ON , innodb_fast_shutdown=0; SHUTDOWN; The first line creates a dummy InnoDB transaction, to ensure that there will be some history to be purged during shutdown and that the undo tablespaces will be truncated. Sure, its not the full ibdata1 space, but might be what you need.

            This feature request seems to duplicate MDEV-14795.

            marko Marko Mäkelä added a comment - This feature request seems to duplicate MDEV-14795 .

            People

              Unassigned Unassigned
              alexcool Alex
              Votes:
              1 Vote for this issue
              Watchers:
              4 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.