diff options
author | 2001-06-07 04:17:39 +0000 | |
---|---|---|
committer | 2001-06-07 04:17:39 +0000 | |
commit | fe52fe9957ce904a57f856716046276e8db72697 (patch) | |
tree | e575106f65a0cc96003f955837cd69dda7b2fbcc /syncshadowdb | |
parent | Fix for bug 83872: Bugzilla no longer requires the Mysql Perl module, but the... (diff) | |
download | bugzilla-fe52fe9957ce904a57f856716046276e8db72697.tar.gz bugzilla-fe52fe9957ce904a57f856716046276e8db72697.tar.bz2 bugzilla-fe52fe9957ce904a57f856716046276e8db72697.zip |
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) { |