Diff for /loncom/metadata_database/cleanup_database.pl between versions 1.4 and 1.5

version 1.4, 2004/06/09 12:39:39 version 1.5, 2006/08/10 20:07:01
Line 119  unless ($dbh = DBI->connect("DBI:mysql:l Line 119  unless ($dbh = DBI->connect("DBI:mysql:l
   
 my $sth = $dbh->prepare("SHOW TABLE STATUS");  my $sth = $dbh->prepare("SHOW TABLE STATUS");
 $sth->execute();  $sth->execute();
 my $results = $sth->fetchall_arrayref;  my $results = $sth->fetchall_hashref(['Name']);
   
 foreach my $array (@$results) {  foreach my $name (keys(%$results)) {
     next if ($array->[14] ne 'temporary');  # [14] is the comment      next if ($results->{$name}{Comment} ne 'temporary'); 
     my $name = $array->[0];      my $tabletime = $results->{$name}{Update_time};
     # [10] in status report is creation time.  
     # [11] in status report is update (last modification?) time.  
     my $tabletime = $array->[11];  
     # Times are like: 2002-07-25 10:17:08      # Times are like: 2002-07-25 10:17:08
     my ($year,$month,$day,$hour,$min,$sec)=       my ($year,$month,$day,$hour,$min,$sec)= 
         ($tabletime =~ /(\d+)-(\d+)-(\d+) (\d+):(\d+):(\d+)/);          ($tabletime =~ /(\d+)-(\d+)-(\d+) (\d+):(\d+):(\d+)/);

Removed from v.1.4  
changed lines
  Added in v.1.5


FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>