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
- includes
-
MDEV-24200 Syntax error in mysqldump (triggers with ; endings)
- Closed
- relates to
-
MDEV-6421 SQL_ERROR_LOG doesn't log comments in Events
- Closed
-
MDEV-24200 Syntax error in mysqldump (triggers with ; endings)
- Closed
-
MDEV-11169 Error Restoring mysqldump in MariaDB 5.5
- Closed
-
MDEV-28588 SIGSEGV in __memmove_avx_unaligned_erms, strmake_root
- Closed