Menu

#2958 (ok 3.2.5)Cannot rename db which has foreign key constraints

3.2.4
fixed
1
2013-06-11
2010-01-01
No

If I have an InnoDB DB with foreign key constraints, and the constraints on the tables are not in alphabetical order, an error will occur saying a table cannot be deleted in the old DB.

Discussion

  • Micah Gersten

    Micah Gersten - 2010-01-01
    • milestone: --> 3.2.4
     
  • Marc Delisle

    Marc Delisle - 2010-01-01
    • assigned_to: nobody --> lem9
     
  • Marc Delisle

    Marc Delisle - 2010-01-01

    Fixed in subversion, thanks for reporting.

     
  • Marc Delisle

    Marc Delisle - 2010-01-01
    • priority: 5 --> 1
    • summary: Cannot rename database when DB has foreign key constraints --> (ok 3.2.5)Cannot rename db which has foreign key constraints
    • status: open --> open-fixed
     
  • Micah Gersten

    Micah Gersten - 2010-01-05

    I am now getting this error:
    Error: mySlidetablestatistics_indexes is undefined
    Source File: http://localhost/phpmyadmin/tbl_structure.php?db=mydb&table=mytable&token=
    Line: 619

    Names changed in URL and token was left out, but I think you can see what I mean.

     
  • Micah Gersten

    Micah Gersten - 2010-01-05

    Nevermind, that's unrelated to the patch.

     
  • Marc Delisle

    Marc Delisle - 2010-01-05

    At least, does the patch fix your problem? You can also download version 3.2.5-rc1 that contains this fix.

     
  • Micah Gersten

    Micah Gersten - 2010-01-05

    Well, I no longer get the errors, but the foreign keys are gone which I think is a bug.

     
  • Micah Gersten

    Micah Gersten - 2010-01-05

    This is with the a patch from the files at that revision you gave me.

     
  • Micah Gersten

    Micah Gersten - 2010-01-05

    I'm testing 3.2.5-rc1 now

     
  • Micah Gersten

    Micah Gersten - 2010-01-06

    When the DB is renamed now, the Foreign Keys are gone.

     
  • Marc Delisle

    Marc Delisle - 2010-01-06

    It works in my testing, so please attach here an export of your db structure (at least a minimal structure to reproduce this problem).

     
  • Marc Delisle

    Marc Delisle - 2010-01-07
    • priority: 1 --> 5
    • summary: (ok 3.2.5)Cannot rename db which has foreign key constraints --> Cannot rename db which has foreign key constraints
    • status: open-fixed --> open
     
  • Marc Delisle

    Marc Delisle - 2010-01-10
    • priority: 5 --> 1
    • summary: Cannot rename db which has foreign key constraints --> (ok 3.2.5)Cannot rename db which has foreign key constraints
     
  • Marc Delisle

    Marc Delisle - 2010-01-10
    • status: open --> closed
     
  • Michal Čihař

    Michal Čihař - 2013-06-11
    • Status: closed --> fixed