MySQL loadUpdateData using literal values for update

I am having an issue with the loadUpdateData change with MySQL 5.6.12.  I am using Liquibase 3.0.2. 

I have a CSV file that is initially being loaded with a loadData change - which works fine.  I am then wanting to add data to the CSV file and update/insert the existing/new rows using loadChangeData.  It seems that Liquibase is generating SQL that is trying to update the columns with the literal values for the column names.  Here is the bad SQL:

INSERT INTO ssue (id, intcol, charcol, datecol) VALUES (‘11bee7914aa74764975e30c07a496835’, 1, ‘String’, ‘2013-08-08 12:16:49’)
ON DUPLICATE KEY UPDATE intcol = intcol,charcol = ‘charcol’,datecol = ‘datecol’;

This is the error where it is using the column name for the value:
 Data truncation: Incorrect datetime value: ‘datecol’ for column ‘datecol’ at row 1
It is trying to use the literal value of the column name for the the update since it is in single quotes. 

If I manually change the SQL to this:
INSERT INTO issue (id, intcol, charcol, datecol) VALUES (‘11bee7914aa74764975e30c07a496835’, 1, ‘String’, ‘2013-08-08 12:16:49’)
ON DUPLICATE KEY UPDATE intcol = intcol,charcol = VALUES(charcol),datecol = VALUES(datecol);

it works fine.

Is this a bug in Liquibase or am I doing something wrong with my changeSet?

The databaseChangeLog looks like this:
 <?xml version="1.0" encoding="UTF-8" standalone="no"?>

   
       
           
               
           
           
           
           
       
   
   
       
   
   
        <loadData encoding=“UTF-8”
                  file=“db/changelog/1.0.0/issue.csv”
                  quotchar="""
                  separator=","
                  tableName=“issue”>
           
           
       
   
   
        <loadUpdateData encoding=“UTF-8” primaryKey=“id”
                  file=“db/changelog/1.0.0/issue.csv”
                  quotchar="""
                  separator=","
                  tableName=“issue”>
           
           
       
   


This is the CSV file:
id,intcol,charcol,datecol
11bee7914aa74764975e30c07a496835,1,“String”,"2013-08-08 12:16:49"

Thanks in advance for any help.

Andy

It is a bug. I logged https://liquibase.jira.com/browse/CORE-1406 and fixed it for 3.0.3


Thanks for the report and the repo info.


Nathan

I’m working on a way to get snapshots out still. Currently you would have to build it yourself.


I’m running final tests on 3.0.3 now, planning on releasing it today.


Nathan

Thanks for the fix!

Should I be able to get this from a snapshot repo?  I didn’t see one here:
https://oss.sonatype.org/content/repositories/snapshots/org/liquibase/liquibase-core/3.0.3-SNAPSHOT/liquibase-core-3.0.3-SNAPSHOT.pom

Is there a projected date for 3.0.3 release?

Thanks again,
Andy