Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

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

4.1.3
fixed
Marc Delisle
None
1
2014-01-17
2014-01-07
Nick Le Mouton
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

1 2 > >> (Page 1 of 2)
  • 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
     
1 2 > >> (Page 1 of 2)