[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.7, Tue Jan 11 18:59:39 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 $@;
80            }
81          return $tmp;          return $tmp;
82      }      }
83      else      else
84      {      {
85          return $dbh->do($sql);          return $dbh->do($sql, undef, @bind_values);
86  #       $sth = $dbh->prepare($sql)  #       $sth = $dbh->prepare($sql)
87  #           or die "prepare failed: $DBI::errstr";  #           or die "prepare failed: $DBI::errstr";
88  #       $sth->execute()  #       $sth->execute()
# Line 340  Line 346 
346      push(@opts, "--basedir=$FIG_Config::common_runtime");      push(@opts, "--basedir=$FIG_Config::common_runtime");
347      push(@opts, "--datadir=$FIG_Config::db_datadir");      push(@opts, "--datadir=$FIG_Config::db_datadir");
348      push(@opts, "--ledir=$FIG_Config::common_runtime/libexec");      push(@opts, "--ledir=$FIG_Config::common_runtime/libexec");
349        push(@opts, "--old-password");
350        push(@opts, "--max-allowed-packet=128M");
351      #      #
352      # 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.
353      #      #

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

MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3