Menu

#173 (in 2.5.5) Fix export of foreign keys

closed-fixed
1
2003-12-28
2003-11-02
Kris Ven
No

When importing a database with InnoDB tables, most of
the times the tables aren't sorted correctly, so that
some foreign key constrains fail.

Starting from version 3.23.52 and 4.0.3, MySQL supports
the "FOREIGN_KEY_CHECKS" variable. If this is set to 0
(zero), no checks are performed when importing a
database. This means the tables can be sorted in random
order.

This patch adds an option box in the "Export SQL"
window that indicates whether you want to disable the
foreign key check. If the option was selected, "SET
FOREIGN_KEY_CHECKS=0;" will be added to the output.

In attachement, you can find a patch against the CVS
repository.

Discussion

<< < 1 2 (Page 2 of 2)
  • Kris Ven

    Kris Ven - 2003-11-13

    Logged In: YES
    user_id=590508

    My patch did remove the spaces by performing an ltrim on
    $regs before passing it to preg_replace.

    Anyway, patch #5 also works, so the problem is indeed fixed.
    Thanks.

     
  • Michal Čihař

    Michal Čihař - 2003-11-14

    Logged In: YES
    user_id=192186

    Yep, you're right, I missed ltrim.

     
  • Marc Delisle

    Marc Delisle - 2003-12-28
    • status: open-fixed --> closed-fixed
     
<< < 1 2 (Page 2 of 2)
Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.