Hello all !
When I try to use returning clause in the insert statement on the
second insert script hangs (code below). It doesn't work on Solaris
2.6, client 8.1.6 r2, server 8.0.5 on linux RH6.2 kernel 2.2.14. But
it does work if client on the linux 8.0.5. Is anybody come into this
problem ? Is it solaris specific ? Any thoughts are very
appreciated.
Perl 5.6.1, DBI 1.20, DBD::Oracle 1.12
Here is sample code:
#!/usr/bin/perl -w
use strict;
use DBI;
use Data::Dumper;
my $dbh = DBI->connect(
'dbi:Oracle:host=db-host;sid=ORCL',
'user', 'passwd', {
RaiseError => 1,
PrintError => 0,
AutoCommit => 0 });
my $sth = $dbh->prepare( <<SQL );
insert into FOO (
ID, NAME
) values (
:in0, :in1
) returning ID, NAME into :out0, :out1
SQL
my @pin = (undef, undef);
my @pout = (undef, undef);
foreach my $kd (1 .. 10) {
$pin[0] = $kd;
$pin[1] = "Some name of the $kd";
print "Inserting: $kd\n";
$sth->bind_param(":in$_", $pin[$_]) foreach 0 .. 1;
$sth->bind_param_inout(":out$_", \$pout[$_], 128) foreach 0 .. 1;
$sth->execute(); # on the second iteration hang here
print Dumper(\@pout);
}
$dbh->rollback();
--
Best regards,
Mike mailto:[EMAIL PROTECTED]