Bug #8862 Views: A view with the name 'VIEW' can be created without any errors.
Submitted: 1 Mar 2005 13:14 Modified: 1 Mar 2005 16:47
Reporter: Disha Email Updates:
Status: Not a Bug Impact on me:
None 
Category:MySQL Server Severity:S2 (Serious)
Version:5.0.2 OS:Any (any)
Assigned to: CPU Architecture:Any

[1 Mar 2005 13:14] Disha
Description:
We can specify the name of a view being created as 'VIEW', whereas 'VIEW' should be treated as a reserved keyword and the view creation should fail with an appropriate error.

How to repeat:
	 1	Delimiter        //
	 2	Create database test1//
	 3 	Use test1 //
	 4	Create table T1 (f1 char(20), f2 TEXT(25), f3 DATE, f4 int); //
	 5	Insert into T1 values ('ABC','XYZ','1990-05-07',100);//
	 6	Create view VIEW as Select * from T1 //

Actual Results : The creation succeeds without any errors or warnings.

Suggested fix:
The Create View statement should fail with an error saying : View cannot be created with the name 'VIEW'.
[1 Mar 2005 16:47] 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:

It's not a bug to have less reserved words than the standard.