[MDEV-7018] SET STATEMENT query_response_time_exec_time_debug has no effect Created: 2014-11-03  Updated: 2015-02-02  Resolved: 2014-11-26

Status: Closed
Project: MariaDB Server
Component/s: Admin statements
Affects Version/s: N/A
Fix Version/s: 10.1.2

Type: Bug Priority: Minor
Reporter: Elena Stepanova Assignee: Oleksandr Byelkin
Resolution: Duplicate Votes: 0
Labels: None

Issue Links:
Relates
relates to MDEV-5231 Per query variables from Percona Serv... Closed
relates to MDEV-6923 Testing for SET STATEMENT .. FOR (MDE... Closed

 Description   

MariaDB [test]> install soname 'query_response_time.so';
Query OK, 0 rows affected (0.03 sec)
 
MariaDB [test]> set global query_response_time_stats=1;
 
MariaDB [test]> set statement query_response_time_exec_time_debug = 5000000 for select 1;
+---+
| 1 |
+---+
| 1 |
+---+
1 row in set (0.00 sec)

MariaDB [test]> 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 |     2 |       0.000381 |
|       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)

Compare with:

MariaDB [test]> set query_response_time_exec_time_debug = 5000000;
Query OK, 0 rows affected (0.00 sec)
 
MariaDB [test]> select 1;
+---+
| 1 |
+---+
| 1 |
+---+
1 row in set (0.00 sec)
 
MariaDB [test]> set query_response_time_exec_time_debug = 0;
Query OK, 0 rows affected (0.00 sec)

MariaDB [test]> select * from information_schema.query_response_time;
+----------------+-------+----------------+
| TIME           | COUNT | TOTAL          |
+----------------+-------+----------------+
|       0.000001 |     1 |       0.000000 |
|       0.000010 |     0 |       0.000000 |
|       0.000100 |     0 |       0.000000 |
|       0.001000 |     2 |       0.000290 |
|       0.010000 |     0 |       0.000000 |
|       0.100000 |     0 |       0.000000 |
|       1.000000 |     0 |       0.000000 |
|      10.000000 |     1 |       5.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)

I don't know whether it's reproducible with Percona server or not, couldn't get query_response_time work there at all.



 Comments   
Comment by Oleksandr Byelkin [ 2014-11-10 ]

The variable reset earlier then audit plugin called.

Comment by Oleksandr Byelkin [ 2014-11-26 ]

Duplicate of 7006.

Test suite was not add because plugin do not work being statically linked.

Generated at Thu Feb 08 07:16:20 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.