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,

sqlite-users mailing list

Reply via email to