note
lhoward
Here's a little test program I use to replicate the issue:
<code>
#!/usr/bin/perl -w
use strict;
use DBI;
my $dbh=DBI->connect('zzz','zzz','zzz');
while(1){
my $sth=$dbh->prepare_cached('select count(*) from EXAMPLE');
$sth->execute();
my @r=$sth->fetchrow();
print "$r[0]\n";
$sth->finish();
sleep 10;
}
$dbh->disconnect();
</code>
When I do the work to EXAMPLE that invalidates the statment handle, my example code returns the following:
<pre>
DBD::Oracle::st execute failed: ORA-00942: table or view does not exist (DBD ERROR: OCIStmtExecute)
DBD::Oracle::st execute failed: ORA-01003: no statement parsed (DBD ERROR: OCIStmtExecute)
</pre>
What I'd like is for prepare_cached to recover gracefully from these types of intermittent hiccups. Any ideas?
<p>
L
272436
272436