[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.20, Fri Jun 24 21:40:16 2005 UTC revision 1.24, Mon Dec 5 19:06:30 2005 UTC
# Line 1  Line 1 
1    #
2    # Copyright (c) 2003-2006 University of Chicago and Fellowship
3    # for Interpretations of Genomes. All Rights Reserved.
4    #
5    # This file is part of the SEED Toolkit.
6    #
7    # The SEED Toolkit is free software. You can redistribute
8    # it and/or modify it under the terms of the SEED Toolkit
9    # Public License.
10    #
11    # You should have received a copy of the SEED Toolkit Public License
12    # along with this program; if not write to the University of Chicago
13    # at info@ci.uchicago.edu or the Fellowship for Interpretation of
14    # Genomes at veronika@thefig.info or download a copy from
15    # http://www.theseed.org/LICENSE.TXT.
16    #
17    
18  package DBrtns;  package DBrtns;
19    
20      # Inherit the DBKernel methods. We must do this BEFORE the "use strict".      # Inherit the DBKernel methods. We must do this BEFORE the "use strict".
# Line 32  Line 49 
49  =cut  =cut
50    
51  sub get_inserted_id {  sub get_inserted_id {
52      my($self, $table, $sth) = @_;      my($self, $table, $sth, $id_column) = @_;
53    
54        $id_column = 'id' unless defined($id_column);
55      if ($self->{_dbms} eq "Pg") {      if ($self->{_dbms} eq "Pg") {
56          my $oid = $sth->{pg_oid_status};          my $oid = $sth->{pg_oid_status};
57          my $ret = $self->SQL("select id from $table where oid = ?", undef, $oid);          my $ret = $self->SQL("select $id_column from $table where oid = ?", undef, $oid);
58          return $ret->[0]->[0];          return $ret->[0]->[0];
59      } elsif ($self->{_dbms} eq "mysql") {      } elsif ($self->{_dbms} eq "mysql") {
60          my $id = $self->{_dbh}->{mysql_insertid};          my $id = $self->{_dbh}->{mysql_insertid};
# Line 170  Line 189 
189      push(@opts, "--old-password");      push(@opts, "--old-password");
190      push(@opts, "--max-allowed-packet=128M");      push(@opts, "--max-allowed-packet=128M");
191      #      #
192        # Use InnoDB for large-table support and allegedly better performance.
193        #
194    
195        #push(@opts, "--default-table-type=innodb");
196    
197        #
198      # 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.
199      #      #
200      #push(@opts, "--port=$FIG_Config::dbport");      #push(@opts, "--port=$FIG_Config::dbport");
# Line 185  Line 210 
210      #      #
211    
212      my $exe = "$FIG_Config::ext_bin/mysqld_safe";      my $exe = "$FIG_Config::ext_bin/mysqld_safe";
213    
214        print "Start $exe @opts\n";
215      if (! -x $exe)      if (! -x $exe)
216      {      {
217          $exe = "mysqld_safe";          $exe = "mysqld_safe";

Legend:
Removed from v.1.20  
changed lines
  Added in v.1.24

MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3