[Bio] / FigKernelPackages / DBrtns.pm Repository:
ViewVC logotype

Diff of /FigKernelPackages/DBrtns.pm

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

revision 1.5, Mon Nov 1 20:20:09 2004 UTC revision 1.9, Sat Feb 26 23:32:45 2005 UTC
# Line 59  Line 59 
59  }  }
60    
61  sub SQL {  sub SQL {
62      my($self,$sql,$verbose) = @_;      my($self, $sql, $verbose, @bind_values) = @_;
63      my($dbh,$sth,$rc,$tmp);      my($dbh,$sth,$rc,$tmp);
64    
65      if ($verbose)      if ($verbose)
# Line 71  Line 71 
71    
72      if ($sql =~ /^select/i)      if ($sql =~ /^select/i)
73      {      {
74          $tmp = $dbh->selectall_arrayref($sql);          my $ok = eval {
75                $tmp = $dbh->selectall_arrayref($sql, undef, @bind_values);
76            };
77            if (!$ok)
78            {
79                confess "Try running 'load_links' and 'load_attributes' to fix this error:\n$@";
80                #print STDERR "DBrtns.pm error: SQL $sql failed\n";
81                #return;
82            }
83          return $tmp;          return $tmp;
84      }      }
85      else      else
86      {      {
87          return $dbh->do($sql);          my $rc;
88            my $ok = eval {
89                $rc = $dbh->do($sql, undef, @bind_values);
90            };
91    
92            if (!$ok)
93            {
94                confess "query failed: " . substr($sql, 0, 100) . ": $@";
95            }
96            return $rc;
97    
98    
99  #       $sth = $dbh->prepare($sql)  #       $sth = $dbh->prepare($sql)
100  #           or die "prepare failed: $DBI::errstr";  #           or die "prepare failed: $DBI::errstr";
101  #       $sth->execute()  #       $sth->execute()
# Line 340  Line 359 
359      push(@opts, "--basedir=$FIG_Config::common_runtime");      push(@opts, "--basedir=$FIG_Config::common_runtime");
360      push(@opts, "--datadir=$FIG_Config::db_datadir");      push(@opts, "--datadir=$FIG_Config::db_datadir");
361      push(@opts, "--ledir=$FIG_Config::common_runtime/libexec");      push(@opts, "--ledir=$FIG_Config::common_runtime/libexec");
362        push(@opts, "--old-password");
363        push(@opts, "--max-allowed-packet=128M");
364      #      #
365      # Oddly, this doesn't seem to work. need to set the environment variable.      # Oddly, this doesn't seem to work. need to set the environment variable.
366      #      #

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

MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3