It never reaches the xOpen call.

V.
________________________________________
From: sqlite-users-boun...@sqlite.org [sqlite-users-boun...@sqlite.org] on 
behalf of Jay A. Kreibich [j...@kreibi.ch]
Sent: Friday, April 29, 2011 10:47 AM
To: General Discussion of SQLite Database
Subject: Re: [sqlite] select * on empty virtual table

On Fri, Apr 29, 2011 at 03:14:07PM +0000, Joseph Stockman scratched on the wall:
> My apologies.
>
> We set idxNum to zero, idxStr to NULL, needToFreeIdxStr to zero,
> orderbyConsumed to zero and estimatedCost to 1000.

  The sqlite3_index_info struct is zero-ed out before it is passed to
  your function.  As such, it essentially provides default values for
  almost everything.  I have a large number of virtual table adapters
  that use this code:

static int xBestIndex ( sqlite3_vtab *vtab, sqlite3_index_info *info )
{
    return SQLITE_OK;
}


> We never get to our xFilter method; sqlite throws the segmentation
> fault internally trying to process the result of the xBestIndex call.

  You should get a call to xOpen() before you get to xFilter().
  xBestIndex() is a "table-level" call, while xFilter() is a
  "cursor-level" call.  What is the status of your xOpen() call?

    -j

--
Jay A. Kreibich < J A Y  @  K R E I B I.C H >

"Intelligence is like underwear: it is important that you have it,
 but showing it to the wrong people has the tendency to make them
 feel uncomfortable." -- Angela Johnson
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to