Platon Technologies
not logged in Login Registration
EnglishSlovak
open source software development celebrating 10 years of open source development! Wednesday, October 14, 2026

Diff for scripts/perl/mysql/mysql-table-copy.pl between version 1.5 and 1.6

version 1.5, 2005/05/10 08:36:03 version 1.6, 2005/05/10 09:19:23
Line 10 
Line 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.4 2005/03/15 23:25:04 rajo Exp $  # $Platon: scripts/perl/mysql/mysql-table-copy.pl,v 1.5 2005/05/10 08:36:03 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
Line 65  $dbh1 = DBI->connect($db_name1, $user1,
Line 65  $dbh1 = DBI->connect($db_name1, $user1,
 $dbh2 = DBI->connect($db_name2, $user2, $pass2) or die $DBI::errstr;  $dbh2 = DBI->connect($db_name2, $user2, $pass2) or die $DBI::errstr;
 $dbh1->{mysql_auto_reconnect} = 1;  $dbh1->{mysql_auto_reconnect} = 1;
 $dbh2->{mysql_auto_reconnect} = 1;  $dbh2->{mysql_auto_reconnect} = 1;
   $dbh1->{AutoCommit} = 1;
   $dbh2->{AutoCommit} = 1;
   
   #
   # Please, optimize me!
   #
   
   if ($db_name1 =~ m/^DBI:Oracle:/) {
       my $sth = $dbh2->prepare('ALTER SESSION SET NLS_DATE_FORMAT = \'YYYY-MM-DD HH24:MI:SS\'')
         or die "DBI::prepare(): $DBI::errstr";
       $sth->execute() or die "DBI::execute(): " . $sth->errstr;
           $sth->finish();
   }
   
   if ($db_name2 =~ m/^DBI:Oracle:/) {
       my $sth = $dbh2->prepare('ALTER SESSION SET NLS_DATE_FORMAT = \'YYYY-MM-DD HH24:MI:SS\'')
         or die "DBI::prepare(): $DBI::errstr";
       $sth->execute() or die "DBI::execute(): " . $sth->errstr;
           $sth->finish();
   }
   
 # }}}  # }}}
   

Legend:
Removed from v.1.5  
changed lines
  Added in v.1.6

Platon Group <platon@platon.org> http://platon.org/
Copyright © 2002-2006 Platon Group
Site powered by Metafox CMS
Go to Top