Details
-
Bug
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Duplicate
-
N/A
-
None
Description
MariaDB [test]> set global log_output = 'TABLE', global slow_query_log = 1; |
Query OK, 0 rows affected (0.00 sec) |
|
MariaDB [test]> set slow_query_log = 1; |
Query OK, 0 rows affected (0.00 sec) |
|
MariaDB [test]> truncate table mysql.slow_log; |
Query OK, 0 rows affected (0.10 sec) |
|
MariaDB [test]> set long_query_time = 0.000001; |
Query OK, 0 rows affected (0.00 sec) |
|
MariaDB [test]> set statement SLOW_QUERY_LOG = 0 for select sleep(0.2); |
+------------+ |
| sleep(0.2) |
|
+------------+ |
| 0 |
|
+------------+ |
1 row in set (0.30 sec) |
MariaDB [test]> select * from mysql.slow_log; |
+----------------------------+------------------------------+-----------------+-----------------+-----------+---------------+------+----------------+-----------+-----------+--------------------------------------------------------+-----------+ |
| start_time | user_host | query_time | lock_time | rows_sent | rows_examined | db | last_insert_id | insert_id | server_id | sql_text | thread_id |
|
+----------------------------+------------------------------+-----------------+-----------------+-----------+---------------+------+----------------+-----------+-----------+--------------------------------------------------------+-----------+ |
| 2014-11-02 01:15:20.492680 | root[root] @ localhost [::1] | 00:00:00.000213 | 00:00:00.000000 | 0 | 0 | test | 0 | 0 | 1 | set long_query_time = 0.000001 | 11 | |
| 2014-11-02 01:15:20.798909 | root[root] @ localhost [::1] | 00:00:00.200698 | 00:00:00.000000 | 1 | 0 | test | 0 | 0 | 1 | set statement SLOW_QUERY_LOG = 0 for select sleep(0.2) | 11 | |
+----------------------------+------------------------------+-----------------+-----------------+-----------+---------------+------+----------------+-----------+-----------+--------------------------------------------------------+-----------+ |
2 rows in set (0.00 sec) |
The test case is not applicable to Percona server, because in Percona slow_query_log is GLOBAL-only.
Attachments
Issue Links
- relates to
-
MDEV-5231 Per query variables from Percona Server [patch]
- Closed
-
MDEV-6923 Testing for SET STATEMENT .. FOR (MDEV-5231, per-query variables)
- Closed
-
MDEV-7006 SET STATEMENT does not work with slow log tuning (long_query_time, log_slow_filter, log_slow_verbosity, log_slow_rate_limit)
- Closed