You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@openjpa.apache.org by "Patrick Linskey (JIRA)" <ji...@apache.org> on 2008/01/30 07:28:38 UTC

[jira] Reopened: (OPENJPA-455) Incorrect MySQL DDL Generation for integer types

     [ https://issues.apache.org/jira/browse/OPENJPA-455?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Patrick Linskey reopened OPENJPA-455:
-------------------------------------

      Assignee: Patrick Linskey  (was: Michael Dick)

> Incorrect MySQL DDL Generation for integer types
> ------------------------------------------------
>
>                 Key: OPENJPA-455
>                 URL: https://issues.apache.org/jira/browse/OPENJPA-455
>             Project: OpenJPA
>          Issue Type: Bug
>    Affects Versions: 1.0.0, 1.0.1
>            Reporter: Michael Dick
>            Assignee: Patrick Linskey
>             Fix For: 1.1.0
>
>         Attachments: OPENJPA-455.patch.txt
>
>
> Opening a JIRA report on Tim's behalf. 
> I turned the schema tool loose on a MySQL production database this
> afternoon and it failed. The essence of the problem appears that DDL was
> being generated with a type declaration of this form:
> int unsigned(10)
> In MySQL, the proper form is:
> int(10) unsigned
> viz:
> ALTER TABLE fubar MODIFY col1 int(10) unsigned;
> Checking other options indicates that similar constructs such as CREATE
> TABLE are likewise defective.
> I looked at the svn trunk head source code in
> org.apache.openjpa.jdbc.sql.MySQLDictionary.java and the parent class
> DBDictionary.java. The offending method appears to be:
> 1508:     public String getTypeName(Column col)
> This method has no override in MySQLDictionary, but apparently needs
> one. I think it's a minor mod, but I'm not currently set up to build and
> test in the environment where the offending database exists.
> This is a SEVERE error. It causes generation of defective SQL for
> SQL-generating options and causes live updates to schemas to fail.
> I don't have a Jira login at present, so if someone could log this, it
> would be appreciated.
>   Thanks,
>    Tim Holloway

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.