Richard Hipp <[email protected]> writes:

> On Thu, Apr 26, 2012 at 5:07 PM, Steinar Midtskogen
> <[email protected]>wrote:
>
>> My xCreate has to run some queries in order to build its declare
>> statement.  If a virtual table is queried inside xCreate causing a
>> another xCreate to be called, the following sqlite3_declare_vtab will
>> fail because pVtabCtx gets erased.
>>
>
> Fixed here:  http://www.sqlite.org/src/info/696a5a40bb

Thanks.  I can confirm that it fixes everything for me.

One other thing which perhaps is surprising, but it can be argued that
it is a feature rather than a bug, is that a virtual table can be
queried before its xCreate gets finished and its sqlite3_declare_vtab
is called.  So if someone says CREATE VIRTUAL TABLE x ... and its
xCreate has a SELECT ... FROM x, it wont get "no such table".  Rather
it will call itself and eventually crash unless xCreate takes care to
test for the recursion somehow.

-- 
Steinar
_______________________________________________
sqlite-users mailing list
[email protected]
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to