-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi Simon,

thank you for the quick reply!

On Dienstag, 15. Januar 2013 12:14:20, Simon Slavin wrote:
>
> On 15 Jan 2013, at 9:50am, Marcus Ilgner <mar...@doo.net> wrote:
>
>> every now and then - very hard to reproduce - I get the SQLite error
>> "malformed database schema" (error code 1). This happens when running
>> lots of schema-changing statements after another and seems to occur
>> only on systems with a very fast hard-disk (SSD).
>> Fortunately, the database seems to be ok, i.e. everything works fine
>> after closing and re-opening the file and re-issuing the statement.
>> This is with in-memory temp database, WAL and PRAGMA synchronous=NORMAL.
>> The statements (schema migrations) are grouped into blocks where each
>> starts with a BEGIN EXCLUSIVE TRANSACTION and ends with committing the
>> transaction.
>
> Which version of SQLite are you using ?  You can tell us the result of
>
> SELECT sqlite_version()
>
> if that's convenient.
>
Sorry for that. The version string is "3.7.15.1".

> Are you using any PRAGMAs besides "PRAGMA synchronous=NORMAL" ?

The complete list of PRAGMAs/setup statements:
PRAGMA temp_store = 2
PRAGMA journal_mode = WAL
PRAGMA synchronous = 1
PRAGMA foreign_keys = ON

> Is the disk database you're using on a local drive or accessed across a 
> network ?

The file resides on a local drive. Also it isn't accessed by any other
processes.

> You say that this happens only when using an SSD drive, but you also say that 
> this is with an in-memory temporary database.  This sounds a little strange.  
> What are you doing to tell SQLite you want an in-memory temporary database ?

Oops. I meant memory temp store, not database.

> Can you try the same thing with just "BEGIN" instead of "BEGIN EXCLUSIVE" ?

It first appeared with deferred transactions and I then changed it to
exclusive mode, just to make sure that the lock was acquired as soon as
possible.

Best regards
Marcus
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.17 (MingW32)
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQEcBAEBAgAGBQJQ9WAEAAoJELuOTdgGQnyZTBgIAJ6XLIAcL9O0fVwx1P/JoOCy
AzPhL/C4TKAInzFgdxTXjpghclfVKlGq1eqUYecLCOTSNElrlg7/qOEVL5T3orta
2j5EARRimtenRdPG5c3rCBzUf1jgCZ/MLNmExkcGrsJNt4L6Q4Z2MABrEQbzBHJ4
JzHbQBKnpGWRjN3plVejk0KogW+SU2Csv21fZieCz8wvMDCwA2XRlFxGu6036OZe
g6fK8heEXnPnN49QqzWT2i4TKDsXFwvrWcdbVXhDhRcXFG9mipofGGGzof2ob7Lf
itcXgM0c9k938AzxUaQkmlF6JgdfsS/IzOLeTLbZ4gk7xa38cH2aa+gONvnDUXg=
=GKwV
-----END PGP SIGNATURE-----

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

Reply via email to