Bug #25982 MySQL Query Browser for Mac OS X hangs when dropping and adding triggers
Submitted: 31 Jan 2007 15:25 Modified: 6 Apr 2007 10:13
Reporter: Joshua Butcher Email Updates:
Status: No Feedback Impact on me:
None 
Category:MySQL Query Browser Severity:S3 (Non-critical)
Version:r9 OS:MacOS (Mac OS X)
Assigned to: Assigned Account CPU Architecture:Any
Tags: MySQL Query Browser for Mac OS X hangs

[31 Jan 2007 15:25] Joshua Butcher
Description:
When using DROP TRIGGER IF EXISTS followed by CREATE TRIGGER QB will simply hang, and not release the GUI.  The dolphin just keeps swimming, however, the script did complete.  The trigger was dropped and updated.

How to repeat:
DROP TRIGGER IF EXISTS after_user_update;
DELIMITER //

CREATE TRIGGER after_user_update AFTER update on users
FOR EACH ROW
BEGIN

    if ( (new.age >= 18) ) then
      # Code Here
    ELSEIF ( (new.age < 18) ) then
      # Code Here
    END IF;
   
    if (new.status_id IN (3,4,5)) AND (old.status_id IN (1,2)) THEN
        #Code Here
       
    END IF;
   
    if (old.status_id IN (3,4,5)) AND (new.status_id IN (1,2)) THEN
       #Code Here
    END IF;
   
END //
DELIMITER ;

Suggested fix:
Make it so it doesnt hang?
[31 Jan 2007 16:38] Sveta Smirnova
Thank you for the report.

Do you issue CREATE TRIGGER statement in a script tab? Did you try to click stop button?
[31 Jan 2007 16:53] Joshua Butcher
If I issue create trigger by itself, it sometimes works and sometimes hangs.  Also, the the stop button most of the time will stop execution of the script and return the GUI to me but not always.  Sometimes I have to close the script tab itself.

Also, sometimes randomly, pasting text into the script tab will cause it to crash and go away. (It always happens when I dont need it to :) )

One other side note.  If you issue a DROP TABLE command on one line, and CREATE TABLE on the next line, and you use InnoDB, it yells at me about the commands being out of sync, and I can't execute in the same window.  We use InnoDB tables here.  It does work correctly on the Windows version of QB and always has.
[9 Feb 2007 13:31] Sveta Smirnova
Thank you for the additional information.

Seems in my case Query Browser crashes too often. So I'll try to repeat this bug report after Bug #26221 were fixed.
[6 Mar 2007 10:13] Sveta Smirnova
Thank you for the report.

I can not repeat hang with current MySQL GUI Tools 5.0-r10. Please, upgrade, try and say us result.
[6 Apr 2007 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".