storesafe / cordova-sqlite-storage

A Cordova/PhoneGap plugin to open and use sqlite databases on Android, iOS and Windows with HTML5/Web SQL API

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Possible "Multiple SQLite problem" (corruption problem) on multiple platforms

brodybits opened this issue · comments

on Android (updated 2020):

From http://ericsink.com/entries/sqlite_android_n.html: in case someone uses android.database.sqlite or any other SQLite implementation from another plugin or from application-specific Java code to access the same database as this plugin there is potential for database corruption ref:

This potential issue is partially due to this plugin using its own non-standard build of SQLite on Android.

Note that the first part about "SQLite and Android N" is NOT a problem with this plugin since it uses its own build of SQLite.

In case anyone encounters this issue the workaround is to open the database with the androidDatabaseImplementation: 2 and possibly androidLockWorkaround: 1 settings as documented.

on other platforms (added March 2020):

from README.md:

This plugin version also uses a fixed version of sqlite3 on iOS, macOS, and Windows. In case the application accesses the SAME database using multiple plugins there is a risk of data corruption as described in https://www.sqlite.org/howtocorrupt.html (similar to the multiple sqlite problem for Android as described in http://ericsink.com/entries/multiple_sqlite_problem.html).

This can be an issue on multiple platforms, updating title and description.