Return-Path: X-Original-To: apmail-db-ddlutils-dev-archive@www.apache.org Delivered-To: apmail-db-ddlutils-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id DB23190E7 for ; Wed, 4 Apr 2012 14:05:43 +0000 (UTC) Received: (qmail 56359 invoked by uid 500); 4 Apr 2012 14:05:43 -0000 Delivered-To: apmail-db-ddlutils-dev-archive@db.apache.org Received: (qmail 56336 invoked by uid 500); 4 Apr 2012 14:05:43 -0000 Mailing-List: contact ddlutils-dev-help@db.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: ddlutils-dev@db.apache.org Delivered-To: mailing list ddlutils-dev@db.apache.org Received: (qmail 56318 invoked by uid 99); 4 Apr 2012 14:05:43 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 04 Apr 2012 14:05:43 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED,T_RP_MATCHES_RCVD X-Spam-Check-By: apache.org Received: from [140.211.11.116] (HELO hel.zones.apache.org) (140.211.11.116) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 04 Apr 2012 14:05:42 +0000 Received: from hel.zones.apache.org (hel.zones.apache.org [140.211.11.116]) by hel.zones.apache.org (Postfix) with ESMTP id 65F05358020 for ; Wed, 4 Apr 2012 14:05:22 +0000 (UTC) Date: Wed, 4 Apr 2012 14:05:22 +0000 (UTC) From: "Masker71 (Commented) (JIRA)" To: ddlutils-dev@db.apache.org Message-ID: <1634884175.11621.1333548322418.JavaMail.tomcat@hel.zones.apache.org> In-Reply-To: <116223161.21828.1330307149072.JavaMail.tomcat@hel.zones.apache.org> Subject: [jira] [Commented] (DDLUTILS-275) platform.readModelFromDatabase(name) is not working if one of the table names contains underscore. MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/DDLUTILS-275?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13246265#comment-13246265 ] Masker71 commented on DDLUTILS-275: ----------------------------------- Hi Sergio, Maybe you will test it as well before saying it's working? Because it doesn't. > 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 > > 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