Details
-
Bug
-
Status: Open (View Workflow)
-
Major
-
Resolution: Unresolved
-
10.3(EOL), 10.4(EOL), 10.5, 10.6, 10.7(EOL), 10.8(EOL), 10.9(EOL), 10.10(EOL), 10.11
Description
If a trigger contains a comment in its description, it can interleave with executable comments which mysqldump adds, resulting in syntactically incorrect statement and unloadable dump.
create table t (a int); |
create trigger /* here */ tr after insert on t for each row set @a=1; |
|
--exec $MYSQL_DUMP test > $MYSQL_TMP_DIR/test.dump
|
--exec $MYSQL test < $MYSQL_TMP_DIR/test.dump
|
|
# Cleanup
|
drop table t; |
10.3 0ca3aaa7 |
ERROR 1064 (42000) at line 47: 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
|
mysqltest: At line 5: exec of '/mnt8t/bld/10.3-nightly/bin/mysql --defaults-file=/mnt8t/bld/10.3-nightly/mysql-test/var/my.cnf test < /mnt8t/bld/10.3-nightly/mysql-test/var/tmp/test.dump' failed, error: 256, status: 1, errno: 11
|
The line 47 which it complains about it
/*!50003 CREATE*/ /*!50017 DEFINER=`root`@`localhost`*/ /*!50003 trigger /* here */ tr after insert on t for each row set @a=1 */;; |
Note the comment /* here */ nested inside the executable comment.