Menu

#4221 (ok 4.1.5) Bzip2 export cannot be directly imported

4.1.3
fixed
None
1
2014-01-17
2014-01-07
No

When importing sql files from a phpMyAdmin export, bzip2 doesn't import all the data. Uncompressed, zip and gzip seem to work, but bzip2 only imports 188 rows from 1408. Comparing the file from the bzip2 with the uncompressed shows an identical file, so I'm guessing something has gone wrong on the import.

There was a problem on 4.1.2 with imports as well (no queries were run when importing bzip2) but this seems to be working better (although not perfectly) under 4.1.3

PHP: 5.5.7
MySQL: 5.6.15
CentOS 6.5

Discussion

  • Nick Le Mouton

    Nick Le Mouton - 2014-01-07

    Issue exists in 4.1.4 also.

     
  • Marc Delisle

    Marc Delisle - 2014-01-09

    I made some tests under two differents PHP versions and I get the same result: at some point during the import, the feof() command returns true, meaning that we have reached end of file, but we haven't reached it yet.

     
  • Marc Delisle

    Marc Delisle - 2014-01-09
    • assigned_to: Marc Delisle
     
  • Marc Delisle

    Marc Delisle - 2014-01-09
    • assigned_to: Marc Delisle --> nobody
     
  • Marc Delisle

    Marc Delisle - 2014-01-10
    • assigned_to: Marc Delisle
     
  • Marc Delisle

    Marc Delisle - 2014-01-10

    For export files reaching a certain size (I tested with the sakila sample database, film table), there is an incompatibility between the bzip2 file produced by phpMyAdmin, and the bzread() function used to uncompress it at import time.

    I found a workaround: decompress and recompress the file; for example:
    bunzip2 film.sql.bz2
    bzip2 film.sql
    Then phpMyadmin has no problem to import. Nick, please confirm with your own file.

     
  • Marc Delisle

    Marc Delisle - 2014-01-10

    Also, with this in my configuration file:

    $cfg['CompressOnFly'] = false;

    I don't have the problem.

     
  • Nick Le Mouton

    Nick Le Mouton - 2014-01-12

    I can confirm that decompressing the file and recompressing it with bzip2 allows me to import it completely. So the problem must be the bzip2 export. I haven't had a chance to try the CompressOnFly setting yet.

     
  • Marc Delisle

    Marc Delisle - 2014-01-15
    • summary: Import doesn't process bzip2 completely --> Bzip2 export cannot be directly imported
     
  • Marc Delisle

    Marc Delisle - 2014-01-15
    • summary: Bzip2 export cannot be directly imported --> (ok 4.1.5) Bzip2 export cannot be directly imported
    • status: open --> resolved
    • Priority: 5 --> 1
     
  • Marc Delisle

    Marc Delisle - 2014-01-17
    • Status: resolved --> fixed
     
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.