Re: Oracle procedure raises exception but looks to be successful from DBI
- From: cj10@xxxxxxxxx (Charles Jardine)
- Date: Mon, 28 Jan 2008 10:21:45 +0000
On 25/01/08 15:25, Martin Evans wrote:
Hi,
I've just spent a long time tracking down a bug in an Oracle procedure because DBI's execute method returned success even though the procedure raised an exception. Shouldn't exceptions raised in procedures cause execute to fail?
[ snip ]
my $s = $h->prepare("call proctest(?)");
This is nothing to do with Perl. It is native Oracle behaviour.
If you use the SQL CALL statement to call a procedure,
"No data found" exceptions will be quietly ignored.
This is specific to CALL and to the "No data found" exception.
Oracle support have insisted that it is not a bug. It is part
of the same mechanism by which
select (select * from dual where 0=1) from dual
returns a null value rather than an exception.
I have been severely burnt buy this, and now avoid CALL altogether.
--
Charles Jardine - Computing Service, University of Cambridge
cj10@xxxxxxxxx Tel: +44 1223 334506, Fax: +44 1223 334679
.
- References:
- Oracle procedure raises exception but looks to be successful from DBI
- From: Martin Evans
- Oracle procedure raises exception but looks to be successful from DBI
- Prev by Date: Re: Oracle procedure raises exception but looks to be successful from DBI
- Next by Date: Silly Question
- Previous by thread: Re: Oracle procedure raises exception but looks to be successful from DBI
- Next by thread: SSL connection with DBD::Oracle?
- Index(es):
Relevant Pages
|