Bug #104240 Recheck documentation for Slow_queries
| Submitted: | 7 Jul 2021 18:11 | Modified: | 27 Aug 2021 5:40 |
|---|---|---|---|
| Reporter: | Oleksandr Kachan | Email Updates: | |
| Status: | Duplicate | Impact on me: | |
| Category: | MySQL Server: Documentation | Severity: | S3 (Non-critical) |
| Version: | 8.0 | OS: | Any |
| Assigned to: | CPU Architecture: | Any |
[7 Jul 2021 18:11]
Oleksandr Kachan
[8 Jul 2021 6:05]
MySQL Verification Team
Hello Oleksandr,
Thank you for the report.
Imho you are right, statement "This counter increments regardless of whether the slow query log is enabled. " sounds incorrect from below test results.
-- 8.0.25
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 9
Server version: 8.0.25 MySQL Community Server - GPL
Copyright (c) 2000, 2021, Oracle and/or its affiliates.
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 global variables where variable_name in ('long_query_time','slow_query_log','log_slow_extra','log_slow_admin_statements');
+---------------------------+-----------+
| Variable_name | Value |
+---------------------------+-----------+
| log_slow_admin_statements | OFF |
| log_slow_extra | OFF |
| long_query_time | 10.000000 |
| slow_query_log | OFF |
+---------------------------+-----------+
4 rows in set (0.00 sec)
mysql> show variables where variable_name in ('long_query_time','slow_query_log','log_slow_extra','log_slow_admin_statements');
+---------------------------+-----------+
| Variable_name | Value |
+---------------------------+-----------+
| log_slow_admin_statements | OFF |
| log_slow_extra | OFF |
| long_query_time | 10.000000 |
| slow_query_log | OFF |
+---------------------------+-----------+
4 rows in set (0.01 sec)
mysql> show status like 'Slow_queries';
+---------------+-------+
| Variable_name | Value |
+---------------+-------+
| Slow_queries | 0 |
+---------------+-------+
1 row in set (0.00 sec)
mysql> select sleep(11), 'Hello Bug #104240' from dual;
+-----------+-------------------+
| sleep(11) | Hello Bug #104240 |
+-----------+-------------------+
| 0 | Hello Bug #104240 |
+-----------+-------------------+
1 row in set (11.01 sec)
mysql> show status like 'Slow_queries';
+---------------+-------+
| Variable_name | Value |
+---------------+-------+
| Slow_queries | 0 |
+---------------+-------+
1 row in set (0.00 sec)
mysql> set global slow_query_log=ON;
Query OK, 0 rows affected (0.07 sec)
mysql> show variables where variable_name in ('long_query_time','slow_query_log','log_slow_extra','log_slow_admin_statements');
+---------------------------+-----------+
| Variable_name | Value |
+---------------------------+-----------+
| log_slow_admin_statements | OFF |
| log_slow_extra | OFF |
| long_query_time | 10.000000 |
| slow_query_log | ON |
+---------------------------+-----------+
4 rows in set (0.00 sec)
mysql> show status like 'Slow_queries';
+---------------+-------+
| Variable_name | Value |
+---------------+-------+
| Slow_queries | 0 |
+---------------+-------+
1 row in set (0.00 sec)
mysql> select sleep(11), 'Hello Bug #104240' from dual;
+-----------+-------------------+
| sleep(11) | Hello Bug #104240 |
+-----------+-------------------+
| 0 | Hello Bug #104240 |
+-----------+-------------------+
1 row in set (11.01 sec)
mysql> show status like 'Slow_queries';
+---------------+-------+
| Variable_name | Value |
+---------------+-------+
| Slow_queries | 1 |
+---------------+-------+
1 row in set (0.00 sec)
regards,
Umesh
[8 Jul 2021 6:10]
MySQL Verification Team
Related - Bug #91496
[27 Aug 2021 5:40]
MySQL Verification Team
Marking this as duplicate of Bug #91496, once Bug #91496 is fixed then doc hanges will be updated accordingly.
Portions of this website are copyright © 2001, 2002 The PHP Group
Page generated in 0.045 sec. using MySQL 8.4.7-u6-cloud
Timestamp references displayed by the system are UTC.
Content reproduced on this site is the property of the
respective copyright holders.
It is not reviewed in advance
by Oracle and does not necessarily represent the opinion of
Oracle or any other party.