LP #1704195: Release lock on table statistics after query plan created | Stop ANALYZE TABLE from flushing table definition cache

Description

**Reported in Launchpad by Sveta Smirnova last update 17-11-2017 11:00:23

Description:
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.

Environment

None

Smart Checklist

Activity

Show:

lpjirasync January 23, 2018 at 4:17 PM

lpjirasync January 23, 2018 at 4:17 PM

**Comment from Launchpad by: Laurynas Biveinis on: 14-11-2017 07:54:02

Enabling this for TokuDB exposes https://jira.percona.com/browse/TDB-83

lpjirasync January 23, 2018 at 4:17 PM

**Comment from Launchpad by: Laurynas Biveinis on: 12-10-2017 03:42:52

The experimental fix at https://github.com/laurynas-biveinis/percona-server/tree/bug1704195-5.6-trunk has been extended for partitioned InnoDB tables too.

lpjirasync January 23, 2018 at 4:17 PM

**Comment from Launchpad by: Sveta Smirnova on: 18-09-2017 11:11:55

My bad! Fix works fine. Thought I had to compile with option -DWITH_TOKUDB=0 (not related to the fix)

Dump file for the reference: https://drive.google.com/a/percona.com/file/d/0B67lYkmv0Zcsel9YNGxrYnpWNUU/view?usp=sharing

lpjirasync January 23, 2018 at 4:17 PM

**Comment from Launchpad by: Laurynas Biveinis on: 16-09-2017 05:56:21

I suspect that you built the default branch after "git clone" instead of the bugfix one, this could also explain the previous compilation issues. Please confirm that you have checked out "bug1704195-5.6-trunk" before building (5eee06f372389168c37941dc075f161f43cd5c0f)

Done

Details

Assignee

Reporter

Priority

Smart Checklist

Created January 23, 2018 at 4:16 PM
Updated December 19, 2023 at 7:47 AM
Resolved January 23, 2018 at 4:16 PM