Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
in cordova-sqlite-evcore-common-free version branch

with workaround for 4-byte UTF-8 crash bug ref:
- #44
- #7

and crash bug fix for Samaritan characters ref:
- #37

(cordova-sqlite-evcore-common-free 0.0.4)
  • Loading branch information
Christopher J. Brody committed Nov 6, 2018
1 parent 2228954 commit 5c59cf7
Show file tree
Hide file tree
Showing 7 changed files with 146 additions and 111 deletions.
4 changes: 3 additions & 1 deletion CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# Changes

### cordova-sqlite-evcore-common-free 0.0.4-pre2
### cordova-sqlite-evcore-common-free 0.0.4

- Use cordova-sqlite-evcore-free-dependencies 0.8.6, with workaround for 4-byte UTF-8 crash bug and fix for Samaritan character crash bug on Android

#### cordova-sqlite-storage 2.5.1

Expand Down
6 changes: 2 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -568,16 +568,14 @@ See **Security of sensitive data** in the [Security](#security) section above.

- The iOS/macOS platform versions do not support certain rapidly repeated open-and-close or open-and-delete test scenarios due to how the implementation handles background processing
- HIGH PRIORITY TODO: The default [Android-sqlite-evcore-native-driver-free](https://github.com/litehelpers/Android-sqlite-evcore-native-driver-free) database access implementation does not currently handle control characters such as vertical tab, form feed, or backspace characters properly ref: [litehelpers/Cordova-sqlite-evcore-extbuild-free#28](https://github.com/litehelpers/Cordova-sqlite-evcore-extbuild-free/issues/28)
- CRASH on Android in case of 3-byte UTF-8 Samaritan letter such as Samaritan Bit (U+0801) (default [Android-sqlite-evcore-native-driver-free](https://github.com/litehelpers/Android-sqlite-evcore-native-driver-free) NDK access implementation) ref: [litehelpers/Cordova-sqlite-evcore-extbuild-free#37](https://github.com/litehelpers/Cordova-sqlite-evcore-extbuild-free/issues/37)
- _CRASH on Android (starting with 6.0), non-standard encoding on Android pre-6.0_ in case of Unicode emoji and other 4-byte UTF-8 characters (default [Android-sqlite-evcore-native-driver-free](https://github.com/litehelpers/Android-sqlite-evcore-native-driver-free) NDK access implementation) ref: [litehelpers/Cordova-sqlite-evcore-extbuild-free#7](https://github.com/litehelpers/Cordova-sqlite-evcore-extbuild-free/issues/7)
- Incorrect handling of emoji and other 4-byte UTF-8 characters on Android on default [Android-sqlite-evcore-native-driver-free](https://github.com/litehelpers/Android-sqlite-evcore-native-driver-free) NDK access implementation as described in: [litehelpers/Cordova-sqlite-evcore-extbuild-free#44](https://github.com/litehelpers/Cordova-sqlite-evcore-extbuild-free/issues/44), [litehelpers/Cordova-sqlite-storage#564](https://github.com/litehelpers/Cordova-sqlite-storage/issues/564)
- It is possible to request a SQL statement list such as "SELECT 1; SELECT 2" within a single SQL statement string, however the plugin will only execute the first statement and silently ignore the others ref: [litehelpers/Cordova-sqlite-storage#551](https://github.com/litehelpers/Cordova-sqlite-storage/issues/551)
- Execution of INSERT statement that affects multiple rows (due to SELECT cause or using TRIGGER(s), for example) reports incorrect rowsAffected on Android with use of the `androidDatabaseProvider: 'system'` setting.
- FIXED in this plugin version: ~~Memory issue observed when adding a large number of records due to the JSON implementation which is improved in [litehelpers / Cordova-sqlite-evcore-extbuild-free](https://github.com/litehelpers/Cordova-sqlite-evcore-extbuild-free) (GPL or commercial license terms)~~
- Infinity (positive or negative) values are not supported on Android/iOS/macOS due to issues described above including a possible crash on iOS/macOS (ref: [litehelpers/Cordova-sqlite-storage#405](https://github.com/litehelpers/Cordova-sqlite-storage/issues/405)) or a hanging transaction queue on Android.
- A stability issue was reported on the iOS platform version when in use together with [SockJS](http://sockjs.org/) client such as [pusher-js](https://github.com/pusher/pusher-js) at the same time (see [litehelpers/Cordova-sqlite-storage#196](https://github.com/litehelpers/Cordova-sqlite-storage/issues/196)). The workaround is to call sqlite functions and [SockJS](http://sockjs.org/) client functions in separate ticks (using setTimeout with 0 timeout).
- SQL errors are reported with incorrect & inconsistent error message on Windows - missing actual error info ref: [litehelpers/Cordova-sqlite-storage#539](https://github.com/litehelpers/Cordova-sqlite-storage/issues/539).
- Issue on default [Android-sqlite-evcore-native-driver-free](https://github.com/litehelpers/Android-sqlite-evcore-native-driver-free) database access implementation in case of database file name with multi-byte UTF-8 characters ref: [litehelpers/Cordova-sqlite-evcore-extbuild-free#25](https://github.com/litehelpers/Cordova-sqlite-evcore-extbuild-free/issues/25)
- The default Android-sqlite-evcore-native-driver-free database access implementation _shows possible crash issue during testing of_ database file names with emoji and other 4-byte UTF-8 characters ref: [litehelpers/Cordova-sqlite-evcore-extbuild-free#26](https://github.com/litehelpers/Cordova-sqlite-evcore-extbuild-free/issues/26)
- Issue (truncation issue) with NULL characters (`'\0\` or `'\u0000'`) on Android (default Android-sqlite-evcore-native-driver-free database access implementation) and Windows ref: [litehelpers/Cordova-sqlite-evcore-extbuild-free#27](https://github.com/litehelpers/Cordova-sqlite-evcore-extbuild-free/issues/27)
- Close/delete database bugs described below.
- When a database is opened and deleted without closing, the iOS/macOS platform version is known to leak resources.
Expand All @@ -599,7 +597,7 @@ Some additional issues are tracked in [open cordova-sqlite-storage bug-general i
- SQL error messages reported by Windows platform version are not consistent with Android/iOS/macOS platform versions.
- UNICODE `\u2028` (line separator) and `\u2029` (paragraph separator) characters are currently not supported and known to be broken on iOS, macOS, and Android platform versions due to JSON issues reported in [Cordova bug CB-9435](https://issues.apache.org/jira/browse/CB-9435) and [cordova/cordova-discuss#57](https://github.com/cordova/cordova-discuss/issues/57). This is fixed with a workaround for iOS/macOS in: [litehelpers / Cordova-sqlite-evplus-legacy-free](https://github.com/litehelpers/Cordova-sqlite-evplus-legacy-free) and [litehelpers / Cordova-sqlite-evplus-legacy-attach-detach-free](https://github.com/litehelpers/Cordova-sqlite-evplus-legacy-attach-detach-free) (GPL or special commercial license terms) as well as [litehelpers / cordova-sqlite-evmax-ext-workers-legacy-build-free](https://github.com/litehelpers/cordova-sqlite-evmax-ext-workers-legacy-build-free) (GPL or premium commercial license terms).
- _SELECT BLOB column value type is not supported consistently across all platforms (not supported on Windows). It is recommended to use the built-in HEX function to SELECT BLOB column data in hexadecimal format, working consistently across all platforms. As an alternative: SELECT BLOB in Base64 format using BASE64 function (described elsewhere in this document) is supported by this plugin version (GPL or commercial license options) as well as [litehelpers / cordova-sqlite-ext](https://github.com/litehelpers/cordova-sqlite-ext) (permissive license terms). INLINE BLOB values such as `X'010203'` are supported by the SQLite syntax on all platforms. FUTURE TBD equivalent to UNHEX (supported in MySQL) or conversion of Base-64 string to BLOB is desired._
- _Database files with certain multi-byte UTF-8 characters are not tested and not expected to work consistently across all platform implementations. The default [Android-sqlite-evcore-native-driver-free](https://github.com/litehelpers/Android-sqlite-evcore-native-driver-free) database access implementation is known to crash on certain Android versions in case of database file names with emoji and other 4-byte UTF-8 characters ref: [litehelpers/Cordova-sqlite-evcore-extbuild-free#26](https://github.com/litehelpers/Cordova-sqlite-evcore-extbuild-free/issues/26)_
- _Database files with certain multi-byte UTF-8 characters are not tested and not expected to work consistently across all platform implementations. The default [Android-sqlite-evcore-native-driver-free](https://github.com/litehelpers/Android-sqlite-evcore-native-driver-free) database access implementation may not function properly on certain Android versions in case of database file names with emoji and other 4-byte UTF-8 characters ref: [litehelpers/Cordova-sqlite-evcore-extbuild-free#26](https://github.com/litehelpers/Cordova-sqlite-evcore-extbuild-free/issues/26)_
- Known issues with using UNICODE `\u0000` character (equivalent to `\0`):
- Encoding issue reproduced on Android (default [Android-sqlite-evcore-native-driver-free](https://github.com/litehelpers/Android-sqlite-evcore-native-driver-free) database access implementation, using Android NDK)
- Truncation in case of argument value with UNICODE `\u0000` character reproduced on (WebKit) Web SQL as well as plugin on Android (default [Android-sqlite-evcore-native-driver-free](https://github.com/litehelpers/Android-sqlite-evcore-native-driver-free) database access implementation, using Android NDK) and Windows
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "cordova-sqlite-evcore-common-free",
"version": "0.0.4-pre2",
"version": "0.0.4",
"description": "Cordova/PhoneGap sqlite storage - free enterprise version with performance improvements for Android (evcore common version branch with external sqlite3 dependencies)",
"cordova": {
"id": "cordova-sqlite-evcore-common-free",
Expand Down Expand Up @@ -30,7 +30,7 @@
},
"homepage": "https://github.com/litehelpers/Cordova-sqlite-evcore-extbuild-free/tree/cordova-sqlite-evcore-common-free",
"dependencies": {
"cordova-sqlite-evcore-free-dependencies": "0.8.4"
"cordova-sqlite-evcore-free-dependencies": "0.8.6"
},
"scripts": {
"start": "node scripts/prepareSpec.js"
Expand Down
2 changes: 1 addition & 1 deletion plugin.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<plugin xmlns="http://www.phonegap.com/ns/plugins/1.0"
xmlns:android="http://schemas.android.com/apk/res/android"
id="cordova-sqlite-evcore-common-free"
version="0.0.4-pre2">
version="0.0.4">

<name>Cordova sqlite storage - free enterprise version with performance improvements for Android (evcore common version branch with external sqlite3 dependencies)</name>

Expand Down
4 changes: 1 addition & 3 deletions spec/www/spec/db-open-close-delete-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -320,8 +320,6 @@ var mytests = function() {
}, MYTIMEOUT);

it(suiteName + 'Open database with U+0801 (3-byte Samaritan character Bit) & check internal database file name', function(done) {
if (!isWindows && isAndroid && !isImpl2) pending('XXX CRASH on Android (default evcore-native-driver database access implementation)');

var dbName = 'a\u0801.db';

try {
Expand Down Expand Up @@ -360,7 +358,7 @@ var mytests = function() {
}, MYTIMEOUT);

it(suiteName + 'Open database with emoji \uD83D\uDE03 (UTF-8 4 bytes) & check internal database file name', function(done) {
if (!isWindows && isAndroid && !isImpl2) pending('XXX CRASH on Android (default evcore-native-driver database access implementation)');
if (!isWindows && isAndroid && !isImpl2) pending('TBD KNOWN ISSUE on Android (default evcore-native-driver database access implementation)');

var dbName = 'a\uD83D\uDE03.db';

Expand Down
Loading

0 comments on commit 5c59cf7

Please sign in to comment.