Problem using mysql delimiter directly from liquibase

Let me add some more info to the description (copy-paste)

change set


       
            <![CDATA[
DELIMITER $$

select 7$$

DELIMITER ;
            ]]>
       


>mvn liquibase:update
which throws Error executing SQL DELIMITER $$

[INFO] Error setting up or running Liquibase: Migration failed for change set src/main/resources/db.
changelog.xml::246::mrki:
     Reason: liquibase.exception.JDBCException: Error executing SQL DELIMITER $$

select 7$$

DELIMITER :
          Caused By: Error executing SQL DELIMITER $$

select 7$$

DELIMITER :
          Caused By: You have an error in your SQL syntax; check the manual that corresponds to your
 MySQL server version for the right syntax to use near ‘DELIMITER $$

select 7$$

DELIMITER’ at line 1


>mvn liquibase:updateSQL
would generate

– Changeset src/main/resources/db.changelog.xml::245::milan.mrdjen::(MD5Sum: 2f77397c1e62bd2d389ff4504e136fe6)
DELIMITER $$

select 7$$

DELIMITER ;



and then

>mysql -u mrki -p db_mrki < migrate.sql
Enter password: ***********
COUNT()
1
COUNT(
)
1
7
7



Any suggestions?

Thanks

Milan

Hi,

I have problem using liquibase with mysql delimiters.Using liquibase 1.9.2 with maven.
When i execute mvn liquibase:update even the following will fail



delimiter $$
select 1$$
delimiter ;



but when i do mvn liquibase:updateSql and then from command line execute the generated file it will run ok! for example mysql -u user -p myDb < migrate.sql


(Other things i’ve tried
 - use splitStatements and endDelimiter but fail.
 - use sqlFile instead of sql and point to file generated with liquibase:updateSql but fail)

Any suggestions?

Thanks, Milan