Skip to content

Commit 09f09e1

Browse files
committed
Prepare release of version 1.8.1
- Based on SQLite version 3.44.2
1 parent 987b1e9 commit 09f09e1

File tree

11 files changed

+101
-51
lines changed

11 files changed

+101
-51
lines changed

CHANGELOG.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,17 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
77

88
## [Unreleased]
99

10+
## [1.8.1] - 2023-12-02
11+
12+
### Changed
13+
14+
- Based on SQLite version 3.44.2
15+
- Applied several modifications to improve support for SQLite3 WASM
16+
17+
### Fixed
18+
19+
- Fixed issue [#133](../../issues/133)) - missing API symbols
20+
1021
## [1.8.0] - 2023-11-23
1122

1223
### Added

configure.ac

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ dnl Copyright (C) 2019-2023 Ulrich Telle <[email protected]>
44
dnl
55
dnl This file is covered by the same licence as the entire SQLite3 Multiple Ciphers package.
66

7-
AC_INIT([sqlite3mc], [1.8.0], [[email protected]])
7+
AC_INIT([sqlite3mc], [1.8.1], [[email protected]])
88

99
dnl This is the version tested with, might work with earlier ones.
1010
AC_PREREQ([2.69])

readme.md

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,10 @@ The code was mainly developed under Windows, but was tested under Linux as well.
1010

1111
## Version information
1212

13-
* 1.8.0 - *November 2023*
14-
- Based on SQLite version 3.44.1
15-
- Added new cipher scheme 'ascon128' based on Ascon, a family of lightweight cryptographic algorithms
16-
- Updated CMake support
17-
- Fixed issue #126 - use of quadmath library in VSV extension.
13+
* 1.8.1 - *December 2023*
14+
- Based on SQLite version 3.44.2
15+
- Fixed issue #133 - missing API symbols
16+
- Applied several modifications to improve support for [SQLite3 WASM](https://sqlite.org/wasm/)
1817

1918
For further version information please consult the [CHANGELOG](CHANGELOG.md).
2019

@@ -24,6 +23,6 @@ For further version information please consult the [CHANGELOG](CHANGELOG.md).
2423

2524
## Documentation
2625

27-
Documentation of the currently supported cipher schemes and the C and SQL interfaces is provided already on the [SQLite3MultipleCiphers website](https://utelle.github.io/SQLite3MultipleCiphers/).
26+
Documentation of the currently supported cipher schemes and the C and SQL interfaces is provided on the [SQLite3 Multiple Ciphers website](https://utelle.github.io/SQLite3MultipleCiphers/).
2827

2928
Documentation on how to build the extension can be found on the page [SQLite3 Multiple Ciphers Installation](https://utelle.github.io/SQLite3MultipleCiphers/docs/installation/install_overview/).

src/chacha20poly1305.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -237,7 +237,7 @@ int poly1305_tagcmp(const uint8_t tag1[16], const uint8_t tag2[16])
237237
*/
238238
#if defined(__WASM__)
239239

240-
extern size_t getentropy(void* buf, size_t n);
240+
extern int getentropy(void* buf, size_t n);
241241

242242
static size_t entropy(void* buf, size_t n)
243243
{

src/rekeyvacuum.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
** Change 4: Call sqlite3mcBtreeSetPageSize instead of sqlite3BtreeSetPageSize for main database
2828
** (sqlite3mcBtreeSetPageSize allows to reduce the number of reserved bytes)
2929
**
30-
** This code is generated by the script rekeyvacuum.sh from SQLite version 3.44.1 amalgamation.
30+
** This code is generated by the script rekeyvacuum.sh from SQLite version 3.44.2 amalgamation.
3131
*/
3232
SQLITE_PRIVATE SQLITE_NOINLINE int sqlite3mcRunVacuumForRekey(
3333
char **pzErrMsg, /* Write error message here */

src/shell.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -902,8 +902,8 @@ static PerStreamTags * getDesignatedEmitStream(FILE *pf, unsigned chix,
902902
** chix equals 1 or 2, or for an arbitrary stream when chix == 0.
903903
** In either case, ppst references a caller-owned PerStreamTags
904904
** struct which may be filled in if none of the known writable
905-
** streams is being held by consoleInfo. The ppf parameter is an
906-
** output when chix!=0 and an input when chix==0.
905+
** streams is being held by consoleInfo. The ppf parameter is a
906+
** byref output when chix!=0 and a byref input when chix==0.
907907
*/
908908
static PerStreamTags *
909909
getEmitStreamInfo(unsigned chix, PerStreamTags *ppst,
@@ -916,7 +916,7 @@ getEmitStreamInfo(unsigned chix, PerStreamTags *ppst,
916916
ppstTry = &consoleInfo.pstSetup[chix];
917917
pfEmit = ppst->pf;
918918
}else pfEmit = ppstTry->pf;
919-
if( !isValidStreamInfo(ppst) ){
919+
if( !isValidStreamInfo(ppstTry) ){
920920
pfEmit = (chix > 1)? stderr : stdout;
921921
ppstTry = ppst;
922922
streamOfConsole(pfEmit, ppstTry);

src/sqlite3.c

Lines changed: 26 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/******************************************************************************
22
** This file is an amalgamation of many separate C source files from SQLite
3-
** version 3.44.1. By combining all the individual C code files into this
3+
** version 3.44.2. By combining all the individual C code files into this
44
** single large file, the entire code can be compiled as a single translation
55
** unit. This allows many compilers to do optimizations that would not be
66
** possible if the files were compiled separately. Performance improvements
@@ -18,7 +18,7 @@
1818
** separate file. This file contains only code for the core SQLite library.
1919
**
2020
** The content in this amalgamation comes from Fossil check-in
21-
** d295f48e8f367b066b881780c98bdf980a1d.
21+
** ebead0e7230cd33bcec9f95d2183069565b9.
2222
*/
2323
#define SQLITE_CORE 1
2424
#define SQLITE_AMALGAMATION 1
@@ -459,9 +459,9 @@ extern "C" {
459459
** [sqlite3_libversion_number()], [sqlite3_sourceid()],
460460
** [sqlite_version()] and [sqlite_source_id()].
461461
*/
462-
#define SQLITE_VERSION "3.44.1"
463-
#define SQLITE_VERSION_NUMBER 3044001
464-
#define SQLITE_SOURCE_ID "2023-11-22 14:18:12 d295f48e8f367b066b881780c98bdf980a1d550397d5ba0b0e49842c95b3e8b4"
462+
#define SQLITE_VERSION "3.44.2"
463+
#define SQLITE_VERSION_NUMBER 3044002
464+
#define SQLITE_SOURCE_ID "2023-11-24 11:41:44 ebead0e7230cd33bcec9f95d2183069565b9e709bf745c9b5db65cc0cbf92c0f"
465465

466466
/*
467467
** CAPI3REF: Run-Time Library Version Numbers
@@ -84183,10 +84183,11 @@ static int growOpArray(Vdbe *v, int nOp){
8418384183
** sqlite3CantopenError(lineno)
8418484184
*/
8418584185
static void test_addop_breakpoint(int pc, Op *pOp){
84186-
static int n = 0;
84186+
static u64 n = 0;
8418784187
(void)pc;
8418884188
(void)pOp;
8418984189
n++;
84190+
if( n==LARGEST_UINT64 ) abort(); /* so that n is used, preventing a warning */
8419084191
}
8419184192
#endif
8419284193

@@ -92330,11 +92331,12 @@ SQLITE_API int sqlite3_found_count = 0;
9233092331
** sqlite3CantopenError(lineno)
9233192332
*/
9233292333
static void test_trace_breakpoint(int pc, Op *pOp, Vdbe *v){
92333-
static int n = 0;
92334+
static u64 n = 0;
9233492335
(void)pc;
9233592336
(void)pOp;
9233692337
(void)v;
9233792338
n++;
92339+
if( n==LARGEST_UINT64 ) abort(); /* So that n is used, preventing a warning */
9233892340
}
9233992341
#endif
9234092342

@@ -143612,7 +143614,8 @@ SQLITE_PRIVATE void sqlite3SubqueryColumnTypes(
143612143614
NameContext sNC;
143613143615

143614143616
assert( pSelect!=0 );
143615-
assert( (pSelect->selFlags & SF_Resolved)!=0 );
143617+
testcase( (pSelect->selFlags & SF_Resolved)==0 );
143618+
assert( (pSelect->selFlags & SF_Resolved)!=0 || IN_RENAME_OBJECT );
143616143619
assert( pTab->nCol==pSelect->pEList->nExpr || pParse->nErr>0 );
143617143620
assert( aff==SQLITE_AFF_NONE || aff==SQLITE_AFF_BLOB );
143618143621
if( db->mallocFailed || IN_RENAME_OBJECT ) return;
@@ -241506,18 +241509,24 @@ static void fts5DoSecureDelete(
241506241509

241507241510
iOff = iStart;
241508241511

241509-
/* Set variable bLastInDoclist to true if this entry happens to be
241510-
** the last rowid in the doclist for its term. */
241512+
/* If the position-list for the entry being removed flows over past
241513+
** the end of this page, delete the portion of the position-list on the
241514+
** next page and beyond.
241515+
**
241516+
** Set variable bLastInDoclist to true if this entry happens
241517+
** to be the last rowid in the doclist for its term. */
241518+
if( iNextOff>=iPgIdx ){
241519+
int pgno = pSeg->iLeafPgno+1;
241520+
fts5SecureDeleteOverflow(p, pSeg->pSeg, pgno, &bLastInDoclist);
241521+
iNextOff = iPgIdx;
241522+
}
241523+
241511241524
if( pSeg->bDel==0 ){
241512-
if( iNextOff>=iPgIdx ){
241513-
int pgno = pSeg->iLeafPgno+1;
241514-
fts5SecureDeleteOverflow(p, pSeg->pSeg, pgno, &bLastInDoclist);
241515-
iNextOff = iPgIdx;
241516-
}else{
241525+
if( iNextOff!=iPgIdx ){
241517241526
/* Loop through the page-footer. If iNextOff (offset of the
241518241527
** entry following the one we are removing) is equal to the
241519241528
** offset of a key on this page, then the entry is the last
241520-
** in its doclist. */
241529+
** in its doclist. */
241521241530
int iKeyOff = 0;
241522241531
for(iIdx=0; iIdx<nIdx; /* no-op */){
241523241532
u32 iVal = 0;
@@ -247612,7 +247621,7 @@ static void fts5SourceIdFunc(
247612247621
){
247613247622
assert( nArg==0 );
247614247623
UNUSED_PARAM2(nArg, apUnused);
247615-
sqlite3_result_text(pCtx, "fts5: 2023-11-22 14:18:12 d295f48e8f367b066b881780c98bdf980a1d550397d5ba0b0e49842c95b3e8b4", -1, SQLITE_TRANSIENT);
247624+
sqlite3_result_text(pCtx, "fts5: 2023-11-24 11:41:44 ebead0e7230cd33bcec9f95d2183069565b9e709bf745c9b5db65cc0cbf92c0f", -1, SQLITE_TRANSIENT);
247616247625
}
247617247626

247618247627
/*

src/sqlite3.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -146,9 +146,9 @@ extern "C" {
146146
** [sqlite3_libversion_number()], [sqlite3_sourceid()],
147147
** [sqlite_version()] and [sqlite_source_id()].
148148
*/
149-
#define SQLITE_VERSION "3.44.1"
150-
#define SQLITE_VERSION_NUMBER 3044001
151-
#define SQLITE_SOURCE_ID "2023-11-22 14:18:12 d295f48e8f367b066b881780c98bdf980a1d550397d5ba0b0e49842c95b3e8b4"
149+
#define SQLITE_VERSION "3.44.2"
150+
#define SQLITE_VERSION_NUMBER 3044002
151+
#define SQLITE_SOURCE_ID "2023-11-24 11:41:44 ebead0e7230cd33bcec9f95d2183069565b9e709bf745c9b5db65cc0cbf92c0f"
152152

153153
/*
154154
** CAPI3REF: Run-Time Library Version Numbers

src/sqlite3mc.c

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,31 @@
77
** License: MIT
88
*/
99

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+
1031
/*
1132
** Enable SQLite debug assertions if requested
1233
*/
34+
1335
#ifndef SQLITE_DEBUG
1436
#if defined(SQLITE_ENABLE_DEBUG) && (SQLITE_ENABLE_DEBUG == 1)
1537
#define SQLITE_DEBUG 1

src/sqlite3mc_version.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@
1414

1515
#define SQLITE3MC_VERSION_MAJOR 1
1616
#define SQLITE3MC_VERSION_MINOR 8
17-
#define SQLITE3MC_VERSION_RELEASE 0
17+
#define SQLITE3MC_VERSION_RELEASE 1
1818
#define SQLITE3MC_VERSION_SUBRELEASE 0
19-
#define SQLITE3MC_VERSION_STRING "SQLite3 Multiple Ciphers 1.8.0"
19+
#define SQLITE3MC_VERSION_STRING "SQLite3 Multiple Ciphers 1.8.1"
2020

2121
#endif /* SQLITE3MC_VERSION_H_ */

src/sqlite3patched.c

Lines changed: 26 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/******************************************************************************
22
** This file is an amalgamation of many separate C source files from SQLite
3-
** version 3.44.1. By combining all the individual C code files into this
3+
** version 3.44.2. By combining all the individual C code files into this
44
** single large file, the entire code can be compiled as a single translation
55
** unit. This allows many compilers to do optimizations that would not be
66
** possible if the files were compiled separately. Performance improvements
@@ -18,7 +18,7 @@
1818
** separate file. This file contains only code for the core SQLite library.
1919
**
2020
** The content in this amalgamation comes from Fossil check-in
21-
** d295f48e8f367b066b881780c98bdf980a1d.
21+
** ebead0e7230cd33bcec9f95d2183069565b9.
2222
*/
2323
#define SQLITE_CORE 1
2424
#define SQLITE_AMALGAMATION 1
@@ -459,9 +459,9 @@ extern "C" {
459459
** [sqlite3_libversion_number()], [sqlite3_sourceid()],
460460
** [sqlite_version()] and [sqlite_source_id()].
461461
*/
462-
#define SQLITE_VERSION "3.44.1"
463-
#define SQLITE_VERSION_NUMBER 3044001
464-
#define SQLITE_SOURCE_ID "2023-11-22 14:18:12 d295f48e8f367b066b881780c98bdf980a1d550397d5ba0b0e49842c95b3e8b4"
462+
#define SQLITE_VERSION "3.44.2"
463+
#define SQLITE_VERSION_NUMBER 3044002
464+
#define SQLITE_SOURCE_ID "2023-11-24 11:41:44 ebead0e7230cd33bcec9f95d2183069565b9e709bf745c9b5db65cc0cbf92c0f"
465465

466466
/*
467467
** CAPI3REF: Run-Time Library Version Numbers
@@ -84205,10 +84205,11 @@ static int growOpArray(Vdbe *v, int nOp){
8420584205
** sqlite3CantopenError(lineno)
8420684206
*/
8420784207
static void test_addop_breakpoint(int pc, Op *pOp){
84208-
static int n = 0;
84208+
static u64 n = 0;
8420984209
(void)pc;
8421084210
(void)pOp;
8421184211
n++;
84212+
if( n==LARGEST_UINT64 ) abort(); /* so that n is used, preventing a warning */
8421284213
}
8421384214
#endif
8421484215

@@ -92352,11 +92353,12 @@ SQLITE_API int sqlite3_found_count = 0;
9235292353
** sqlite3CantopenError(lineno)
9235392354
*/
9235492355
static void test_trace_breakpoint(int pc, Op *pOp, Vdbe *v){
92355-
static int n = 0;
92356+
static u64 n = 0;
9235692357
(void)pc;
9235792358
(void)pOp;
9235892359
(void)v;
9235992360
n++;
92361+
if( n==LARGEST_UINT64 ) abort(); /* So that n is used, preventing a warning */
9236092362
}
9236192363
#endif
9236292364

@@ -143639,7 +143641,8 @@ SQLITE_PRIVATE void sqlite3SubqueryColumnTypes(
143639143641
NameContext sNC;
143640143642

143641143643
assert( pSelect!=0 );
143642-
assert( (pSelect->selFlags & SF_Resolved)!=0 );
143644+
testcase( (pSelect->selFlags & SF_Resolved)==0 );
143645+
assert( (pSelect->selFlags & SF_Resolved)!=0 || IN_RENAME_OBJECT );
143643143646
assert( pTab->nCol==pSelect->pEList->nExpr || pParse->nErr>0 );
143644143647
assert( aff==SQLITE_AFF_NONE || aff==SQLITE_AFF_BLOB );
143645143648
if( db->mallocFailed || IN_RENAME_OBJECT ) return;
@@ -241541,18 +241544,24 @@ static void fts5DoSecureDelete(
241541241544

241542241545
iOff = iStart;
241543241546

241544-
/* Set variable bLastInDoclist to true if this entry happens to be
241545-
** the last rowid in the doclist for its term. */
241547+
/* If the position-list for the entry being removed flows over past
241548+
** the end of this page, delete the portion of the position-list on the
241549+
** next page and beyond.
241550+
**
241551+
** Set variable bLastInDoclist to true if this entry happens
241552+
** to be the last rowid in the doclist for its term. */
241553+
if( iNextOff>=iPgIdx ){
241554+
int pgno = pSeg->iLeafPgno+1;
241555+
fts5SecureDeleteOverflow(p, pSeg->pSeg, pgno, &bLastInDoclist);
241556+
iNextOff = iPgIdx;
241557+
}
241558+
241546241559
if( pSeg->bDel==0 ){
241547-
if( iNextOff>=iPgIdx ){
241548-
int pgno = pSeg->iLeafPgno+1;
241549-
fts5SecureDeleteOverflow(p, pSeg->pSeg, pgno, &bLastInDoclist);
241550-
iNextOff = iPgIdx;
241551-
}else{
241560+
if( iNextOff!=iPgIdx ){
241552241561
/* Loop through the page-footer. If iNextOff (offset of the
241553241562
** entry following the one we are removing) is equal to the
241554241563
** offset of a key on this page, then the entry is the last
241555-
** in its doclist. */
241564+
** in its doclist. */
241556241565
int iKeyOff = 0;
241557241566
for(iIdx=0; iIdx<nIdx; /* no-op */){
241558241567
u32 iVal = 0;
@@ -247647,7 +247656,7 @@ static void fts5SourceIdFunc(
247647247656
){
247648247657
assert( nArg==0 );
247649247658
UNUSED_PARAM2(nArg, apUnused);
247650-
sqlite3_result_text(pCtx, "fts5: 2023-11-22 14:18:12 d295f48e8f367b066b881780c98bdf980a1d550397d5ba0b0e49842c95b3e8b4", -1, SQLITE_TRANSIENT);
247659+
sqlite3_result_text(pCtx, "fts5: 2023-11-24 11:41:44 ebead0e7230cd33bcec9f95d2183069565b9e709bf745c9b5db65cc0cbf92c0f", -1, SQLITE_TRANSIENT);
247651247660
}
247652247661

247653247662
/*

0 commit comments

Comments
 (0)