Toad World® Forums

Beta 6.2, Wrong Trigger is going to be deleted in object navigator


#1

Hi there,

You have the object tree open (as is in the screen shot)
After creating a new trigger TI_VG_KONT_IO via script and refreshing with F5-Key all triggers are visible. That’s OK.
But if you try to delete one of them (TIA_VG_KONT_IO), the wrong trigger (TI_VG_KONT_IO ) is going to be deleted.
The message box shows the name of the trigger that really will be deleted (TI_VG_KONT_IO ) – but that’s not the one you have chosen to be deleted.
With other words: The selection and the inside selected one are different. Maybe the internal sorting has a error.

That’s a really heavy and ugly bug.

Regards
Alex

Alex_DEL_Trigger.jpeg


#2

Hi,

I tested with build 1250 but could not replicate. Did you click on the trigger and select drop from the right-click menu or did you press the Delete key? You were doing this using DB Explorer right? Could you capture the screenshot right before you do delete? (The whole screen with code editor and everything)

Thanks
Gwen


#3

Hi Gwen,

Sorry.
It’s quite strange but when we tried to reproduce it this morning we were unable to manage it.
Alex must have run in a very strange constellation some how.
However, I saw this wrong behaviour at his screen too.
Very unlikely that the two of us are partially insane.
Alex will have a look at this issue and if he will be able to reproduce it we will inform you.

Regards
Andre


#4

Nav Bug: wrong Trigger in DB Nav Window

Hi Gwen

I think I have a reproducible example for the

Make the following steps:

· Open Nav. (V 6.2.0.1381)

· run the script.

· look at the trigger order (in my case TEST_TRIGGER3, TEST_TRIGGER1, TEST_TRIGGER2, TEST_TRIGGER4)

· open TEST_TRIGGER2 (it is important that the trigger you use will be not the first or last one) from the DB Navigator window by double click

· make syntax error in the body.

· try to save by using the Ally-changes-to-the-DB-button. You get an error.

· change something and generate sql (the trigger must still have a syntax error)

· run the script in sql window (you will get the error too)

· go back to the trigger editor window

· fix the error and compile the trigger

· switch to the DB navigator window

· try to delete TEST_TRIGGER4 by clicking the right mouse button for context menu (you must use the last one of the list)

· you will get the following

· Picture (Device Independent Bitmap)

· the same result you will get by extracting ddl from TEST_TRIGGER4. The output is from trigger TEST_TRIGGER2.

· I tried it with DB Version 9.2.0.6.0 and 10.2.0.4.0

By the way the text syntax color have still a lot of bugs. Will you fix them for the next release?

Best regards

Alex
Trigger.jpeg


#5

Hi Alex,

Thanks for the detailed steps but when I dropped, it dropped the right object. After you fix the error, you also click on Apply changes to DB button, right? Can I please have the script to receate these triggers?

Gwen


#6

Hi Gwen,

this time it’s me -Andre.
I’m sorry - I forgot to attache the Script Alex sent me via mail.
Here it is:

Another hint from Alex: Yes he saved the trigger.

Warm Regards
Andre
NeavBug_Trigger.sql (692 Bytes)


#7

Hi guys,

I tried the script but it didn’t make any difference. THe right trigger was selected and dropped. I wonder if anyone has the same issue. Would it be possible for you to record these steps using webex? I’m not sure if I will find anything but it may worth a try.

Gwen


#8

Hi guys

I had a this problem with triggers: after editing a trigger the order showned in the tree was not the “internal” order. I.e. when I click to open trigger_a it would open trigger_b.

It’s that similar to the problem reported?

regards
Filipe


#9

Hi Filipe,

definitely yes!
if I remember correctly,
this issue has been the first indication to the underlying problem what Alex is talking about.

Thanks an Regards
Andre


#10

OK, I finally got it.
Firstly, I was looking at the Triggers node under ‘My schema’ instead of under the ‘TEST’ table.
Secondly, the issue only appears if you forget to refresh the tree after making the change.

The problem here is somehow the triggers are sorted everytime a change is made. So the one that got updated last will appear at the end of the list. In this case, test_trigger2 will end up in the position of test_trigger4 and hence got deleted.

I think what we can do is stopping these sorting from happen. Maybe they should just be sorted according to names like in the ‘triggers’ node under my schema.

Gwen

Message was edited by: Gwen