Bug #4170 MySQL server too picky on @@ in system vars
Submitted: 16 Jun 2004 16:51 Modified: 16 Jun 2004 19:38
Reporter: Guilhem Bichot Email Updates:
Status: Not a Bug Impact on me:
None 
Category:MySQL Server Severity:S3 (Non-critical)
Version:4.0 OS:Linux (linux)
Assigned to: CPU Architecture:Any

[16 Jun 2004 16:51] Guilhem Bichot
Description:
I have seen this:

Your MySQL connection id is 1 to server version: 4.0.21-valgrind-max-debug

Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

SLAVE> show global variables like 'table_type';
+---------------+--------+
| Variable_name | Value  |
+---------------+--------+
| table_type    | MYISAM |
+---------------+--------+
1 row in set (0.00 sec)

SLAVE> set global table_type=innodb;
Query OK, 0 rows affected (0.00 sec)

SLAVE> show global variables like 'table_type';
+---------------+--------+
| Variable_name | Value  |
+---------------+--------+
| table_type    | INNODB |
+---------------+--------+
1 row in set (0.00 sec)

SLAVE> set global @@table_type=myisam;
Query OK, 0 rows affected (0.00 sec)

SLAVE> show global variables like 'table_type';
+---------------+--------+
| Variable_name | Value  |
+---------------+--------+
| table_type    | INNODB |
+---------------+--------+
1 row in set (0.00 sec)

SLAVE> set global @@table_type=myisam;
Query OK, 0 rows affected (0.00 sec)

SLAVE> set global @@table_type=myisam;
Query OK, 0 rows affected (0.00 sec)

SLAVE> show global variables like 'table_type';
+---------------+--------+
| Variable_name | Value  |
+---------------+--------+
| table_type    | INNODB |
+---------------+--------+
1 row in set (0.00 sec)

SLAVE> set global table_type=myisam;
Query OK, 0 rows affected (0.00 sec)

SLAVE> show global variables like 'table_type';
+---------------+--------+
| Variable_name | Value  |
+---------------+--------+
| table_type    | MYISAM |
+---------------+--------+
1 row in set (0.01 sec)

See, apparently the absence of @@ changed something.
It may be that I misunderstood something in the use of @@. Pardon me then ;)

How to repeat:
show global variables like 'table_type';
set global table_type=innodb;
show global variables like 'table_type';
set global @@table_type=myisam;
show global variables like 'table_type';
set global table_type=myisam;
show global variables like 'table_type';
[16 Jun 2004 19:38] Sergei Golubchik
Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at
http://www.mysql.com/documentation/ and the instructions on
how to report a bug at http://bugs.mysql.com/how-to-report.php

Additional info:

yes, according to the manual you should use either @@ or global:

     SET variable_assignment [, variable_assignment] ...
     
     variable_assignment:
           user_var_name = expr
         | [GLOBAL | SESSION] system_var_name = expr
         | @@[global. | session.]system_var_name = expr
[16 Jun 2004 20:10] Guilhem Bichot
"yes, according to the manual you should use either @@ or global"
... and if you use both, it won't work ;) ... still not natural to me.
but ok, why not...