SQLite Version: 3.2.5
Platform: Windows XP

I happen to have a bug in my wrapper that allowed an empty filename to be passed on to sqlite3. I noticed from check-in 1085 that it opens a temporary database, and seems to be acceptable behavior to go on with life. I'm guessing this is an in memory database, but can it be referenced in anyway, or is this just a /dev/null ? Equivalent to :memory: maybe? Figured it might be useful in someway...

I've pasted some C code to demonstrated what I ran into for the curious. It runs fine, and no assert()'s are triggered.

   int errorCode = SQLITE_OK;
   sqlite3* db;
   sqlite3_stmt* stmt;
errorCode = sqlite3_open("", &db);
   assert(errorCode == SQLITE_OK);

errorCode = sqlite3_prepare(db, "CREATE TABLE foo( aNumber INTEGER );", -1, &stmt, NULL);
   assert(errorCode == SQLITE_OK);

   errorCode = sqlite3_step( stmt );
   assert(errorCode == SQLITE_DONE);

   errorCode = sqlite3_finalize( stmt );
   assert(errorCode == SQLITE_OK);

   sqlite3_close(db);

Reply via email to