Details
-
Bug
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Fixed
-
10.6
-
None
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;
|