Hi, I had a look at this bug [0]. Not being able to completely import a .bz2 file is serious.
The .bz2 generated by phpMyAdmin (with $cfg['CompressOnFly'] being true by default) contains extra headers that are not handled correctly by the bzread() function. This happens for export files reaching a certain size.
Curiously, the bunzip2 command handles the file correctly.
Forcing $cfg['CompressOnFly'] to false for .bz2 will only bring us memory problems at export time.
I have contacted the author of bzip, asking for an opinion. No answer so far after four days.
I see two possible solutions: - ask users to uncompress / recompress their .bz2 export file before importing (not elegant; might be difficult to make this procedure known to users)
- withdraw support for exporting/importing in .bz2
[0] https://sourceforge.net/p/phpmyadmin/bugs/4221/
Hi
Dne Tue, 14 Jan 2014 10:57:40 -0500 Marc Delisle marc@infomarc.info napsal(a):
I had a look at this bug [0]. Not being able to completely import a .bz2 file is serious.
Given that the bug was not discovered for about ten years, I don't see it that serious.
The .bz2 generated by phpMyAdmin (with $cfg['CompressOnFly'] being true by default) contains extra headers that are not handled correctly by the bzread() function. This happens for export files reaching a certain size.
Curiously, the bunzip2 command handles the file correctly.
Indeed it was tested only against bunzip2.
I see two possible solutions:
- ask users to uncompress / recompress their .bz2 export file before
importing (not elegant; might be difficult to make this procedure known to users)
- withdraw support for exporting/importing in .bz2
I'd happily remove bz2 and replace it with xz, but unfortunately xz support in PHP is nowhere near.
Le 2014-01-15 03:01, Michal Čihař a écrit :
Hi
Dne Tue, 14 Jan 2014 10:57:40 -0500 Marc Delisle marc@infomarc.info napsal(a):
I had a look at this bug [0]. Not being able to completely import a .bz2 file is serious.
Given that the bug was not discovered for about ten years, I don't see it that serious.
Well I do, as the person who created the ticket, who could not restore his backup.
But the fact that we did not get a report about this, might mean that this feature is not used much.
The .bz2 generated by phpMyAdmin (with $cfg['CompressOnFly'] being true by default) contains extra headers that are not handled correctly by the bzread() function. This happens for export files reaching a certain size.
Curiously, the bunzip2 command handles the file correctly.
Indeed it was tested only against bunzip2.
I see two possible solutions:
- ask users to uncompress / recompress their .bz2 export file before
importing (not elegant; might be difficult to make this procedure known to users)
- withdraw support for exporting/importing in .bz2
I'd happily remove bz2 and replace it with xz, but unfortunately xz support in PHP is nowhere near.
Users who want compression can use the gzip option, so removing bz2 would not leave them with nothing.
Hi
Dne Wed, 15 Jan 2014 06:25:20 -0500 Marc Delisle marc@infomarc.info napsal(a):
Le 2014-01-15 03:01, Michal Čihař a écrit :
Hi
Dne Tue, 14 Jan 2014 10:57:40 -0500 Marc Delisle marc@infomarc.info napsal(a):
I had a look at this bug [0]. Not being able to completely import a .bz2 file is serious.
Given that the bug was not discovered for about ten years, I don't see it that serious.
Well I do, as the person who created the ticket, who could not restore his backup.
There is simple workaround - use different tool to uncompress the backup.
But the fact that we did not get a report about this, might mean that this feature is not used much.
Indeed, that's also possibility.
Users who want compression can use the gzip option, so removing bz2 would not leave them with nothing.
I'm fine with removal (for export, for import, it should IMHO stay for a while). bz2 really does not have much benefits these days.
Le 2014-01-15 06:40, Michal Čihař a écrit :
Hi
Dne Wed, 15 Jan 2014 06:25:20 -0500 Marc Delisle marc@infomarc.info napsal(a):
Le 2014-01-15 03:01, Michal Čihař a écrit :
Hi
Dne Tue, 14 Jan 2014 10:57:40 -0500 Marc Delisle marc@infomarc.info napsal(a):
I had a look at this bug [0]. Not being able to completely import a .bz2 file is serious.
Given that the bug was not discovered for about ten years, I don't see it that serious.
Well I do, as the person who created the ticket, who could not restore his backup.
There is simple workaround - use different tool to uncompress the backup.
But the fact that we did not get a report about this, might mean that this feature is not used much.
Indeed, that's also possibility.
Users who want compression can use the gzip option, so removing bz2 would not leave them with nothing.
I'm fine with removal (for export, for import, it should IMHO stay for a while). bz2 really does not have much benefits these days
Just to clarify, you are fine with removing for export?
Dne Wed, 15 Jan 2014 06:43:19 -0500 Marc Delisle marc@infomarc.info napsal(a):
Le 2014-01-15 06:40, Michal Čihař a écrit :
Hi
Dne Wed, 15 Jan 2014 06:25:20 -0500 Marc Delisle marc@infomarc.info napsal(a):
Le 2014-01-15 03:01, Michal Čihař a écrit :
Hi
Dne Tue, 14 Jan 2014 10:57:40 -0500 Marc Delisle marc@infomarc.info napsal(a):
I had a look at this bug [0]. Not being able to completely import a .bz2 file is serious.
Given that the bug was not discovered for about ten years, I don't see it that serious.
Well I do, as the person who created the ticket, who could not restore his backup.
There is simple workaround - use different tool to uncompress the backup.
But the fact that we did not get a report about this, might mean that this feature is not used much.
Indeed, that's also possibility.
Users who want compression can use the gzip option, so removing bz2 would not leave them with nothing.
I'm fine with removal (for export, for import, it should IMHO stay for a while). bz2 really does not have much benefits these days
Just to clarify, you are fine with removing for export?
Exactly.