aboutsummaryrefslogtreecommitdiff
path: root/ext
diff options
context:
space:
mode:
authorstephan <stephan@noemail.net>2025-03-14 11:14:52 +0000
committerstephan <stephan@noemail.net>2025-03-14 11:14:52 +0000
commit5390f95f071ae83d2d89742b7a94ec1bfec6f6ff (patch)
tree3eba9019d68ded8463afa908365f262326ede5d9 /ext
parent69eaadbee3dc5912aba995288bfb20eeeb1222e6 (diff)
parent1560045c328e5dc3b9a09e9c975b8626f984ef4f (diff)
downloadsqlite-5390f95f071ae83d2d89742b7a94ec1bfec6f6ff.tar.gz
sqlite-5390f95f071ae83d2d89742b7a94ec1bfec6f6ff.zip
Minor doc corrections for the sahpool-digest fix and merge in current trunk.
FossilOrigin-Name: 500f2e6ec74b4c0e4ac0365ba4e0d81ed6df8dd09dc0f8af65d294c3453f8865
Diffstat (limited to 'ext')
-rw-r--r--ext/expert/sqlite3expert.c2
-rw-r--r--ext/fts3/README.syntax10
-rw-r--r--ext/fts3/fts3.c6
-rw-r--r--ext/fts3/fts3Int.h2
-rw-r--r--ext/fts3/fts3_expr.c2
-rw-r--r--ext/fts3/fts3_porter.c2
-rw-r--r--ext/fts3/fts3_write.c4
-rw-r--r--ext/fts3/unicode/mkunicode.tcl2
-rw-r--r--ext/fts5/fts5_aux.c2
-rw-r--r--ext/fts5/fts5_buffer.c2
-rw-r--r--ext/fts5/fts5_expr.c2
-rw-r--r--ext/fts5/fts5_hash.c4
-rw-r--r--ext/fts5/fts5_index.c2
-rw-r--r--ext/fts5/test/fts5simple3.test2
-rw-r--r--ext/jni/GNUmakefile2
-rw-r--r--ext/jni/README.md2
-rw-r--r--ext/jni/src/c/sqlite3-jni.c4
-rw-r--r--ext/jni/src/org/sqlite/jni/capi/CApi.java4
-rw-r--r--ext/jni/src/org/sqlite/jni/capi/CallbackProxy.java2
-rw-r--r--ext/jni/src/org/sqlite/jni/capi/PrepareMultiCallback.java2
-rw-r--r--ext/jni/src/org/sqlite/jni/test-script-interpreter.md2
-rw-r--r--ext/jni/src/org/sqlite/jni/wrapper1/Sqlite.java2
-rw-r--r--ext/lsm1/lsmInt.h2
-rw-r--r--ext/lsm1/lsm_ckpt.c2
-rw-r--r--ext/lsm1/lsm_sorted.c6
-rw-r--r--ext/misc/amatch.c4
-rw-r--r--ext/misc/btreeinfo.c2
-rw-r--r--ext/misc/completion.c7
-rw-r--r--ext/misc/csv.c2
-rw-r--r--ext/misc/decimal.c7
-rw-r--r--ext/misc/fuzzer.c4
-rw-r--r--ext/misc/ieee754.c2
-rw-r--r--ext/misc/normalize.c2
-rw-r--r--ext/misc/percentile.c2
-rw-r--r--ext/misc/series.c8
-rw-r--r--ext/misc/shathree.c2
-rw-r--r--ext/misc/uint.c2
-rw-r--r--ext/misc/vfstrace.c2
-rw-r--r--ext/rbu/sqlite3rbu.c2
-rw-r--r--ext/rbu/sqlite3rbu.h4
-rw-r--r--ext/recover/recoverslowidx.test2
-rw-r--r--ext/recover/sqlite3recover.c46
-rw-r--r--ext/rtree/README2
-rw-r--r--ext/rtree/geopoly.c2
-rw-r--r--ext/rtree/rtree.c2
-rw-r--r--ext/rtree/rtreedoc2.test2
-rw-r--r--ext/session/sqlite3session.c2
-rw-r--r--ext/wasm/GNUmakefile4
-rw-r--r--ext/wasm/api/sqlite3-api-glue.c-pp.js2
-rw-r--r--ext/wasm/api/sqlite3-api-prologue.js8
-rw-r--r--ext/wasm/api/sqlite3-opfs-async-proxy.js4
-rw-r--r--ext/wasm/api/sqlite3-vfs-opfs-sahpool.c-pp.js18
-rw-r--r--ext/wasm/api/sqlite3-wasm.c10
-rw-r--r--ext/wasm/c-pp.c4
-rw-r--r--ext/wasm/common/whwasmutil.js4
-rw-r--r--ext/wasm/fiddle/index.html2
-rw-r--r--ext/wasm/jaccwabyt/jaccwabyt.js2
-rw-r--r--ext/wasm/jaccwabyt/jaccwabyt.md2
-rw-r--r--ext/wasm/mkwasmbuilds.c2
59 files changed, 136 insertions, 110 deletions
diff --git a/ext/expert/sqlite3expert.c b/ext/expert/sqlite3expert.c
index 93693cfae..ddb36714f 100644
--- a/ext/expert/sqlite3expert.c
+++ b/ext/expert/sqlite3expert.c
@@ -2052,7 +2052,7 @@ sqlite3expert *sqlite3_expert_new(sqlite3 *db, char **pzErrmsg){
sqlite3_set_authorizer(pNew->dbv, idxAuthCallback, (void*)pNew);
}
- /* If an error has occurred, free the new object and reutrn NULL. Otherwise,
+ /* If an error has occurred, free the new object and return NULL. Otherwise,
** return the new sqlite3expert handle. */
if( rc!=SQLITE_OK ){
sqlite3_expert_destroy(pNew);
diff --git a/ext/fts3/README.syntax b/ext/fts3/README.syntax
index 01bc80c5f..d32ae384c 100644
--- a/ext/fts3/README.syntax
+++ b/ext/fts3/README.syntax
@@ -62,20 +62,20 @@
matches rows that contain both the "engineering" and "consultancy" tokens
in the same column with not more than 10 other words between them. It does
not matter which of the two terms occurs first in the document, only that
- they be seperated by only 10 tokens or less. The user may also specify
+ they be separated by only 10 tokens or less. The user may also specify
a different required proximity by adding "/N" immediately after the NEAR
operator, where N is an integer. For example:
<col> MATCH 'engineering NEAR/5 consultancy'
- searches for a row containing an instance of each specified token seperated
+ searches for a row containing an instance of each specified token separated
by not more than 5 other tokens. More than one NEAR operator can be used
in as sequence. For example this query:
<col> MATCH 'reliable NEAR/2 engineering NEAR/5 consultancy'
searches for a row that contains an instance of the token "reliable"
- seperated by not more than two tokens from an instance of "engineering",
+ separated by not more than two tokens from an instance of "engineering",
which is in turn separated by not more than 5 other tokens from an
instance of the term "consultancy". Phrases enclosed in quotes may
also be used as arguments to the NEAR operator.
@@ -146,7 +146,7 @@
<col> MATCH '(hello world) OR (simple example)'
matches documents that contain both "hello" and "world", and documents
- that contain both "simple" and "example". It is not possible to forumlate
+ that contain both "simple" and "example". It is not possible to formulate
such a query using the standard syntax.
2) Instead of separating tokens and phrases by whitespace, an AND operator
@@ -174,7 +174,7 @@
4) Unlike in the standard syntax, where the OR operator has a higher
precedence than the implicit AND operator, when using the enhanced
- syntax implicit and explict AND operators have a higher precedence
+ syntax implicit and explicit AND operators have a higher precedence
than OR operators. Using the enhanced syntax, the following two
queries are equivalent:
diff --git a/ext/fts3/fts3.c b/ext/fts3/fts3.c
index 4f075363b..3771aa8ba 100644
--- a/ext/fts3/fts3.c
+++ b/ext/fts3/fts3.c
@@ -87,7 +87,7 @@
** Here, array { X } means zero or more occurrences of X, adjacent in
** memory. A "position" is an index of a token in the token stream
** generated by the tokenizer. Note that POS_END and POS_COLUMN occur
-** in the same logical place as the position element, and act as sentinals
+** in the same logical place as the position element, and act as sentinels
** ending a position list array. POS_END is 0. POS_COLUMN is 1.
** The positions numbers are not stored literally but rather as two more
** than the difference from the prior position, or the just the position plus
@@ -2639,7 +2639,7 @@ static int fts3DoclistOrMerge(
** sizes of the two inputs, plus enough space for exactly one of the input
** docids to grow.
**
- ** A symetric argument may be made if the doclists are in descending
+ ** A symmetric argument may be made if the doclists are in descending
** order.
*/
aOut = sqlite3_malloc64((i64)n1+n2+FTS3_VARINT_MAX-1+FTS3_BUFFER_PADDING);
@@ -5744,7 +5744,7 @@ static int fts3EvalNext(Fts3Cursor *pCsr){
}
/*
-** Restart interation for expression pExpr so that the next call to
+** Restart iteration for expression pExpr so that the next call to
** fts3EvalNext() visits the first row. Do not allow incremental
** loading or merging of phrase doclists for this iteration.
**
diff --git a/ext/fts3/fts3Int.h b/ext/fts3/fts3Int.h
index 28c4ffb1d..06f3c6efe 100644
--- a/ext/fts3/fts3Int.h
+++ b/ext/fts3/fts3Int.h
@@ -306,7 +306,7 @@ struct Fts3Table {
#endif
#if defined(SQLITE_DEBUG) || defined(SQLITE_TEST)
- /* True to disable the incremental doclist optimization. This is controled
+ /* True to disable the incremental doclist optimization. This is controlled
** by special insert command 'test-no-incr-doclist'. */
int bNoIncrDoclist;
diff --git a/ext/fts3/fts3_expr.c b/ext/fts3/fts3_expr.c
index ce4282dea..ca857835e 100644
--- a/ext/fts3/fts3_expr.c
+++ b/ext/fts3/fts3_expr.c
@@ -657,7 +657,7 @@ static int fts3ExprParse(
/* The isRequirePhrase variable is set to true if a phrase or
** an expression contained in parenthesis is required. If a
- ** binary operator (AND, OR, NOT or NEAR) is encounted when
+ ** binary operator (AND, OR, NOT or NEAR) is encountered when
** isRequirePhrase is set, this is a syntax error.
*/
if( !isPhrase && isRequirePhrase ){
diff --git a/ext/fts3/fts3_porter.c b/ext/fts3/fts3_porter.c
index fbe791302..35e81b74a 100644
--- a/ext/fts3/fts3_porter.c
+++ b/ext/fts3/fts3_porter.c
@@ -256,7 +256,7 @@ static int star_oh(const char *z){
/*
** If the word ends with zFrom and xCond() is true for the stem
-** of the word that preceeds the zFrom ending, then change the
+** of the word that precedes the zFrom ending, then change the
** ending to zTo.
**
** The input word *pz and zFrom are both in reverse order. zTo
diff --git a/ext/fts3/fts3_write.c b/ext/fts3/fts3_write.c
index 5a449dec1..55a3f0a82 100644
--- a/ext/fts3/fts3_write.c
+++ b/ext/fts3/fts3_write.c
@@ -3956,7 +3956,7 @@ static int fts3IncrmergePush(
**
** It is assumed that the buffer associated with pNode is already large
** enough to accommodate the new entry. The buffer associated with pPrev
-** is extended by this function if requrired.
+** is extended by this function if required.
**
** If an error (i.e. OOM condition) occurs, an SQLite error code is
** returned. Otherwise, SQLITE_OK.
@@ -5619,7 +5619,7 @@ int sqlite3Fts3DeferToken(
/*
** SQLite value pRowid contains the rowid of a row that may or may not be
** present in the FTS3 table. If it is, delete it and adjust the contents
-** of subsiduary data structures accordingly.
+** of subsidiary data structures accordingly.
*/
static int fts3DeleteByRowid(
Fts3Table *p,
diff --git a/ext/fts3/unicode/mkunicode.tcl b/ext/fts3/unicode/mkunicode.tcl
index 1306629da..3bf866ef7 100644
--- a/ext/fts3/unicode/mkunicode.tcl
+++ b/ext/fts3/unicode/mkunicode.tcl
@@ -893,7 +893,7 @@ proc print_test_main {} {
puts "\}"
}
-# Proces the command line arguments. Exit early if they are not to
+# Process the command line arguments. Exit early if they are not to
# our liking.
#
proc usage {} {
diff --git a/ext/fts5/fts5_aux.c b/ext/fts5/fts5_aux.c
index ad578156d..95b33ea31 100644
--- a/ext/fts5/fts5_aux.c
+++ b/ext/fts5/fts5_aux.c
@@ -667,7 +667,7 @@ static int fts5Bm25GetData(
** under consideration.
**
** The problem with this is that if (N < 2*nHit), the IDF is
- ** negative. Which is undesirable. So the mimimum allowable IDF is
+ ** negative. Which is undesirable. So the minimum allowable IDF is
** (1e-6) - roughly the same as a term that appears in just over
** half of set of 5,000,000 documents. */
double idf = log( (nRow - nHit + 0.5) / (nHit + 0.5) );
diff --git a/ext/fts5/fts5_buffer.c b/ext/fts5/fts5_buffer.c
index 891ef0203..afcd83b6b 100644
--- a/ext/fts5/fts5_buffer.c
+++ b/ext/fts5/fts5_buffer.c
@@ -308,7 +308,7 @@ char *sqlite3Fts5Strndup(int *pRc, const char *pIn, int nIn){
** * The 52 upper and lower case ASCII characters, and
** * The 10 integer ASCII characters.
** * The underscore character "_" (0x5F).
-** * The unicode "subsitute" character (0x1A).
+** * The unicode "substitute" character (0x1A).
*/
int sqlite3Fts5IsBareword(char t){
u8 aBareword[128] = {
diff --git a/ext/fts5/fts5_expr.c b/ext/fts5/fts5_expr.c
index 877c3f79c..dc2f7fb39 100644
--- a/ext/fts5/fts5_expr.c
+++ b/ext/fts5/fts5_expr.c
@@ -3252,7 +3252,7 @@ int sqlite3Fts5ExprInstToken(
}
/*
-** Clear the token mappings for all Fts5IndexIter objects mannaged by
+** Clear the token mappings for all Fts5IndexIter objects managed by
** the expression passed as the only argument.
*/
void sqlite3Fts5ExprClearTokens(Fts5Expr *pExpr){
diff --git a/ext/fts5/fts5_hash.c b/ext/fts5/fts5_hash.c
index 8a9bb3fc9..a33dec9a9 100644
--- a/ext/fts5/fts5_hash.c
+++ b/ext/fts5/fts5_hash.c
@@ -20,7 +20,7 @@ typedef struct Fts5HashEntry Fts5HashEntry;
/*
** This file contains the implementation of an in-memory hash table used
-** to accumulate "term -> doclist" content before it is flused to a level-0
+** to accumulate "term -> doclist" content before it is flushed to a level-0
** segment.
*/
@@ -77,7 +77,7 @@ struct Fts5HashEntry {
};
/*
-** Eqivalent to:
+** Equivalent to:
**
** char *fts5EntryKey(Fts5HashEntry *pEntry){ return zKey; }
*/
diff --git a/ext/fts5/fts5_index.c b/ext/fts5/fts5_index.c
index 93c54ee20..70a4752e2 100644
--- a/ext/fts5/fts5_index.c
+++ b/ext/fts5/fts5_index.c
@@ -6451,7 +6451,7 @@ static void fts5TokendataIterAppendMap(
/*
** Sort the contents of the pT->aMap[] array.
**
-** The sorting algorithm requries a malloc(). If this fails, an error code
+** The sorting algorithm requires a malloc(). If this fails, an error code
** is left in Fts5Index.rc before returning.
*/
static void fts5TokendataIterSortMap(Fts5Index *p, Fts5TokenDataIter *pT){
diff --git a/ext/fts5/test/fts5simple3.test b/ext/fts5/test/fts5simple3.test
index 680448081..bc3ebfc7c 100644
--- a/ext/fts5/test/fts5simple3.test
+++ b/ext/fts5/test/fts5simple3.test
@@ -81,7 +81,7 @@ do_execsql_test 3.0 {
}
#-------------------------------------------------------------------------
-# Test that a crash occuring when the second or subsequent tokens in a
+# Test that a crash occurring when the second or subsequent tokens in a
# phrase matched zero rows has been fixed.
#
do_execsql_test 4.0 {
diff --git a/ext/jni/GNUmakefile b/ext/jni/GNUmakefile
index 1c4e9d4e5..668b6e084 100644
--- a/ext/jni/GNUmakefile
+++ b/ext/jni/GNUmakefile
@@ -79,7 +79,7 @@ $(bin.version-info): $(dir.tool)/version-info.c $(sqlite3.h) $(dir.top)/Makefile
$(MAKE) -C $(dir.top) version-info
# Be explicit about which Java files to compile so that we can work on
-# in-progress files without requiring them to be in a compilable statae.
+# in-progress files without requiring them to be in a compilable state.
JAVA_FILES.main := $(patsubst %,$(dir.src.jni)/annotation/%,\
Experimental.java \
NotNull.java \
diff --git a/ext/jni/README.md b/ext/jni/README.md
index fc7b5f761..5ad79fce9 100644
--- a/ext/jni/README.md
+++ b/ext/jni/README.md
@@ -169,7 +169,7 @@ deliberately return an error code, instead of segfaulting, when passed
a `null`.
Client-defined callbacks _must never throw exceptions_ unless _very
-explitly documented_ as being throw-safe. Exceptions are generally
+explicitly documented_ as being throw-safe. Exceptions are generally
reserved for higher-level bindings which are constructed to
specifically deal with them and ensure that they do not leak C-level
resources. In some cases, callback handlers are permitted to throw, in
diff --git a/ext/jni/src/c/sqlite3-jni.c b/ext/jni/src/c/sqlite3-jni.c
index 3bde79998..6bd6daaec 100644
--- a/ext/jni/src/c/sqlite3-jni.c
+++ b/ext/jni/src/c/sqlite3-jni.c
@@ -1603,7 +1603,7 @@ static void * NativePointerHolder__get(JNIEnv * env, jobject jNph,
** 2023-11-09: testing has not revealed any measurable performance
** difference between the approach of passing type T to C compared to
** passing pointer-to-T to C, and adding support for the latter
-** everywhere requires sigificantly more code. As of this writing, the
+** everywhere requires significantly more code. As of this writing, the
** older/simpler approach is being applied except for (A) where the
** newer approach has already been applied and (B) hot-spot APIs where
** a difference of microseconds (i.e. below our testing measurement
@@ -3290,7 +3290,7 @@ static void s3jni_rollback_hook_impl(void *pP){
static jobject s3jni_commit_rollback_hook(int isCommit, JNIEnv * const env,
jlong jpDb, jobject jHook){
S3JniDb * ps;
- jobject pOld = 0; /* previous hoook */
+ jobject pOld = 0; /* previous hook */
S3JniHook * pHook; /* ps->hooks.commit|rollback */
S3JniDb_mutex_enter;
diff --git a/ext/jni/src/org/sqlite/jni/capi/CApi.java b/ext/jni/src/org/sqlite/jni/capi/CApi.java
index c495d44ed..13367a610 100644
--- a/ext/jni/src/org/sqlite/jni/capi/CApi.java
+++ b/ext/jni/src/org/sqlite/jni/capi/CApi.java
@@ -264,7 +264,7 @@ public final class CApi {
}
/**
- Convenience overload which is equivalant to passing its arguments
+ Convenience overload which is equivalent to passing its arguments
to sqlite3_bind_nio_buffer() with the values 0 and -1 for the
final two arguments.
*/
@@ -312,7 +312,7 @@ public final class CApi {
The byte range of the buffer may be restricted by providing a
start index and a number of bytes. beginPos may not be negative.
- Negative howMany is interpretated as the remainder of the buffer
+ Negative howMany is interpreted as the remainder of the buffer
past the given start position, up to the buffer's limit() (as
opposed its capacity()).
diff --git a/ext/jni/src/org/sqlite/jni/capi/CallbackProxy.java b/ext/jni/src/org/sqlite/jni/capi/CallbackProxy.java
index 7df748e8d..ffd776119 100644
--- a/ext/jni/src/org/sqlite/jni/capi/CallbackProxy.java
+++ b/ext/jni/src/org/sqlite/jni/capi/CallbackProxy.java
@@ -18,7 +18,7 @@ package org.sqlite.jni.capi;
classes which have a call() method implementing some specific
callback interface on behalf of the C library.
- <p>Unless very explicitely documented otherwise, callbacks must
+ <p>Unless very explicitly documented otherwise, callbacks must
never throw. Any which do throw but should not might trigger debug
output regarding the error, but the exception will not be
propagated. For callback interfaces which support returning error
diff --git a/ext/jni/src/org/sqlite/jni/capi/PrepareMultiCallback.java b/ext/jni/src/org/sqlite/jni/capi/PrepareMultiCallback.java
index 9f6dd478c..af242fb3c 100644
--- a/ext/jni/src/org/sqlite/jni/capi/PrepareMultiCallback.java
+++ b/ext/jni/src/org/sqlite/jni/capi/PrepareMultiCallback.java
@@ -20,7 +20,7 @@ public interface PrepareMultiCallback extends CallbackProxy {
/**
Gets passed a sqlite3_stmt which it may handle in arbitrary ways,
- transfering ownership of it to this function.
+ transferring ownership of it to this function.
sqlite3_prepare_multi() will _not_ finalize st - it is up
to the call() implementation how st is handled.
diff --git a/ext/jni/src/org/sqlite/jni/test-script-interpreter.md b/ext/jni/src/org/sqlite/jni/test-script-interpreter.md
index 939f77e1b..c10122349 100644
--- a/ext/jni/src/org/sqlite/jni/test-script-interpreter.md
+++ b/ext/jni/src/org/sqlite/jni/test-script-interpreter.md
@@ -101,7 +101,7 @@ interpreter is in a "verbose" mode, the interpreter might choose to emit
an informational message along the lines of "test script NAME abandoned
due to unsupported command: --whatever".
-The initial implemention will only recognize a few commands. Other
+The initial implementation will only recognize a few commands. Other
commands may be added later. The following is the initial set of
commands:
diff --git a/ext/jni/src/org/sqlite/jni/wrapper1/Sqlite.java b/ext/jni/src/org/sqlite/jni/wrapper1/Sqlite.java
index de131e854..2855d4c25 100644
--- a/ext/jni/src/org/sqlite/jni/wrapper1/Sqlite.java
+++ b/ext/jni/src/org/sqlite/jni/wrapper1/Sqlite.java
@@ -661,7 +661,7 @@ public final class Sqlite implements AutoCloseable {
}
/**
- Equivallent to prepareMulti(X,prepFlags,visitor), where X is
+ Equivalent to prepareMulti(X,prepFlags,visitor), where X is
sql.getBytes(StandardCharsets.UTF_8).
*/
public void prepareMulti(String sql, int prepFlags, PrepareMulti visitor){
diff --git a/ext/lsm1/lsmInt.h b/ext/lsm1/lsmInt.h
index 5060366d0..4e3c5e59c 100644
--- a/ext/lsm1/lsmInt.h
+++ b/ext/lsm1/lsmInt.h
@@ -570,7 +570,7 @@ struct FreelistEntry {
/*
** A snapshot of a database. A snapshot contains all the information required
** to read or write a database file on disk. See the description of struct
-** Database below for futher details.
+** Database below for further details.
*/
struct Snapshot {
Database *pDatabase; /* Database this snapshot belongs to */
diff --git a/ext/lsm1/lsm_ckpt.c b/ext/lsm1/lsm_ckpt.c
index 1c4f788ad..dbfa1a61f 100644
--- a/ext/lsm1/lsm_ckpt.c
+++ b/ext/lsm1/lsm_ckpt.c
@@ -169,7 +169,7 @@
** The argument to this macro must be of type u32. On a little-endian
** architecture, it returns the u32 value that results from interpreting
** the 4 bytes as a big-endian value. On a big-endian architecture, it
-** returns the value that would be produced by intepreting the 4 bytes
+** returns the value that would be produced by interpreting the 4 bytes
** of the input value as a little-endian integer.
*/
#define BYTESWAP32(x) ( \
diff --git a/ext/lsm1/lsm_sorted.c b/ext/lsm1/lsm_sorted.c
index 6e5243e85..a72c8cafb 100644
--- a/ext/lsm1/lsm_sorted.c
+++ b/ext/lsm1/lsm_sorted.c
@@ -2652,7 +2652,7 @@ int lsmSortedLoadFreelist(
void **ppVal, /* OUT: Blob containing LSM free-list */
int *pnVal /* OUT: Size of *ppVal blob in bytes */
){
- MultiCursor *pCsr; /* Cursor used to retreive free-list */
+ MultiCursor *pCsr; /* Cursor used to retrieve free-list */
int rc = LSM_OK; /* Return Code */
assert( pDb->pWorker );
@@ -2764,7 +2764,7 @@ static int mcursorLocationOk(MultiCursor *pCsr, int bDeleteOk){
}
/* If the cursor points to a system key (free-list entry), and the
- ** CURSOR_IGNORE_SYSTEM flag is set, skip thie entry. */
+ ** CURSOR_IGNORE_SYSTEM flag is set, skip this entry. */
if( (pCsr->flags & CURSOR_IGNORE_SYSTEM) && rtTopic(eType)!=0 ){
return 0;
}
@@ -3586,7 +3586,7 @@ static int mergeWorkerBtreeWrite(
Hierarchy *p = &pMW->hier;
lsm_db *pDb = pMW->pDb; /* Database handle */
int rc = LSM_OK; /* Return Code */
- int iLevel; /* Level of b-tree hierachy to write to */
+ int iLevel; /* Level of b-tree hierarchy to write to */
int nData; /* Size of aData[] in bytes */
u8 *aData; /* Page data for level iLevel */
int iOff; /* Offset on b-tree page to write record to */
diff --git a/ext/misc/amatch.c b/ext/misc/amatch.c
index dd9bee53d..b3fcbac50 100644
--- a/ext/misc/amatch.c
+++ b/ext/misc/amatch.c
@@ -482,9 +482,9 @@ struct amatch_rule {
amatch_rule *pNext; /* Next rule in order of increasing rCost */
char *zFrom; /* Transform from (a string from user input) */
amatch_cost rCost; /* Cost of this transformation */
- amatch_langid iLang; /* The langauge to which this rule belongs */
+ amatch_langid iLang; /* The language to which this rule belongs */
amatch_len nFrom, nTo; /* Length of the zFrom and zTo strings */
- char zTo[4]; /* Tranform to V.W value (extra space appended) */
+ char zTo[4]; /* Transform to V.W value (extra space appended) */
};
/*
diff --git a/ext/misc/btreeinfo.c b/ext/misc/btreeinfo.c
index 02f8c0319..9c726f5f1 100644
--- a/ext/misc/btreeinfo.c
+++ b/ext/misc/btreeinfo.c
@@ -49,7 +49,7 @@
** USAGE EXAMPLES:
**
** Show the table btrees in a schema order with the tables with the most
-** rows occuring first:
+** rows occurring first:
**
** SELECT name, nEntry
** FROM sqlite_btreeinfo
diff --git a/ext/misc/completion.c b/ext/misc/completion.c
index 54abc0ae1..0a6db1a22 100644
--- a/ext/misc/completion.c
+++ b/ext/misc/completion.c
@@ -41,6 +41,11 @@ SQLITE_EXTENSION_INIT1
#ifndef SQLITE_OMIT_VIRTUALTABLE
+#ifndef IsAlnum
+#define IsAlnum(X) isalnum((unsigned char)X)
+#endif
+
+
/* completion_vtab is a subclass of sqlite3_vtab which will
** serve as the underlying representation of a completion virtual table
*/
@@ -377,7 +382,7 @@ static int completionFilter(
}
if( pCur->zLine!=0 && pCur->zPrefix==0 ){
int i = pCur->nLine;
- while( i>0 && (isalnum(pCur->zLine[i-1]) || pCur->zLine[i-1]=='_') ){
+ while( i>0 && (IsAlnum(pCur->zLine[i-1]) || pCur->zLine[i-1]=='_') ){
i--;
}
pCur->nPrefix = pCur->nLine - i;
diff --git a/ext/misc/csv.c b/ext/misc/csv.c
index b38500f4b..8331265aa 100644
--- a/ext/misc/csv.c
+++ b/ext/misc/csv.c
@@ -315,7 +315,7 @@ typedef struct CsvTable {
} CsvTable;
/* Allowed values for tstFlags */
-#define CSVTEST_FIDX 0x0001 /* Pretend that constrained searchs cost less*/
+#define CSVTEST_FIDX 0x0001 /* Pretend that constrained search cost less*/
/* A cursor for the CSV virtual table */
typedef struct CsvCursor {
diff --git a/ext/misc/decimal.c b/ext/misc/decimal.c
index 9365ae68b..60488a001 100644
--- a/ext/misc/decimal.c
+++ b/ext/misc/decimal.c
@@ -27,6 +27,9 @@ SQLITE_EXTENSION_INIT1
# define UNUSED_PARAMETER(X) (void)(X)
#endif
+#ifndef IsSpace
+#define IsSpace(X) isspace((unsigned char)X)
+#endif
/* A decimal object */
typedef struct Decimal Decimal;
@@ -76,7 +79,7 @@ static Decimal *decimalNewFromText(const char *zIn, int n){
p->nFrac = 0;
p->a = sqlite3_malloc64( n+1 );
if( p->a==0 ) goto new_from_text_failed;
- for(i=0; isspace(zIn[i]); i++){}
+ for(i=0; IsSpace(zIn[i]); i++){}
if( zIn[i]=='-' ){
p->sign = 1;
i++;
@@ -731,7 +734,7 @@ static void decimalSubFunc(
decimal_free(pB);
}
-/* Aggregate funcion: decimal_sum(X)
+/* Aggregate function: decimal_sum(X)
**
** Works like sum() except that it uses decimal arithmetic for unlimited
** precision.
diff --git a/ext/misc/fuzzer.c b/ext/misc/fuzzer.c
index 03d7af06e..e16d005d9 100644
--- a/ext/misc/fuzzer.c
+++ b/ext/misc/fuzzer.c
@@ -97,7 +97,7 @@
** LIMIT 20
**
** The query above gives the 20 closest words to the $word being tested.
-** (Note that for good performance, the vocubulary.w column should be
+** (Note that for good performance, the vocabulary.w column should be
** indexed.)
**
** A similar query can be used to find all words in the dictionary that
@@ -207,7 +207,7 @@ struct fuzzer_rule {
** Every stem is added to a hash table as it is output. Generation of
** duplicate stems is suppressed.
**
-** Active stems (those that might generate new outputs) are kepts on a linked
+** Active stems (those that might generate new outputs) are kept on a linked
** list sorted by increasing cost. The cost is the sum of rBaseCost and
** pRule->rCost.
*/
diff --git a/ext/misc/ieee754.c b/ext/misc/ieee754.c
index 99489fe9c..5ddb4a2fe 100644
--- a/ext/misc/ieee754.c
+++ b/ext/misc/ieee754.c
@@ -79,7 +79,7 @@
** WITH c(name,bin) AS (VALUES
** ('minimum positive value', x'0000000000000001'),
** ('maximum subnormal value', x'000fffffffffffff'),
-** ('mininum positive nornal value', x'0010000000000000'),
+** ('minimum positive normal value', x'0010000000000000'),
** ('maximum value', x'7fefffffffffffff'))
** SELECT c.name, decimal_mul(ieee754_mantissa(c.bin),pow2.v)
** FROM pow2, c WHERE pow2.x=ieee754_exponent(c.bin);
diff --git a/ext/misc/normalize.c b/ext/misc/normalize.c
index 08d7733b9..800e12911 100644
--- a/ext/misc/normalize.c
+++ b/ext/misc/normalize.c
@@ -286,7 +286,7 @@ static const unsigned char sqlite3CtypeMap[256] = {
#define TK_VARIABLE TK_LITERAL
#define TK_BLOB TK_LITERAL
-/* Disable nuisence warnings about case fall-through */
+/* Disable nuisance warnings about case fall-through */
#if !defined(deliberate_fall_through) && defined(__GCC__) && __GCC__>=7
# define deliberate_fall_through __attribute__((fallthrough));
#else
diff --git a/ext/misc/percentile.c b/ext/misc/percentile.c
index 06865185d..98e45cc3a 100644
--- a/ext/misc/percentile.c
+++ b/ext/misc/percentile.c
@@ -205,7 +205,7 @@ static int percentBinarySearch(Percentile *p, double y, int bExact){
/*
** Generate an error for a percentile function.
**
-** The error format string must have exactly one occurrance of "%%s()"
+** The error format string must have exactly one occurrence of "%%s()"
** (with two '%' characters). That substring will be replaced by the name
** of the function.
*/
diff --git a/ext/misc/series.c b/ext/misc/series.c
index aff979692..04644dd60 100644
--- a/ext/misc/series.c
+++ b/ext/misc/series.c
@@ -139,7 +139,7 @@ static sqlite3_int64 genSeqMember(
smBase += (mxI64 - mxI64/2) * smStep;
}
/* Under UBSAN (or on 1's complement machines), must do this last term
- * in steps to avoid the dreaded (and harmless) signed multiply overlow. */
+ * in steps to avoid the dreaded (and harmless) signed multiply overflow. */
if( ix>=2 ){
sqlite3_int64 ix2 = (sqlite3_int64)ix/2;
smBase += ix2*smStep;
@@ -519,8 +519,7 @@ static int seriesFilter(
pCur->ss.iBase += ((d+szStep-1)/szStep)*szStep;
}
if( pCur->ss.iTerm>iMax ){
- sqlite3_uint64 d = pCur->ss.iTerm - iMax;
- pCur->ss.iTerm -= ((d+szStep-1)/szStep)*szStep;
+ pCur->ss.iTerm = iMax;
}
}else{
sqlite3_int64 szStep = -pCur->ss.iStep;
@@ -530,8 +529,7 @@ static int seriesFilter(
pCur->ss.iBase -= ((d+szStep-1)/szStep)*szStep;
}
if( pCur->ss.iTerm<iMin ){
- sqlite3_uint64 d = iMin - pCur->ss.iTerm;
- pCur->ss.iTerm += ((d+szStep-1)/szStep)*szStep;
+ pCur->ss.iTerm = iMin;
}
}
}
diff --git a/ext/misc/shathree.c b/ext/misc/shathree.c
index fc05a3b73..b08eb813e 100644
--- a/ext/misc/shathree.c
+++ b/ext/misc/shathree.c
@@ -64,7 +64,7 @@
**
** typeof(Y)='blob' The hash is taken over prefix "Bnnn:" followed
** by the binary content of the blob. The "nnn"
-** in the prefix is the mimimum-length decimal
+** in the prefix is the minimum-length decimal
** representation of the byte-length of the blob.
**
** According to the rules above, all of the following SELECT statements
diff --git a/ext/misc/uint.c b/ext/misc/uint.c
index 286314fef..a527b2f07 100644
--- a/ext/misc/uint.c
+++ b/ext/misc/uint.c
@@ -16,7 +16,7 @@
** of digits compare in numeric order.
**
** * Leading zeros are handled properly, in the sense that
-** they do not mess of the maginitude comparison of embedded
+** they do not mess of the magnitude comparison of embedded
** strings of digits. "x00123y" is equal to "x123y".
**
** * Only unsigned integers are recognized. Plus and minus
diff --git a/ext/misc/vfstrace.c b/ext/misc/vfstrace.c
index c274558d1..a3cb12197 100644
--- a/ext/misc/vfstrace.c
+++ b/ext/misc/vfstrace.c
@@ -120,7 +120,7 @@
**
** Individual APIs can be enabled or disabled by name, with or without
** the initial "x" character. For example, to set up for tracing lock
-** primatives only:
+** primitives only:
**
** PRAGMA vfstrace('-all, +Lock,Unlock,ShmLock');
**
diff --git a/ext/rbu/sqlite3rbu.c b/ext/rbu/sqlite3rbu.c
index 36688925d..4509986ee 100644
--- a/ext/rbu/sqlite3rbu.c
+++ b/ext/rbu/sqlite3rbu.c
@@ -4822,7 +4822,7 @@ static int rbuVfsFileSize(sqlite3_file *pFile, sqlite_int64 *pSize){
/* If this is an RBU vacuum operation and this is the target database,
** pretend that it has at least one page. Otherwise, SQLite will not
- ** check for the existance of a *-wal file. rbuVfsRead() contains
+ ** check for the existence of a *-wal file. rbuVfsRead() contains
** similar logic. */
if( rc==SQLITE_OK && *pSize==0
&& p->pRbu && rbuIsVacuum(p->pRbu)
diff --git a/ext/rbu/sqlite3rbu.h b/ext/rbu/sqlite3rbu.h
index 98b441b69..1534877a9 100644
--- a/ext/rbu/sqlite3rbu.h
+++ b/ext/rbu/sqlite3rbu.h
@@ -49,7 +49,7 @@
**
** "RBU" stands for "Resumable Bulk Update". As in a large database update
** transmitted via a wireless network to a mobile device. A transaction
-** applied using this extension is hence refered to as an "RBU update".
+** applied using this extension is hence referred to as an "RBU update".
**
**
** LIMITATIONS
@@ -346,7 +346,7 @@ SQLITE_API sqlite3rbu *sqlite3rbu_open(
** the next call to sqlite3rbu_vacuum() opens a handle that starts a
** new RBU vacuum operation.
**
-** As with sqlite3rbu_open(), Zipvfs users should rever to the comment
+** As with sqlite3rbu_open(), Zipvfs users should refer to the comment
** describing the sqlite3rbu_create_vfs() API function below for
** a description of the complications associated with using RBU with
** zipvfs databases.
diff --git a/ext/recover/recoverslowidx.test b/ext/recover/recoverslowidx.test
index 269105113..36842b8a6 100644
--- a/ext/recover/recoverslowidx.test
+++ b/ext/recover/recoverslowidx.test
@@ -39,6 +39,7 @@ do_test 1.2 {
} [list {*}{
{BEGIN}
{PRAGMA writable_schema = on}
+ {PRAGMA foreign_keys = off}
{PRAGMA encoding = 'UTF-8'}
{PRAGMA page_size = '1024'}
{PRAGMA auto_vacuum = '0'}
@@ -67,6 +68,7 @@ do_test 1.4 {
} [list {*}{
{BEGIN}
{PRAGMA writable_schema = on}
+ {PRAGMA foreign_keys = off}
{PRAGMA encoding = 'UTF-8'}
{PRAGMA page_size = '1024'}
{PRAGMA auto_vacuum = '0'}
diff --git a/ext/recover/sqlite3recover.c b/ext/recover/sqlite3recover.c
index 58d726f59..b13719083 100644
--- a/ext/recover/sqlite3recover.c
+++ b/ext/recover/sqlite3recover.c
@@ -2574,37 +2574,53 @@ static void recoverUninstallWrapper(sqlite3_recover *p){
static void recoverStep(sqlite3_recover *p){
assert( p && p->errCode==SQLITE_OK );
switch( p->eState ){
- case RECOVER_STATE_INIT:
+ case RECOVER_STATE_INIT: {
+ int bUseWrapper = 1;
/* This is the very first call to sqlite3_recover_step() on this object.
*/
recoverSqlCallback(p, "BEGIN");
recoverSqlCallback(p, "PRAGMA writable_schema = on");
+ recoverSqlCallback(p, "PRAGMA foreign_keys = off");
recoverEnterMutex();
- recoverInstallWrapper(p);
/* Open the output database. And register required virtual tables and
** user functions with the new handle. */
recoverOpenOutput(p);
- /* Open transactions on both the input and output databases. */
- sqlite3_file_control(p->dbIn, p->zDb, SQLITE_FCNTL_RESET_CACHE, 0);
- recoverExec(p, p->dbIn, "PRAGMA writable_schema = on");
- recoverExec(p, p->dbIn, "BEGIN");
- if( p->errCode==SQLITE_OK ) p->bCloseTransaction = 1;
- recoverExec(p, p->dbIn, "SELECT 1 FROM sqlite_schema");
- recoverTransferSettings(p);
- recoverOpenRecovery(p);
- recoverCacheSchema(p);
-
- recoverUninstallWrapper(p);
- recoverLeaveMutex();
+ /* Attempt to open a transaction and read page 1 of the input database.
+ ** Two attempts may be made - one with a wrapper installed to ensure
+ ** that the database header is sane, and then if that attempt returns
+ ** SQLITE_NOTADB, then again with no wrapper. The second attempt is
+ ** required for encrypted databases. */
+ if( p->errCode==SQLITE_OK ){
+ do{
+ p->errCode = SQLITE_OK;
+ if( bUseWrapper ) recoverInstallWrapper(p);
+
+ /* Open a transaction on the input database. */
+ sqlite3_file_control(p->dbIn, p->zDb, SQLITE_FCNTL_RESET_CACHE, 0);
+ recoverExec(p, p->dbIn, "PRAGMA writable_schema = on");
+ recoverExec(p, p->dbIn, "BEGIN");
+ if( p->errCode==SQLITE_OK ) p->bCloseTransaction = 1;
+ recoverExec(p, p->dbIn, "SELECT 1 FROM sqlite_schema");
+ recoverTransferSettings(p);
+ recoverOpenRecovery(p);
+ recoverCacheSchema(p);
+
+ if( bUseWrapper ) recoverUninstallWrapper(p);
+ }while( p->errCode==SQLITE_NOTADB
+ && (bUseWrapper--)
+ && SQLITE_OK==sqlite3_exec(p->dbIn, "ROLLBACK", 0, 0, 0)
+ );
+ }
+ recoverLeaveMutex();
recoverExec(p, p->dbOut, "BEGIN");
-
recoverWriteSchema1(p);
p->eState = RECOVER_STATE_WRITING;
break;
+ }
case RECOVER_STATE_WRITING: {
if( p->w1.pTbls==0 ){
diff --git a/ext/rtree/README b/ext/rtree/README
index 3736f45c5..051fd1339 100644
--- a/ext/rtree/README
+++ b/ext/rtree/README
@@ -24,7 +24,7 @@ and query r-tree structures using ordinary SQL statements.
3 and 11. Unlike regular SQLite tables, r-tree tables are strongly
typed.
- The leftmost column is always the pimary key and contains 64-bit
+ The leftmost column is always the primary key and contains 64-bit
integer values. Each subsequent column contains a 32-bit real
value. For each pair of real values, the first (leftmost) must be
less than or equal to the second. R-tree tables may be
diff --git a/ext/rtree/geopoly.c b/ext/rtree/geopoly.c
index 842d014b7..0ae42e7b7 100644
--- a/ext/rtree/geopoly.c
+++ b/ext/rtree/geopoly.c
@@ -771,7 +771,7 @@ static void geopolyBBoxFinal(
** Determine if point (x0,y0) is beneath line segment (x1,y1)->(x2,y2).
** Returns:
**
-** +2 x0,y0 is on the line segement
+** +2 x0,y0 is on the line segment
**
** +1 x0,y0 is beneath line segment
**
diff --git a/ext/rtree/rtree.c b/ext/rtree/rtree.c
index c2e5dad95..21c87bdc7 100644
--- a/ext/rtree/rtree.c
+++ b/ext/rtree/rtree.c
@@ -2105,7 +2105,7 @@ static int rtreeBestIndex(sqlite3_vtab *tab, sqlite3_index_info *pIdxInfo){
}
/*
-** Return the N-dimensional volumn of the cell stored in *p.
+** Return the N-dimensional volume of the cell stored in *p.
*/
static RtreeDValue cellArea(Rtree *pRtree, RtreeCell *p){
RtreeDValue area = (RtreeDValue)1;
diff --git a/ext/rtree/rtreedoc2.test b/ext/rtree/rtreedoc2.test
index ca0c6b31b..6032f32fe 100644
--- a/ext/rtree/rtreedoc2.test
+++ b/ext/rtree/rtreedoc2.test
@@ -116,7 +116,7 @@ set testprefix rtreedoc2-2
# 1-dimensional R*Tree, 4 for a 2-dimensional R*Tree, 6 for a
# 3-dimensional R*Tree, and so forth.
#
-# The second argument refered to above is the length of the list passed
+# The second argument referred to above is the length of the list passed
# as the 3rd parameter to the Tcl script.
#
do_execsql_test 1.0 {
diff --git a/ext/session/sqlite3session.c b/ext/session/sqlite3session.c
index b2654315a..7d6f21255 100644
--- a/ext/session/sqlite3session.c
+++ b/ext/session/sqlite3session.c
@@ -1190,7 +1190,7 @@ static int sessionTableInfo(
/*
** This function is called to initialize the SessionTable.nCol, azCol[]
** abPK[] and azDflt[] members of SessionTable object pTab. If these
-** fields are already initilialized, this function is a no-op.
+** fields are already initialized, this function is a no-op.
**
** If an error occurs, an error code is stored in sqlite3_session.rc and
** non-zero returned. Or, if no error occurs but the table has no primary
diff --git a/ext/wasm/GNUmakefile b/ext/wasm/GNUmakefile
index 2d3e735a6..ec258099f 100644
--- a/ext/wasm/GNUmakefile
+++ b/ext/wasm/GNUmakefile
@@ -327,7 +327,7 @@ endif
# If the canonical build process finds the file
# sqlite3_wasm_extra_init.c in the main wasm build directory, it
# arranges to include that file in the build of sqlite3.wasm and
-# defines SQLITE_EXTRA_INIT=sqlite3_wasm_extra_init.
+# defines SQLITE_EXTRA_INIT_MUTEXED=sqlite3_wasm_extra_init.
#
# sqlite3_wasm_extra_init() must be a function with this signature:
#
@@ -909,7 +909,7 @@ $(sqlite3-node.mjs): $(sqlite3.mjs)
# We need separate copies of certain supplementary JS files for the
# bundler-friendly build. Concretely, any supplemental JS files which
# themselves use importScripts() or Workers or URL() constructors
-# which refer to other in-tree (m)JS files quire a bundler-friendly
+# which refer to other in-tree (m)JS files require a bundler-friendly
# copy.
sqlite3-worker1.js.in := $(dir.api)/sqlite3-worker1.c-pp.js
sqlite3-worker1-promiser.js.in := $(dir.api)/sqlite3-worker1-promiser.c-pp.js
diff --git a/ext/wasm/api/sqlite3-api-glue.c-pp.js b/ext/wasm/api/sqlite3-api-glue.c-pp.js
index a40b83282..a38b9cb5e 100644
--- a/ext/wasm/api/sqlite3-api-glue.c-pp.js
+++ b/ext/wasm/api/sqlite3-api-glue.c-pp.js
@@ -1835,7 +1835,7 @@ globalThis.sqlite3ApiBootstrap.initializers.push(function(sqlite3){
if(!(tgt instanceof StructBinder.StructType)){
toss("Usage error: target object is-not-a StructType.");
}else if(!(func instanceof Function) && !wasm.isPtr(func)){
- toss("Usage errror: expecting a Function or WASM pointer to one.");
+ toss("Usage error: expecting a Function or WASM pointer to one.");
}
if(1===arguments.length){
return (n,f)=>callee(tgt, n, f, applyArgcCheck);
diff --git a/ext/wasm/api/sqlite3-api-prologue.js b/ext/wasm/api/sqlite3-api-prologue.js
index 973d7e49b..719e307e8 100644
--- a/ext/wasm/api/sqlite3-api-prologue.js
+++ b/ext/wasm/api/sqlite3-api-prologue.js
@@ -124,7 +124,7 @@
globalThis.sqlite3ApiBootstrap = function sqlite3ApiBootstrap(
apiConfig = (globalThis.sqlite3ApiConfig || sqlite3ApiBootstrap.defaultConfig)
){
- if(sqlite3ApiBootstrap.sqlite3){ /* already initalized */
+ if(sqlite3ApiBootstrap.sqlite3){ /* already initialized */
(sqlite3ApiBootstrap.sqlite3.config || console).warn(
"sqlite3ApiBootstrap() called multiple times.",
"Config and external initializers are ignored on calls after the first."
@@ -869,7 +869,7 @@ globalThis.sqlite3ApiBootstrap = function sqlite3ApiBootstrap(
Emscripten -sWASM_BIGINT flag, else false. When
enabled, certain 64-bit sqlite3 APIs are enabled which
are not otherwise enabled due to JS/WASM int64
- impedence mismatches.
+ impedance mismatches.
*/
bigIntEnabled: !!config.bigIntEnabled,
/**
@@ -880,7 +880,7 @@ globalThis.sqlite3ApiBootstrap = function sqlite3ApiBootstrap(
/**
When Emscripten compiles with `-sIMPORTED_MEMORY`, it
- initalizes the heap and imports it into wasm, as opposed to
+ initializes the heap and imports it into wasm, as opposed to
the other way around. In this case, the memory is not
available via this.exports.memory.
*/
@@ -1555,7 +1555,7 @@ globalThis.sqlite3ApiBootstrap = function sqlite3ApiBootstrap(
- "memdb": results are undefined.
- "kvvfs": will fail with an I/O error due to strict internal
- requirments of that VFS's xTruncate().
+ requirements of that VFS's xTruncate().
- "unix" and related: will use the WASM build's equivalent of the
POSIX I/O APIs. This will work so long as neither a specific
diff --git a/ext/wasm/api/sqlite3-opfs-async-proxy.js b/ext/wasm/api/sqlite3-opfs-async-proxy.js
index 0028c1025..e10d0dd50 100644
--- a/ext/wasm/api/sqlite3-opfs-async-proxy.js
+++ b/ext/wasm/api/sqlite3-opfs-async-proxy.js
@@ -61,7 +61,7 @@ const installAsyncProxy = function(){
}
/**
- Will hold state copied to this object from the syncronous side of
+ Will hold state copied to this object from the synchronous side of
this API.
*/
const state = Object.create(null);
@@ -722,7 +722,7 @@ const installAsyncProxy = function(){
https://github.com/tomayac/sqlite-wasm/issues/12
- is reporting that this occassionally, under high loads,
+ is reporting that this occasionally, under high loads,
returns 'ok', which leads to the whichOp being 0 (which
isn't a valid operation ID and leads to an exception,
along with a corresponding ugly console log
diff --git a/ext/wasm/api/sqlite3-vfs-opfs-sahpool.c-pp.js b/ext/wasm/api/sqlite3-vfs-opfs-sahpool.c-pp.js
index 81bbcf3c5..f30df3198 100644
--- a/ext/wasm/api/sqlite3-vfs-opfs-sahpool.c-pp.js
+++ b/ext/wasm/api/sqlite3-vfs-opfs-sahpool.c-pp.js
@@ -83,11 +83,11 @@ globalThis.sqlite3ApiBootstrap.initializers.push(function(sqlite3){
/* Part of the fix for
https://github.com/sqlite/sqlite-wasm/issues/97
- Summary: prior to versions 3.49.2 and 3.50.0 computeDigest()
- always computes a value of [0,0] due to overflows, so it does not
- do anything useful. Fixing it invalidates old persistent files,
- so we instead only fix it for files created or updated since the
- bug was discovered and fixed.
+ Summary: prior to version 3.50.0 computeDigest() always computes
+ a value of [0,0] due to overflows, so it does not do anything
+ useful. Fixing it invalidates old persistent files, so we
+ instead only fix it for files created or updated since the bug
+ was discovered and fixed.
This flag determines whether we use the broken legacy
computeDigest() or the v2 variant. We only use this flag for
@@ -97,7 +97,7 @@ globalThis.sqlite3ApiBootstrap.initializers.push(function(sqlite3){
What this means, in terms of db file compatibility between
versions:
- - DBs created with versions older than this fix (<=3.49.1)
+ - DBs created with versions older than this fix (<3.50.0)
can be read by post-fix versions. Such DBs which are written
to in-place (not replaced) by newer versions can still be read
by older versions, as the affected digest is only modified
@@ -110,7 +110,7 @@ globalThis.sqlite3ApiBootstrap.initializers.push(function(sqlite3){
entry is missing the FLAG_COMPUTE_DIGEST_V2 bit so will treat it
as a legacy file.
- This flag is stored in the same memory as the variour
+ This flag is stored in the same memory as the various
SQLITE_OPEN_... flags and we must be careful here to not use a
flag bit which is otherwise relevant for the VFS.
SQLITE_OPEN_MEMORY is handled by sqlite3_open_v2() and friends,
@@ -1163,7 +1163,7 @@ globalThis.sqlite3ApiBootstrap.initializers.push(function(sqlite3){
- `clearOnInit`: (default=false) if truthy, contents and filename
mapping are removed from each SAH it is acquired during
- initalization of the VFS, leaving the VFS's storage in a pristine
+ initialization of the VFS, leaving the VFS's storage in a pristine
state. Use this only for databases which need not survive a page
reload.
@@ -1290,7 +1290,7 @@ globalThis.sqlite3ApiBootstrap.initializers.push(function(sqlite3){
VFS-hosted database file. The result of the resolved Promise when
called this way is the size of the resulting database.
- On succes this routine rewrites the database header bytes in the
+ On success this routine rewrites the database header bytes in the
output file (not the input array) to force disabling of WAL mode.
On a write error, the handle is removed from the pool and made
diff --git a/ext/wasm/api/sqlite3-wasm.c b/ext/wasm/api/sqlite3-wasm.c
index 4af52a969..d9f0f08eb 100644
--- a/ext/wasm/api/sqlite3-wasm.c
+++ b/ext/wasm/api/sqlite3-wasm.c
@@ -128,7 +128,9 @@
#endif
#ifdef SQLITE_WASM_EXTRA_INIT
-# define SQLITE_EXTRA_INIT sqlite3_wasm_extra_init
+/* SQLITE_EXTRA_INIT vs SQLITE_EXTRA_INIT_MUTEXED:
+** see https://sqlite.org/forum/forumpost/14183b98fc0b1dea */
+# define SQLITE_EXTRA_INIT_MUTEXED sqlite3_wasm_extra_init
#endif
/*
@@ -284,7 +286,7 @@ SQLITE_WASM_EXPORT void * sqlite3__wasm_stack_alloc(int n){
/*
** State for the "pseudo-stack" allocator implemented in
** sqlite3__wasm_pstack_xyz(). In order to avoid colliding with
-** Emscripten-controled stack space, it carves out a bit of stack
+** Emscripten-controlled stack space, it carves out a bit of stack
** memory to use for that purpose. This memory ends up in the
** WASM-managed memory, such that routines which manipulate the wasm
** heap can also be used to manipulate this memory.
@@ -311,7 +313,7 @@ SQLITE_WASM_EXPORT void * sqlite3__wasm_pstack_ptr(void){
return PStack.pPos;
}
/*
-** Sets the pstack position poitner to p. Results are undefined if the
+** Sets the pstack position pointer to p. Results are undefined if the
** given value did not come from sqlite3__wasm_pstack_ptr().
*/
SQLITE_WASM_EXPORT void sqlite3__wasm_pstack_restore(unsigned char * p){
@@ -1417,7 +1419,7 @@ int sqlite3__wasm_db_serialize( sqlite3 *pDb, const char *zSchema,
** NULL), or nData is negative, SQLITE_MISUSE are returned.
**
** On success, it creates a new file with the given name, populated
-** with the fist nData bytes of pData. If pData is NULL, the file is
+** with the first nData bytes of pData. If pData is NULL, the file is
** created and/or truncated to nData bytes.
**
** Whether or not directory components of zFilename are created
diff --git a/ext/wasm/c-pp.c b/ext/wasm/c-pp.c
index c67881dd3..318325e93 100644
--- a/ext/wasm/c-pp.c
+++ b/ext/wasm/c-pp.c
@@ -36,7 +36,7 @@
** - `#pragma` is in place for adding "meta-commands", but it does not
** yet have any concrete list of documented commands.
**
-* - `#stderr` outputs its file name, line number, and the remaininder
+* - `#stderr` outputs its file name, line number, and the remainder
** of that line to stderr.
**
** - `#//` acts as a single-line comment, noting that there must be as
@@ -1215,7 +1215,7 @@ static void cmpp_kwd_if(CmppKeyword const * pKw, CmppTokenizer *t){
CmppLevel_push(t);
break;
default:
- cmpp_kwd__misuse(pKw, t, "Unpexected keyword token type");
+ cmpp_kwd__misuse(pKw, t, "Unexpected keyword token type");
break;
}
buul = db_define_has((char const *)t->args.argv[1]);
diff --git a/ext/wasm/common/whwasmutil.js b/ext/wasm/common/whwasmutil.js
index b113b52ec..b4d8f691b 100644
--- a/ext/wasm/common/whwasmutil.js
+++ b/ext/wasm/common/whwasmutil.js
@@ -1769,7 +1769,7 @@ globalThis.WhWasmUtilInstaller = function(target){
/** If true, the constructor emits a warning. The intent is that
this be set to true after bootstrapping of the higher-level
client library is complete, to warn downstream clients that
- they shouldn't be relying on this implemenation detail which
+ they shouldn't be relying on this implementation detail which
does not have a stable interface. */
xArg.FuncPtrAdapter.warnOnUse = false;
@@ -1949,7 +1949,7 @@ globalThis.WhWasmUtilInstaller = function(target){
- `json:dealloc` (results): works exactly like `string:dealloc` but
returns the same thing as the `json` adapter. Note the
- warning in `string:dealloc` regarding maching allocators and
+ warning in `string:dealloc` regarding matching allocators and
deallocators.
The type names for results and arguments are validated when
diff --git a/ext/wasm/fiddle/index.html b/ext/wasm/fiddle/index.html
index f77974931..ca6788ef0 100644
--- a/ext/wasm/fiddle/index.html
+++ b/ext/wasm/fiddle/index.html
@@ -5,7 +5,7 @@
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>SQLite3 Fiddle</title>
<link rel="shortcut icon" href="data:image/x-icon;," type="image/x-icon">
- <!-- to add a togglable terminal-style view, uncomment the following
+ <!-- to add a toggleable terminal-style view, uncomment the following
two lines and ensure that these files are on the web server. -->
<!--script src="jqterm/jqterm-bundle.min.js"></script>
<link rel="stylesheet" href="jqterm/jquery.terminal.min.css"/-->
diff --git a/ext/wasm/jaccwabyt/jaccwabyt.js b/ext/wasm/jaccwabyt/jaccwabyt.js
index 1846441e5..8144e8d62 100644
--- a/ext/wasm/jaccwabyt/jaccwabyt.js
+++ b/ext/wasm/jaccwabyt/jaccwabyt.js
@@ -561,7 +561,7 @@ globalThis.Jaccwabyt = function StructBinderFactory(config){
const dbg = ctor.prototype.debugFlags.__flags;
/*
TODO?: set prototype of descr to an object which can set/fetch
- its prefered representation, e.g. conversion to string or mapped
+ its preferred representation, e.g. conversion to string or mapped
function. Advantage: we can avoid doing that via if/else if/else
in the get/set methods.
*/
diff --git a/ext/wasm/jaccwabyt/jaccwabyt.md b/ext/wasm/jaccwabyt/jaccwabyt.md
index 54029e363..17bba78cc 100644
--- a/ext/wasm/jaccwabyt/jaccwabyt.md
+++ b/ext/wasm/jaccwabyt/jaccwabyt.md
@@ -176,7 +176,7 @@ essentially boils down to:
3. [Feed (2) to the function generated by (1)](#step-3) to create JS
constuctor functions for each struct. This is done at runtime, as
opposed to during a build-process step, and can be set up in such a
- way that it does not require any maintenace after its initial
+ way that it does not require any maintenance after its initial
setup.
4. [Create and use instances of those structs](#step-4).
diff --git a/ext/wasm/mkwasmbuilds.c b/ext/wasm/mkwasmbuilds.c
index ef0358850..e3cd34b00 100644
--- a/ext/wasm/mkwasmbuilds.c
+++ b/ext/wasm/mkwasmbuilds.c
@@ -364,7 +364,7 @@ static void mk_lib_mode(const char *zName /* build name */,
zNM, zName);
pf("\t@ls -la $@\n");
if( LIBMODE_BUNDLER_FRIENDLY & flags ){
- /* Avoid a 3rd occurance of the bug fixed by 65798c09a00662a3,
+ /* Avoid a 3rd occurrence of the bug fixed by 65798c09a00662a3,
** which was (in two cases) caused by makefile refactoring and
** not recognized until after a release was made with the broken
** sqlite3-bundler-friendly.mjs: */