Recently, I found that after upgrading mysql to 5.7.14 or higher, the QUERY_RESPONSE_TIME_AUDIT plugin was not working any more.
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 14421
Server version: 5.7.14-7-log Percona Server (GPL), Release 7, Revision 083e298
Copyright (c) 2009-2016 Percona LLC and/or its affiliates
Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved.
Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
mysql> show plugins;
+-----------------------------+----------+--------------------+------------------------+---------+
| Name | Status | Type | Library | License |
+-----------------------------+----------+--------------------+------------------------+---------+
...
| QUERY_RESPONSE_TIME | ACTIVE | INFORMATION SCHEMA | query_response_time.so | GPL |
| QUERY_RESPONSE_TIME_AUDIT | ACTIVE | AUDIT | query_response_time.so | GPL |
| QUERY_RESPONSE_TIME_READ | ACTIVE | INFORMATION SCHEMA | query_response_time.so | GPL |
| QUERY_RESPONSE_TIME_WRITE | ACTIVE | INFORMATION SCHEMA | query_response_time.so | GPL |
+-----------------------------+----------+--------------------+------------------------+---------+
53 rows in set (0.00 sec)
mysql> show global variables like '%QUERY_RESPONSE_TIME%';
+--------------------------------+-------+
| Variable_name | Value |
+--------------------------------+-------+
| query_response_time_flush | OFF |
| query_response_time_range_base | 10 |
| query_response_time_stats | ON |
+--------------------------------+-------+
3 rows in set (0.00 sec)
mysql> select * from information_schema.QUERY_RESPONSE_TIME;
+----------------+-------+----------------+
| TIME | COUNT | TOTAL |
+----------------+-------+----------------+
| 0.000001 | 0 | 0.000000 |
| 0.000010 | 0 | 0.000000 |
| 0.000100 | 0 | 0.000000 |
| 0.001000 | 0 | 0.000000 |
| 0.010000 | 0 | 0.000000 |
| 0.100000 | 0 | 0.000000 |
| 1.000000 | 0 | 0.000000 |
| 10.000000 | 0 | 0.000000 |
| 100.000000 | 0 | 0.000000 |
| 1000.000000 | 0 | 0.000000 |
| 10000.000000 | 0 | 0.000000 |
| 100000.000000 | 0 | 0.000000 |
| 1000000.000000 | 0 | 0.000000 |
| TOO LONG | 0 | TOO LONG |
+----------------+-------+----------------+
14 rows in set (0.00 sec)