Skip to content

mysqldump backups broken with #3408 #3577

@rPraml

Description

@rPraml

@rbygrave @mkurz The change in #3408 breaks backups, that are made with "mysqldump" / "mariadbdump"
(We use mysqldump --hex-blob --routines --single-transaction --skip-extended-insert --complete-insert --no-autocommit)

When backing up a DB, "mysqldump" creates the following output:

DELIMITER ;;
CREATE DEFINER=`user`@`%` PROCEDURE `usp_ebean_drop_column`(IN p_table_name VARCHAR(255), IN p_column_name VARCHAR(255))
BEGIN
CALL usp_ebean_drop_foreign_keys(p_table_name, p_column_name);
SET @sql = CONCAT('ALTER TABLE `', p_table_name, '` DROP COLUMN `', p_column_name, '`');
PREPARE stmt FROM @sql;
EXECUTE stmt;
END
-- play-ebean-end ;;
DELIMITER ;

Before, the penultimate line was END;;. Now it is -- play-ebean-end ;; and the backup cannot be restored, because the delimiter is behind the comment. You may have to replace -- play-ebean-end ;; by ;; in these backups.

I think this is a bug in mysqldump, but I still wanted to mention that we have a problem here now.

an easy workaround could be, that after -- play-ebean-end a newline is added or that it is ignored by the ebean migration-runner - but we have not verified that, yet.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions