Bug #99426 Mysqldump (all versions) export views as wrong SQL
Submitted: 3 May 2020 19:00 Modified: 5 May 2020 13:26
Reporter: Robert Jamróz Email Updates:
Status: Not a Bug Impact on me:
Category:MySQL Server: Command-line Clients Severity:S2 (Serious)
Version:all OS:Any
Assigned to: CPU Architecture:Any
Tags: mysqldump, Views

[3 May 2020 19:00] Robert Jamróz
I have views and when export its with mysqldump tool tehn SQL contains command like this :
CREATE VIEW AS SELECT 1 AS username, 1 as email, 1 as registered; 

but option from UI "copy to clipboar > create statement" export views in right format.

This tool export all views like this above. Tested on multiple versions of mysqldump tool and system like windows and unix - same result.

Please help. 

How to repeat:
Create table. Create view eg. selecting cilumns as aliases eg. u.name as user_name from prewious table. 
Then use mysqldump tool to export view. 
Exported sql have create view as select 1  as user_name.
[5 May 2020 10:51] Robert Jamróz
Hi, sorry but it is my fault. I have seen in sql code create view like select 1 as field_name but below is right creation sql script.
Ticket my be closed.
[5 May 2020 13:26] MySQL Verification Team
Hello Mr. Jamroz,

Thank you for your bug report and for your observations.

Closed as "Not a bug".