platform.readModelFromDatabase(name) is not working if one of the table names 
contains underscore.
--------------------------------------------------------------------------------------------------

                 Key: DDLUTILS-275
                 URL: https://issues.apache.org/jira/browse/DDLUTILS-275
             Project: DdlUtils
          Issue Type: Bug
          Components: Core - MySql
    Affects Versions: 1.1
         Environment: Ubuntu 10.02, 64 bit, JDK 1.6.0_20, probably all others 
as well.
            Reporter: Masker71
            Assignee: Thomas Dudziak
            Priority: Blocker


org.apache.ddlutils.platform.JdbcModelReader
lines 859, 900, 1007

            pkData = 
metaData.getPrimaryKeys(metaData.escapeForSearch(tableName));
            fkData = 
metaData.getForeignKeys(metaData.escapeForSearch(tableName));
            indexData = 
metaData.getIndices(metaData.escapeForSearch(tableName), false, false);

should be replaced to:

            pkData = metaData.getPrimaryKeys(tableName);
            fkData = metaData.getForeignKeys(tableName);
            indexData = metaData.getIndices(tableName, false, false);

According to MySQL 5 documentation "show create table" accepts table name, not 
table name pattern.
http://dev.mysql.com/doc/refman/5.0/en/show-create-table.html

If any of the table names contain underline this line bombs:
                Database db = platform.readModelFromDatabase( "test" );


--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to