Discussion:
[Liquibase-user] New Topic: XML parsing error?
Liquibase Community Forum
2010-11-22 16:52:09 UTC
Permalink
A new topic, 'XML parsing error?', has been made on a board you are watching.

You can see it at
http://liquibase.org/forum/index.php?topic=798.new#new

The text of the topic is shown below:

I've just tried to create a stored procedure in a liquibase changelog file using the <sql> tag.

The migration fails with (among other things) this weird error:

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 '}" tableName="Shelter"><colLT FALSE;
DECLARE c CURSOR FOR
SELECT b' at line 5

Obviously I would not write such invalid SQL. I looked in the log to see what Liquibase was trying to execute, and lo and behold. Here's a snippet. See line 5:

Error executing SQL CREATE PROCEDURE fixBreadcrumbs() MODIFIES SQL DATA
BEGIN
DECLARE newCurrentQuestionID VARCHAR(30);
DECLARE newSessionID BIGINT(20);
DECLARE maxId BIGINT(20);maName}" tableName="Shelter"><colLT FALSE;
DECLARE c CURSOR FOR
SELECT bc.priorQuestionID, bc.sessionID
FROM sessionbreadcrumb bc

That bizarre fragment--see the maName}" tableName="Shelter"><col part?--is from a <createTable> element waaaay up earlier in the changelog.xml. Needless to say, I didn't incorporate this piece of text in my stored procedure SQL.

Is there some weird parameter substitution going on here that shouldn't be going on?

Unsubscribe to new topics from this board by clicking here: http://liquibase.org/forum/index.php?action=notifyboard;board=1.0

Regards,
The Liquibase Community Forum Team.

Loading...