LP #482454: userstats patch only updates I_S tables when handle is closed

Description

**Reported in Launchpad by Ryan Lowe last update 25-06-2012 04:43:03

The I_S tables are only updated with metrics when a table handle is closed (not handed back to the table cache). This means that well-tuned instances of MySQL can encounter situations where the stats don't get updated!!! I see 2 solutions to this:

1 - Update the documentation to reflect in order to get a consistent read, you must issue FLUSH TABLES.
2 - Change the call to update statistics when a table handle is passed back to the cache.

The problem with #2 is if I have an instance with no table cache, the stats may never get updated.

– Ryan Lowe

Environment

None

Smart Checklist

Activity

lpjirasync January 22, 2018 at 3:06 PM

**Comment from Launchpad by: Stewart Smith on: 25-06-2012 04:43:03

Closing due to inactivity

lpjirasync January 22, 2018 at 3:06 PM

**Comment from Launchpad by: Oleg Tsarev on: 28-01-2012 06:55:48

As I can see in the source code, thread statistics updated after close_thread_table call, i.e. after every runned query.

Do you want see updated while query executing?

lpjirasync January 22, 2018 at 3:06 PM

**Comment from Launchpad by: Stewart Smith on: 05-07-2011 05:06:36

I cannot repeat with current Percona Server. If you can, please re-open bug and provide complete test case.

lpjirasync January 22, 2018 at 3:05 PM

**Comment from Launchpad by: Stewart Smith on: 20-06-2011 03:03:25

Is this still current with Percona Server?

Done

Details

Assignee

Reporter

Priority

Smart Checklist

Created January 22, 2018 at 3:04 PM
Updated April 17, 2018 at 8:37 AM
Resolved January 22, 2018 at 3:04 PM