[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.3, Thu Jul 1 21:16:34 2004 UTC revision 1.4, Wed Oct 27 15:04:10 2004 UTC
# Line 17  Line 17 
17      $dbpass = defined($dbpass) ? $dbpass : $FIG_Config::dbpass;      $dbpass = defined($dbpass) ? $dbpass : $FIG_Config::dbpass;
18      $dbport = defined($dbport) ? $dbport : $FIG_Config::dbport;      $dbport = defined($dbport) ? $dbport : $FIG_Config::dbport;
19    
20      my $data_source = "DBI:$dbms(AutoCommit => 1):dbname=$dbname;port=$dbport";      my @opts;
21    
22        push(@opts, "port=${dbport}");
23    
24        #
25        # Late-model mysql needs to have the client enable loading from local files.
26        #
27    
28        if ($dbms eq "mysql")
29        {
30            push(@opts, "mysql_local_infile=1");
31        }
32    
33        my $opts = join(";", @opts);
34        my $data_source = "DBI:$dbms(AutoCommit => 1):dbname=$dbname;$opts";
35      my $dbh         = DBI->connect( $data_source, $dbuser, $dbpass )      my $dbh         = DBI->connect( $data_source, $dbuser, $dbpass )
36          || die "ERROR: Could not connect to $data_source; ", DBI->errstr, "\n";          || die "ERROR: Could not connect to $data_source; ", DBI->errstr, "\n";
37      $dbh->{PrintError} = 1;      $dbh->{PrintError} = 1;

Legend:
Removed from v.1.3  
changed lines
  Added in v.1.4

MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3