Uploaded image for project: 'MariaDB Server'
  1. MariaDB Server
  2. MDEV-24200

Syntax error in mysqldump (triggers with ; endings)

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Duplicate
    • 10.3.25
    • N/A
    • Backup, Triggers
    • None

    Description

      Hi,

      When dumping a database with triggers for a customer I got the current output:

      DELIMITER ;;
      /*!50003 CREATE*/ /*!50017 DEFINER=`mydb`@`%` */ /*!50003 TRIGGER trigger_LabelsUsers_insert_before BEFORE INSERT ON LabelsUsers FOR EACH ROW SET NEW.LabelsUsersID2 = MD5(CONCAT(NOW(),RAND())); */;;
      DELIMITER ;
      

      When restoring or running it manually I get:

      ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '*/' at line 1
      

      If I remove the last ; so the query looks like this:

      /*!50003 CREATE*/ /*!50017 DEFINER=`mydb`@`%` */ /*!50003 TRIGGER trigger_LabelsUsers_insert_before BEFORE INSERT ON LabelsUsers FOR EACH ROW SET NEW.LabelsUsersID2 = MD5(CONCAT(NOW(),RAND())) */;;
      

      then it works.

      Attachments

        Issue Links

          Activity

            People

              serg Sergei Golubchik
              Desdic Kim Gert Nielsen
              Votes:
              1 Vote for this issue
              Watchers:
              8 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Git Integration

                  Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.