[jira] Created: (OPENJPA-1132) Dropping constraints fails on MySQL

4 messages Options
Embed this post
Permalink
JIRA jira@apache.org

[jira] Created: (OPENJPA-1132) Dropping constraints fails on MySQL

Reply Threaded More More options
Print post
Permalink
Dropping constraints fails on MySQL
-----------------------------------

                 Key: OPENJPA-1132
                 URL: https://issues.apache.org/jira/browse/OPENJPA-1132
             Project: OpenJPA
          Issue Type: Bug
          Components: sql
    Affects Versions: 2.0.0
         Environment: MySQL 5.1
            Reporter: Milosz Tylenda
            Assignee: Milosz Tylenda


MySQL rejects our DROP CONSTRAINT statements, it requires different syntax.


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

JIRA jira@apache.org

[jira] Commented: (OPENJPA-1132) Dropping constraints fails on MySQL

Reply Threaded More More options
Print post
Permalink

    [ https://issues.apache.org/jira/browse/OPENJPA-1132?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12718284#action_12718284 ]

Michael Dick commented on OPENJPA-1132:
---------------------------------------

Looks like ALTER TABLE xxx DROP FOREIGN KEY yyy should work [1]. I'm not sure if there's a more general name we can use  though.

[1] http://dev.mysql.com/doc/refman/5.1/en/innodb-foreign-key-constraints.html

> Dropping constraints fails on MySQL
> -----------------------------------
>
>                 Key: OPENJPA-1132
>                 URL: https://issues.apache.org/jira/browse/OPENJPA-1132
>             Project: OpenJPA
>          Issue Type: Bug
>          Components: sql
>    Affects Versions: 2.0.0
>         Environment: MySQL 5.1
>            Reporter: Milosz Tylenda
>            Assignee: Milosz Tylenda
>
> MySQL rejects our DROP CONSTRAINT statements, it requires different syntax.

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

JIRA jira@apache.org

[jira] Updated: (OPENJPA-1132) Dropping constraints fails on MySQL

Reply Threaded More More options
Print post
Permalink
In reply to this post by JIRA jira@apache.org

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

Milosz Tylenda updated OPENJPA-1132:
------------------------------------

    Affects Version/s: 1.3.0

> Dropping constraints fails on MySQL
> -----------------------------------
>
>                 Key: OPENJPA-1132
>                 URL: https://issues.apache.org/jira/browse/OPENJPA-1132
>             Project: OpenJPA
>          Issue Type: Bug
>          Components: sql
>    Affects Versions: 1.3.0, 2.0.0
>         Environment: MySQL 5.1
>            Reporter: Milosz Tylenda
>            Assignee: Milosz Tylenda
>
> MySQL rejects our DROP CONSTRAINT statements, it requires different syntax.

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

JIRA jira@apache.org

[jira] Resolved: (OPENJPA-1132) Dropping constraints fails on MySQL

Reply Threaded More More options
Print post
Permalink
In reply to this post by JIRA jira@apache.org

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

Milosz Tylenda resolved OPENJPA-1132.
-------------------------------------

       Resolution: Fixed
    Fix Version/s: 2.0.0
                   1.3.0

I have modified MySQLDictionary to use "ALTER TABLE xxx DROP FOREIGN KEY yyy". Also corrected the statement to drop a primary key to "ALTER TABLE xxx DROP PRIMARY KEY" although it seems to be unused at the moment.

Change applied to trunk and 1.3.x branch.


> Dropping constraints fails on MySQL
> -----------------------------------
>
>                 Key: OPENJPA-1132
>                 URL: https://issues.apache.org/jira/browse/OPENJPA-1132
>             Project: OpenJPA
>          Issue Type: Bug
>          Components: sql
>    Affects Versions: 1.3.0, 2.0.0
>         Environment: MySQL 5.1
>            Reporter: Milosz Tylenda
>            Assignee: Milosz Tylenda
>             Fix For: 1.3.0, 2.0.0
>
>
> MySQL rejects our DROP CONSTRAINT statements, it requires different syntax.

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