Details
-
Bug
-
Status: Closed (View Workflow)
-
Minor
-
Resolution: Not a Bug
-
None
-
None
Description
Trying to enable slow_query with verbosity enabled with different options in Mariadb 10.6.*. But unable to set option- explain for log-slow-verbosity in session
https://mariadb.com/kb/en/explain-in-the-slow-query-log/
while we can set other options as query_plan and InnoDB in the session
> set log_slow_verbosity=explain;
|
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'explain' at line 1 |
|
> set log_slow_verbosity=query_plan;
|
Query OK, 0 rows affected (0.009 sec) |
|
> set log_slow_verbosity=innodb;
|
Query OK, 0 rows affected (0.038 sec) |
|
> show variables like '%slow%'; |
+------------------------------+------------------------------------+
|
| Variable_name | Value |
|
+------------------------------+------------------------------------+
|
| ::: | |
|
| log_slow_verbosity | query_plan
|
| slow_query_log | ON
|
| slow_query_log_file | /var/opt/na/log/mysql-1/slow-query.log |
+------------------------------+------------------------------------+
|
And while the same is working fine when we set this variable as part of my.cnf file
> cat /etc/na/my-1.cnf | grep log-slow |
log-slow-verbosity=query_plan,explain
|
|
> show variables like '%log_slow%'; |
+------------------------------+------------------------------------+
|
| Variable_name | Value |
|
+------------------------------+------------------------------------+
|
| log_slow_verbosity | query_plan,explain |
|
+------------------------------+--------------------------------------------------------------------------------------------------------------------------------------+
|
6 rows in set (0.001 sec) |
Is this option not supported in MariaDB 10.6 which is not mentioned in the docs (Not sure about other MariaDB version) or am I missing anything https://mariadb.com/kb/en/slow-query-log-extended-statistics/