better-sqlite3-multiple-ciphers 11.9.1 → 11.10.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 CHANGED
@@ -17,10 +17,10 @@ The fastest and simplest library for SQLite in Node.js. This particular fork sup
17
17
  ## Current versions
18
18
 
19
19
  - ### Stable
20
- - **better-sqlite3-multiple-ciphers** - [`11.9.1`](https://github.com/m4heshd/better-sqlite3-multiple-ciphers/releases/tag/v11.9.1)
21
- - **better-sqlite3** - [`11.9.1`](https://github.com/JoshuaWise/better-sqlite3/releases/tag/v11.9.1)
22
- - **SQLite** - [`3.49.1`](https://www.sqlite.org/releaselog/3_49_1.html)
23
- - **SQLite3 Multiple Ciphers** - [`2.1.0`](https://github.com/utelle/SQLite3MultipleCiphers/releases/tag/v2.1.0)
20
+ - **better-sqlite3-multiple-ciphers** - [`11.10.0`](https://github.com/m4heshd/better-sqlite3-multiple-ciphers/releases/tag/v11.10.0)
21
+ - **better-sqlite3** - [`11.10.0`](https://github.com/JoshuaWise/better-sqlite3/releases/tag/v11.10.0)
22
+ - **SQLite** - [`3.49.2`](https://www.sqlite.org/releaselog/3_49_2.html)
23
+ - **SQLite3 Multiple Ciphers** - [`2.1.1`](https://github.com/utelle/SQLite3MultipleCiphers/releases/tag/v2.1.1)
24
24
 
25
25
  - ### Beta
26
26
  - **better-sqlite3-multiple-ciphers** - [`11.0.0-beta.0`](https://github.com/m4heshd/better-sqlite3-multiple-ciphers/releases/tag/v11.0.0-beta.0)
@@ -120,7 +120,7 @@ SQLITE_API LPWSTR sqlite3_win32_utf8_to_unicode(const char*);
120
120
  /*** Begin of #include "sqlite3patched.c" ***/
121
121
  /******************************************************************************
122
122
  ** This file is an amalgamation of many separate C source files from SQLite
123
- ** version 3.49.1. By combining all the individual C code files into this
123
+ ** version 3.49.2. By combining all the individual C code files into this
124
124
  ** single large file, the entire code can be compiled as a single translation
125
125
  ** unit. This allows many compilers to do optimizations that would not be
126
126
  ** possible if the files were compiled separately. Performance improvements
@@ -138,7 +138,7 @@ SQLITE_API LPWSTR sqlite3_win32_utf8_to_unicode(const char*);
138
138
  ** separate file. This file contains only code for the core SQLite library.
139
139
  **
140
140
  ** The content in this amalgamation comes from Fossil check-in
141
- ** 873d4e274b4988d260ba8354a9718324a1c2 with changes in files:
141
+ ** 17144570b0d96ae63cd6f3edca39e27ebd74 with changes in files:
142
142
  **
143
143
  **
144
144
  */
@@ -586,9 +586,9 @@ extern "C" {
586
586
  ** [sqlite3_libversion_number()], [sqlite3_sourceid()],
587
587
  ** [sqlite_version()] and [sqlite_source_id()].
588
588
  */
589
- #define SQLITE_VERSION "3.49.1"
590
- #define SQLITE_VERSION_NUMBER 3049001
591
- #define SQLITE_SOURCE_ID "2025-02-18 13:38:58 873d4e274b4988d260ba8354a9718324a1c26187a4ab4c1cc0227c03d0f10e70"
589
+ #define SQLITE_VERSION "3.49.2"
590
+ #define SQLITE_VERSION_NUMBER 3049002
591
+ #define SQLITE_SOURCE_ID "2025-05-07 10:39:52 17144570b0d96ae63cd6f3edca39e27ebd74925252bbaf6723bcb2f6b4861fb1"
592
592
 
593
593
  /*
594
594
  ** CAPI3REF: Run-Time Library Version Numbers
@@ -19199,6 +19199,7 @@ struct Index {
19199
19199
  unsigned bLowQual:1; /* sqlite_stat1 says this is a low-quality index */
19200
19200
  unsigned bNoQuery:1; /* Do not use this index to optimize queries */
19201
19201
  unsigned bAscKeyBug:1; /* True if the bba7b69f9849b5bf bug applies */
19202
+ unsigned bIdxRowid:1; /* One or more of the index keys is the ROWID */
19202
19203
  unsigned bHasVCol:1; /* Index references one or more VIRTUAL columns */
19203
19204
  unsigned bHasExpr:1; /* Index contains an expression, either a literal
19204
19205
  ** expression, or a reference to a VIRTUAL column */
@@ -97393,6 +97394,7 @@ case OP_MakeRecord: {
97393
97394
  zHdr += sqlite3PutVarint(zHdr, serial_type);
97394
97395
  if( pRec->n ){
97395
97396
  assert( pRec->z!=0 );
97397
+ assert( pRec->z!=(const char*)sqlite3CtypeMap );
97396
97398
  memcpy(zPayload, pRec->z, pRec->n);
97397
97399
  zPayload += pRec->n;
97398
97400
  }
@@ -115620,11 +115622,11 @@ SQLITE_PRIVATE void sqlite3ExprIfTrue(Parse *pParse, Expr *pExpr, int dest, int
115620
115622
  assert( TK_ISNULL==OP_IsNull ); testcase( op==TK_ISNULL );
115621
115623
  assert( TK_NOTNULL==OP_NotNull ); testcase( op==TK_NOTNULL );
115622
115624
  r1 = sqlite3ExprCodeTemp(pParse, pExpr->pLeft, &regFree1);
115623
- sqlite3VdbeTypeofColumn(v, r1);
115625
+ assert( regFree1==0 || regFree1==r1 );
115626
+ if( regFree1 ) sqlite3VdbeTypeofColumn(v, r1);
115624
115627
  sqlite3VdbeAddOp2(v, op, r1, dest);
115625
115628
  VdbeCoverageIf(v, op==TK_ISNULL);
115626
115629
  VdbeCoverageIf(v, op==TK_NOTNULL);
115627
- testcase( regFree1==0 );
115628
115630
  break;
115629
115631
  }
115630
115632
  case TK_BETWEEN: {
@@ -115795,11 +115797,11 @@ SQLITE_PRIVATE void sqlite3ExprIfFalse(Parse *pParse, Expr *pExpr, int dest, int
115795
115797
  case TK_ISNULL:
115796
115798
  case TK_NOTNULL: {
115797
115799
  r1 = sqlite3ExprCodeTemp(pParse, pExpr->pLeft, &regFree1);
115798
- sqlite3VdbeTypeofColumn(v, r1);
115800
+ assert( regFree1==0 || regFree1==r1 );
115801
+ if( regFree1 ) sqlite3VdbeTypeofColumn(v, r1);
115799
115802
  sqlite3VdbeAddOp2(v, op, r1, dest);
115800
115803
  testcase( op==TK_ISNULL ); VdbeCoverageIf(v, op==TK_ISNULL);
115801
115804
  testcase( op==TK_NOTNULL ); VdbeCoverageIf(v, op==TK_NOTNULL);
115802
- testcase( regFree1==0 );
115803
115805
  break;
115804
115806
  }
115805
115807
  case TK_BETWEEN: {
@@ -126493,6 +126495,7 @@ SQLITE_PRIVATE void sqlite3CreateIndex(
126493
126495
  assert( j<=0x7fff );
126494
126496
  if( j<0 ){
126495
126497
  j = pTab->iPKey;
126498
+ pIndex->bIdxRowid = 1;
126496
126499
  }else{
126497
126500
  if( pTab->aCol[j].notNull==0 ){
126498
126501
  pIndex->uniqNotNull = 0;
@@ -139289,48 +139292,48 @@ static const char *const pragCName[] = {
139289
139292
  /* 13 */ "pk",
139290
139293
  /* 14 */ "hidden",
139291
139294
  /* table_info reuses 8 */
139292
- /* 15 */ "schema", /* Used by: table_list */
139293
- /* 16 */ "name",
139295
+ /* 15 */ "name", /* Used by: function_list */
139296
+ /* 16 */ "builtin",
139294
139297
  /* 17 */ "type",
139295
- /* 18 */ "ncol",
139296
- /* 19 */ "wr",
139297
- /* 20 */ "strict",
139298
- /* 21 */ "seqno", /* Used by: index_xinfo */
139299
- /* 22 */ "cid",
139300
- /* 23 */ "name",
139301
- /* 24 */ "desc",
139302
- /* 25 */ "coll",
139303
- /* 26 */ "key",
139304
- /* 27 */ "name", /* Used by: function_list */
139305
- /* 28 */ "builtin",
139306
- /* 29 */ "type",
139307
- /* 30 */ "enc",
139308
- /* 31 */ "narg",
139309
- /* 32 */ "flags",
139310
- /* 33 */ "tbl", /* Used by: stats */
139311
- /* 34 */ "idx",
139312
- /* 35 */ "wdth",
139313
- /* 36 */ "hght",
139314
- /* 37 */ "flgs",
139315
- /* 38 */ "seq", /* Used by: index_list */
139316
- /* 39 */ "name",
139317
- /* 40 */ "unique",
139318
- /* 41 */ "origin",
139319
- /* 42 */ "partial",
139298
+ /* 18 */ "enc",
139299
+ /* 19 */ "narg",
139300
+ /* 20 */ "flags",
139301
+ /* 21 */ "schema", /* Used by: table_list */
139302
+ /* 22 */ "name",
139303
+ /* 23 */ "type",
139304
+ /* 24 */ "ncol",
139305
+ /* 25 */ "wr",
139306
+ /* 26 */ "strict",
139307
+ /* 27 */ "seqno", /* Used by: index_xinfo */
139308
+ /* 28 */ "cid",
139309
+ /* 29 */ "name",
139310
+ /* 30 */ "desc",
139311
+ /* 31 */ "coll",
139312
+ /* 32 */ "key",
139313
+ /* 33 */ "seq", /* Used by: index_list */
139314
+ /* 34 */ "name",
139315
+ /* 35 */ "unique",
139316
+ /* 36 */ "origin",
139317
+ /* 37 */ "partial",
139318
+ /* 38 */ "tbl", /* Used by: stats */
139319
+ /* 39 */ "idx",
139320
+ /* 40 */ "wdth",
139321
+ /* 41 */ "hght",
139322
+ /* 42 */ "flgs",
139320
139323
  /* 43 */ "table", /* Used by: foreign_key_check */
139321
139324
  /* 44 */ "rowid",
139322
139325
  /* 45 */ "parent",
139323
139326
  /* 46 */ "fkid",
139324
- /* index_info reuses 21 */
139325
- /* 47 */ "seq", /* Used by: database_list */
139326
- /* 48 */ "name",
139327
- /* 49 */ "file",
139328
- /* 50 */ "busy", /* Used by: wal_checkpoint */
139329
- /* 51 */ "log",
139330
- /* 52 */ "checkpointed",
139331
- /* collation_list reuses 38 */
139327
+ /* 47 */ "busy", /* Used by: wal_checkpoint */
139328
+ /* 48 */ "log",
139329
+ /* 49 */ "checkpointed",
139330
+ /* 50 */ "seq", /* Used by: database_list */
139331
+ /* 51 */ "name",
139332
+ /* 52 */ "file",
139333
+ /* index_info reuses 27 */
139332
139334
  /* 53 */ "database", /* Used by: lock_status */
139333
139335
  /* 54 */ "status",
139336
+ /* collation_list reuses 33 */
139334
139337
  /* 55 */ "cache_size", /* Used by: default_cache_size */
139335
139338
  /* module_list pragma_list reuses 9 */
139336
139339
  /* 56 */ "timeout", /* Used by: busy_timeout */
@@ -139423,7 +139426,7 @@ static const PragmaName aPragmaName[] = {
139423
139426
  {/* zName: */ "collation_list",
139424
139427
  /* ePragTyp: */ PragTyp_COLLATION_LIST,
139425
139428
  /* ePragFlg: */ PragFlg_Result0,
139426
- /* ColNames: */ 38, 2,
139429
+ /* ColNames: */ 33, 2,
139427
139430
  /* iArg: */ 0 },
139428
139431
  #endif
139429
139432
  #if !defined(SQLITE_OMIT_COMPILEOPTION_DIAGS)
@@ -139458,7 +139461,7 @@ static const PragmaName aPragmaName[] = {
139458
139461
  {/* zName: */ "database_list",
139459
139462
  /* ePragTyp: */ PragTyp_DATABASE_LIST,
139460
139463
  /* ePragFlg: */ PragFlg_Result0,
139461
- /* ColNames: */ 47, 3,
139464
+ /* ColNames: */ 50, 3,
139462
139465
  /* iArg: */ 0 },
139463
139466
  #endif
139464
139467
  #if !defined(SQLITE_OMIT_PAGER_PRAGMAS) && !defined(SQLITE_OMIT_DEPRECATED)
@@ -139538,7 +139541,7 @@ static const PragmaName aPragmaName[] = {
139538
139541
  {/* zName: */ "function_list",
139539
139542
  /* ePragTyp: */ PragTyp_FUNCTION_LIST,
139540
139543
  /* ePragFlg: */ PragFlg_Result0,
139541
- /* ColNames: */ 27, 6,
139544
+ /* ColNames: */ 15, 6,
139542
139545
  /* iArg: */ 0 },
139543
139546
  #endif
139544
139547
  #endif
@@ -139567,17 +139570,17 @@ static const PragmaName aPragmaName[] = {
139567
139570
  {/* zName: */ "index_info",
139568
139571
  /* ePragTyp: */ PragTyp_INDEX_INFO,
139569
139572
  /* ePragFlg: */ PragFlg_NeedSchema|PragFlg_Result1|PragFlg_SchemaOpt,
139570
- /* ColNames: */ 21, 3,
139573
+ /* ColNames: */ 27, 3,
139571
139574
  /* iArg: */ 0 },
139572
139575
  {/* zName: */ "index_list",
139573
139576
  /* ePragTyp: */ PragTyp_INDEX_LIST,
139574
139577
  /* ePragFlg: */ PragFlg_NeedSchema|PragFlg_Result1|PragFlg_SchemaOpt,
139575
- /* ColNames: */ 38, 5,
139578
+ /* ColNames: */ 33, 5,
139576
139579
  /* iArg: */ 0 },
139577
139580
  {/* zName: */ "index_xinfo",
139578
139581
  /* ePragTyp: */ PragTyp_INDEX_INFO,
139579
139582
  /* ePragFlg: */ PragFlg_NeedSchema|PragFlg_Result1|PragFlg_SchemaOpt,
139580
- /* ColNames: */ 21, 6,
139583
+ /* ColNames: */ 27, 6,
139581
139584
  /* iArg: */ 1 },
139582
139585
  #endif
139583
139586
  #if !defined(SQLITE_OMIT_INTEGRITY_CHECK)
@@ -139756,7 +139759,7 @@ static const PragmaName aPragmaName[] = {
139756
139759
  {/* zName: */ "stats",
139757
139760
  /* ePragTyp: */ PragTyp_STATS,
139758
139761
  /* ePragFlg: */ PragFlg_NeedSchema|PragFlg_Result0|PragFlg_SchemaReq,
139759
- /* ColNames: */ 33, 5,
139762
+ /* ColNames: */ 38, 5,
139760
139763
  /* iArg: */ 0 },
139761
139764
  #endif
139762
139765
  #if !defined(SQLITE_OMIT_PAGER_PRAGMAS)
@@ -139775,7 +139778,7 @@ static const PragmaName aPragmaName[] = {
139775
139778
  {/* zName: */ "table_list",
139776
139779
  /* ePragTyp: */ PragTyp_TABLE_LIST,
139777
139780
  /* ePragFlg: */ PragFlg_NeedSchema|PragFlg_Result1,
139778
- /* ColNames: */ 15, 6,
139781
+ /* ColNames: */ 21, 6,
139779
139782
  /* iArg: */ 0 },
139780
139783
  {/* zName: */ "table_xinfo",
139781
139784
  /* ePragTyp: */ PragTyp_TABLE_INFO,
@@ -139852,7 +139855,7 @@ static const PragmaName aPragmaName[] = {
139852
139855
  {/* zName: */ "wal_checkpoint",
139853
139856
  /* ePragTyp: */ PragTyp_WAL_CHECKPOINT,
139854
139857
  /* ePragFlg: */ PragFlg_NeedSchema,
139855
- /* ColNames: */ 50, 3,
139858
+ /* ColNames: */ 47, 3,
139856
139859
  /* iArg: */ 0 },
139857
139860
  #endif
139858
139861
  #if !defined(SQLITE_OMIT_FLAG_PRAGMAS)
@@ -147230,6 +147233,7 @@ static int multiSelect(
147230
147233
  multi_select_end:
147231
147234
  pDest->iSdst = dest.iSdst;
147232
147235
  pDest->nSdst = dest.nSdst;
147236
+ pDest->iSDParm2 = dest.iSDParm2;
147233
147237
  if( pDelete ){
147234
147238
  sqlite3ParserAddCleanup(pParse, sqlite3SelectDeleteGeneric, pDelete);
147235
147239
  }
@@ -151184,6 +151188,7 @@ static void agginfoFree(sqlite3 *db, void *pArg){
151184
151188
  ** * There is no WHERE or GROUP BY or HAVING clauses on the subqueries
151185
151189
  ** * The outer query is a simple count(*) with no WHERE clause or other
151186
151190
  ** extraneous syntax.
151191
+ ** * None of the subqueries are DISTINCT (forumpost/a860f5fb2e 2025-03-10)
151187
151192
  **
151188
151193
  ** Return TRUE if the optimization is undertaken.
151189
151194
  */
@@ -151216,7 +151221,11 @@ static int countOfViewOptimization(Parse *pParse, Select *p){
151216
151221
  if( pSub->op!=TK_ALL && pSub->pPrior ) return 0; /* Must be UNION ALL */
151217
151222
  if( pSub->pWhere ) return 0; /* No WHERE clause */
151218
151223
  if( pSub->pLimit ) return 0; /* No LIMIT clause */
151219
- if( pSub->selFlags & SF_Aggregate ) return 0; /* Not an aggregate */
151224
+ if( pSub->selFlags & (SF_Aggregate|SF_Distinct) ){
151225
+ testcase( pSub->selFlags & SF_Aggregate );
151226
+ testcase( pSub->selFlags & SF_Distinct );
151227
+ return 0; /* Not an aggregate nor DISTINCT */
151228
+ }
151220
151229
  assert( pSub->pHaving==0 ); /* Due to the previous */
151221
151230
  pSub = pSub->pPrior; /* Repeat over compound */
151222
151231
  }while( pSub );
@@ -167047,7 +167056,7 @@ static int whereLoopAddBtreeIndex(
167047
167056
  if( (pNew->wsFlags & WHERE_TOP_LIMIT)==0
167048
167057
  && pNew->u.btree.nEq<pProbe->nColumn
167049
167058
  && (pNew->u.btree.nEq<pProbe->nKeyCol ||
167050
- pProbe->idxType!=SQLITE_IDXTYPE_PRIMARYKEY)
167059
+ (pProbe->idxType!=SQLITE_IDXTYPE_PRIMARYKEY && !pProbe->bIdxRowid))
167051
167060
  ){
167052
167061
  if( pNew->u.btree.nEq>3 ){
167053
167062
  sqlite3ProgressCheck(pParse);
@@ -256069,7 +256078,7 @@ static void fts5SourceIdFunc(
256069
256078
  ){
256070
256079
  assert( nArg==0 );
256071
256080
  UNUSED_PARAM2(nArg, apUnused);
256072
- sqlite3_result_text(pCtx, "fts5: 2025-02-18 13:38:58 873d4e274b4988d260ba8354a9718324a1c26187a4ab4c1cc0227c03d0f10e70", -1, SQLITE_TRANSIENT);
256081
+ sqlite3_result_text(pCtx, "fts5: 2025-05-07 10:39:52 17144570b0d96ae63cd6f3edca39e27ebd74925252bbaf6723bcb2f6b4861fb1", -1, SQLITE_TRANSIENT);
256073
256082
  }
256074
256083
 
256075
256084
  /*
@@ -261896,9 +261905,9 @@ SQLITE_API const char *sqlite3_sourceid(void){ return SQLITE_SOURCE_ID; }
261896
261905
 
261897
261906
  #define SQLITE3MC_VERSION_MAJOR 2
261898
261907
  #define SQLITE3MC_VERSION_MINOR 1
261899
- #define SQLITE3MC_VERSION_RELEASE 0
261908
+ #define SQLITE3MC_VERSION_RELEASE 1
261900
261909
  #define SQLITE3MC_VERSION_SUBRELEASE 0
261901
- #define SQLITE3MC_VERSION_STRING "SQLite3 Multiple Ciphers 2.1.0"
261910
+ #define SQLITE3MC_VERSION_STRING "SQLite3 Multiple Ciphers 2.1.1"
261902
261911
 
261903
261912
  #endif /* SQLITE3MC_VERSION_H_ */
261904
261913
  /*** End of #include "sqlite3mc_version.h" ***/
@@ -262057,9 +262066,9 @@ extern "C" {
262057
262066
  ** [sqlite3_libversion_number()], [sqlite3_sourceid()],
262058
262067
  ** [sqlite_version()] and [sqlite_source_id()].
262059
262068
  */
262060
- #define SQLITE_VERSION "3.49.1"
262061
- #define SQLITE_VERSION_NUMBER 3049001
262062
- #define SQLITE_SOURCE_ID "2025-02-18 13:38:58 873d4e274b4988d260ba8354a9718324a1c26187a4ab4c1cc0227c03d0f10e70"
262069
+ #define SQLITE_VERSION "3.49.2"
262070
+ #define SQLITE_VERSION_NUMBER 3049002
262071
+ #define SQLITE_SOURCE_ID "2025-05-07 10:39:52 17144570b0d96ae63cd6f3edca39e27ebd74925252bbaf6723bcb2f6b4861fb1"
262063
262072
 
262064
262073
  /*
262065
262074
  ** CAPI3REF: Run-Time Library Version Numbers
@@ -329621,7 +329630,7 @@ sqlite3mcBtreeSetPageSize(Btree* p, int pageSize, int nReserve, int iFix)
329621
329630
  ** Change 4: Call sqlite3mcBtreeSetPageSize instead of sqlite3BtreeSetPageSize for main database
329622
329631
  ** (sqlite3mcBtreeSetPageSize allows to reduce the number of reserved bytes)
329623
329632
  **
329624
- ** This code is generated by the script rekeyvacuum.sh from SQLite version 3.49.1 amalgamation.
329633
+ ** This code is generated by the script rekeyvacuum.sh from SQLite version 3.49.2 amalgamation.
329625
329634
  */
329626
329635
  SQLITE_PRIVATE SQLITE_NOINLINE int sqlite3mcRunVacuumForRekey(
329627
329636
  char **pzErrMsg, /* Write error message here */
@@ -339433,8 +339442,7 @@ int sqlite3_series_init(sqlite3* db, char** pzErrMsg, const sqlite3_api_routines
339433
339442
  ** step HIDDEN
339434
339443
  ** );
339435
339444
  **
339436
- ** The virtual table also has a rowid, logically equivalent to n+1 where
339437
- ** "n" is the ascending integer in the aforesaid production definition.
339445
+ ** The virtual table also has a rowid which is an alias for the value.
339438
339446
  **
339439
339447
  ** Function arguments in queries against this virtual table are translated
339440
339448
  ** into equality constraints against successive hidden columns. In other
@@ -339490,6 +339498,7 @@ SQLITE_EXTENSION_INIT1
339490
339498
  #include <assert.h>
339491
339499
  #include <string.h>
339492
339500
  #include <limits.h>
339501
+ #include <math.h>
339493
339502
 
339494
339503
  #ifndef SQLITE_OMIT_VIRTUALTABLE
339495
339504
  /*
@@ -339650,6 +339659,7 @@ static int seriesConnect(
339650
339659
  int rc;
339651
339660
 
339652
339661
  /* Column numbers */
339662
+ #define SERIES_COLUMN_ROWID (-1)
339653
339663
  #define SERIES_COLUMN_VALUE 0
339654
339664
  #define SERIES_COLUMN_START 1
339655
339665
  #define SERIES_COLUMN_STOP 2
@@ -339737,13 +339747,11 @@ static int seriesColumn(
339737
339747
  #endif
339738
339748
 
339739
339749
  /*
339740
- ** Return the rowid for the current row, logically equivalent to n+1 where
339741
- ** "n" is the ascending integer in the aforesaid production definition.
339750
+ ** The rowid is the same as the value.
339742
339751
  */
339743
339752
  static int seriesRowid(sqlite3_vtab_cursor *cur, sqlite_int64 *pRowid){
339744
339753
  series_cursor *pCur = (series_cursor*)cur;
339745
- sqlite3_uint64 n = pCur->ss.uSeqIndexNow;
339746
- *pRowid = (sqlite3_int64)((n<LARGEST_UINT64)? n+1 : 0);
339754
+ *pRowid = pCur->ss.iValueNow;
339747
339755
  return SQLITE_OK;
339748
339756
  }
339749
339757
 
@@ -339856,25 +339864,52 @@ static int seriesFilter(
339856
339864
  ** constraints on the "value" column.
339857
339865
  */
339858
339866
  if( idxNum & 0x0080 ){
339859
- iMin = iMax = sqlite3_value_int64(argv[i++]);
339867
+ if( sqlite3_value_numeric_type(argv[i])==SQLITE_FLOAT ){
339868
+ double r = sqlite3_value_double(argv[i++]);
339869
+ if( r==ceil(r) ){
339870
+ iMin = iMax = (sqlite3_int64)r;
339871
+ }else{
339872
+ returnNoRows = 1;
339873
+ }
339874
+ }else{
339875
+ iMin = iMax = sqlite3_value_int64(argv[i++]);
339876
+ }
339860
339877
  }else{
339861
339878
  if( idxNum & 0x0300 ){
339862
- iMin = sqlite3_value_int64(argv[i++]);
339863
- if( idxNum & 0x0200 ){
339864
- if( iMin==LARGEST_INT64 ){
339865
- returnNoRows = 1;
339879
+ if( sqlite3_value_numeric_type(argv[i])==SQLITE_FLOAT ){
339880
+ double r = sqlite3_value_double(argv[i++]);
339881
+ if( idxNum & 0x0200 && r==ceil(r) ){
339882
+ iMin = (sqlite3_int64)ceil(r+1.0);
339866
339883
  }else{
339867
- iMin++;
339884
+ iMin = (sqlite3_int64)ceil(r);
339885
+ }
339886
+ }else{
339887
+ iMin = sqlite3_value_int64(argv[i++]);
339888
+ if( idxNum & 0x0200 ){
339889
+ if( iMin==LARGEST_INT64 ){
339890
+ returnNoRows = 1;
339891
+ }else{
339892
+ iMin++;
339893
+ }
339868
339894
  }
339869
339895
  }
339870
339896
  }
339871
339897
  if( idxNum & 0x3000 ){
339872
- iMax = sqlite3_value_int64(argv[i++]);
339873
- if( idxNum & 0x2000 ){
339874
- if( iMax==SMALLEST_INT64 ){
339875
- returnNoRows = 1;
339898
+ if( sqlite3_value_numeric_type(argv[i])==SQLITE_FLOAT ){
339899
+ double r = sqlite3_value_double(argv[i++]);
339900
+ if( (idxNum & 0x2000)!=0 && r==floor(r) ){
339901
+ iMax = (sqlite3_int64)(r-1.0);
339876
339902
  }else{
339877
- iMax--;
339903
+ iMax = (sqlite3_int64)floor(r);
339904
+ }
339905
+ }else{
339906
+ iMax = sqlite3_value_int64(argv[i++]);
339907
+ if( idxNum & 0x2000 ){
339908
+ if( iMax==SMALLEST_INT64 ){
339909
+ returnNoRows = 1;
339910
+ }else{
339911
+ iMax--;
339912
+ }
339878
339913
  }
339879
339914
  }
339880
339915
  }
@@ -339893,8 +339928,7 @@ static int seriesFilter(
339893
339928
  pCur->ss.iBase += ((d+szStep-1)/szStep)*szStep;
339894
339929
  }
339895
339930
  if( pCur->ss.iTerm>iMax ){
339896
- sqlite3_uint64 d = pCur->ss.iTerm - iMax;
339897
- pCur->ss.iTerm -= ((d+szStep-1)/szStep)*szStep;
339931
+ pCur->ss.iTerm = iMax;
339898
339932
  }
339899
339933
  }else{
339900
339934
  sqlite3_int64 szStep = -pCur->ss.iStep;
@@ -339904,8 +339938,7 @@ static int seriesFilter(
339904
339938
  pCur->ss.iBase -= ((d+szStep-1)/szStep)*szStep;
339905
339939
  }
339906
339940
  if( pCur->ss.iTerm<iMin ){
339907
- sqlite3_uint64 d = iMin - pCur->ss.iTerm;
339908
- pCur->ss.iTerm += ((d+szStep-1)/szStep)*szStep;
339941
+ pCur->ss.iTerm = iMin;
339909
339942
  }
339910
339943
  }
339911
339944
  }
@@ -340033,7 +340066,10 @@ static int seriesBestIndex(
340033
340066
  continue;
340034
340067
  }
340035
340068
  if( pConstraint->iColumn<SERIES_COLUMN_START ){
340036
- if( pConstraint->iColumn==SERIES_COLUMN_VALUE && pConstraint->usable ){
340069
+ if( (pConstraint->iColumn==SERIES_COLUMN_VALUE ||
340070
+ pConstraint->iColumn==SERIES_COLUMN_ROWID)
340071
+ && pConstraint->usable
340072
+ ){
340037
340073
  switch( op ){
340038
340074
  case SQLITE_INDEX_CONSTRAINT_EQ:
340039
340075
  case SQLITE_INDEX_CONSTRAINT_IS: {
@@ -31,9 +31,9 @@
31
31
 
32
32
  #define SQLITE3MC_VERSION_MAJOR 2
33
33
  #define SQLITE3MC_VERSION_MINOR 1
34
- #define SQLITE3MC_VERSION_RELEASE 0
34
+ #define SQLITE3MC_VERSION_RELEASE 1
35
35
  #define SQLITE3MC_VERSION_SUBRELEASE 0
36
- #define SQLITE3MC_VERSION_STRING "SQLite3 Multiple Ciphers 2.1.0"
36
+ #define SQLITE3MC_VERSION_STRING "SQLite3 Multiple Ciphers 2.1.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.49.1"
196
- #define SQLITE_VERSION_NUMBER 3049001
197
- #define SQLITE_SOURCE_ID "2025-02-18 13:38:58 873d4e274b4988d260ba8354a9718324a1c26187a4ab4c1cc0227c03d0f10e70"
195
+ #define SQLITE_VERSION "3.49.2"
196
+ #define SQLITE_VERSION_NUMBER 3049002
197
+ #define SQLITE_SOURCE_ID "2025-05-07 10:39:52 17144570b0d96ae63cd6f3edca39e27ebd74925252bbaf6723bcb2f6b4861fb1"
198
198
 
199
199
  /*
200
200
  ** CAPI3REF: Run-Time Library Version Numbers
package/deps/sqlite3.gyp CHANGED
@@ -52,9 +52,9 @@
52
52
  'direct_dependent_settings': {
53
53
  'include_dirs': ['<(SHARED_INTERMEDIATE_DIR)/sqlite3/'],
54
54
  },
55
- 'cflags': ['-std=c99', '-w', '-maes', '-msse4.2'],
55
+ 'cflags': ['-std=c99', '-w'],
56
56
  'xcode_settings': {
57
- 'OTHER_CFLAGS': ['-std=c99', '-maes', '-msse4.2'],
57
+ 'OTHER_CFLAGS': ['-std=c99'],
58
58
  'WARNING_CFLAGS': ['-w'],
59
59
  },
60
60
  'conditions': [
@@ -66,15 +66,6 @@
66
66
  'SQLITE_ENABLE_COLUMN_METADATA',
67
67
  ],
68
68
  }],
69
- ['OS=="win"', {
70
- 'cflags!': ['-maes', '-msse4.2'],
71
- }],
72
- ['target_arch=="arm64"', {
73
- 'cflags!': ['-maes', '-msse4.2'],
74
- }],
75
- ['target_arch=="arm"', {
76
- 'cflags!': ['-maes', '-msse4.2'],
77
- }],
78
69
  ],
79
70
  'configurations': {
80
71
  'Debug': {
@@ -21,8 +21,8 @@
21
21
  # ===
22
22
 
23
23
  YEAR="2025"
24
- VERSION="3490100"
25
- SQLITE3MC_VERSION="v2.1.0"
24
+ VERSION="3490200"
25
+ SQLITE3MC_VERSION="v2.1.1"
26
26
 
27
27
  # Defines below are sorted alphabetically
28
28
  DEFINES="
@@ -63,6 +63,9 @@ const wrapTransaction = (apply, fn, db, { begin, commit, rollback, savepoint, re
63
63
  before.run();
64
64
  try {
65
65
  const result = apply.call(fn, this, arguments);
66
+ if (result && typeof result.then === 'function') {
67
+ throw new TypeError('Transaction function cannot return a promise');
68
+ }
66
69
  after.run();
67
70
  return result;
68
71
  } catch (ex) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "better-sqlite3-multiple-ciphers",
3
- "version": "11.9.1",
3
+ "version": "11.10.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>",