Bug #5239 CREATE VIEW denied when using UNION of two tables
Submitted: 26 Aug 2004 21:26 Modified: 27 Aug 2004 3:09
Reporter: Jerome Marcon Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server Severity:S3 (Non-critical)
Version:5.0.1-alpha-snapshot OS:Windows (Windows XP)
Assigned to: Oleksandr Byelkin CPU Architecture:Any

[26 Aug 2004 21:26] Jerome Marcon
Description:
It seems not possible to create a view from the UNION of two permanent tables (whereas the document says it is possible).

This statement works all right :
CREATE OR REPLACE VIEW myview AS SELECT 1 AS mycol UNION ALL SELECT mycol FROM mytable2;

This one does not :
CREATE OR REPLACE VIEW myview AS SELECT mycol FROM mytable1 UNION ALL SELECT mycol FROM mytable2;

and returns the error "ERROR 1143 (42000): create view command denied to user 'root'@'localhost' for column 'mycol' in table 'myview'"

although the creation request is made by the "root" account (that has all privileges).

How to repeat:
Using the root account, create any view from the the union of two permanent tables
[26 Aug 2004 21:40] MySQL Verification Team
Verified against 5.0.2 (2 days older).
[27 Aug 2004 3:09] MySQL Verification Team
Testing against latest BK 5.0 source tree this issue was already fixed.

Thank you for the bug report.