I was trying to figure out what to do about this WAL journal_mode option... 1) my vfs does not (and cannot) have a shared memory interface... so those routines are NULL (so I would think WAL logic should prohibit flagging the database as wal...) 2) I tried to return error on the pragma, but returning "SQLITE_NOTFOUND" results in a recordset with 'delete' as the first field... (used to be the journal mode such as 'WAL' )... returning SQLITE_ERROR results in a parsing error that also does not indicate my result error of something like 'journal mode not supported'.... so when I started doing this, sqlite was still attemping to delete the -wal 3 times at startup and then a lot of tests if it exists... but it never does... (and never has? isn't journal mode recorded in the database?)
I'm using a 3.8.7.4 amalgamation. The database seemed to be working before with much fewer operations; was just annoyed that it was constantly trying to find a file it never created... (2? times per statement) And actually even without ever issuing a wal journal mode it keeps testing for existence...

