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. I could also see this as an issue when trying to use SQLite as a pure memory implementation without an OS/file system behind it. I am compiling the SQLITE-amalgamation version 3.7.17 with the following compilation options: -DSQLITE_THREADSAFE=0 -DSQLITE_TEMP_STORE=2 -DSQLITE_OS_OTHER=1 -DSQLITE_ZERO_MALLOC -DSQLITE_ENABLE_MEMSYS5 -DSQLITE_OMIT_LOAD_EXTENSION -DSQLITE_OMIT_FLOATING_POINT A demo program is below: #include "sqlite3.h" #define SQL_BUF_SIZE 10485760 //10 MB * 1024 (KB/MB) * 1024 (B/KB) uint8_t SQLBuf[SQL_BUF_SIZE]; Int main() { int rc = 0; sqlite3 * database; //Configure to use a HEAP of pre-allocated memory instead of malloc/calloc/free. rc = sqlite3_config(SQLITE_CONFIG_HEAP, SQLBuf, SQL_BUF_SIZE, sizeof(uint8_t)); rc = sqlite3_open_v2(":memory:",&database, SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE,NULL); if(rc != SQLITE_OK) { printf("%s\n",((char *)sqlite3_errmsg(database))); } return rc; } F. Andrew Beal Acoustical Communications Group Woods Hole Oceanographic Institution _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users