You are viewing a plain text version of this content. The canonical link for it is here.
Posted to ddlutils-dev@db.apache.org by "Charith Haputhanthree (JIRA)" <ji...@apache.org> on 2012/07/16 07:45:35 UTC

[jira] [Commented] (DDLUTILS-275) platform.readModelFromDatabase(name) is not working if one of the table names contains underscore.

    [ https://issues.apache.org/jira/browse/DDLUTILS-275?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13414860#comment-13414860 ] 

Charith Haputhanthree commented on DDLUTILS-275:
------------------------------------------------

Hi ,
I have tried the fix with a Oracle Data Base and its not working.
Have this been highlighted earlier and has a fix now ?
Kind Regards
Charith
                
> 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
>              Labels: patch
>         Attachments: JdbcModelReader.java
>
>
> 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