On 11/03/2013 05:51 PM, Dmitry Yemanov wrote:
> 03.11.2013 16:44, Mark Rotteveel wrote:
>
>> I have a test in Jaybird trunk which attempts to retrieve the execution
>> plan of an unprepared statement. In Firebird 2.5 the result is an empty
>> string as the plan. In Firebird 3 (alpha 1), this results in an error
>> with error code 335544711 (isc_unprepared_stmt) and message "Attempt to
>> execute an unprepared dynamic SQL statement."
>>
>> Is it an intentional change that this now throws an error instead of
>> just returning an empty plan, and if this is an intentional change,
>> shouldn't this have a different errorcode and a better error message as
>> I am not trying to execute it?
> It's likely to be a side effect of the better protection against handle
> misuse, so it can be considered being intentional.

In fb3 ISC API is emulated on the top of object API. In object API one 
can't have an unprepared statement - statement is a result of prepare() 
executed by attachment. Therefore any attempt to access NULL interface 
pointer is disabled and returns an error. Not to say change was 
intentional but I think it's correct.

On the other hand, taking into an account that old API means first of 
all backward compatibility, may be we should better keep legacy behavior?

> I believe the error code is correct (meaning any kind of wrong operation
> for the unprepared handle) but the error message deserves a better wording.
>
>
> Dmitry
>
>
> ------------------------------------------------------------------------------
> Android is increasing in popularity, but the open development platform that
> developers love is also attractive to malware creators. Download this white
> paper to learn more about secure code signing practices that can help keep
> Android apps secure.
> http://pubads.g.doubleclick.net/gampad/clk?id=65839951&iu=/4140/ostg.clktrk
> Firebird-Devel mailing list, web interface at 
> https://lists.sourceforge.net/lists/listinfo/firebird-devel
>
>


------------------------------------------------------------------------------
Android is increasing in popularity, but the open development platform that
developers love is also attractive to malware creators. Download this white
paper to learn more about secure code signing practices that can help keep
Android apps secure.
http://pubads.g.doubleclick.net/gampad/clk?id=65839951&iu=/4140/ostg.clktrk
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel

Reply via email to