Menu

#2839 (ok 3.2.1) Using DELIMITER produces infinite cycle

3.1.2
fixed
1
2013-06-11
2009-02-24
No

If we use sql command DELIMITER in sql query phpmyadmin never ending, probably infinite cycle, 100% procesor load.

Win XP SP3, Apache 2.2, PHP 5.2.6, Mysql 5.1.31
FreeBSD, Apache 2.2, PHP 5.2.7, Mysql 5.1.29

Example:
DELIMITER $$

DROP TRIGGER /*!50032 IF EXISTS */ `svn`.`fakt_vydane_typ_insert`$$

CREATE
/*!50017 DEFINER = 'root'@'localhost' */
TRIGGER `fakt_vydane_typ_insert` AFTER INSERT ON `fakt_vydane_typ`
FOR EACH ROW BEGIN
INSERT INTO action_log (tabulka,id,akce,user,datum) VALUES ('fakt_vydane_typ',NEW.ID,'I',NEW.id_user,NOW());
END;
$$

DELIMITER ;

Discussion

  • Marc Delisle

    Marc Delisle - 2009-02-27

    Confirmed. But DELIMITER is not a SQL command, it's a keyword used in the "mysql" command-line client. We tried to handle it in the query box too but in this case it fails. Meanwhile, use the "Delimiter" option just under the query box.

     
  • Dominik Fišer

    Dominik Fišer - 2009-02-28

    Ok, I agree with you. But there is a problem, when I export database with triggers in phpMyAdmin and try to import it. It's impossible:( I have an idea, add parameter for export without triggers and possibility to export only triggers. Because of in other cases are table's structures mixed with triggers and using Demiliter under query box is impossible...

     
  • Marc Delisle

    Marc Delisle - 2009-04-05

    It's not always impossible to export and reimport a .sql file which contains trigger definitions: I have at least one case where it works correctly.

    So it's just a matter to find this particular bug and I'm working on it.

     
  • Marc Delisle

    Marc Delisle - 2009-04-11

    The problem is caused by the logic expecting a newline after the last semi-colon.

     
  • Marc Delisle

    Marc Delisle - 2009-04-12
    • priority: 5 --> 1
    • summary: Using DELIMITER ends with infinite cycle --> (ok 3.1.4) Using DELIMITER ends with infinite cycle
    • status: open --> open-fixed
     
  • Marc Delisle

    Marc Delisle - 2009-04-12

    Fixed in subversion, thanks for reporting.

     
  • Marc Delisle

    Marc Delisle - 2009-04-17

    The fix is not good, reverting it.

     
  • Marc Delisle

    Marc Delisle - 2009-04-17
    • priority: 1 --> 5
    • status: open-fixed --> open
     
  • Marc Delisle

    Marc Delisle - 2009-04-17
    • summary: (ok 3.1.4) Using DELIMITER ends with infinite cycle --> Using DELIMITER ends with infinite cycle
     
  • Marc Delisle

    Marc Delisle - 2009-06-05
    • assigned_to: nobody --> lem9
     
  • Marc Delisle

    Marc Delisle - 2009-06-19
    • assigned_to: lem9 --> nobody
     
  • Marc Delisle

    Marc Delisle - 2009-07-04
    • assigned_to: nobody --> lem9
     
  • Marc Delisle

    Marc Delisle - 2009-07-04
    • summary: Using DELIMITER ends with infinite cycle --> Using DELIMITER produces infinite cycle
     
  • Marc Delisle

    Marc Delisle - 2009-07-04
    • summary: Using DELIMITER produces infinite cycle --> (ok 3.2.1) Using DELIMITER produces infinite cycle
    • priority: 5 --> 1
    • status: open --> open-fixed
     
  • Marc Delisle

    Marc Delisle - 2009-07-04

    New fix should be correct.

     
  • Marc Delisle

    Marc Delisle - 2009-08-09
    • status: open-fixed --> closed-fixed
     
  • Michal Čihař

    Michal Čihař - 2013-06-11
    • Status: closed-fixed --> fixed
     
MongoDB Logo MongoDB