mirror of
https://github.com/MariaDB/server.git
synced 2025-02-20 20:33:15 +01:00
![]() - With the help of MDEV-14795, InnoDB implemented a way to shrink the InnoDB system tablespace after undo tablespaces have been moved to separate files (MDEV-29986). There is no way to defragment any pages of InnoDB system tables. By doing that, shrinking of system tablespace can be more effective. This patch deals with defragment of system tables inside ibdata1. Following steps are done to do the defragmentation of system tablespace: 1) Make sure that there is no user tables exist in ibdata1 2) Iterate through all extent descriptor pages in system tablespace and note their states. 3) Find the free earlier extent to replace the lastly used extents in the system tablespace. 4) Iterate through all indexes of system tablespace and defragment the tree level by level. 5) Iterate the level from left page to right page. If the page comes under the extent to be replaced then allocate a new page from the new extent which are mapped during step(2). 6) Copy the old page content to new page 7) Change the associative pages like left, right and parent page 8) Do step (5), (6), (7) in a single mini-transaction Defragmentation is enabled only when :autoextend exist in innodb_data_file_path variable. |
||
---|---|---|
.. | ||
archive | ||
blackhole | ||
columnstore | ||
connect | ||
csv | ||
example | ||
federated | ||
federatedx | ||
heap | ||
innobase | ||
maria | ||
mroonga | ||
myisam | ||
myisammrg | ||
oqgraph | ||
perfschema | ||
rocksdb | ||
sequence | ||
sphinx | ||
spider | ||
test_sql_discovery |