WL#7795: PERFORMANCE SCHEMA, HISTORY PER THREAD

Affects: Server-5.7   —   Status: Complete

Currently, consumer flags control whether or not to log history events, for the
respective events (waits, stages, statements and transactions).

These flags are global to the server, so that collection of historical data for
different threads is either all or nothing.

With this feature, the DBA can specify for which sessions / accounts / users /
hosts to collect historical data, separatly from turning instrumentation on or
off for the same sessions / accounts / users / hosts.

This allows to control more precisely what events are logged in history tables,
which:
- decrease the runtime overhead, when historical data is needed only for a
subset of the instrumented sessions
- reduce the noise in events_waits_history_long, events_stages_history_long,
events_statements_history_long, events_transactions_history_long tables, which
facilitates troubleshooting on busy servers (that generates a lot of events)

User Documentation
==================

http://dev.mysql.com/doc/relnotes/mysql/5.7/en/news-5-7-8.html
http://dev.mysql.com/doc/refman/5.7/en/performance-schema-pre-
filtering.html#performance-schema-thread-filtering
http://dev.mysql.com/doc/refman/5.7/en/setup-actors-table.html
http://dev.mysql.com/doc/refman/5.7/en/threads-table.html