From 72015ed04cc2db3330af4d0c824fd0eb21265878 Mon Sep 17 00:00:00 2001 From: "Christopher J. Brody" Date: Sun, 31 Dec 2017 09:12:38 -0500 Subject: [PATCH] cordova-sqlite-evplus-legacy-attach-detach-free build flag updates before merge - SQLITE_THREADSAFE=2 on iOS & macOS (SQLITE_THREADSAFE=1 on Windows) to avoid possible malformed database due to multithreaded access ref: litehelpers/Cordova-sqlite-storage#703 - Suppress warnings for sqlite3.c on iOS/macOS Thanks again to @cjpearson for the suggestion in litehelpers/Cordova-sqlite-storage#569 - Some additional iOS/macOS/Windows build flag updates in this plugin version - Document sqlite (3.8.10.2) build settings --- README.md | 16 ++++++++++++++++ plugin.xml | 6 ++++-- .../SQLite3/SQLite3.Shared.vcxitems | 3 ++- 3 files changed, 22 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 6423adb..82b2ca2 100644 --- a/README.md +++ b/README.md @@ -46,6 +46,22 @@ As documented in the "**A User’s iCloud Storage Is Limited**" section of [iClo - Status for the target platforms: - Android: now using [Android-sqlite-connector](https://github.com/liteglue/Android-sqlite-connector) (with sqlite `3.8.10.2`), with support for FTS3/FTS4 and R-Tree, and REGEXP support using PCRE 8.37 as built from [liteglue / Android-sqlite-native-driver-regexp-pcre](https://github.com/liteglue/Android-sqlite-native-driver-regexp-pcre) - iOS/macOS/Windows: sqlite `3.8.10.2` embedded +- SQLite `3.8.10.2` included in this plugin version, with the following definitions: + - `NDEBUG` on Windows (Release build only) + - `SQLITE_THREADSAFE=2` on Android/iOS/macOS (`SQLITE_THREADSAFE=1` on Windows) + - `SQLITE_DEFAULT_MEMSTATUS=0` (iOS/macOS/Windows) + - ~~`SQLITE_OMIT_DECLTYPE`~~ (TBD issue with this option on sqlite 3.8.10.2) + - `SQLITE_OMIT_DEPRECATED` (iOS/macOS/Windows) + - `SQLITE_OMIT_PROGRESS_CALLBACK` (iOS/macOS/Windows) + - `SQLITE_OMIT_SHARED_CACHE` (iOS/macOS/Windows) + - `SQLITE_TEMP_STORE=2` + - `SQLITE_OMIT_LOAD_EXTENSION` (iOS/macOS/Windows) + - `SQLITE_ENABLE_FTS3` + - `SQLITE_ENABLE_FTS3_PARENTHESIS` + - `SQLITE_ENABLE_FTS4` + - `SQLITE_ENABLE_RTREE` + - `SQLITE_DEFAULT_PAGE_SIZE=1024` and `SQLITE_DEFAULT_CACHE_SIZE=2000` to avoid FUTURE TBD "potentially distruptive change(s)" from SQLite 3.12.0 ref: + - `SQLITE_OS_WINRT` (Windows only) - Windows version is TBD: - Issue with UNICODE `\u0000` character (same as `\0`) - No background processing (for future consideration) diff --git a/plugin.xml b/plugin.xml index cce4362..cd19a32 100644 --- a/plugin.xml +++ b/plugin.xml @@ -54,7 +54,8 @@ - + @@ -70,7 +71,8 @@ - + diff --git a/src/windows/SQLite3-Win-RT/SQLite3/SQLite3.Shared.vcxitems b/src/windows/SQLite3-Win-RT/SQLite3/SQLite3.Shared.vcxitems index 3bafb4f..88521da 100644 --- a/src/windows/SQLite3-Win-RT/SQLite3/SQLite3.Shared.vcxitems +++ b/src/windows/SQLite3-Win-RT/SQLite3/SQLite3.Shared.vcxitems @@ -11,6 +11,7 @@ %(AdditionalIncludeDirectories);$(MSBuildThisFileDirectory) + /DSQLITE_THREADSAFE=1 /DSQLITE_DEFAULT_MEMSTATUS=0 /DSQLITE_OMIT_DEPRECATED /DSQLITE_OMIT_PROGRESS_CALLBACK /DSQLITE_OMIT_SHARED_CACHE /DSQLITE_TEMP_STORE=2 /DSQLITE_OMIT_LOAD_EXTENSION /DSQLITE_ENABLE_FTS3 /DSQLITE_ENABLE_FTS3_PARENTHESIS /DSQLITE_ENABLE_FTS4 /DSQLITE_ENABLE_RTREE /DSQLITE_DEFAULT_PAGE_SIZE=1024 /DSQLITE_DEFAULT_CACHE_SIZE=2000 /DSQLITE_OS_WINRT %(AdditionalOptions) @@ -34,4 +35,4 @@ - \ No newline at end of file +