Menu

#2843 (ok 3.2) SQL_MODE not saved during Partial Import

2.11.8
fixed
1
2013-06-11
2009-03-01
No

channeling AltaVida at http://drupal.org/node/204411

An interesting thing I noticed about PHPMyAdmin and NO_AUTO_VALUE_ON_ZERO:

As mentioned, more recent versions of PHPMyAdmin add SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO" to the beginning of a dump file.

However if your database is large, on import you can use the "Partial Import" option which is described as "Allow interrupt of import in case script detects it is close to time limit. This might be good way to import large files, however it can break transactions."

This allows you to perform an import over multiple requests in case the PHP time limit is reached before the import completes. However, since it works by re-uploading the dump file each time (until the import is complete) and "resuming" the import from the last line processed in your dump file, your SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO" statement at the beginning of the file will get skipped after the first request and therefore you might see this problem (even though you might think you shouldn't).

I'm using PHPMyAdmin version 2.11.8.1.

Discussion

  • Marc Delisle

    Marc Delisle - 2009-04-05
    • assigned_to: nobody --> lem9
     
  • Marc Delisle

    Marc Delisle - 2009-04-05

    I suggest adding an option in the SQL import dialog that has for effect to generate a
    SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO"

    for each imported chunk, regardless of the presence of this statement (or not) in the imported file.

     
  • Marc Delisle

    Marc Delisle - 2009-04-08

    New option added.

     
  • Marc Delisle

    Marc Delisle - 2009-04-08
    • priority: 5 --> 1
    • summary: SQL_MODE not saved during Partial Import continuation --> (ok 3.2) SQL_MODE not saved during Partial Import
    • status: open --> open-fixed
     
  • Marc Delisle

    Marc Delisle - 2009-06-15
    • status: open-fixed --> closed-fixed
     
  • Michal Čihař

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