On 2016/01/09 5:22 PM, Bart Smissaert wrote:
> If I run sqlite3_prepare16_v2 on this statement:
>
> PRAGMA compile_optionsXXX
>
> I get a return value of 0 and there is a non-zero statement handle.
> I would expect a return value of 1 and a zero statement handle.
>
> But if I run instead sqlite3_prepare16_v2 on this statement:
>
> PRAGMA compile_options XXX
>
> Then I get the expected result, so return value 1 and zero statement handle.
>
> This looks like a bug to me.

It's because the first statement still looks like a PRAGMA statement. 
Unknown pragmas are silently ignored - I think the thinking is/was that 
the version of SQLite (which may be an earlier version than current) 
thinks it might be a valid pragma, but doesn't know what it does, so 
ignores it, and so doesn't break compatibility. The wisdom of-which is 
probably arguable, but either way, it isn't a bug.


Reply via email to