On 04/08/2013 04:40 PM, Max Vlasov wrote:
On Mon, Apr 8, 2013 at 1:23 PM, Dan Kennedy <danielk1...@gmail.com> wrote:
Right. But a VFS is not obliged to support the new xFetch() and
xUnfetch() methods (used to read data from a memory mapped file).
And if it doesn't, SQLite will use xRead() exclusively.
It always uses xWrite() to write - whether mmap is enabled or not.
Great, what is the correct way of not providing fetch procedures? Maybe I
did something wrong?
- If I call original xFetch/xUnfetch from mine - no xRead called,
- if I provide Nil as the function address, then I get Access violation
(00000000) so probably sqlite tries to call it anyway.
- If return SQLITE_Error from xFetch, xUnfetch, I get sqlite logic error.
Set the iVersion field of your sqlite3_io_methods struct to 2 (not 3).
The idea is that if you have an existing VFS, it should keep working
as is without any modifications. If you find this is not the case, it
may be a bug.
Dan.
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users