Bug #35456 ALTER Script generates wrong syntax for VIEW

Submitted: 20 Mar 2008 12:00 Modified: 26 Apr 2008 20:57
Reporter: Vladimir Dusa Email Updates:
Status: No Feedback Impact on me:
None 
Category:MySQL Workbench Severity:S3 (Non-critical)
Version:5.0.15 OS:Windows
Assigned to: CPU Architecture:Any
Tags: alter, VIEW

[20 Mar 2008 12:00] Vladimir Dusa
Description:
Syntax generated for VIEWs is wrong (CREATE OR REPLACE  OR REPLACE VIEW):

Definition in Model:
CREATE OR REPLACE VIEW `view_siaphasen` AS select `phase`.`siap_Nr` AS `Nr`,concat(`phase`.`siap_Order`,_utf8'. ',`phase`.`siap_Name`) AS `Name` from `tbl_siaphase` `Phase` where (`phase`.`siap_Teilphase` = 0) union select `teilphase`.`siap_Nr` AS `Nr`,concat(`phase`.`siap_Order`,_utf8'.',`teilphase`.`siap_Order`,_utf8'. ',`teilphase`.`siap_Name`) AS `Name` from (`tbl_siaphase` `Teilphase` join `tbl_siaphase` `Phase` on((`teilphase`.`siap_Parent` = `phase`.`siap_Nr`))) where (`teilphase`.`siap_Teilphase` = -(1)) order by `Name`

Generated in ALTER script:
CREATE OR REPLACE  OR REPLACE VIEW `view_siaphasen` AS select `phase`.`siap_Nr` AS `Nr`,concat(`phase`.`siap_Order`,_utf8'. ',`phase`.`siap_Name`) AS `Name` from `tbl_siaphase` `Phase` where (`phase`.`siap_Teilphase` = 0) union select `teilphase`.`siap_Nr` AS `Nr`,concat(`phase`.`siap_Order`,_utf8'.',`teilphase`.`siap_Order`,_utf8'. ',`teilphase`.`siap_Name`) AS `Name` from (`tbl_siaphase` `Teilphase` join `tbl_siaphase` `Phase` on((`teilphase`.`siap_Parent` = `phase`.`siap_Nr`))) where (`teilphase`.`siap_Teilphase` = -(1)) order by `Name`;

How to repeat:
1) take some backup and import it as a new model (File/Import/Reverse Engineer MySQL Script)
2) create new VIEW in the model.
3) generate ALTER Script (File/Export/Forward Engineer SQL ALTER Script)
4) go through the wizard till the script will be shown.
5) check the syntax of the view in the ALTER Script
[26 Mar 2008 20:57] Valeriy Kravchuk
Thnak you for a problem report. Please, try to repeat with a newer version, 5.0.16-rc, and inform about the results.
[26 Apr 2008 23:00] Bugs System
No feedback was provided for this bug for over a month, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".
[2 May 2008 8:04] Robbert E. Peters
This problem still exists in version 5.0.21

Portions of this website are copyright © 2001, 2002 The PHP Group

Page generated in 0.051 sec. using MySQL 8.4.7-u6-cloud

Timestamp references displayed by the system are UTC.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.