• anarcat's avatar
    handle mysqldump errors again · 79092eee
    anarcat authored
    we rewrite the dump code completely, stealing bits from
    safe_shell_exec() for the DB credentials, to directly do the search
    and replace of certain patterns ourselves. this simplifies the
    pipeline and should also improve performance (because we avoid forking
    sed twice), unless some memory leaks exist in PHP (which is quite
    possible). we process the dump one line at a time so memory usage
    shouldn't be higher.
    
    the previous code would not catch errors from mysqldump because the
    "sed" pipeline would succeed and therefore hide error from earlier in
    the pipeline. we would need "set -o pipefail" in bash to workaround
    this issue, but that is not portable and, let's be honest, there
    already enough crap here as it is to warrant a cleanup.
    
    previous attempt at fixing this issue (#2098289) are sometimes
    unsuccesful because some dumps fail later than 1024 bytes. we still
    keep that check just in case.
    
    the bug (#1324466) was introduced in 571b63de, present since the 1.1
    release.
    
    this should be refactored to make safe_shell_exec() allow for a hook
    to modify the dumpfile inline, but for now i just wanted to port a
    working prototype in place.
    79092eee
Name
Last commit
Last update
Provision Loading commit data...
Symfony/Component/ClassLoader Loading commit data...
db Loading commit data...
debian Loading commit data...
dns Loading commit data...
example Loading commit data...
http Loading commit data...
platform Loading commit data...
provision-tests Loading commit data...
scripts Loading commit data...
.gitignore Loading commit data...
HACKING_2x.mdwn Loading commit data...
LICENSE.txt Loading commit data...
README.txt Loading commit data...
aegir-dev.make Loading commit data...
aegir-release.make Loading commit data...
aegir.make Loading commit data...
example.drushrc.php Loading commit data...
example.sudoers Loading commit data...
install.hostmaster.inc Loading commit data...
migrate.hostmaster.inc Loading commit data...
parse.backend.inc Loading commit data...
provision.api.php Loading commit data...
provision.context.inc Loading commit data...
provision.drush.inc Loading commit data...
provision.file.inc Loading commit data...
provision.inc Loading commit data...
provision.info Loading commit data...
provision.service.inc Loading commit data...
release.sh Loading commit data...
uninstall.hostmaster.inc Loading commit data...
upgrade.sh.txt Loading commit data...