Bug #10837 | view with check option, server accepts syntactical wrong SQL | ||
---|---|---|---|
Submitted: | 24 May 2005 18:46 | Modified: | 1 Jun 2005 15:27 |
Reporter: | Matthias Leich | Email Updates: | |
Status: | Not a Bug | Impact on me: | |
Category: | MySQL Server | Severity: | S3 (Non-critical) |
Version: | OS: | ||
Assigned to: | Mikael Ronström | CPU Architecture: | Any |
[24 May 2005 18:46]
Matthias Leich
[1 Jun 2005 15:27]
Mikael Ronström
CREATE VIEW v1 AS SELECT * FROM t1 CASCADED WITH CHECK OPTION is a perfectly ok syntax that means CREATE VIEW v1 AS SELECT * from t1 CASCADED WITH CHECK OPTION Thus CASCADED here is an alias for the table name t1, completely useless in this particular query but still an allowed syntax. If one wants to avoid this problem then CASCADED cannot be used at all as an identifer.