Bug #93636 Documentation incorrect on when data purged from events_statements_history_long
Submitted: 17 Dec 2018 9:30 Modified: 18 Dec 2018 14:58
Reporter: Mark Leith Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Documentation Severity:S3 (Non-critical)
Version: OS:Any
Assigned to: CPU Architecture:Any

[17 Dec 2018 9:30] Mark Leith
Description:
The documentation for the Performance Schema statement history tables states :

“When a thread ends, all its rows are discarded from both history tables.”

https://dev.mysql.com/doc/refman/5.7/en/performance-schema-event-tables.html

This is incorrect, when a thread ends all of the data is discarded from the _history table(s), but the data is maintained within the _history_long table(s).

How to repeat:
Execute a statement from a session, close that session, check whether the statement is visible within performance_schema.events_statements_history_long.

Suggested fix:
Update the docs to reflect that only the _history table (per thread data) is purged when connections disconnect, history_long (global data) is maintained.
[17 Dec 2018 14:21] Derek Downey
This probably goes without saying, but the docs should also be updated on the specific events_XXX_history_long pages. eg:

https://dev.mysql.com/doc/refman/5.7/en/events-waits-history-long-table.html
https://dev.mysql.com/doc/refman/5.7/en/events-statements-history-long-table.html

both mention this at the end of the first paragraph: 

"When a thread ends, all its rows are discarded."
[18 Dec 2018 14:58] Paul DuBois
Posted by developer:
 
Updated the docs for _history_long tables. Thanks for pointing out the problem.