Srdjan,
> Hi,
Howdy,
> Versions:
> Perl: 5.6.1
Mine is 5.8
> DBI: 1.32
> DBD-Oracle: 1.12
Mine are similar
> Operating System: Solaris 5.8
WinNt
> Oracle version: 8.1.7
I am 8.1.5
> Description:
> procedure, the program dumps core.
No core dump here unless DBI->trace(n) is set with 'n' > 1
> Note that the execution is successful also if the cursor
> statement did not have any rows returned. The program fails
> ONLY if the cursor is untouched.
I made the table and stored code - thanks for posting completely!
> use DBI qw(:sql_types); # Perl DBI Database
> DBI->trace(5);
I used DBI->trace(1);
and it (finally) did not dump core. I wonder if a core dump is a 'feature'
for trace >1
>
> $sth = $dbh->prepare('BEGIN :1 := BUG_PACKAGE.BUG_FUNCTION(:2,:3);
I don't think it actualy matters but I bound as:
? := BUG_PACKAGE.BUG_FUNCTION(?, ?);
> $sth->bind_param_inout(1, \$ErrCode, 0)
> while(@row = $csr->fetchrow_array) {
> print (join(',', @row)."\n");
> }
>
> $sth->finish
> || die "Cannot finish the execution: ".$DBI::errstr."\n";
I included:
$csr->finish || die "Cannot finish the execution: ".$DBI::errstr."\n";
beacuse (after taming the seg fault) dbi complained about the open handle
> $dbh->disconnect
> || warn "Database disconnect failed: $DBI::errstr\n";
>
> == failure.log
> ========================================================================
> !! ERROR: 24338 'ORA-24338: statement handle not executed (DBD
I believe this is the ref cursor not executing
> ERROR: OCIAttrGet OCI_ATTR_PARAM_COUNT)'
> <- execute= undef at ./bug.pl line 40
> DBD::Oracle::st execute failed: ORA-24338: statement handle not executed
I believe this is the focus here - the ref cursor is not executed (because
of the exception you raise in your code)
I understand you do not want to alter the stored code, so try setting trace
to 1 and see if it is better behaved.
HTH
David