Bug #52587 | Syntax checker deletes code | ||
---|---|---|---|
Submitted: | 5 Apr 2010 1:33 | Modified: | 21 Apr 2010 12:55 |
Reporter: | Barry Galbraith | Email Updates: | |
Status: | Closed | Impact on me: | |
Category: | MySQL Workbench: SQL Editor | Severity: | S3 (Non-critical) |
Version: | 5.2.17 | OS: | Windows (XP Pro SP3) |
Assigned to: | Sergei Tkachenko | CPU Architecture: | Any |
Tags: | Trigger syntax checker deletes code |
[5 Apr 2010 1:33]
Barry Galbraith
[9 Apr 2010 4:50]
Valeriy Kravchuk
Please, provide exact code of the trigger and indicate what exact part of it to copy and where exactly to paste it. I can not repeat this with my simple triggers.
[9 Apr 2010 6:26]
Barry Galbraith
In SQL Development. Select schema, select a table. Right click, Alter table. Select Trigger tab. You get this - Trigger DDL Statements DELIMITER $$ USE `mydb`$$ I then type this code CREATE DEFINER=`root`@`localhost` TRIGGER ai_table1 AFTER INSERT ON table1 FOR EACH ROW INSERT INTO tbllog (ch_type,chdate) VALUES ("insert", NOW())$$ So now it reads - Trigger DDL Statements DELIMITER $$ USE `mydb`$$CREATE DEFINER=`root`@`localhost` TRIGGER ai_table1 AFTER INSERT ON table1 FOR EACH ROW INSERT INTO tbllog (ch_type,chdate) VALUES ("insert", NOW())$$ Then insert the same code again to create a AFTER UPDATE trigger on the same table. It now reads - Trigger DDL Statements DELIMITER $$ USE `mydb`$$CREATE DEFINER=`root`@`localhost` TRIGGER ai_table1 AFTER INSERT ON table1 FOR EACH ROW INSERT INTO tbllog (ch_type,chdate) VALUES ("insert", NOW())$$CREATE DEFINER=`root`@`localhost` TRIGGER ai_table1 AFTER INSERT ON table1 FOR EACH ROW INSERT INTO tbllog (ch_type,chdate) VALUES ("insert", NOW())$$ for about 2 seconds, then the second trigger is deleted before I can get to edit it.
[10 Apr 2010 7:45]
Valeriy Kravchuk
Still not repeatable for me on Mac OS X. Will check on XP next week.
[11 Apr 2010 21:51]
Robert Nowotny
I can confirm the behaviour on XP. I do the edit of the triggers in Ultraedit and the paste it back to the workbench, thats my workaround .... I think the code in the editor should not be deleted, just marked in red for instance.
[12 Apr 2010 8:32]
Valeriy Kravchuk
Verified just as described on XP.
[12 Apr 2010 11:56]
Sergei Tkachenko
All alike problems have been fixed in windows version. Editor contents isn't affected by background actions anymore.
[12 Apr 2010 23:35]
Johannes Taxacher
fix confirmed in repository
[21 Apr 2010 12:55]
Tony Bedford
An entry has been added to the 5.2.18 changelog: The Triggers tab in the Alter Table dialog of the SQL Editor erased all typed code, when an attempt was made to copy and paste text within the tab.