db-ddlutils-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Masker71 (Created) (JIRA)" <j...@apache.org>
Subject [jira] [Created] (DDLUTILS-275) platform.readModelFromDatabase(name) is not working if one of the table names contains underscore.
Date Mon, 27 Feb 2012 01:45:49 GMT
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

        

Mime
View raw message