Menu

#3439 (ok 3.4.6) Relations are dropped/created on every change

3.4.5
fixed
1
2013-06-11
2011-09-22
Blade 1o6
No

I've just upgraded to 3.4.5 (was on 3.2.3 before), and I'm facing the same bug as #1982489 (which was fixed in 2.11, so it may be the same fix).

PHP: 5.3.3
MySQL: 5.1.49 - InnoDB
Linux Debian stable (squeeze)
PMA: 3.4.5

When updating a contraint on a table, all constraints (innodb) are removed then added back. For me there's one issue to fix and one improvement to make:
- issue: don't remove a constraint already up-to-date (may be the introduction of «RESTRICT» that's not working)
- improvement: instead of running multiple queries, only one should be sent, so that the table isn't created for every deletion/adding. This can also fix the issue reported here:
-- replace: ALTER TABLE XX DROP CONSTRAINT1; ALTER TABLE XX ADD FOREIGN KEY YY;
-- with: ALTER TABLE XX DROP CONSTRAINT1, ADD FOREIGN KEY YY;
This way the table is only created once, and I don't care if all constraints are dropped then added back :-)

Thanks!
Yvan.

Discussion

  • Blade 1o6

    Blade 1o6 - 2011-09-22
    • summary: Relationships are dropped and created on every change --> Relations/constraints are dropped/created on every change
     
  • Madhura Jayaratne

    • assigned_to: nobody --> madhuracj
     
  • Madhura Jayaratne

    This bug was fixed in repository and will be part of a future release; thanks for reporting.

     
  • Madhura Jayaratne

    • priority: 5 --> 1
    • summary: Relations/constraints are dropped/created on every change --> (ok 3.4.6) Relations are dropped/created on every change
    • status: open --> open-fixed
     
  • Blade 1o6

    Blade 1o6 - 2011-09-27

    Thanks for the fix. Also I've noticed that changing the column which is used as the title (at the very bottom of the same page) will recreate foreign keys, but there should be no links between these two parts. Perhaps you've already fixed this too.

     
  • Madhura Jayaratne

    Yes, this is also fixed.

     
  • Blade 1o6

    Blade 1o6 - 2011-09-27
    • status: open-fixed --> closed-fixed
     
  • Marc Delisle

    Marc Delisle - 2011-09-27
    • status: closed-fixed --> open-fixed
     
  • Marc Delisle

    Marc Delisle - 2011-09-27

    Please, we only close when the new version has been released.

     
  • Marc Delisle

    Marc Delisle - 2011-10-16
    • status: open-fixed --> closed-fixed
     
  • Michal Čihař

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