threads table contains a row
for each server thread. Each row contains information about a
thread and indicates whether monitoring is enabled for it. For
the Performance Schema to monitor a thread, these things must be
INSTRUMENTED column in the
threads table indicates the
monitoring state for each thread. For foreground threads
(resulting from client connections), the initial
INSTRUMENTED value is determined by whether
the user account associated with the thread matches any row in
For background threads, there is no associated user.
setup_actors is not
look like this:
SELECT * FROM setup_actors;+------+------+------+ | HOST | USER | ROLE | +------+------+------+ | % | % | % | +------+------+------+
should contain a literal host or user name, or
'%' to match any name.
The Performance Schema uses the
USER columns to match each new foreground
ROLE is unused.) The
INSTRUMENTED value for the thread becomes
YES if any row matches,
otherwise. This enables instrumenting to be applied selectively
per host, user, or combination of host and user.
By default, monitoring is enabled for all new foreground threads
initially contains a row with
'%' for both
USER. To perform
more limited matching such as to enable monitoring only for some
foreground threads, you must delete this row because it matches
Suppose that you modify
setup_actors as follows:
TRUNCATE TABLE setup_actors;
setup_actors is empty and there are no
rows that could match incoming connections. Consequently, the
Performance Schema sets the
NO for all new foreground threads.
Suppose that you further modify
INSERT INTO setup_actors (HOST,USER,ROLE) VALUES('localhost','joe','%'); INSERT INTO setup_actors (HOST,USER,ROLE) VALUES('%','sam','%');
Now the Performance Schema determines how to set the
INSTRUMENTED value for new connection threads
joeconnects from the local host, the connection matches the first inserted row.
joeconnects from any other host, there is no match.
samconnects from any host, the connection matches the second inserted row.
For any other connection, there is no match.
Modifications to the
table affect only foreground threads created subsequent to the
modification, not existing threads. To affect existing threads,
INSTRUMENTED column of
threads table rows.