The value of the
variable affects the information available from the tables
described here. For details, see the description of that
variable in Section 5.1.7, “Server System Variables”.
The MySQL server maintains many system variables that indicate how it is configured (see Section 5.1.7, “Server System Variables”). System variable information is available in these Performance Schema tables:
global_variables: Global system variables. An application that wants only global values should use this table.
session_variables: System variables for the current session. An application that wants all system variable values for its own session should use this table. It includes the session variables for its session, as well as the values of global variables that have no session counterpart.
variables_by_thread: Session system variables for each active session. An application that wants to know the session variable values for specific sessions should use this table. It includes session variables only, identified by thread ID.
variables_by_thread table has
The thread identifier of the session in which the system variable is defined.
The system variable name.
The session variable value for the session named by the
contains system variable information only about foreground
threads. If not all threads are instrumented by the Performance
Schema, this table will miss some rows. In this case, the
status variable will be greater than zero.
TRUNCATE TABLE is not supported
for Performance Schema system variable tables.