/[rserv]/bin/Replicate
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Diff of /bin/Replicate

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.16 by dpavlin, Sun Nov 2 11:30:23 2003 UTC revision 1.17 by dpavlin, Sun Nov 2 15:43:05 2003 UTC
# Line 130  SyncSync($mconn, $sconn); Line 130  SyncSync($mconn, $sconn);
130    
131  my $masterId = 0;  my $masterId = 0;
132  if ($multiplemaster || $slaveId == 0) {  if ($multiplemaster || $slaveId == 0) {
133          $masterId = GetServerId($sconn, $master, $masterhost);          $masterId = GetServerId($mconn, $master, $masterhost);
134    
135          die "\n>>>>>>>>>>>>> ERROR: Can't GetServerId for $sinfo\n" if (! defined($masterId));          die "\n>>>>>>>>>>>>> ERROR: Can't GetServerId for $sinfo\n" if (! defined($masterId));
136    
# Line 147  my $outf = new IO::File; Line 147  my $outf = new IO::File;
147  open $outf, ">$snapshot";  open $outf, ">$snapshot";
148  print "\n>>>>>>>>>>>>> Prepare Snapshot\n\n" if ($verbose);  print "\n>>>>>>>>>>>>> Prepare Snapshot\n\n" if ($verbose);
149  print "master id: $masterId slave id: $slaveId\n" if ($debug);  print "master id: $masterId slave id: $slaveId\n" if ($debug);
150  my $res = PrepareSnapshot($mconn, $sconn, $outf, $masterId, $slaveId, $tables);  my $res = PrepareSnapshot($mconn, $sconn, $outf, $masterId, $slaveId, $multiplemaster, $tables);
151  close $outf;  close $outf;
152  if ($res < 0) {  if ($res < 0) {
153      unlink $fname;      unlink $fname;
# Line 164  if ($res == 0) Line 164  if ($res == 0)
164  my $inpf = new IO::File;  my $inpf = new IO::File;
165  open $inpf, "<$snapshot";  open $inpf, "<$snapshot";
166  print "\n>>>>>>>>>>>>> Apply Snapshot\n\n" if ($verbose);  print "\n>>>>>>>>>>>>> Apply Snapshot\n\n" if ($verbose);
167  $res = ApplySnapshot($sconn, $inpf, $tables);  $res = ApplySnapshot($sconn, $inpf, $multiplemaster, $tables);
168  close $inpf;  close $inpf;
169  if ($res < 0) {  if ($res < 0) {
170      unlink $fname;      unlink $fname;

Legend:
Removed from v.1.16  
changed lines
  Added in v.1.17

  ViewVC Help
Powered by ViewVC 1.1.26