WL#13895: InnoDB: SET TABLESPACE AUTOEXTEND SIZE

Affects: Server-8.0   —   Status: Complete

Tablespace growth size is hardcoded inside InnoDB to 1MB (page_size * number of 
pages in an extent). This 1MB limit may have been sufficient on HW from 20 years 
ago. With today's loads, this becomes a bottleneck, especially where we want to 
do high ingestion of data.

In WL#13782 the idea was to use fallocate() on Linux to increase tablespace 
space. This is very fast but has the side effect of fragmenting the file system 
which results in a lot of random IO and more importantly, dropping a tablespace 
becomes very expensive. The time goes up from sub-second to 25 seconds for a 15GB 
tablespace. For very large tablespaces this is unacceptable.

The proposal is to make the auto-extend a tablespace attribute that can be 
updated by the following extension to the existing DDLs to manipulate both the 
implicit or explicit tablespaces:

1) For explicit/general tablespaces
CREATE TABLESPACE T [AUTOEXTEND_SIZE [=] ];
ALTER TABLESPACE T [AUTOEXTEND_SIZE [=] ];

2) For implicit or file_per_table tablespaces, CREATE/ALTER TABLE statements will 
be modified to support the AUTOEXTEND_SIZE clause:
CREATE TABLE T [AUTOEXTEND_SIZE [=] ];
ALTER TABLE T [AUTOEXTEND_SIZE [=] ];