← Back to team overview

maria-developers team mailing list archive

MDEV-6111: Optimizer trace: let's get rid of "optimizer_trace_enabled"

 

Hi Zhzhzoo,

I see that the current patch uses @@optimizer_trace_enabled variable to control
it.

Meanwhile, in MySQL the name of the variable is "optimizer_trace".

It is a flag set:

mysql>  select @@optimizer_trace;
+-------------------------+
| @@optimizer_trace       |
+-------------------------+
| enabled=on,one_line=off |
+-------------------------+
1 row in set (0.00 sec)

but one can set it to 1 or 0 to just set enabled on/off:

mysql> set @@optimizer_trace=1;
Query OK, 0 rows affected (0.00 sec)

mysql> set @@optimizer_trace=0;
Query OK, 0 rows affected (0.00 sec)

This obviously carries some legacy but I think we should have it the same way,
in order to be compatible with MySQL where possible.

Please use the same name/values as MySQL does.

BR
 Sergei
-- 
Sergei Petrunia, Software Developer
MariaDB Corporation | Skype: sergefp | Blog: http://s.petrunia.net/blog