Bug #2827 SHOW GRANTS results in syntax error
Submitted: 16 Feb 2004 9:06 Modified: 28 Feb 2004 11:56
Reporter: [ name withheld ] Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Command-line Clients Severity:S3 (Non-critical)
Version:Ver 14.3 Distrib 4.1.1-alpha OS:Linux (RedHat 9.0)
Assigned to: CPU Architecture:Any

[16 Feb 2004 9:06] [ name withheld ]
Description:
Attempt to initiate the SHOW GRANTS command:

mysql> SHOW GRANTS;
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 '' at line 1

~ OR ~

mysql> SHOW GRANTS FOR root@localhost;
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 '' at line 1

How to repeat:
This is occurring with a new install using RPMs.  The only installations performed were client and server.  All other SHOW commands function.  SHOW GRANTS, does not function repeatedly when the command is issued.
[28 Feb 2004 11:18] MySQL Verification Team
Can't repeat it with 4.1.2:

Your MySQL connection id is 1 to server version: 4.1.2-alpha-debug

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

mysql> show grants;
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 '' at line 1
mysql> show grants for root@localhost;
+---------------------------------------------------------------------+
| Grants for root@localhost                                           |
+---------------------------------------------------------------------+
| GRANT ALL PRIVILEGES ON *.* TO 'root'@'localhost' WITH GRANT OPTION |
+---------------------------------------------------------------------+
1 row in set (0.01 sec)

mysql> SHOW GRANTS FOR root@localhost;
+---------------------------------------------------------------------+
| Grants for root@localhost                                           |
+---------------------------------------------------------------------+
| GRANT ALL PRIVILEGES ON *.* TO 'root'@'localhost' WITH GRANT OPTION |
+---------------------------------------------------------------------+
1 row in set (0.00 sec)
[28 Feb 2004 11:53] [ name withheld ]
Please close this bug report.  Show grants is now functioning (re-installed MySQL) but not as stand-alone as follows:

mysql> SHOW GRANTS;
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 '' at line 1
[28 Feb 2004 11:56] MySQL Verification Team
SHOW GRANTS;

alone is not supposed to be used.