Hi Ryan, I just became aware that I might give synchronisation level 3 a chance (currently the level is 1, default setting). I was not aware of this setting since a couple of minutes ago. Otherwise, the database is in serialised threading mode, though only one thread is accessing it. The operation system is iOS (therefore, it is difficult to remove the battery and do several tests after each other) and the database is opened with read-write access and no further options used but the default ones. The old style journal mode is used. I could never reproduce it by myself but as I said with iOS it is difficult to do a lot of tests. The incident occurs one or two times a year at different customers.
I do not own the database therefore I am not able to share it publicly. I might get the permission to share it privately. Regards, Hartwig > Am 2018-06-13 um 21:32 schrieb R Smith <ryansmit...@gmail.com>: > > On 2018/06/13 6:35 PM, skywind mailing lists wrote: >> Hi Ryan, >> >> my problem is that I use the "most safest" mode that exists for SQLite and >> it still fails… Therefore, I need to know why it fails. > > Alright, but this implies a very serious flaw in SQLite, so mind if we > double-check some things? > > - What exactly is the "most safest" mode that you use? > - May we see the full schema?, > - May we see the initialization calls (pragma calls esp.) when opening the DB > file?, > - What is the specific file-system and file-locking methods it supports? > - Can you reproduce this error by removing the phone battery mid-write? (or > perhaps by any other service interruption?) > - If so, can you reproduce it with a DB with fake data (to protect privacy) > and then send us the broken DB file? > - if unable to reproduce it, how often have you had reports of it breaking? > And, > - Any chance we can get such a broken DB? (If the data is sensitive, perhaps > only send it to Richard). > > "Why it fails" is easy - it fails because it has data half-written during > power cut in a way that puts it out of sync with the schema, but then the > "most safest" journal modes actually protect against that, so if you use the > correct modes and it still fails, it means either SQLite is broken or your > implementation is doing something weird (such as non-standard file-locking > mechanism, or the OS lying about data being committed to storage) or you > might be assuming something that might not work as you expect, and we can > only learn which of these it is when having the above information. > > Let us know, > Ryan > > > _______________________________________________ > sqlite-users mailing list > sqlite-users@mailinglists.sqlite.org > http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users > _______________________________________________ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users