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

Avoid extending of tablespace frequently

    XMLWordPrintable

Details

    Description

      Altering the table using bulk insert algorithm increases the file size
      by 4mb in some cases. Without MDEV-26740, file size increases by 8mb.
      So we should find out where the bulk insert extends the file size unnecessarily.

      Test case:

      --source include/have_innodb.inc
      --source include/have_sequence.inc
       
      CREATE TABLE s (id varchar(255) PRIMARY KEY, d mediumblob NOT NULL)
      ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci;
       
      INSERT INTO s SELECT UUID(),repeat('x',255) FROM seq_1_to_1000000;
      let $datadir=`SELECT @@datadir`;
      --exec wc -c $datadir/test/s.ibd
      DELETE FROM s LIMIT 100000;
      INSERT INTO s SELECT UUID(),repeat('x',255) FROM seq_1_to_100000;
      --exec wc -c $datadir/test/s.ibd
      390070272 /home/thiru/mariadb_parent/server/10.6-work/bld_work-debug/mysql-test/var/mysqld.1/data//test/s.ibd
       
       
      ALTER TABLE s FORCE, ALGORITHM=INPLACE;
      --exec wc -c $datadir/test/s.ibd
       
      394264576 /home/thiru/mariadb_parent/server/10.6-work/bld_work-debug/mysql-test/var/mysqld.1/data//test/s.ibd
       
      ...
       
      ALTER TABLE s FORCE, ALGORITHM=COPY;
      --exec wc -c $datadir/test/s.ibd
      356515840 /home/thiru/mariadb_parent/server/10.6-work/bld_work-debug/mysql-test/var/mysqld.1/data//test/s.ibd
       
      DROP TABLE s;
      

      Attachments

        Activity

          People

            thiru Thirunarayanan Balathandayuthapani
            thiru Thirunarayanan Balathandayuthapani
            Votes:
            0 Vote for this issue
            Watchers:
            2 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.