Description:
when initialize a new instance with --innodb-data-file-path=ibdata1:4096M:autoextend, the ibdata file is 3MB,which is "impossable" size, it should 5MB at least.
if the size set to 4224MB the ibdata file is 128MB, if the size set to 10240MB the ibdata file is 2GB.
So, I suspect that it is mod by 4GB, or it is an 32 bit integer problem.
The current workaround is set size less than 4096MB.
And it seems 5.7 and lower will not have this problem.
How to repeat:
The OS tested is "CentOS Linux release 7.5.1804 (Core)", but I don't think it matters.
I'm using with binary mysql-8.0.15/16-linux-glibc2.12-x86_64.tar.xz, which is unzipped to /usr/local/,and linked like this:
lrwxrwxrwx 1 root root 46 May 6 12:05 mysql -> /usr/local/mysql-8.0.15-linux-glibc2.12-x86_64
drwxr-xr-x 10 root root 4096 May 6 13:23 mysql-8.0.15-linux-glibc2.12-x86_64
drwxr-xr-x 11 root root 4096 May 6 11:37 mysql-8.0.16-linux-glibc2.12-x86_64
the PATH is setted like this
export PATH=/usr/local/mysql/bin:$PATH
/etc/my.cnf is empty
run this command:
rm -rf /usr/local/mysql/data/* ; mysqld --initialize --innodb-data-file-path=ibdata1:4096M:autoextend ;ll /usr/local/mysql/data/ibdata1 -h
we can see the ibdata is 3MB
-rw-r----- 1 root root 3.0M May 6 13:30 /usr/local/mysql/data/ibdata1
then try this command:
rm -rf /usr/local/mysql/data/* ; mysqld --initialize --innodb-data-file-path=ibdata1:4224M:autoextend ;ll /usr/local/mysql/data/ibdata1 -h
we can see the ibdata is 128MB
-rw-r----- 1 root root 128M May 6 13:33 /usr/local/mysql/data/ibdata1
finally, this command:
rm -rf /usr/local/mysql/data/* ; mysqld --initialize --innodb-data-file-path=ibdata1:10240M:autoextend ;ll /usr/local/mysql/data/ibdata1 -h
we can see the ibdata is 2GB
-rw-r----- 1 root root 2.0G May 6 13:35 /usr/local/mysql/data/ibdata1