Re: [sqlite] Does disabling synchronous AND shared cache cause "Error: database disk image is malformed"?

2012-02-07 Thread Richard Hipp
On Tue, Feb 7, 2012 at 9:16 PM, David Barrett wrote: > Are you, perhaps, using -DSQLITE_SHM_DIRECTORY when compiling the servers, > >> but failing to use the same -D when compiling the command-line tool? >> > > This is possible -- we haven't been hand-compiling the sqlite3

Re: [sqlite] Does disabling synchronous AND shared cache cause "Error: database disk image is malformed"?

2012-02-07 Thread David Barrett
On 02/07/2012 05:27 PM, Richard Hipp wrote: On Tue, Feb 7, 2012 at 8:13 PM, David Barrettwrote: My best guess still is that the command-line shell is somehow not seeing the shared-memory file that is created when the database is running in WAL mode. Or, perhaps the posix

Re: [sqlite] Does disabling synchronous AND shared cache cause "Error: database disk image is malformed"?

2012-02-07 Thread Richard Hipp
On Tue, Feb 7, 2012 at 8:13 PM, David Barrett wrote: > > Ah, I guess that blows that theory. But thanks for the quick and thorough > response nonetheless. I'm a huge sqlite fan. I just wish I could figure > out this (non)malformed database issue! > Are you, perhaps,

Re: [sqlite] Does disabling synchronous AND shared cache cause "Error: database disk image is malformed"?

2012-02-07 Thread Richard Hipp
On Tue, Feb 7, 2012 at 8:13 PM, David Barrett wrote: > On 02/07/2012 05:08 PM, Richard Hipp wrote: > >> There are no known limitations on the use of PRAGMA synchronous=OFF, WAL >> mode, and shared cache together. >> > > Ah, I guess that blows that theory. But thanks for

Re: [sqlite] Does disabling synchronous AND shared cache cause "Error: database disk image is malformed"?

2012-02-07 Thread Simon Slavin
On 8 Feb 2012, at 1:13am, David Barrett wrote: > On 02/07/2012 05:08 PM, Richard Hipp wrote: >> There are no known limitations on the use of PRAGMA synchronous=OFF, WAL >> mode, and shared cache together. > > Ah, I guess that blows that theory. But thanks for the quick and thorough > response

Re: [sqlite] Does disabling synchronous AND shared cache cause "Error: database disk image is malformed"?

2012-02-07 Thread David Barrett
On 02/07/2012 05:08 PM, Richard Hipp wrote: There are no known limitations on the use of PRAGMA synchronous=OFF, WAL mode, and shared cache together. Ah, I guess that blows that theory. But thanks for the quick and thorough response nonetheless. I'm a huge sqlite fan. I just wish I could

Re: [sqlite] Does disabling synchronous AND shared cache cause "Error: database disk image is malformed"?

2012-02-07 Thread Richard Hipp
On Tue, Feb 7, 2012 at 7:59 PM, David Barrett wrote: > > > Or, perhaps you are running the command-line tool on a >> different machine where it is not able to access the WAL's database-shm >> file in shared memory. So the command-line tool reads a one page of the >>

Re: [sqlite] Does disabling synchronous AND shared cache cause "Error: database disk image is malformed"?

2012-02-07 Thread David Barrett
On 02/07/2012 04:05 PM, Richard Hipp wrote: This tells me that the error is occurring at http://www.sqlite.org/src/artifact/5047fb303cdf6?ln=1362 which occurs right as SQLite is first starting to decode a page that it as loaded from the disk. The error indicates that the shell really is seeing

Re: [sqlite] Does disabling synchronous AND shared cache cause "Error: database disk image is malformed"?

2012-02-07 Thread Richard Hipp
On Tue, Feb 7, 2012 at 6:31 PM, David Barrett wrote: > On 02/07/2012 03:00 PM, Richard Hipp wrote: > >> On Tue, Feb 7, 2012 at 5:19 PM, David Barrett> >wrote: >> >>> 2) However, we get erratic behavior when using the sqlite3 command-line >>> >>>

Re: [sqlite] Does disabling synchronous AND shared cache cause "Error: database disk image is malformed"?

2012-02-07 Thread David Barrett
On 02/07/2012 03:00 PM, Richard Hipp wrote: On Tue, Feb 7, 2012 at 5:19 PM, David Barrettwrote: 2) However, we get erratic behavior when using the sqlite3 command-line tool to just do a basic select on the database: sometimes it works, sometimes it returns "Error:

Re: [sqlite] Does disabling synchronous AND shared cache cause "Error: database disk image is malformed"?

2012-02-07 Thread Richard Hipp
On Tue, Feb 7, 2012 at 5:19 PM, David Barrett wrote: > Hi! We're seeing the dreaded "Error: database disk image is malformed" > message, even though the database is actually fine. I've read a few other > threads on it and I'd previously concluded that it was just an