Bug #87065 Release lock on table statistics after query plan created
Submitted: 13 Jul 2017 18:49 Modified: 6 Jun 2018 14:38
Reporter: Sveta Smirnova (OCA) Email Updates:
Status: Verified Impact on me:
Category:MySQL Server: InnoDB storage engine Severity:S4 (Feature request)
Version:5.7.18, 5.6.36 OS:Any
Assigned to: CPU Architecture:Any

[13 Jul 2017 18:49] Sveta Smirnova
Under concurrent environment running ANALYZE TABLE could lead to situation when hundreds of tables are in state "Waiting for table flush".

How to repeat:
Read https://www.percona.com/blog/2013/02/27/mysql-optimizer-analyze-table-and-waiting-for-tabl...

Suggested fix:
Implement new type of lock which holds statistics only and release it immediately after Optimizer creates execution plan.
[6 Jun 2018 14:38] MySQL Verification Team
HI Sveta,

Thank you for your report.

I consider this as a very positive and beneficial feature request.