Bug #6808 Views: CREATE VIEW v ... FROM t AS v fails
Submitted: 24 Nov 2004 17:30 Modified: 14 Sep 2005 0:43
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: Timour Katchaounov CPU Architecture:Any

[24 Nov 2004 17:30] Peter Gulutzan
Description:
If the view's SELECT has a FROM clause with an AS clause "AS v", then I can't create a 
view named v. 
 

How to repeat:
mysql> create table t (s1 int); 
Query OK, 0 rows affected (0.28 sec) 
 
mysql> create view aaa as select * from t as aaa; 
ERROR 1066 (42000): Not unique table/alias: 'aaa'
[12 Sep 2005 14:01] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/internals/29662
[13 Sep 2005 11:09] Timour Katchaounov
Fixed in 5.0.13.
[14 Sep 2005 0:43] Paul DuBois
Noted in 5.0.13 changelog.