Platon Technologies
neprihlásený Prihlásiť Registrácia
SlovakEnglish
open source software development oslavujeme 10 rokov vývoja otvoreného softvéru! Sobota, 24. október 2026

Rozdiely pre scripts/perl/mysql/mysql-table-copy.pl medzi verziami 1.7 a 1.8

verzia 1.7, 2005/05/10 09:40:39 verzia 1.8, 2005/05/10 09:49:25
Riadok 10 
Riadok 10 
 # Licensed under terms of GNU General Public License.  # Licensed under terms of GNU General Public License.
 # All rights reserved.  # All rights reserved.
 #  #
 # $Platon: scripts/perl/mysql/mysql-table-copy.pl,v 1.6 2005/05/10 09:19:23 nepto Exp $  # $Platon: scripts/perl/mysql/mysql-table-copy.pl,v 1.7 2005/05/10 09:40:39 nepto Exp $
   
 # TODO: - reconnect on closed connection  # TODO: - reconnect on closed connection
 #       - managment for tables with multiple KEY columns  #       - managment for tables with multiple KEY columns
Riadok 22  use Time::HiRes qw(gettimeofday tv_inter
Riadok 22  use Time::HiRes qw(gettimeofday tv_inter
 use POSIX qw(strftime);  use POSIX qw(strftime);
   
 use vars qw (  use vars qw (
         $opt_pk          $opt_pk $opt_exit
         $dbh1 $db_name1 $user1 $pass1          $dbh1 $db_name1 $user1 $pass1
         $dbh2 $db_name2 $user2 $pass2          $dbh2 $db_name2 $user2 $pass2
         $table $timeout          $table $timeout
Riadok 41  while ($ARGV[0] =~ /^-/) {
Riadok 41  while ($ARGV[0] =~ /^-/) {
         my $option = shift @ARGV;          my $option = shift @ARGV;
         if ($option eq '-pk') {          if ($option eq '-pk') {
                 $opt_pk = 1;                  $opt_pk = 1;
           } elsif ($option eq '-exit') {
                   $opt_exit = 1;
         }          }
 }  }
   
Riadok 51  if (! defined $db_name1 or ! defined $db
Riadok 53  if (! defined $db_name1 or ! defined $db
         print STDERR "  $0 [options] database=DB1,host=localhost database=DB2,host=localhost Table\n";          print STDERR "  $0 [options] database=DB1,host=localhost database=DB2,host=localhost Table\n";
         print STDERR "    [user1] [pass1] [user2] [pass2] [<time_interval>]\n";          print STDERR "    [user1] [pass1] [user2] [pass2] [<time_interval>]\n";
         print STDERR "Options:\n";          print STDERR "Options:\n";
         print STDERR "  -pk - copy/replicate primary key as well\n";          print STDERR "  -exit   exit immediately after execution\n";
           print STDERR "  -pk     copy/replicate primary key as well\n";
         exit 1;          exit 1;
 }  }
   
Riadok 163  while (1) {
Riadok 166  while (1) {
                 }                  }
         }          }
   
           last if ($opt_exit);
         sleep $timeout;          sleep $timeout;
 }  }
   

Legend:
Odstranené z verzie1.7  
zmenené riadky
  Pridané vo verzii1.8

Platon Group <platon@platon.sk> http://platon.sk/
Copyright © 2002-2006 Platon Group
Stránka používa redakčný systém Metafox
Na začiatok