Skip to content

Commit

Permalink
Fix missing if condition causing FATAL with 8i
Browse files Browse the repository at this point in the history
.. this time with ALL the brackets
  • Loading branch information
UnvorherSeba committed Feb 17, 2014
1 parent c1acafc commit 740d45f
Showing 1 changed file with 9 additions and 8 deletions.
17 changes: 9 additions & 8 deletions lib/Ora2Pg.pm
Original file line number Diff line number Diff line change
Expand Up @@ -4240,14 +4240,15 @@ SELECT COLUMN_NAME, DATA_TYPE, DATA_LENGTH, NULLABLE, DATA_DEFAULT, DATA_PRECISI
FROM $self->{prefix}_TAB_COLUMNS $condition
ORDER BY COLUMN_ID
END
if(!$sth) {
my $ret = $self->{dbh}->err;
if (!$recurs && ($ret == 942) && ($self->{prefix} eq 'DBA')) {
$self->logit("HINT: Please activate USER_GRANTS or connect using a user with DBA privilege.\n");
$self->{prefix} = 'ALL';
return $self->_column_info($table, $owner, 1);
}
$self->logit("FATAL: " . $self->{dbh}->errstr . "\n", 0, 1);
if(!$sth) {
my $ret = $self->{dbh}->err;
if (!$recurs && ($ret == 942) && ($self->{prefix} eq 'DBA')) {
$self->logit("HINT: Please activate USER_GRANTS or connect using a user with DBA privilege.\n");
$self->{prefix} = 'ALL';
return $self->_column_info($table, $owner, 1);
}
$self->logit("FATAL: " . $self->{dbh}->errstr . "\n", 0, 1);
}
}
$sth->execute or $self->logit("FATAL: " . $self->{dbh}->errstr . "\n", 0, 1);

Expand Down

0 comments on commit 740d45f

Please sign in to comment.