Menu

#735 (ok 4.0)Contest-1 Ignoring foreign keys while dropping table

closed-fixed
1
2013-05-09
2012-03-23
No

Added 'Foreign Key Check' disabling option in the drop table confirmation form.

Discussion

  • Marc Delisle

    Marc Delisle - 2012-03-24
    • assigned_to: nobody --> lem9
     
  • Marc Delisle

    Marc Delisle - 2012-03-24

    Hi,
    this is a very good start! Here are the needed improvements:
    1. Move CSS to the themes
    2. The messages you generate via jQuery should be translatable; see js/messages.php
    3. For the default state of the checkbox, please take into account the current value of the global system variable foreign_key_checks

     
  • Atul Pratap Singh

    @lem9 Thanks for guiding me, I have now attahced a patch with some suggested improvements.
    But I couldn't find the global variable foreign_key_checks. Though, there is a variable $GLOBALS['sql_disable_fk'] for exporting purposes.
    Should I add a new feature for ForeignKeyChecks in the user settings section?

     
  • Marc Delisle

    Marc Delisle - 2012-03-26

    By "global system variable" I meant a MySQL variable, not a PHP variable. See in phpMyAdmin the "Variables" tab.

     
  • Atul Pratap Singh

    I have updated the patch by involving server system variable 'foreign_key_checks'.
    While having a look at 'Variables' tab I found 'foreign_key_checks' has been treated as GLOBAL scope variable but its a SESSION scope variable. So when editing its value from the 'Variables' tab, it shows an error.

     
  • Marc Delisle

    Marc Delisle - 2012-03-26

    Atul,
    congratulations, I accept your patch.
    About the scope, it depends on the MySQL server version. I tested in 5.1.55 and it's not GLOBAL, but in 5.5.13 it is.

     
  • Marc Delisle

    Marc Delisle - 2012-03-26
    • priority: 5 --> 1
    • summary: Contest-1 Ignoring foreign keys while dropping tables --> (ok 4.0)Contest-1 Ignoring foreign keys while dropping table
    • status: open --> open-accepted
     
  • Marc Delisle

    Marc Delisle - 2012-03-26

    Your patch was merged in the repository, thanks.

     
  • Marc Delisle

    Marc Delisle - 2012-03-26

    Please send me (marc@infomarc.info) your email address.

     
  • Michal Čihař

    Michal Čihař - 2013-05-09
    • Status: open-accepted --> closed-fixed
     
MongoDB Logo MongoDB