Hacker News new | ask | show | jobs
by j_s 3072 days ago
> I have not heard of any cases of SQLite failure in phone, or anyone needing a DB admin to recover their phone contact data.

For a long time (until API level 11), Android automatically silently deleted corrupted SQLite databases. https://android.stackexchange.com/questions/12388#33896 https://stackoverflow.com/questions/7764943

I learned the hard way to limit SMS storage and install Jan Berkel's SMS Backup+ https://github.com/jberkel/sms-backup-plus/#readme after losing my first Android SMS database (this may or may not have been SQLite's fault).

https://www.sqlite.org/howtocorrupt.html#_bugs_in_sqlite

1 comments

Specifically (can't edit above post -- too slow):

https://issuetracker.google.com/issues/36911900#comment457

>the SQLite packaged with Android is being upgraded to version 3.6.22 in Android 2.2. I think that the SQLite database corruption bug linked in comment 451 has been fixed in Android 2.2. So _if_ that's what's causing the text message database corruption and deletion, then this bug will probably be fixed in Android 2.2

http://sqlite.1065341.n5.nabble.com/Android-database-corrupt...

>Statically link your application against SQLite 3.6.23 instead of using the SQLite 3.5.9 that is found on Android. The bug you are hitting was fixed in SQLite 3.6.2

Contrast https://web.archive.org/web/20110219041419/https://www.sqlit... (Feb 2011) vs. https://web.archive.org/web/20110729152833/https://www.sqlit... (July 2011), which could be a glitch in the Internet Archive (a partial copy of the oldest record?) but adds "Though SQLite is resistant to database corruption, it is not immune" and introduced an extensive history of known issues.

Sqlite is amazing and its development history is further testament to its current reliability, especially when used correctly!