Bug #5149 Views: View using function with funny name: fails
Submitted: 23 Aug 2004 0:35 Modified: 6 Sep 2004 13:42
Reporter: Peter Gulutzan Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server Severity:S3 (Non-critical)
Version:5.0.2-alpha-debug OS:Linux (SuSE 8.2)
Assigned to: Oleksandr Byelkin CPU Architecture:Any

[23 Aug 2004 0:35] Peter Gulutzan
Description:
I can't make a view that uses a function with a 
funny name e.g. "help" or "select". If I do, 
there are errors and eventually I get "packets 
out of order". 

How to repeat:
mysql> create function `help` () returns int return 5; 
Query OK, 0 rows affected (0.27 sec) 
 
mysql> create view vhelp as select `help` (); 
Query OK, 0 rows affected (0.00 sec) 
 
mysql> show create view vhelp; 
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 '() AS `help`` ()`' 
at line 1 
mysql> show create view vhelp; 
Packets out of order (Found: 2, expected 1) 
ERROR 2013 (HY000): Lost connection to MySQL server during query 
mysql> drop function `help`;
[30 Aug 2004 21:00] Oleksandr Byelkin
ChangeSet 
  1.1737 04/08/30 21:47:52 bell@sanja.is.com.ua +3 -0 
  fixed printing of stored procedure functions names (BUG#5149)
[6 Sep 2004 13:42] Oleksandr Byelkin
Thank you for bugreport! bugfix is pushed into our source repository.