Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 1.3.0, 2.0.0
    • Fix Version/s: 2.0.0-M3
    • Component/s: sql
    • Labels:
      None
    • Environment:
      MySQL 5.1

      Description

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

        Issue Links

          Activity

          Donald Woods made changes -
          Status Resolved [ 5 ] Closed [ 6 ]
          Donald Woods made changes -
          Fix Version/s 2.0.0-M3 [ 12314148 ]
          Fix Version/s 1.3.0 [ 12313326 ]
          Fix Version/s 2.0.0 [ 12314019 ]
          Milosz Tylenda made changes -
          Status Open [ 1 ] Resolved [ 5 ]
          Fix Version/s 1.3.0 [ 12313326 ]
          Fix Version/s 2.0.0 [ 12314019 ]
          Resolution Fixed [ 1 ]
          Hide
          Milosz Tylenda added a comment -

          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.

          Show
          Milosz Tylenda added a comment - 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.
          Milosz Tylenda made changes -
          Affects Version/s 1.3.0 [ 12313326 ]
          Hide
          Michael Dick added a comment -

          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

          Show
          Michael Dick added a comment - 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
          Milosz Tylenda made changes -
          Field Original Value New Value
          Link This issue relates to OPENJPA-1083 [ OPENJPA-1083 ]
          Milosz Tylenda created issue -

            People

            • Assignee:
              Milosz Tylenda
              Reporter:
              Milosz Tylenda
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development