1. DdlUtils
  2. DDLUTILS-62

column DEFAULT - SQL error during create table in ddlToDatabase( to MySQL) using files produced by databaseToDdl(from MSSQL)


    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 1.0 RC1
    • Labels:
    • Environment:
      Windows 2K
      MSSQL 2000
      JDBC Driver - jtds
      MySQL 5.0
      JDBC driver - MySQL Connector/J - mysql-connector-java-5.0.0-beta


      • This issue is clone of another issue, but is cloned for highlighting the specific issue around the actual default value
      • Dumped out a database from MSSQL using ddlutils ant task
      • Using these files, attempting creating the equivalent database on MySQL 5.0
      • Getting few errors as below:
        CREATE TABLE `whatever`
        `col1` INTEGER NOT NULL,
        `col2` INTEGER NOT NULL,
        `col3` CHAR(1) DEFAULT '(''some string'')' NULL
        ) failed with You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax ...
      • I changed the col3 line to as follows and then the ddltodatabase works fine
        `col3` CHAR(1) DEFAULT 'some string' NULL
      • I am not too sure why this specific default value is xml encoded in the first place, but in any case, if one indeed had such literal data,
        there should be a way to configure the ddlutils to deal with it (possibly appropriately escape/encode)
      • I could not find info if there were any user configurable settings that can overcome this problem.

        Issue Links


          No work has yet been logged on this issue.


            • Assignee:
              Thomas Dudziak
              Appajee Papolu
            • Votes:
              0 Vote for this issue
              0 Start watching this issue


              • Created: