Bug #85830 MySQL startup blocked for 20 minutes on partition-engine-check.
Submitted: 6 Apr 12:07 Modified: 6 Apr 13:17
Reporter: Jean-François Gagné Email Updates:
Status: Verified Impact on me:
Category:MySQL Server: Partitions Severity:S2 (Serious)
Version:5.7.17 OS:Any
Assigned to:

[6 Apr 12:07] Jean-François Gagné

In [1], I can read: "As of MySQL 5.7.17, the generic partitioning handler in the MySQL server is deprecated, [...]".

[1]: https://dev.mysql.com/doc/refman/5.7/en/server-options.html#option_mysqld_disable-partitio...

It looks like a check has been added on MySQL startup to check for tables using the deprecated partition engine.  This check can be disabled with '--disable-partition-engine-check'.

However, this check might take a very long time see below (almost 20 minutes):

2017-04-06T11:34:51.070461Z 0 [Note] Executing 'SELECT * FROM INFORMATION_SCHEMA.TABLES;' to get a list of tables using the deprecated partition engine. You may use the startup option '--disable-partition-engine-check' to skip this check.
2017-04-06T11:34:51.070478Z 0 [Note] Beginning of list of non-natively partitioned tables
2017-04-06T11:53:41.730694Z 0 [Note] End of list of non-natively partitioned tables

The logs above have been produced on this system:

| count(*) |
|   191061 |
1 row in set (0.78 sec)

See suggested fix.

Note that I classified this bug as S2 as delaying MySQL startup can have very bad consequences.  It looks to me that this check is not a good reason to delay MySQL startup.

Many thanks,


How to repeat:
See description.

Suggested fix:
Run the check in a sub thread.

Improve logging so it becomes clean that MySQL is not stuck.
[6 Apr 13:17] Umesh Shastry
Hello Jean,

Thank you for the report and feedback.
Observed this with 5.7.17 build.

[6 Apr 13:18] Umesh Shastry
test results

Attachment: 85830.results (application/octet-stream, text), 3.25 KiB.