diff options
author | justdave%syndicomm.com <> | 2001-06-07 06:17:39 +0200 |
---|---|---|
committer | justdave%syndicomm.com <> | 2001-06-07 06:17:39 +0200 |
commit | fe52fe9957ce904a57f856716046276e8db72697 (patch) | |
tree | e575106f65a0cc96003f955837cd69dda7b2fbcc /syncshadowdb | |
parent | e1417d77ee61c777ae414590c220fca0d8da3dca (diff) | |
download | bugzilla-fe52fe9957ce904a57f856716046276e8db72697.tar.gz bugzilla-fe52fe9957ce904a57f856716046276e8db72697.tar.xz |
Fix for bug 21253: removing all single-parameter system() calls from Bugzilla
Patch by Dave Miller <justdave@syndicomm.com>
r= tara@tequilarista.org
Diffstat (limited to 'syncshadowdb')
-rwxr-xr-x | syncshadowdb | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/syncshadowdb b/syncshadowdb index 94e492044..985bd16b8 100755 --- a/syncshadowdb +++ b/syncshadowdb @@ -156,10 +156,13 @@ if ($syncall) { } Verbose("Locking entire database"); SendSQL($query); - my $tablelist = join(' ', @tables); my $tempfile = "data/tmpsyncshadow.$$"; Verbose("Dumping database to a temp file ($tempfile)."); - system("mysqldump -l -e $db_name $tablelist > $tempfile"); + open SAVEOUT, ">&STDOUT"; # stash the original output stream + open STDOUT, ">$tempfile"; # redirect to file + select STDOUT; $| = 1; # disable buffering + system("mysqldump","-l","-e",$db_name,@tables); + open STDOUT, ">&SAVEOUT"; # redirect back to original stream Verbose("Restoring from tempfile into shadowdb"); my $extra = ""; if ($verbose) { |