Bug #15443 | Views: can't create view, error 'Duplicate column' | ||
---|---|---|---|
Submitted: | 2 Dec 2005 18:09 | Modified: | 2 Dec 2005 20:06 |
Reporter: | Konstantin Osipov (OCA) | Email Updates: | |
Status: | Not a Bug | Impact on me: | |
Category: | MySQL Server | Severity: | S3 (Non-critical) |
Version: | OS: | ||
Assigned to: | CPU Architecture: | Any |
[2 Dec 2005 18:09]
Konstantin Osipov
[2 Dec 2005 18:14]
Konstantin Osipov
Sorry, view v1 is, of course, unnecessary.
[2 Dec 2005 19:59]
Valeriy Kravchuk
Thank you for a problem report. But it looks like not a bug for me. Tha manual (http://dev.mysql.com/doc/refman/5.0/en/create-view.html) clearly states: "Views must have unique column names with no duplicates, just like base tables. By default, the names of the columns retrieved by the SELECT statement are used for the view column names. To define explicit names for the view columns, the optional column_list clause can be given as a list of comma-separated identifiers." So, please, check the proposed workaround and inform about the results.
[2 Dec 2005 20:06]
Konstantin Osipov
Yes, Igor has pointed that out to me already. The error message however doesn't give you any hint that the problem is actually in the SELECT list and not in the ON clause. That can be considered a bug, probably.