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

extra semicolon in show create event syntax

    XMLWordPrintable

Details

    Description

      Dear MariaDB developers,

      I encountered a problem when importing from a database dump of itself.

      I used this command for the dump:

      mysqldump --routines --triggers --events --single-transaction -u root -p --databases my_db > ./my_db_dump.sql
      

      After I got the dump file, and was trying to import the database dump, the MariaDB complains about syntax error on a single line. This line is about the EVENT from the dump.

      The offending line looks like this:

      /*!50106 CREATE*/ /*!50117 DEFINER=`root`@`localhost`*/ /*!50106 EVENT `expireToken` ON SCHEDULE EVERY 1 DAY STARTS '2014-08-08 14:47:34' ON COMPLETION NOT PRESERVE ENABLE DO DELETE FROM Token WHERE DATE(time_end) < CURRENT_DATE; */ ;;
      

      Notice, there are a lot of "/* */" in this line. If I remove them as the following, the import can finish without any issue, and the database seems to be set up properly after importing:

      CREATE DEFINER=`root`@`localhost` EVENT `expireToken` ON SCHEDULE EVERY 1 DAY STARTS '2014-08-08 14:47:34' ON COMPLETION NOT PRESERVE ENABLE DO DELETE FROM Token WHERE DATE(time_end) < CURRENT_DATE;
      

      Do you know what could be the issues here? Is this a bug in MariaDB "mysqldump" command?

      Thanks,

      Kai

      Attachments

        Issue Links

          Activity

            People

              serg Sergei Golubchik
              ksong Kai Song
              Votes:
              1 Vote for this issue
              Watchers:
              9 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.