Bug #61571 multiple options not accepted for FLUSH
Submitted: 20 Jun 2011 16:30 Modified: 20 Jun 2011 19:29
Reporter: Jim Hetland Email Updates:
Status: Not a Bug Impact on me:
None 
Category:MySQL Server: Parser Severity:S3 (Non-critical)
Version:5.5.15, 5.5.13 OS:Windows
Assigned to: CPU Architecture:Any
Tags: regression, syntax

[20 Jun 2011 16:30] Jim Hetland
Description:
I did not find any reference to this in forums.

Statement
FLUSH tables, logs;
works in 5.1, but gives a syntax error in 5.5.13

Both of these work fine:
FLUSH tables;
FLUSH logs;

The current 5.5 manual does not mention any change in this syntax

How to repeat:
FLUSH tables, logs;
[20 Jun 2011 16:35] Jim Hetland
mysql> flush tables;
Query OK, 0 rows affected (9.13 sec)

mysql> flush logs;
Query OK, 0 rows affected (1.83 sec)

mysql> flush tables,logs;
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that
corresponds to your MySQL server version for the right syntax to use near 'logs'
 at line 1
mysql> flush logs,tables;
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that
corresponds to your MySQL server version for the right syntax to use near 'table
s' at line 1
mysql>
[20 Jun 2011 17:10] Valeriy Kravchuk
Thank you for the bug report. Indeed, this works in 5.1:

macbook-pro:5.1 openxs$ bin/mysql -uroot testReading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A

Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 4942
Server version: 5.1.59-debug Source distribution

Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved.
This software comes with ABSOLUTELY NO WARRANTY. This is free software,
and you are welcome to modify and redistribute it under the GPL v2 license

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql> flush tables, logs;
Query OK, 0 rows affected (0.09 sec)

but not in 5.5:

macbook-pro:5.5 openxs$ bin/mysql -uroot test
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A

Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 1
Server version: 5.5.15-debug Source distribution

Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved.

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> flush tables, logs;
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ' logs' at line 1

and our manual, http://dev.mysql.com/doc/refman/5.5/en/flush.html, says nothing about this change in behavior. So this is a regression bug.
[20 Jun 2011 19:01] Valeriy Kravchuk
Actually, this is NOT a bug formally - I had missed the following at http://dev.mysql.com/doc/refman/5.5/en/flush.html:

"As of MySQL 5.5.3, if any variant of the TABLES option is used, it must be the only option used."

If not with TABLES, flush with multiple options still works:

mysql> flush hosts, logs;
Query OK, 0 rows affected (0.00 sec)

mysql> select version();
+--------------+
| version()    |
+--------------+
| 5.5.15-debug |
+--------------+
1 row in set (0.00 sec)
[20 Jun 2011 19:29] Jim Hetland
Valeriy, thanks, and my apologies; I missed it too.
Looks like this also moots Bug #60770; same paragraph.