better-sqlite3-multiple-ciphers 8.7.1-beta.0 → 9.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +4 -4
- package/binding.gyp +1 -1
- package/deps/setup.ps1 +1 -1
- package/deps/sqlite3/sqlite3.c +42 -25
- package/deps/sqlite3/sqlite3.h +5 -5
- package/package.json +2 -8
package/README.md
CHANGED
|
@@ -17,10 +17,10 @@ The fastest and simplest library for SQLite3 in Node.js. This particular fork su
|
|
|
17
17
|
## Current versions
|
|
18
18
|
|
|
19
19
|
- ### Stable
|
|
20
|
-
- **better-sqlite3-multiple-ciphers** - [`
|
|
21
|
-
- **better-sqlite3** - [`
|
|
22
|
-
- **SQLite** - [`3.43.
|
|
23
|
-
- **SQLite3 Multiple Ciphers** - [`1.
|
|
20
|
+
- **better-sqlite3-multiple-ciphers** - [`9.0.0`](https://github.com/m4heshd/better-sqlite3-multiple-ciphers/releases/tag/v9.0.0)
|
|
21
|
+
- **better-sqlite3** - [`9.0.0`](https://github.com/JoshuaWise/better-sqlite3/releases/tag/v9.0.0)
|
|
22
|
+
- **SQLite** - [`3.43.2`](https://www.sqlite.org/releaselog/3_43_2.html)
|
|
23
|
+
- **SQLite3 Multiple Ciphers** - [`1.7.2`](https://github.com/utelle/SQLite3MultipleCiphers/releases/tag/v1.7.2)
|
|
24
24
|
|
|
25
25
|
- ### Beta
|
|
26
26
|
- **better-sqlite3-multiple-ciphers** - [`v8.7.1-beta.0`](https://github.com/m4heshd/better-sqlite3-multiple-ciphers/releases/tag/v8.7.1-beta.0)
|
package/binding.gyp
CHANGED
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
'cflags_cc': ['-std=c++17'],
|
|
13
13
|
'xcode_settings': {
|
|
14
14
|
'OTHER_CPLUSPLUSFLAGS': ['-std=c++17', '-stdlib=libc++'],
|
|
15
|
-
'OTHER_LDFLAGS': ['-framework Security'
|
|
15
|
+
'OTHER_LDFLAGS': ['-framework Security'],
|
|
16
16
|
},
|
|
17
17
|
'msvs_settings': {
|
|
18
18
|
'VCCLCompilerTool': {
|
package/deps/setup.ps1
CHANGED
package/deps/sqlite3/sqlite3.c
CHANGED
|
@@ -92,7 +92,7 @@ extern SQLITE_API LPWSTR sqlite3_win32_utf8_to_unicode(const char*);
|
|
|
92
92
|
/*** Begin of #include "sqlite3patched.c" ***/
|
|
93
93
|
/******************************************************************************
|
|
94
94
|
** This file is an amalgamation of many separate C source files from SQLite
|
|
95
|
-
** version 3.43.
|
|
95
|
+
** version 3.43.2. By combining all the individual C code files into this
|
|
96
96
|
** single large file, the entire code can be compiled as a single translation
|
|
97
97
|
** unit. This allows many compilers to do optimizations that would not be
|
|
98
98
|
** possible if the files were compiled separately. Performance improvements
|
|
@@ -110,7 +110,7 @@ extern SQLITE_API LPWSTR sqlite3_win32_utf8_to_unicode(const char*);
|
|
|
110
110
|
** separate file. This file contains only code for the core SQLite library.
|
|
111
111
|
**
|
|
112
112
|
** The content in this amalgamation comes from Fossil check-in
|
|
113
|
-
**
|
|
113
|
+
** 310099cce5a487035fa535dd3002c59ac7f.
|
|
114
114
|
*/
|
|
115
115
|
#define SQLITE_CORE 1
|
|
116
116
|
#define SQLITE_AMALGAMATION 1
|
|
@@ -551,9 +551,9 @@ extern "C" {
|
|
|
551
551
|
** [sqlite3_libversion_number()], [sqlite3_sourceid()],
|
|
552
552
|
** [sqlite_version()] and [sqlite_source_id()].
|
|
553
553
|
*/
|
|
554
|
-
#define SQLITE_VERSION "3.43.
|
|
555
|
-
#define SQLITE_VERSION_NUMBER
|
|
556
|
-
#define SQLITE_SOURCE_ID "2023-
|
|
554
|
+
#define SQLITE_VERSION "3.43.2"
|
|
555
|
+
#define SQLITE_VERSION_NUMBER 3043002
|
|
556
|
+
#define SQLITE_SOURCE_ID "2023-10-10 12:14:04 4310099cce5a487035fa535dd3002c59ac7f1d1bec68d7cf317fd3e769484790"
|
|
557
557
|
|
|
558
558
|
/*
|
|
559
559
|
** CAPI3REF: Run-Time Library Version Numbers
|
|
@@ -35294,29 +35294,29 @@ SQLITE_PRIVATE void sqlite3FpDecode(FpDecode *p, double r, int iRound, int mxRou
|
|
|
35294
35294
|
double rr[2];
|
|
35295
35295
|
rr[0] = r;
|
|
35296
35296
|
rr[1] = 0.0;
|
|
35297
|
-
if( rr[0]>
|
|
35298
|
-
while( rr[0]>
|
|
35297
|
+
if( rr[0]>9.223372036854774784e+18 ){
|
|
35298
|
+
while( rr[0]>9.223372036854774784e+118 ){
|
|
35299
35299
|
exp += 100;
|
|
35300
35300
|
dekkerMul2(rr, 1.0e-100, -1.99918998026028836196e-117);
|
|
35301
35301
|
}
|
|
35302
|
-
while( rr[0]>
|
|
35302
|
+
while( rr[0]>9.223372036854774784e+28 ){
|
|
35303
35303
|
exp += 10;
|
|
35304
35304
|
dekkerMul2(rr, 1.0e-10, -3.6432197315497741579e-27);
|
|
35305
35305
|
}
|
|
35306
|
-
while( rr[0]>
|
|
35306
|
+
while( rr[0]>9.223372036854774784e+18 ){
|
|
35307
35307
|
exp += 1;
|
|
35308
35308
|
dekkerMul2(rr, 1.0e-01, -5.5511151231257827021e-18);
|
|
35309
35309
|
}
|
|
35310
35310
|
}else{
|
|
35311
|
-
while( rr[0]<
|
|
35311
|
+
while( rr[0]<9.223372036854774784e-83 ){
|
|
35312
35312
|
exp -= 100;
|
|
35313
35313
|
dekkerMul2(rr, 1.0e+100, -1.5902891109759918046e+83);
|
|
35314
35314
|
}
|
|
35315
|
-
while( rr[0]<
|
|
35315
|
+
while( rr[0]<9.223372036854774784e+07 ){
|
|
35316
35316
|
exp -= 10;
|
|
35317
35317
|
dekkerMul2(rr, 1.0e+10, 0.0);
|
|
35318
35318
|
}
|
|
35319
|
-
while( rr[0]<
|
|
35319
|
+
while( rr[0]<9.22337203685477478e+17 ){
|
|
35320
35320
|
exp -= 1;
|
|
35321
35321
|
dekkerMul2(rr, 1.0e+01, 0.0);
|
|
35322
35322
|
}
|
|
@@ -77138,6 +77138,7 @@ static int rebuildPage(
|
|
|
77138
77138
|
int k; /* Current slot in pCArray->apEnd[] */
|
|
77139
77139
|
u8 *pSrcEnd; /* Current pCArray->apEnd[k] value */
|
|
77140
77140
|
|
|
77141
|
+
assert( nCell>0 );
|
|
77141
77142
|
assert( i<iEnd );
|
|
77142
77143
|
j = get2byte(&aData[hdr+5]);
|
|
77143
77144
|
if( NEVER(j>(u32)usableSize) ){ j = 0; }
|
|
@@ -77444,6 +77445,7 @@ static int editPage(
|
|
|
77444
77445
|
return SQLITE_OK;
|
|
77445
77446
|
editpage_fail:
|
|
77446
77447
|
/* Unable to edit this page. Rebuild it from scratch instead. */
|
|
77448
|
+
if( nNew<1 ) return SQLITE_CORRUPT_BKPT;
|
|
77447
77449
|
populateCellCache(pCArray, iNew, nNew);
|
|
77448
77450
|
return rebuildPage(pCArray, iNew, nNew, pPg);
|
|
77449
77451
|
}
|
|
@@ -100947,8 +100949,7 @@ static int blobSeekToRow(Incrblob *p, sqlite3_int64 iRow, char **pzErr){
|
|
|
100947
100949
|
/* Set the value of register r[1] in the SQL statement to integer iRow.
|
|
100948
100950
|
** This is done directly as a performance optimization
|
|
100949
100951
|
*/
|
|
100950
|
-
v->aMem[1]
|
|
100951
|
-
v->aMem[1].u.i = iRow;
|
|
100952
|
+
sqlite3VdbeMemSetInt64(&v->aMem[1], iRow);
|
|
100952
100953
|
|
|
100953
100954
|
/* If the statement has been run before (and is paused at the OP_ResultRow)
|
|
100954
100955
|
** then back it up to the point where it does the OP_NotExists. This could
|
|
@@ -204263,6 +204264,7 @@ static void jsonReplaceFunc(
|
|
|
204263
204264
|
}
|
|
204264
204265
|
pParse = jsonParseCached(ctx, argv[0], ctx, argc>1);
|
|
204265
204266
|
if( pParse==0 ) return;
|
|
204267
|
+
pParse->nJPRef++;
|
|
204266
204268
|
for(i=1; i<(u32)argc; i+=2){
|
|
204267
204269
|
zPath = (const char*)sqlite3_value_text(argv[i]);
|
|
204268
204270
|
pParse->useMod = 1;
|
|
@@ -204275,6 +204277,7 @@ static void jsonReplaceFunc(
|
|
|
204275
204277
|
jsonReturnJson(pParse, pParse->aNode, ctx, 1);
|
|
204276
204278
|
replace_err:
|
|
204277
204279
|
jsonDebugPrintParse(pParse);
|
|
204280
|
+
jsonParseFree(pParse);
|
|
204278
204281
|
}
|
|
204279
204282
|
|
|
204280
204283
|
|
|
@@ -204309,6 +204312,7 @@ static void jsonSetFunc(
|
|
|
204309
204312
|
}
|
|
204310
204313
|
pParse = jsonParseCached(ctx, argv[0], ctx, argc>1);
|
|
204311
204314
|
if( pParse==0 ) return;
|
|
204315
|
+
pParse->nJPRef++;
|
|
204312
204316
|
for(i=1; i<(u32)argc; i+=2){
|
|
204313
204317
|
zPath = (const char*)sqlite3_value_text(argv[i]);
|
|
204314
204318
|
bApnd = 0;
|
|
@@ -204325,9 +204329,8 @@ static void jsonSetFunc(
|
|
|
204325
204329
|
}
|
|
204326
204330
|
jsonDebugPrintParse(pParse);
|
|
204327
204331
|
jsonReturnJson(pParse, pParse->aNode, ctx, 1);
|
|
204328
|
-
|
|
204329
204332
|
jsonSetDone:
|
|
204330
|
-
|
|
204333
|
+
jsonParseFree(pParse);
|
|
204331
204334
|
}
|
|
204332
204335
|
|
|
204333
204336
|
/*
|
|
@@ -239816,7 +239819,6 @@ static void fts5DoSecureDelete(
|
|
|
239816
239819
|
int iIdx = 0;
|
|
239817
239820
|
int iStart = 0;
|
|
239818
239821
|
int iKeyOff = 0;
|
|
239819
|
-
int iPrevKeyOff = 0;
|
|
239820
239822
|
int iDelKeyOff = 0; /* Offset of deleted key, if any */
|
|
239821
239823
|
|
|
239822
239824
|
nIdx = nPg-iPgIdx;
|
|
@@ -244378,6 +244380,9 @@ static int fts5FilterMethod(
|
|
|
244378
244380
|
pCsr->iFirstRowid = fts5GetRowidLimit(pRowidGe, SMALLEST_INT64);
|
|
244379
244381
|
}
|
|
244380
244382
|
|
|
244383
|
+
rc = sqlite3Fts5IndexLoadConfig(pTab->p.pIndex);
|
|
244384
|
+
if( rc!=SQLITE_OK ) goto filter_out;
|
|
244385
|
+
|
|
244381
244386
|
if( pTab->pSortCsr ){
|
|
244382
244387
|
/* If pSortCsr is non-NULL, then this call is being made as part of
|
|
244383
244388
|
** processing for a "... MATCH <expr> ORDER BY rank" query (ePlan is
|
|
@@ -244400,7 +244405,9 @@ static int fts5FilterMethod(
|
|
|
244400
244405
|
pCsr->pExpr = pTab->pSortCsr->pExpr;
|
|
244401
244406
|
rc = fts5CursorFirst(pTab, pCsr, bDesc);
|
|
244402
244407
|
}else if( pCsr->pExpr ){
|
|
244403
|
-
|
|
244408
|
+
if( rc==SQLITE_OK ){
|
|
244409
|
+
rc = fts5CursorParseRank(pConfig, pCsr, pRank);
|
|
244410
|
+
}
|
|
244404
244411
|
if( rc==SQLITE_OK ){
|
|
244405
244412
|
if( bOrderByRank ){
|
|
244406
244413
|
pCsr->ePlan = FTS5_PLAN_SORTED_MATCH;
|
|
@@ -245881,7 +245888,7 @@ static void fts5SourceIdFunc(
|
|
|
245881
245888
|
){
|
|
245882
245889
|
assert( nArg==0 );
|
|
245883
245890
|
UNUSED_PARAM2(nArg, apUnused);
|
|
245884
|
-
sqlite3_result_text(pCtx, "fts5: 2023-
|
|
245891
|
+
sqlite3_result_text(pCtx, "fts5: 2023-10-10 12:14:04 4310099cce5a487035fa535dd3002c59ac7f1d1bec68d7cf317fd3e769484790", -1, SQLITE_TRANSIENT);
|
|
245885
245892
|
}
|
|
245886
245893
|
|
|
245887
245894
|
/*
|
|
@@ -251139,9 +251146,9 @@ SQLITE_API const char *sqlite3_sourceid(void){ return SQLITE_SOURCE_ID; }
|
|
|
251139
251146
|
|
|
251140
251147
|
#define SQLITE3MC_VERSION_MAJOR 1
|
|
251141
251148
|
#define SQLITE3MC_VERSION_MINOR 7
|
|
251142
|
-
#define SQLITE3MC_VERSION_RELEASE
|
|
251149
|
+
#define SQLITE3MC_VERSION_RELEASE 2
|
|
251143
251150
|
#define SQLITE3MC_VERSION_SUBRELEASE 0
|
|
251144
|
-
#define SQLITE3MC_VERSION_STRING "SQLite3 Multiple Ciphers 1.7.
|
|
251151
|
+
#define SQLITE3MC_VERSION_STRING "SQLite3 Multiple Ciphers 1.7.2"
|
|
251145
251152
|
|
|
251146
251153
|
#endif /* SQLITE3MC_VERSION_H_ */
|
|
251147
251154
|
/*** End of #include "sqlite3mc_version.h" ***/
|
|
@@ -251300,9 +251307,9 @@ extern "C" {
|
|
|
251300
251307
|
** [sqlite3_libversion_number()], [sqlite3_sourceid()],
|
|
251301
251308
|
** [sqlite_version()] and [sqlite_source_id()].
|
|
251302
251309
|
*/
|
|
251303
|
-
#define SQLITE_VERSION "3.43.
|
|
251304
|
-
#define SQLITE_VERSION_NUMBER
|
|
251305
|
-
#define SQLITE_SOURCE_ID "2023-
|
|
251310
|
+
#define SQLITE_VERSION "3.43.2"
|
|
251311
|
+
#define SQLITE_VERSION_NUMBER 3043002
|
|
251312
|
+
#define SQLITE_SOURCE_ID "2023-10-10 12:14:04 4310099cce5a487035fa535dd3002c59ac7f1d1bec68d7cf317fd3e769484790"
|
|
251306
251313
|
|
|
251307
251314
|
/*
|
|
251308
251315
|
** CAPI3REF: Run-Time Library Version Numbers
|
|
@@ -268137,6 +268144,8 @@ void RijndaelDecrypt(Rijndael* rijndael, UINT8 a[16], UINT8 b[16]);
|
|
|
268137
268144
|
#define AES_HARDWARE_NI 1
|
|
268138
268145
|
#define AES_HARDWARE_NEON 2
|
|
268139
268146
|
|
|
268147
|
+
#ifndef SQLITE3MC_OMIT_AES_HARDWARE_SUPPORT
|
|
268148
|
+
|
|
268140
268149
|
#if defined __ARM_FEATURE_CRYPTO
|
|
268141
268150
|
#define HAS_AES_HARDWARE AES_HARDWARE_NEON
|
|
268142
268151
|
|
|
@@ -268194,6 +268203,14 @@ void RijndaelDecrypt(Rijndael* rijndael, UINT8 a[16], UINT8 b[16]);
|
|
|
268194
268203
|
|
|
268195
268204
|
#endif
|
|
268196
268205
|
|
|
268206
|
+
#else /* SQLITE3MC_OMIT_AES_HARDWARE_SUPPORT defined */
|
|
268207
|
+
|
|
268208
|
+
/* Omit AES hardware support */
|
|
268209
|
+
#define HAS_AES_HARDWARE AES_HARDWARE_NONE
|
|
268210
|
+
|
|
268211
|
+
#endif /* SQLITE3MC_OMIT_AES_HARDWARE_SUPPORT */
|
|
268212
|
+
|
|
268213
|
+
|
|
268197
268214
|
#if HAS_AES_HARDWARE != AES_HARDWARE_NONE
|
|
268198
268215
|
/* --- Implementation of common data and functions for any AES hardware --- */
|
|
268199
268216
|
|
|
@@ -274652,7 +274669,7 @@ sqlite3mcBtreeSetPageSize(Btree* p, int pageSize, int nReserve, int iFix)
|
|
|
274652
274669
|
** Change 4: Call sqlite3mcBtreeSetPageSize instead of sqlite3BtreeSetPageSize for main database
|
|
274653
274670
|
** (sqlite3mcBtreeSetPageSize allows to reduce the number of reserved bytes)
|
|
274654
274671
|
**
|
|
274655
|
-
** This code is generated by the script rekeyvacuum.sh from SQLite version 3.43.
|
|
274672
|
+
** This code is generated by the script rekeyvacuum.sh from SQLite version 3.43.2 amalgamation.
|
|
274656
274673
|
*/
|
|
274657
274674
|
SQLITE_PRIVATE SQLITE_NOINLINE int sqlite3mcRunVacuumForRekey(
|
|
274658
274675
|
char **pzErrMsg, /* Write error message here */
|
package/deps/sqlite3/sqlite3.h
CHANGED
|
@@ -31,9 +31,9 @@
|
|
|
31
31
|
|
|
32
32
|
#define SQLITE3MC_VERSION_MAJOR 1
|
|
33
33
|
#define SQLITE3MC_VERSION_MINOR 7
|
|
34
|
-
#define SQLITE3MC_VERSION_RELEASE
|
|
34
|
+
#define SQLITE3MC_VERSION_RELEASE 2
|
|
35
35
|
#define SQLITE3MC_VERSION_SUBRELEASE 0
|
|
36
|
-
#define SQLITE3MC_VERSION_STRING "SQLite3 Multiple Ciphers 1.7.
|
|
36
|
+
#define SQLITE3MC_VERSION_STRING "SQLite3 Multiple Ciphers 1.7.2"
|
|
37
37
|
|
|
38
38
|
#endif /* SQLITE3MC_VERSION_H_ */
|
|
39
39
|
/*** End of #include "sqlite3mc_version.h" ***/
|
|
@@ -192,9 +192,9 @@ extern "C" {
|
|
|
192
192
|
** [sqlite3_libversion_number()], [sqlite3_sourceid()],
|
|
193
193
|
** [sqlite_version()] and [sqlite_source_id()].
|
|
194
194
|
*/
|
|
195
|
-
#define SQLITE_VERSION "3.43.
|
|
196
|
-
#define SQLITE_VERSION_NUMBER
|
|
197
|
-
#define SQLITE_SOURCE_ID "2023-
|
|
195
|
+
#define SQLITE_VERSION "3.43.2"
|
|
196
|
+
#define SQLITE_VERSION_NUMBER 3043002
|
|
197
|
+
#define SQLITE_SOURCE_ID "2023-10-10 12:14:04 4310099cce5a487035fa535dd3002c59ac7f1d1bec68d7cf317fd3e769484790"
|
|
198
198
|
|
|
199
199
|
/*
|
|
200
200
|
** CAPI3REF: Run-Time Library Version Numbers
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "better-sqlite3-multiple-ciphers",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "9.0.0",
|
|
4
4
|
"description": "better-sqlite3 with multiple-cipher encryption support",
|
|
5
5
|
"homepage": "https://github.com/m4heshd/better-sqlite3-multiple-ciphers",
|
|
6
6
|
"author": "Mahesh Bandara Wijerathna (m4heshd) <m4heshd@gmail.com>",
|
|
@@ -27,17 +27,11 @@
|
|
|
27
27
|
"cli-color": "^2.0.3",
|
|
28
28
|
"fs-extra": "^11.1.1",
|
|
29
29
|
"mocha": "^10.2.0",
|
|
30
|
-
"node-gyp": "9.4.0",
|
|
31
30
|
"nodemark": "^0.3.0",
|
|
32
|
-
"prebuild": "^
|
|
31
|
+
"prebuild": "^12.0.0",
|
|
33
32
|
"sqlite": "^5.0.1",
|
|
34
33
|
"sqlite3": "^5.1.6"
|
|
35
34
|
},
|
|
36
|
-
"overrides": {
|
|
37
|
-
"prebuild": {
|
|
38
|
-
"node-gyp": "$node-gyp"
|
|
39
|
-
}
|
|
40
|
-
},
|
|
41
35
|
"scripts": {
|
|
42
36
|
"install": "prebuild-install || node-gyp rebuild --release",
|
|
43
37
|
"build-release": "node-gyp rebuild --release",
|