forums › forums › SQLyog › SQLyog: Bugs / Feature Requests › Smaal Bug With Editing Triggers
- This topic is empty.
-
AuthorPosts
-
-
April 9, 2012 at 6:39 pm #12635jonb2Member
Hi
Just discovered a small bug. 9.63. Ultimate.
EDIT: I can see why it does this. It's a useful facility for building statements with named entities. But in this case, it's technically wrong and could lead to errors.
1) Navigate to 'triggers' in property window.
2) Right click on trigger – choose alter
3) Double click on trigger in property window – the title of the trigger is 'added' to the end-of-text of the alter edit window.
Kind regards
Jon
-
April 9, 2012 at 7:46 pm #33252peterlaursenParticipant
It is not a bug. It is per design.
The name of any database object (database, table, column, index trigger .. whatever) will be pasted to the current open edditor window on doubleclick. You can turn off this from tools .. preferences .. 'general' tab .. uncheck 'paste object name in editor on doubleclick'.
What did you expect would happen when doubleclicking on the trigger name?
-
April 10, 2012 at 9:35 am #33253jonb2Member
Hi Peter
Yes, I can see your point. Conceded. But in this case it's recursive. You cannot re-use the trigger name in the edit once it's been created. I can live with it.
I just bought the ultimate version yesterday and was playing with it (missed the voucher which appeared in my inbox this morning, c'est la vie!).
I have another issue. I cannot see an easy way of altering a trigger and saving it without doing an SQL dump. Is there a way? As this seems particularly laborious. If not, I would ask this added to the feature list ASAP 🙂
Kind regards
Jon
'peterlaursen' wrote:It is not a bug. It is per design.
The name of any database object (database, table, column, index trigger .. whatever) will be pasted to the current open edditor window on doubleclick. You can turn off this from tools .. preferences .. 'general' tab .. uncheck 'paste object name in editor on doubleclick'.
What did you expect would happen when doubleclicking on the trigger name?
-
April 10, 2012 at 9:47 am #33254peterlaursenParticipant
1)
ALTER TRIGGER will open an editor tab. Here you edit what you want. Once done you execute the statements basically like you would execute a simple SELECT statement etc.
Just click the blue 'double arrow' icon (or press SHIFT+F9). This is 'execute all'. All statements on the TAB (The USE, the DROP and the CREATE statements) will be executed.
2)
I do not understand “But in this case it's recursive. You cannot re-use the trigger name in the edit once it's been created”. I think simply you are trying to operate the program as it was never designed to be operated.
-
April 10, 2012 at 10:30 am #33255jonb2Member
P. I *think* you have missed my point 🙂
Take the trigger below. I want to edit it, not run it. How do I edit and save it – easily? At the moment it wants to save it as SQL if I want to save it.
Secondly, take a look at it and to illustrate. I do not need the title of the trigger copied on a double-click, as it is already created, it already exists, it is not a dead parrot.
I think triggers need their own edit box perhaps.
==============================
DELIMITER $$
USE `iwin`$$
DROP TRIGGER /*!50032 IF EXISTS */ `links_ins`$$
CREATE
TRIGGER `customer_create_date` BEFORE INSERT ON `customer` FOR EACH ROW SET NEW.create_date = NOW() ;
So both HeidiSQL and SQLyog does the same. But they have this SAVE and we have Execute All.
If I do not understand your concern it would be better if we have GoToMeeting session. Please tell us in which timezone you are in and suitable time to have online screen sharing session using GoToMeeting?
You can create a ticket for privacy(By mailing us to [email protected]).
-
-
AuthorPosts
- You must be logged in to reply to this topic.