Subject | Re: [Firebird-Architect] Re: RFC: Please unify stored procedure execution |
---|---|
Author | Martijn Tonies |
Post date | 2004-12-21T16:49:30Z |
Hello Roman,
IF it returns a resultset, this resultset may be empty. Nothing wrong with
that, right?
That is, unless you want "b" with the result "3" - but then you should
have put another SUSPEND in the code.
This sounds like a logical error to me.
Martijn Tonies
Database Workbench - developer tool for InterBase, Firebird, MySQL & MS SQL
Server
Upscene Productions
http://www.upscene.com
> > Care to show us that example?Well, yes. But that's possible with a "valid" stored procedure anyway.
> >
> > (as some seem to think that the existence of output parameters makes
> > it selectable ;-)
>
> Vlad posted example IF (1=0) THEN SUSPEND;. No real example was
> showed, but let me suggest following:
>
> CREATE PROCEDURE test(a INTEGER) RETURNS (b INTEGER)
> AS BEGIN
> b = 2;
>
> IF (0=1) THEN
> SUSPEND;
>
> b = 3;
> END
>
> If this condition never happens, then we have pretty legitimate
> executable procedure with SUSPEND inside and when it is called with
> SELECT * FROM it will return empty result set.
IF it returns a resultset, this resultset may be empty. Nothing wrong with
that, right?
That is, unless you want "b" with the result "3" - but then you should
have put another SUSPEND in the code.
This sounds like a logical error to me.
> But again, this is far beyond my knowledge of BLR and must be answeredWith regards,
> by core engine developers.
Martijn Tonies
Database Workbench - developer tool for InterBase, Firebird, MySQL & MS SQL
Server
Upscene Productions
http://www.upscene.com