better-sqlite3-multiple-ciphers 9.1.2-beta.0 → 9.2.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/deps/setup.ps1 +1 -1
- package/deps/sqlite3/sqlite3.c +144 -46
- package/deps/sqlite3/sqlite3.h +9 -9
- package/package.json +1 -1
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** - [`9.
|
|
21
|
-
- **better-sqlite3** - [`9.
|
|
22
|
-
- **SQLite** - [`3.44.
|
|
23
|
-
- **SQLite3 Multiple Ciphers** - [`1.
|
|
20
|
+
- **better-sqlite3-multiple-ciphers** - [`9.2.0`](https://github.com/m4heshd/better-sqlite3-multiple-ciphers/releases/tag/v9.2.0)
|
|
21
|
+
- **better-sqlite3** - [`9.2.0`](https://github.com/JoshuaWise/better-sqlite3/releases/tag/v9.2.0)
|
|
22
|
+
- **SQLite** - [`3.44.2`](https://www.sqlite.org/releaselog/3_44_2.html)
|
|
23
|
+
- **SQLite3 Multiple Ciphers** - [`1.8.1`](https://github.com/utelle/SQLite3MultipleCiphers/releases/tag/v1.8.1)
|
|
24
24
|
|
|
25
25
|
- ### Beta
|
|
26
26
|
- **better-sqlite3-multiple-ciphers** - [`v9.1.2-beta.0`](https://github.com/m4heshd/better-sqlite3-multiple-ciphers/releases/tag/v9.1.2-beta.0)
|
package/deps/setup.ps1
CHANGED
package/deps/sqlite3/sqlite3.c
CHANGED
|
@@ -7,9 +7,31 @@
|
|
|
7
7
|
** License: MIT
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
|
+
/*
|
|
11
|
+
** Force some options required for WASM builds
|
|
12
|
+
*/
|
|
13
|
+
|
|
14
|
+
#ifdef __WASM__
|
|
15
|
+
|
|
16
|
+
/* Disable User Authentication Extension */
|
|
17
|
+
#ifdef SQLITE_USER_AUTHENTICATION
|
|
18
|
+
#undef SQLITE_USER_AUTHENTICATION
|
|
19
|
+
#endif
|
|
20
|
+
#define SQLITE_USER_AUTHENTICATION 0
|
|
21
|
+
|
|
22
|
+
/* Disable AES hardware support */
|
|
23
|
+
/* Note: this may be changed in the future depending on available support */
|
|
24
|
+
#ifdef SQLITE3MC_OMIT_AES_HARDWARE_SUPPORT
|
|
25
|
+
#undef SQLITE3MC_OMIT_AES_HARDWARE_SUPPORT
|
|
26
|
+
#endif
|
|
27
|
+
#define SQLITE3MC_OMIT_AES_HARDWARE_SUPPORT 1
|
|
28
|
+
|
|
29
|
+
#endif
|
|
30
|
+
|
|
10
31
|
/*
|
|
11
32
|
** Enable SQLite debug assertions if requested
|
|
12
33
|
*/
|
|
34
|
+
|
|
13
35
|
#ifndef SQLITE_DEBUG
|
|
14
36
|
#if defined(SQLITE_ENABLE_DEBUG) && (SQLITE_ENABLE_DEBUG == 1)
|
|
15
37
|
#define SQLITE_DEBUG 1
|
|
@@ -111,7 +133,7 @@ extern SQLITE_API LPWSTR sqlite3_win32_utf8_to_unicode(const char*);
|
|
|
111
133
|
/*** Begin of #include "sqlite3patched.c" ***/
|
|
112
134
|
/******************************************************************************
|
|
113
135
|
** This file is an amalgamation of many separate C source files from SQLite
|
|
114
|
-
** version 3.44.
|
|
136
|
+
** version 3.44.2. By combining all the individual C code files into this
|
|
115
137
|
** single large file, the entire code can be compiled as a single translation
|
|
116
138
|
** unit. This allows many compilers to do optimizations that would not be
|
|
117
139
|
** possible if the files were compiled separately. Performance improvements
|
|
@@ -129,7 +151,7 @@ extern SQLITE_API LPWSTR sqlite3_win32_utf8_to_unicode(const char*);
|
|
|
129
151
|
** separate file. This file contains only code for the core SQLite library.
|
|
130
152
|
**
|
|
131
153
|
** The content in this amalgamation comes from Fossil check-in
|
|
132
|
-
**
|
|
154
|
+
** ebead0e7230cd33bcec9f95d2183069565b9.
|
|
133
155
|
*/
|
|
134
156
|
#define SQLITE_CORE 1
|
|
135
157
|
#define SQLITE_AMALGAMATION 1
|
|
@@ -570,9 +592,9 @@ extern "C" {
|
|
|
570
592
|
** [sqlite3_libversion_number()], [sqlite3_sourceid()],
|
|
571
593
|
** [sqlite_version()] and [sqlite_source_id()].
|
|
572
594
|
*/
|
|
573
|
-
#define SQLITE_VERSION "3.44.
|
|
574
|
-
#define SQLITE_VERSION_NUMBER
|
|
575
|
-
#define SQLITE_SOURCE_ID "2023-11-
|
|
595
|
+
#define SQLITE_VERSION "3.44.2"
|
|
596
|
+
#define SQLITE_VERSION_NUMBER 3044002
|
|
597
|
+
#define SQLITE_SOURCE_ID "2023-11-24 11:41:44 ebead0e7230cd33bcec9f95d2183069565b9e709bf745c9b5db65cc0cbf92c0f"
|
|
576
598
|
|
|
577
599
|
/*
|
|
578
600
|
** CAPI3REF: Run-Time Library Version Numbers
|
|
@@ -84316,10 +84338,11 @@ static int growOpArray(Vdbe *v, int nOp){
|
|
|
84316
84338
|
** sqlite3CantopenError(lineno)
|
|
84317
84339
|
*/
|
|
84318
84340
|
static void test_addop_breakpoint(int pc, Op *pOp){
|
|
84319
|
-
static
|
|
84341
|
+
static u64 n = 0;
|
|
84320
84342
|
(void)pc;
|
|
84321
84343
|
(void)pOp;
|
|
84322
84344
|
n++;
|
|
84345
|
+
if( n==LARGEST_UINT64 ) abort(); /* so that n is used, preventing a warning */
|
|
84323
84346
|
}
|
|
84324
84347
|
#endif
|
|
84325
84348
|
|
|
@@ -92463,11 +92486,12 @@ SQLITE_API int sqlite3_found_count = 0;
|
|
|
92463
92486
|
** sqlite3CantopenError(lineno)
|
|
92464
92487
|
*/
|
|
92465
92488
|
static void test_trace_breakpoint(int pc, Op *pOp, Vdbe *v){
|
|
92466
|
-
static
|
|
92489
|
+
static u64 n = 0;
|
|
92467
92490
|
(void)pc;
|
|
92468
92491
|
(void)pOp;
|
|
92469
92492
|
(void)v;
|
|
92470
92493
|
n++;
|
|
92494
|
+
if( n==LARGEST_UINT64 ) abort(); /* So that n is used, preventing a warning */
|
|
92471
92495
|
}
|
|
92472
92496
|
#endif
|
|
92473
92497
|
|
|
@@ -143750,7 +143774,8 @@ SQLITE_PRIVATE void sqlite3SubqueryColumnTypes(
|
|
|
143750
143774
|
NameContext sNC;
|
|
143751
143775
|
|
|
143752
143776
|
assert( pSelect!=0 );
|
|
143753
|
-
|
|
143777
|
+
testcase( (pSelect->selFlags & SF_Resolved)==0 );
|
|
143778
|
+
assert( (pSelect->selFlags & SF_Resolved)!=0 || IN_RENAME_OBJECT );
|
|
143754
143779
|
assert( pTab->nCol==pSelect->pEList->nExpr || pParse->nErr>0 );
|
|
143755
143780
|
assert( aff==SQLITE_AFF_NONE || aff==SQLITE_AFF_BLOB );
|
|
143756
143781
|
if( db->mallocFailed || IN_RENAME_OBJECT ) return;
|
|
@@ -241652,18 +241677,24 @@ static void fts5DoSecureDelete(
|
|
|
241652
241677
|
|
|
241653
241678
|
iOff = iStart;
|
|
241654
241679
|
|
|
241655
|
-
/*
|
|
241656
|
-
** the
|
|
241680
|
+
/* If the position-list for the entry being removed flows over past
|
|
241681
|
+
** the end of this page, delete the portion of the position-list on the
|
|
241682
|
+
** next page and beyond.
|
|
241683
|
+
**
|
|
241684
|
+
** Set variable bLastInDoclist to true if this entry happens
|
|
241685
|
+
** to be the last rowid in the doclist for its term. */
|
|
241686
|
+
if( iNextOff>=iPgIdx ){
|
|
241687
|
+
int pgno = pSeg->iLeafPgno+1;
|
|
241688
|
+
fts5SecureDeleteOverflow(p, pSeg->pSeg, pgno, &bLastInDoclist);
|
|
241689
|
+
iNextOff = iPgIdx;
|
|
241690
|
+
}
|
|
241691
|
+
|
|
241657
241692
|
if( pSeg->bDel==0 ){
|
|
241658
|
-
if( iNextOff
|
|
241659
|
-
int pgno = pSeg->iLeafPgno+1;
|
|
241660
|
-
fts5SecureDeleteOverflow(p, pSeg->pSeg, pgno, &bLastInDoclist);
|
|
241661
|
-
iNextOff = iPgIdx;
|
|
241662
|
-
}else{
|
|
241693
|
+
if( iNextOff!=iPgIdx ){
|
|
241663
241694
|
/* Loop through the page-footer. If iNextOff (offset of the
|
|
241664
241695
|
** entry following the one we are removing) is equal to the
|
|
241665
241696
|
** offset of a key on this page, then the entry is the last
|
|
241666
|
-
** in its doclist.
|
|
241697
|
+
** in its doclist. */
|
|
241667
241698
|
int iKeyOff = 0;
|
|
241668
241699
|
for(iIdx=0; iIdx<nIdx; /* no-op */){
|
|
241669
241700
|
u32 iVal = 0;
|
|
@@ -247758,7 +247789,7 @@ static void fts5SourceIdFunc(
|
|
|
247758
247789
|
){
|
|
247759
247790
|
assert( nArg==0 );
|
|
247760
247791
|
UNUSED_PARAM2(nArg, apUnused);
|
|
247761
|
-
sqlite3_result_text(pCtx, "fts5: 2023-11-
|
|
247792
|
+
sqlite3_result_text(pCtx, "fts5: 2023-11-24 11:41:44 ebead0e7230cd33bcec9f95d2183069565b9e709bf745c9b5db65cc0cbf92c0f", -1, SQLITE_TRANSIENT);
|
|
247762
247793
|
}
|
|
247763
247794
|
|
|
247764
247795
|
/*
|
|
@@ -253068,9 +253099,9 @@ SQLITE_API const char *sqlite3_sourceid(void){ return SQLITE_SOURCE_ID; }
|
|
|
253068
253099
|
|
|
253069
253100
|
#define SQLITE3MC_VERSION_MAJOR 1
|
|
253070
253101
|
#define SQLITE3MC_VERSION_MINOR 8
|
|
253071
|
-
#define SQLITE3MC_VERSION_RELEASE
|
|
253102
|
+
#define SQLITE3MC_VERSION_RELEASE 1
|
|
253072
253103
|
#define SQLITE3MC_VERSION_SUBRELEASE 0
|
|
253073
|
-
#define SQLITE3MC_VERSION_STRING "SQLite3 Multiple Ciphers 1.8.
|
|
253104
|
+
#define SQLITE3MC_VERSION_STRING "SQLite3 Multiple Ciphers 1.8.1"
|
|
253074
253105
|
|
|
253075
253106
|
#endif /* SQLITE3MC_VERSION_H_ */
|
|
253076
253107
|
/*** End of #include "sqlite3mc_version.h" ***/
|
|
@@ -253229,9 +253260,9 @@ extern "C" {
|
|
|
253229
253260
|
** [sqlite3_libversion_number()], [sqlite3_sourceid()],
|
|
253230
253261
|
** [sqlite_version()] and [sqlite_source_id()].
|
|
253231
253262
|
*/
|
|
253232
|
-
#define SQLITE_VERSION "3.44.
|
|
253233
|
-
#define SQLITE_VERSION_NUMBER
|
|
253234
|
-
#define SQLITE_SOURCE_ID "2023-11-
|
|
253263
|
+
#define SQLITE_VERSION "3.44.2"
|
|
253264
|
+
#define SQLITE_VERSION_NUMBER 3044002
|
|
253265
|
+
#define SQLITE_SOURCE_ID "2023-11-24 11:41:44 ebead0e7230cd33bcec9f95d2183069565b9e709bf745c9b5db65cc0cbf92c0f"
|
|
253235
253266
|
|
|
253236
253267
|
/*
|
|
253237
253268
|
** CAPI3REF: Run-Time Library Version Numbers
|
|
@@ -266426,7 +266457,7 @@ extern "C" {
|
|
|
266426
266457
|
** If the SQLITE_USER table is not present in the database file, then
|
|
266427
266458
|
** this interface is a harmless no-op returnning SQLITE_OK.
|
|
266428
266459
|
*/
|
|
266429
|
-
int sqlite3_user_authenticate(
|
|
266460
|
+
SQLITE_API int sqlite3_user_authenticate(
|
|
266430
266461
|
sqlite3 *db, /* The database connection */
|
|
266431
266462
|
const char *zUsername, /* Username */
|
|
266432
266463
|
const char *aPW, /* Password or credentials */
|
|
@@ -266443,7 +266474,7 @@ int sqlite3_user_authenticate(
|
|
|
266443
266474
|
** for any ATTACH-ed databases. Any call to sqlite3_user_add() by a
|
|
266444
266475
|
** non-admin user results in an error.
|
|
266445
266476
|
*/
|
|
266446
|
-
int sqlite3_user_add(
|
|
266477
|
+
SQLITE_API int sqlite3_user_add(
|
|
266447
266478
|
sqlite3 *db, /* Database connection */
|
|
266448
266479
|
const char *zUsername, /* Username to be added */
|
|
266449
266480
|
const char *aPW, /* Password or credentials */
|
|
@@ -266458,7 +266489,7 @@ int sqlite3_user_add(
|
|
|
266458
266489
|
** credentials or admin privilege setting. No user may change their own
|
|
266459
266490
|
** admin privilege setting.
|
|
266460
266491
|
*/
|
|
266461
|
-
int sqlite3_user_change(
|
|
266492
|
+
SQLITE_API int sqlite3_user_change(
|
|
266462
266493
|
sqlite3 *db, /* Database connection */
|
|
266463
266494
|
const char *zUsername, /* Username to change */
|
|
266464
266495
|
const char *aPW, /* New password or credentials */
|
|
@@ -266473,7 +266504,7 @@ int sqlite3_user_change(
|
|
|
266473
266504
|
** the database cannot be converted into a no-authentication-required
|
|
266474
266505
|
** database.
|
|
266475
266506
|
*/
|
|
266476
|
-
int sqlite3_user_delete(
|
|
266507
|
+
SQLITE_API int sqlite3_user_delete(
|
|
266477
266508
|
sqlite3 *db, /* Database connection */
|
|
266478
266509
|
const char *zUsername /* Username to remove */
|
|
266479
266510
|
);
|
|
@@ -269358,7 +269389,16 @@ int poly1305_tagcmp(const uint8_t tag1[16], const uint8_t tag2[16])
|
|
|
269358
269389
|
/*
|
|
269359
269390
|
* Platform-specific entropy functions for seeding RNG
|
|
269360
269391
|
*/
|
|
269361
|
-
#if defined(
|
|
269392
|
+
#if defined(__WASM__)
|
|
269393
|
+
|
|
269394
|
+
extern int getentropy(void* buf, size_t n);
|
|
269395
|
+
|
|
269396
|
+
static size_t entropy(void* buf, size_t n)
|
|
269397
|
+
{
|
|
269398
|
+
return (getentropy(buf, n) == 0) ? n : 0;
|
|
269399
|
+
}
|
|
269400
|
+
|
|
269401
|
+
#elif defined(_WIN32) || defined(__CYGWIN__)
|
|
269362
269402
|
|
|
269363
269403
|
#if SQLITE3MC_USE_RAND_S
|
|
269364
269404
|
|
|
@@ -269512,15 +269552,6 @@ static size_t entropy(void* buf, size_t n)
|
|
|
269512
269552
|
return read_urandom(buf, n);
|
|
269513
269553
|
}
|
|
269514
269554
|
|
|
269515
|
-
#elif defined(__WASM__)
|
|
269516
|
-
|
|
269517
|
-
extern size_t getentropy(void* buf, size_t n);
|
|
269518
|
-
|
|
269519
|
-
static size_t entropy(void* buf, size_t n)
|
|
269520
|
-
{
|
|
269521
|
-
return (getentropy(buf, n) == 0) ? n : 0;
|
|
269522
|
-
}
|
|
269523
|
-
|
|
269524
269555
|
#else
|
|
269525
269556
|
# error "Secure pseudorandom number generator not implemented for this OS"
|
|
269526
269557
|
#endif
|
|
@@ -269768,7 +269799,7 @@ void sqlite3CryptFunc(
|
|
|
269768
269799
|
** If the SQLITE_USER table is not present in the database file, then
|
|
269769
269800
|
** this interface is a harmless no-op returnning SQLITE_OK.
|
|
269770
269801
|
*/
|
|
269771
|
-
int sqlite3_user_authenticate(
|
|
269802
|
+
SQLITE_API int sqlite3_user_authenticate(
|
|
269772
269803
|
sqlite3 *db, /* The database connection */
|
|
269773
269804
|
const char *zUsername, /* Username */
|
|
269774
269805
|
const char *zPW, /* Password or credentials */
|
|
@@ -269808,7 +269839,7 @@ int sqlite3_user_authenticate(
|
|
|
269808
269839
|
** for any ATTACH-ed databases. Any call to sqlite3_user_add() by a
|
|
269809
269840
|
** non-admin user results in an error.
|
|
269810
269841
|
*/
|
|
269811
|
-
int sqlite3_user_add(
|
|
269842
|
+
SQLITE_API int sqlite3_user_add(
|
|
269812
269843
|
sqlite3 *db, /* Database connection */
|
|
269813
269844
|
const char *zUsername, /* Username to be added */
|
|
269814
269845
|
const char *aPW, /* Password or credentials */
|
|
@@ -269855,7 +269886,7 @@ int sqlite3_user_add(
|
|
|
269855
269886
|
** credentials or admin privilege setting. No user may change their own
|
|
269856
269887
|
** admin privilege setting.
|
|
269857
269888
|
*/
|
|
269858
|
-
int sqlite3_user_change(
|
|
269889
|
+
SQLITE_API int sqlite3_user_change(
|
|
269859
269890
|
sqlite3 *db, /* Database connection */
|
|
269860
269891
|
const char *zUsername, /* Username to change */
|
|
269861
269892
|
const char *aPW, /* Modified password or credentials */
|
|
@@ -269906,7 +269937,7 @@ int sqlite3_user_change(
|
|
|
269906
269937
|
** the database cannot be converted into a no-authentication-required
|
|
269907
269938
|
** database.
|
|
269908
269939
|
*/
|
|
269909
|
-
int sqlite3_user_delete(
|
|
269940
|
+
SQLITE_API int sqlite3_user_delete(
|
|
269910
269941
|
sqlite3 *db, /* Database connection */
|
|
269911
269942
|
const char *zUsername /* Username to remove */
|
|
269912
269943
|
){
|
|
@@ -278374,7 +278405,7 @@ sqlite3mcBtreeSetPageSize(Btree* p, int pageSize, int nReserve, int iFix)
|
|
|
278374
278405
|
** Change 4: Call sqlite3mcBtreeSetPageSize instead of sqlite3BtreeSetPageSize for main database
|
|
278375
278406
|
** (sqlite3mcBtreeSetPageSize allows to reduce the number of reserved bytes)
|
|
278376
278407
|
**
|
|
278377
|
-
** This code is generated by the script rekeyvacuum.sh from SQLite version 3.44.
|
|
278408
|
+
** This code is generated by the script rekeyvacuum.sh from SQLite version 3.44.2 amalgamation.
|
|
278378
278409
|
*/
|
|
278379
278410
|
SQLITE_PRIVATE SQLITE_NOINLINE int sqlite3mcRunVacuumForRekey(
|
|
278380
278411
|
char **pzErrMsg, /* Write error message here */
|
|
@@ -301511,7 +301542,57 @@ static const int walFileHeaderSize = 32;
|
|
|
301511
301542
|
/*
|
|
301512
301543
|
** Global I/O method structure of SQLite3 Multiple Ciphers VFS
|
|
301513
301544
|
*/
|
|
301514
|
-
|
|
301545
|
+
|
|
301546
|
+
#define IOMETHODS_VERSION_MIN 1
|
|
301547
|
+
#define IOMETHODS_VERSION_MAX 3
|
|
301548
|
+
|
|
301549
|
+
static sqlite3_io_methods mcIoMethodsGlobal1 =
|
|
301550
|
+
{
|
|
301551
|
+
1, /* iVersion */
|
|
301552
|
+
mcIoClose, /* xClose */
|
|
301553
|
+
mcIoRead, /* xRead */
|
|
301554
|
+
mcIoWrite, /* xWrite */
|
|
301555
|
+
mcIoTruncate, /* xTruncate */
|
|
301556
|
+
mcIoSync, /* xSync */
|
|
301557
|
+
mcIoFileSize, /* xFileSize */
|
|
301558
|
+
mcIoLock, /* xLock */
|
|
301559
|
+
mcIoUnlock, /* xUnlock */
|
|
301560
|
+
mcIoCheckReservedLock, /* xCheckReservedLock */
|
|
301561
|
+
mcIoFileControl, /* xFileControl */
|
|
301562
|
+
mcIoSectorSize, /* xSectorSize */
|
|
301563
|
+
mcIoDeviceCharacteristics, /* xDeviceCharacteristics */
|
|
301564
|
+
0, /* xShmMap */
|
|
301565
|
+
0, /* xShmLock */
|
|
301566
|
+
0, /* xShmBarrier */
|
|
301567
|
+
0, /* xShmUnmap */
|
|
301568
|
+
0, /* xFetch */
|
|
301569
|
+
0, /* xUnfetch */
|
|
301570
|
+
};
|
|
301571
|
+
|
|
301572
|
+
static sqlite3_io_methods mcIoMethodsGlobal2 =
|
|
301573
|
+
{
|
|
301574
|
+
2, /* iVersion */
|
|
301575
|
+
mcIoClose, /* xClose */
|
|
301576
|
+
mcIoRead, /* xRead */
|
|
301577
|
+
mcIoWrite, /* xWrite */
|
|
301578
|
+
mcIoTruncate, /* xTruncate */
|
|
301579
|
+
mcIoSync, /* xSync */
|
|
301580
|
+
mcIoFileSize, /* xFileSize */
|
|
301581
|
+
mcIoLock, /* xLock */
|
|
301582
|
+
mcIoUnlock, /* xUnlock */
|
|
301583
|
+
mcIoCheckReservedLock, /* xCheckReservedLock */
|
|
301584
|
+
mcIoFileControl, /* xFileControl */
|
|
301585
|
+
mcIoSectorSize, /* xSectorSize */
|
|
301586
|
+
mcIoDeviceCharacteristics, /* xDeviceCharacteristics */
|
|
301587
|
+
mcIoShmMap, /* xShmMap */
|
|
301588
|
+
mcIoShmLock, /* xShmLock */
|
|
301589
|
+
mcIoShmBarrier, /* xShmBarrier */
|
|
301590
|
+
mcIoShmUnmap, /* xShmUnmap */
|
|
301591
|
+
0, /* xFetch */
|
|
301592
|
+
0, /* xUnfetch */
|
|
301593
|
+
};
|
|
301594
|
+
|
|
301595
|
+
static sqlite3_io_methods mcIoMethodsGlobal3 =
|
|
301515
301596
|
{
|
|
301516
301597
|
3, /* iVersion */
|
|
301517
301598
|
mcIoClose, /* xClose */
|
|
@@ -301534,6 +301615,9 @@ static sqlite3_io_methods mcIoMethodsGlobal =
|
|
|
301534
301615
|
mcIoUnfetch, /* xUnfetch */
|
|
301535
301616
|
};
|
|
301536
301617
|
|
|
301618
|
+
static sqlite3_io_methods* mcIoMethodsGlobal[] =
|
|
301619
|
+
{ 0, &mcIoMethodsGlobal1 , &mcIoMethodsGlobal2 , &mcIoMethodsGlobal3 };
|
|
301620
|
+
|
|
301537
301621
|
/*
|
|
301538
301622
|
** Internal functions
|
|
301539
301623
|
*/
|
|
@@ -301708,7 +301792,9 @@ SQLITE_PRIVATE void* sqlite3mcPagerCodec(PgHdrMC* pPg)
|
|
|
301708
301792
|
{
|
|
301709
301793
|
sqlite3_file* pFile = sqlite3PagerFile(pPg->pPager);
|
|
301710
301794
|
void* aData = 0;
|
|
301711
|
-
if (pFile->pMethods == &
|
|
301795
|
+
if (pFile->pMethods == &mcIoMethodsGlobal1 ||
|
|
301796
|
+
pFile->pMethods == &mcIoMethodsGlobal2 ||
|
|
301797
|
+
pFile->pMethods == &mcIoMethodsGlobal3)
|
|
301712
301798
|
{
|
|
301713
301799
|
sqlite3mc_file* mcFile = (sqlite3mc_file*) pFile;
|
|
301714
301800
|
Codec* codec = mcFile->codec;
|
|
@@ -301810,9 +301896,18 @@ static int mcVfsOpen(sqlite3_vfs* pVfs, const char* zName, sqlite3_file* pFile,
|
|
|
301810
301896
|
if (rc == SQLITE_OK)
|
|
301811
301897
|
{
|
|
301812
301898
|
/*
|
|
301813
|
-
** Real open succeeded
|
|
301899
|
+
** Real open succeeded
|
|
301900
|
+
** Initialize methods (use same version number as underlying implementation
|
|
301901
|
+
** Register main database files
|
|
301814
301902
|
*/
|
|
301815
|
-
pFile->pMethods
|
|
301903
|
+
int ioMethodsVersion = mcFile->pFile->pMethods->iVersion;
|
|
301904
|
+
if (ioMethodsVersion < IOMETHODS_VERSION_MIN ||
|
|
301905
|
+
ioMethodsVersion > IOMETHODS_VERSION_MAX)
|
|
301906
|
+
{
|
|
301907
|
+
/* If version out of range, use highest known version */
|
|
301908
|
+
ioMethodsVersion = IOMETHODS_VERSION_MAX;
|
|
301909
|
+
}
|
|
301910
|
+
pFile->pMethods = mcIoMethodsGlobal[ioMethodsVersion];
|
|
301816
301911
|
if (flags & SQLITE_OPEN_MAIN_DB)
|
|
301817
301912
|
{
|
|
301818
301913
|
mcMainListAdd(mcFile);
|
|
@@ -302598,7 +302693,10 @@ static int mcIoFileControl(sqlite3_file* pFile, int op, void* pArg)
|
|
|
302598
302693
|
|
|
302599
302694
|
static int mcIoSectorSize(sqlite3_file* pFile)
|
|
302600
302695
|
{
|
|
302601
|
-
|
|
302696
|
+
if (REALFILE(pFile)->pMethods->xSectorSize)
|
|
302697
|
+
return REALFILE(pFile)->pMethods->xSectorSize(REALFILE(pFile));
|
|
302698
|
+
else
|
|
302699
|
+
return SQLITE_DEFAULT_SECTOR_SIZE;
|
|
302602
302700
|
}
|
|
302603
302701
|
|
|
302604
302702
|
static int mcIoDeviceCharacteristics(sqlite3_file* pFile)
|
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 8
|
|
34
|
-
#define SQLITE3MC_VERSION_RELEASE
|
|
34
|
+
#define SQLITE3MC_VERSION_RELEASE 1
|
|
35
35
|
#define SQLITE3MC_VERSION_SUBRELEASE 0
|
|
36
|
-
#define SQLITE3MC_VERSION_STRING "SQLite3 Multiple Ciphers 1.8.
|
|
36
|
+
#define SQLITE3MC_VERSION_STRING "SQLite3 Multiple Ciphers 1.8.1"
|
|
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.44.
|
|
196
|
-
#define SQLITE_VERSION_NUMBER
|
|
197
|
-
#define SQLITE_SOURCE_ID "2023-11-
|
|
195
|
+
#define SQLITE_VERSION "3.44.2"
|
|
196
|
+
#define SQLITE_VERSION_NUMBER 3044002
|
|
197
|
+
#define SQLITE_SOURCE_ID "2023-11-24 11:41:44 ebead0e7230cd33bcec9f95d2183069565b9e709bf745c9b5db65cc0cbf92c0f"
|
|
198
198
|
|
|
199
199
|
/*
|
|
200
200
|
** CAPI3REF: Run-Time Library Version Numbers
|
|
@@ -13389,7 +13389,7 @@ extern "C" {
|
|
|
13389
13389
|
** If the SQLITE_USER table is not present in the database file, then
|
|
13390
13390
|
** this interface is a harmless no-op returnning SQLITE_OK.
|
|
13391
13391
|
*/
|
|
13392
|
-
int sqlite3_user_authenticate(
|
|
13392
|
+
SQLITE_API int sqlite3_user_authenticate(
|
|
13393
13393
|
sqlite3 *db, /* The database connection */
|
|
13394
13394
|
const char *zUsername, /* Username */
|
|
13395
13395
|
const char *aPW, /* Password or credentials */
|
|
@@ -13406,7 +13406,7 @@ int sqlite3_user_authenticate(
|
|
|
13406
13406
|
** for any ATTACH-ed databases. Any call to sqlite3_user_add() by a
|
|
13407
13407
|
** non-admin user results in an error.
|
|
13408
13408
|
*/
|
|
13409
|
-
int sqlite3_user_add(
|
|
13409
|
+
SQLITE_API int sqlite3_user_add(
|
|
13410
13410
|
sqlite3 *db, /* Database connection */
|
|
13411
13411
|
const char *zUsername, /* Username to be added */
|
|
13412
13412
|
const char *aPW, /* Password or credentials */
|
|
@@ -13421,7 +13421,7 @@ int sqlite3_user_add(
|
|
|
13421
13421
|
** credentials or admin privilege setting. No user may change their own
|
|
13422
13422
|
** admin privilege setting.
|
|
13423
13423
|
*/
|
|
13424
|
-
int sqlite3_user_change(
|
|
13424
|
+
SQLITE_API int sqlite3_user_change(
|
|
13425
13425
|
sqlite3 *db, /* Database connection */
|
|
13426
13426
|
const char *zUsername, /* Username to change */
|
|
13427
13427
|
const char *aPW, /* New password or credentials */
|
|
@@ -13436,7 +13436,7 @@ int sqlite3_user_change(
|
|
|
13436
13436
|
** the database cannot be converted into a no-authentication-required
|
|
13437
13437
|
** database.
|
|
13438
13438
|
*/
|
|
13439
|
-
int sqlite3_user_delete(
|
|
13439
|
+
SQLITE_API int sqlite3_user_delete(
|
|
13440
13440
|
sqlite3 *db, /* Database connection */
|
|
13441
13441
|
const char *zUsername /* Username to remove */
|
|
13442
13442
|
);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "better-sqlite3-multiple-ciphers",
|
|
3
|
-
"version": "9.
|
|
3
|
+
"version": "9.2.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>",
|