Bug #74132 mysql_install_db takes much longer in 5.7.5
Submitted: 29 Sep 2014 9:58 Modified: 24 Nov 2014 16:34
Reporter: Jorge Jordao Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Installing Severity:S2 (Serious)
Version:5.7.5 OS:Any
Assigned to: CPU Architecture:Any

[29 Sep 2014 9:58] Jorge Jordao
Description:
The mysql_install_db execution takes MUCH longer in 5.7.5 than in 5.7.4 (or 5.6.21).

The issue seems to originate not from the script/executable itself, but from the "mysqld --bootstrap" calls that it makes.

Results with a slightly modified mysql_install_db perl script that prints out elapsed times in seconds (find script attached):

$ scripts/mysql_install_db --no-defaults --basedir=/home/jorge/Temp/5.7.4 --datadir=/home/jorge/Temp/5.7.4/data --skip-random-passwords
Installing MySQL system tables...OK (9)
Filling help tables...OK (3)
Total time: 12

$ scripts/mysql_install_db --no-defaults --basedir=/home/jorge/Temp/5.7.5 --datadir=/home/jorge/Temp/5.7.5/data --skip-random-passwords
Installing MySQL system tables...OK (12)
Filling help tables...OK (102)
Total time: 114

How to repeat:
Run the attached mysql_install_db against a 5.7.4 and 5.7.5 installation.
[24 Nov 2014 16:34] Paul DuBois
Noted in 5.7.6 changelog.

With the change in MySQL 5.7.5 to InnoDB for the help tables in the
mysql database, mysql_install_db became much slower for loading the
help-table content. This was due to the INSERT statements loading
with autocommit enabled. Now all the statements execute as a single
transaction, not one transaction per statement.