On Mon, Jun 24, 2013 at 10:28 AM, Andrew Beal <ab...@whoi.edu> wrote:

> Hello All,
>
> I am trying to implement SQLite on our embedded platform. Since I am in
> the process of implementing the VFS, I was trying to give our other
> developers the chance to use the in-memory database while we implement the
> VFS, however I have noticed that the open code for a database refers
> finding the default VFS which then fails since no VFS is present.
>
> I suspect that this is a bug since it prevents the use of the in-memory
> database while the VFS isn't implemented or present.
>

The VFS is used for things other than file I/O.  Examples:  the xSleep()
method used to implement sqlite3_sleep() and the xCurrentTimeInt64() method
used by the date and time functions to get the current system time and the
xRandomness() method that is used to seed SQLite's internal PRNG.  So a VFS
is necessary even if the ":memory:" database is being used.

If os_unix.c won't even link on your system, then I suggest you create a
quick VFS that has stub functions for all of the disk I/O routines -
functions that always return SQLITE_ERROR.  You can probably use one of the
test VFSes like test_vfstrace.c or test_onefile.c as a template.  Make a
copy of one of those files, then go into the body of each disk I/O method,
delete the existing code, and replace the deleted code with "return
SQLITE_ERROR;".

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

Reply via email to