SQLite

Timeline
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

540 check-ins using file src/update.c version 5b0302c4

2023-01-14
19:36
Add OOM check, per tip at forum post 933479b2d5 (Leaf check-in: c66c7734 user: drh tags: branch-3.40)
2023-01-13
19:32
In expression nodes of type REGISTER with sub-type COLUMN, ensure that the iColumn field is set correctly, as otherwise the "IS NULL" operator might be incorrectly optimized. Fix for the problem described by forum post d010a26798915b53. (check-in: 76b440c5 user: drh tags: branch-3.40)
2023-01-05
13:55
Remove the unused sqlite3IsMemdb() routine, to avoid a harmless compiler warning. (check-in: 4f512a39 user: drh tags: branch-3.40)
13:41
Fix a problem with applying integer affinity to a MEM_IntReal value. Forum post d270125fae. (check-in: d28d9398 user: drh tags: branch-3.40)
01:32
Increase the version number to 3.40.2. (check-in: 43375ef8 user: drh tags: branch-3.40)
01:29
In the zipfile extension (which is not part of the SQLite amalgamation, but which is included in the CLI by default) ensure that fopen() is not invoked using a NULL filename. Fix for the issue reported by forum post d1c96a9032e564f8. (check-in: e4de5777 user: drh tags: branch-3.40)
2022-12-28
14:55
Merge the 3.40.1 changes into the reuse-schema branch. (Leaf check-in: 126c68bd user: drh tags: reuse-schema-3.40)
14:03
Version 3.40.1 (check-in: df5c253c user: drh tags: release, version-3.40.1, branch-3.40)
2022-12-27
14:14
Fix a broken assert() in fts5. (check-in: ff1d4561 user: dan tags: branch-3.40)
14:12
Fix a faulty assert() in fts5. (check-in: 4acff807 user: dan tags: branch-3.40)
14:11
Fix an assert() in fts5. Simplify memdb xLock/xUnlock some. (check-in: 43079c52 user: dan tags: branch-3.40)
14:06
Fix a missing 0 at the end of an integer literal in the MEMSYS5 fix. (check-in: e3bc10e8 user: drh tags: branch-3.40)
11:53
Fix minor problems in test scripts where.test and recover1.test. (check-in: 64588bd5 user: dan tags: branch-3.40)
2022-12-26
17:09
Fix an unsafe use of sqlite3_mprintf() in sqlite3_overload_function() identified by forum post: https://sqlite.org/forum/forumpost/95b338860d. (check-in: a3152226 user: drh tags: branch-3.40)
17:02
Prevent the sessions rebaser from generating changesets containing UPDATE records for which non-PK fields are present in the old.* but not the new.* record. Also update the changeset iterator to work around such changesets. (check-in: 629dbe25 user: drh tags: branch-3.40)
16:54
In the unix backend, when implementing the defenses against small file descriptors, delete a file just created if it was opened with O_EXCL|O_CREAT so that it can be created again the next time through the loop. Fix for the problem described by forum post 699af709ab3a8ccf. (check-in: 174acf32 user: drh tags: branch-3.40)
16:45
Fix an over-zealous assert() reported by Yong Heng. (check-in: 1e9dbb5a user: drh tags: branch-3.40)
16:24
Ensure the RETURNING clause is honoured when a row of a temp table is updated by an ON CONFLICT clause. (check-in: ac9568cf user: drh tags: branch-3.40)
16:12
Add the SQLITE_FCNTL_RESET_CACHE verb. Use it to ensure that the page cache is purged before and after a the recovery extension is run. (check-in: 71dd920f user: drh tags: branch-3.40)
16:03
Fix corner cases in UTF8 handling in the REGEXP extension. Forum post 3ffe058b04. (check-in: 93e68b39 user: drh tags: branch-3.40)
15:55
Fix a off-by-one error in code generation that comes up when doing a DISTINCT query against a virtual table with an OR term in the WHERE clause and where the ORDER BY clause has 64 or more references to the result set. Forum post dfe8084751. The error is harmless in production builds, but might cause an assertion fault in a debugging build. (check-in: cbcd7d9b user: drh tags: branch-3.40)
15:44
Fix safe mode authorizer callback to reject disallowed UDFs. Reported at Forum post 07beac8056151b2f. (check-in: 70964b8a user: drh tags: branch-3.40)
15:21
Fix an infinite loop in the MEMSYS5 auxiliary memory allocator that occurs for memory allocations between 500MiB and 1GiB in size. Error introduced by check-in [949133231f8f751a]. The problem only affects builds that include the SQLITE_ENABLE_MEMSYS5 compile-time option. (check-in: c10d40ca user: drh tags: branch-3.40)
2022-12-14
18:06
Rename the new peek/pokeF32() and peek/pokeF64() to peek/poke32f() and peek/poke64f() for consistency with related APIs and because they're easier on both the eyes and the fingers. (check-in: cc86f03e user: stephan tags: trunk)
17:46
Rework the code that computes the datatypes and affinities for subqueries and views. If the subquery/view is constructed from a compound SELECT where the affinity varies across arms of the compound, set the affinity for the corresponding column in the constructed view to be BLOB so that it is allowed to take on any data type. (check-in: 27655c93 user: drh tags: trunk)
16:40
Slight reformulation of some test code to test multi-arg wasm.peek() call form. (check-in: 349bb28f user: stephan tags: trunk)
14:41
If the SELECT that implements a subquery or a VIEW or a CREATE TABLE AS is a compound with different result datatypes on two or more arms of the compound, then the overall column type becomes BLOB (ANY). (Closed-Leaf check-in: 6ebb178c user: drh tags: refactor-subquery-types)
14:40
Use the new peek/poke() variants throughout tester1.js. (check-in: ef7b7835 user: stephan tags: trunk)
14:28
Add convenience variants of sqlite3.wasm.peek/poke() for each numeric type to help reduce errors related to typos in the final argument (type-name strings). If wasm.xWrap.FuncPtrAdapter is called as a function, instead of a constructor, it now behaves as if it were called as a constructor (previously it threw an exception). (check-in: 14e3fc01 user: stephan tags: trunk)
09:06
Back out the part of the change in [88a05141c28e5ff1] that adds affinity to the materialization of a view, as the affinity can be undefined for a compound query. This passes all TCL tests, but shows failures in the TH3 tests derived from forum post 6f842bc5b2dadcb2, presumably because the WHERE clause of the query uses constraints of the form "source_crs_code='8675'" instead of "source_crs_code=8675". Perhaps further changes on this branch should reimplement affinity on joins in cases where the affinity is unambiguous. (check-in: fe5a77bc user: drh tags: refactor-subquery-types)
08:12
Add a test to demonstrate/verify which object acts as "this" in a oo1.DB.exec() callback. (check-in: 8fc4b3f1 user: stephan tags: trunk)
08:01
A micro-optimization in sqlite3.oo1.DB.exec(). Changed the rowMode option of that method to only accept $X instead of $X, @X, and :X, as the extra options are entirely superfluous and may lead to confusion. (check-in: 82a6c7fd user: stephan tags: trunk)
2022-12-13
19:52
Fix a comment in ext/session/test_session.c. (check-in: bd814af1 user: dan tags: trunk)
19:40
Prevent the sessions rebaser from generating changesets containing UPDATE records for which non-PK fields are present in the old.* but not the new.* record. Also update the changeset iterator to work around such changesets. (check-in: f9cd23df user: dan tags: trunk)
16:59
Remove an unused variable from sqlite3SubqueryColumnTypes(). (check-in: c6e3ff39 user: drh tags: refactor-subquery-types)
16:55
Use standard datatype names for the column datatypes in views and subqueries. (check-in: baf2c241 user: drh tags: refactor-subquery-types)
15:54
Refactor the sqlite3SelectAddColumnTypeAndCollation() routine. Improved comments. Now called sqlite3SubqueryColumnTypes(). (check-in: 4dfb1b45 user: drh tags: refactor-subquery-types)
14:59
Add extra test cases for applying sessions module changesets to databases that have been modified using "ALTER TABLE .. ADD COLUMN". (check-in: a7b404f2 user: dan tags: trunk)
13:33
Slightly faster implementation of sqlite3ExprAffinity(). (check-in: 01cf3278 user: drh tags: trunk)
10:54
Document the role of the sqlite3.client JS API property. (check-in: 5f11f1c7 user: stephan tags: trunk)
08:25
Extend the sqlite3.wasm function pointer argument converter to be able to handle the "two-layered context" of sqlite3_create_collation() and friends and make use of FuncPtrAdapter to perform JS-to-WASM function conversion for them. (check-in: 0a60b721 user: stephan tags: trunk)
2022-12-12
21:22
Further fix for ticket [57c47526c34f01e8]. If a subquery has a result set column of the form "CAST(expr AS NUMERIC)" do not give that column NUMERIC affinity. NUMERIC affinity always goes to an integer if able, but a CAST to numeric is a no-op if the input is a number. So the two are not equivalent. (check-in: f0325359 user: drh tags: trunk)
18:58
If a subquery has a result column of the form "CAST(... AS NUMERIC)" then give that column no affinity rather than NUMERIC affinity. This is because casting to numeric preserves real values that could be integers but numeric affinity does not. By using no affinity on the column, we make the behavior consistent if the subquery is implemented as a co-routine or is materialized. (Closed-Leaf check-in: ece07d09 user: drh tags: cast-to-numeric)
18:42
Revert part of [9386d6f63468] because the new automatic function pointer binding cannot properly track per-context function mappings when the context is more complex than a single context-type pointer. e.g. it is fine for sqlite3_trace_v2() but it breaks down with sqlite3_create_collation() because that one needs to use the collation name as part of the context key and we cannot sensibly do so with the current code. (check-in: 6cd21b79 user: stephan tags: trunk)
17:33
Add new logging code SQLITE_NOTICE_RBU and use it when logging for the spurious error that RBU injects into SQLite as part of applying an update. (check-in: cd881d35 user: dan tags: trunk)
14:31
Move JS-to-C binding signatures from sqlite3-api-prologue.js to sqlite3-api-glue.js to allow for use of the new/experimental sqlite3.wasm.xWrap() feature which automatically binds JS functions to WASM/C as needed, which simplifies creation of bindings which take C function pointers. Reimplement sqlite3_exec(), sqlite3_create_collation(), sqlite3_progress_handler() to use this new feature. (check-in: 9386d6f6 user: stephan tags: trunk)
11:38
ext/wasm/module-symbols.html: for C APIs which have extended JS-side semantics, link to the JS-side API docs instead of the C docs. (check-in: d5570152 user: stephan tags: trunk)
11:22
ext/wasm/module-symbols.html: add a hyperlink to the API docs for each exported sqlite3_...() function. (check-in: 01d3a9bb user: stephan tags: trunk)
08:16
Rework the internals of how argument/result types are converted to/from wasm in prep for attempting to support automated conversions of function pointer argument types. (check-in: 58052d82 user: stephan tags: trunk)
07:52
Add sqlite3.mjs to the new 'quick' wasm build for the sake of the snapshot build. (check-in: 5a3f2224 user: stephan tags: trunk)
07:31
Expose sqlite3_txn_state() to wasm. (check-in: f6f3397a user: stephan tags: trunk)
07:27
Expose a number of infrequently-used sqlite3_...() functions to wasm whose absences were noticed while documenting. (check-in: 3144e7c0 user: stephan tags: trunk)
2022-12-11
07:53
Minor build tweaks in ext/wasm to create a faster-running build for the common dev-mode cases. No code changes. (check-in: 6a61b14a user: stephan tags: trunk)
2022-12-10
19:22
Ensure that the types and collation sequences of a view are taken from the leftmost component of compound SELECTs, even when column names are explicitly provided for the view. Fix for ticket [679ed6a282a97c51] (check-in: 6f0bf892 user: dan tags: trunk)
17:54
Ensure that the types and collation sequences of a view are taken from the leftmost component of compound SELECTs, even when column names are explicitly provided for the view. Possible fix for [679ed6a2]. (Closed-Leaf check-in: b0e49aa8 user: dan tags: tkt-679ed6a2)
17:45
Remove -flto from wasm build flags, as it increases build time and doesn't seem to have a measurable benefit. (check-in: 35a88747 user: stephan tags: trunk)
17:20
Correct wasm heap corruption introduced in test code added in [e144fd5c88fa4] which led to unpredictable failures. (check-in: 6c1e07e3 user: stephan tags: trunk)
15:41
Remove two incorrect calls to structType.dipose() which prematurely freed objects in use by the virtual table test/demo code. (check-in: 060eb284 user: stephan tags: trunk)
15:13
Expose sqlite3_column_value() to WASM and add sqlite3_column_js(). (check-in: 7783aa4a user: stephan tags: trunk)
12:06
Rerun autoconf using version 2.69 to minimize configure script differences with trunk. (check-in: b6334283 user: drh tags: wasi-patches)
10:24
Refactor the internal JS routines for converting UDF results and errors to JS into public APIs. (check-in: 35d1d63c user: stephan tags: trunk)
07:02
Imply configure flag --disable-shared when --with-wasi-sdk is active because libtool is running gcc for linking the shared lib, which cannot work in a wasi build. (check-in: 9253ba43 user: stephan tags: wasi-patches)
06:44
Add --with-wasi-sdk=DIR flag to configure.ac. This mode compiles but fails to link the DLL because libtool is apparently hard-coded to gcc for the DLL. (check-in: 39c9f441 user: stephan tags: wasi-patches)
05:52
Run configure.ac through autoupdate, as required by autoconf for rebuilding configure. These (many) changes were made entirely by the autotools, except that some whitespace-only changes were reverted by hand to reduce noise, and are a preliminary step to adding a new flag to configure.ac. (check-in: 2be2d5d4 user: stephan tags: wasi-patches)
05:00
Merge trunk into wasi-patches branch. (check-in: 13dade95 user: stephan tags: wasi-patches)
2022-12-09
15:26
Export sqlite3_result_subtype() and sqlite3_value_dup/free/subtype() to WASM. (check-in: 4600a7bb user: stephan tags: trunk)
15:12
Expose sqlite3_value_frombind/nochange/numeric_type() to WASM. Add a flag to sqlite3_value_to_js() to cause it to return undefined, instead of throwing, if no conversion can be found. (check-in: de8fc4bf user: stephan tags: trunk)
14:46
Refactor the sqlite3_value-to-JS conversion from an internal detail to sqlite3.capi.sqlite3_value_to_js() for use with routines like sqlite3_module::xFilter(). (check-in: f6dbf280 user: stephan tags: trunk)
13:49
Fix typo in the SQLITE_DBCONFIG_LOOKASIDE documentation. (check-in: c6e7582a user: drh tags: trunk)
12:12
Remove some unused sqlite3_status() codes from the JS API. Add custom JS wrappers for sqlite3_create_collation/_v2() which accept JS functions (plus tests). Expand the argument options for sqlite3_wasm_db_error() to enable it to translate exception objects to C-level errors. (check-in: 073a2f1e user: stephan tags: trunk)
09:23
Rename the oft-used, verbose sqlite3.wasm.get/setMemValue() and get/setPtrValue() to peek/poke() and peek/pokePtr(). The old names are retained as aliases just in case any client code actually uses them, but they are now deprecated. (check-in: ad0a8139 user: stephan tags: trunk)
08:44
Micro-optimization in the oft-activated JS-to-WASM arguments conversion step. (check-in: ee47e9b8 user: stephan tags: trunk)
07:17
Correct a test bug which broke the previous checkin's wasm tests in higher optimization levels. Test bug - it should not have worked in -O0 mode. (check-in: f07141b7 user: stephan tags: trunk)
05:47
Export sqlite3_status() and sqlite3_stmt_status() to wasm. Expand the arg/return semantics of wasm.get/setPtrValue() and get/setMemValue() to simplify handling of multiple pointers. Edit: tests pass when built with -O0 but fail with -Oz. Moving to branch to work out the breakage. Edit: it was a test bug - one too many levels of pointer indirection. It shouldn't have worked in low-optimization mode. (check-in: e144fd5c user: stephan tags: trunk)
02:23
JS API doc updates. (check-in: 4f80fd3b user: stephan tags: trunk)
02:12
Expose sqlite3_table_column_metadata() to wasm. (check-in: c31eb509 user: stephan tags: trunk)
01:49
Expose sqlite3_db_status() and sqlite3_db_config() to wasm, noting that the latter requires several internal wrappers to account for the various varidic forms (C varargs cannot be bound to wasm). (check-in: d5753668 user: stephan tags: trunk)
00:50
Reorganization and renaming in the new VFS/vtab JS pieces. (check-in: 1c2dda17 user: stephan tags: trunk)
2022-12-08
21:05
Support ".scanstats est" to enable including planner estimates in query profiles. (check-in: 0fe71287 user: dan tags: trunk)
18:18
Further docs and minor cleanups in the JS virtual table helper. (check-in: c31e7488 user: stephan tags: trunk)
17:07
Ease-of-use/legibility improvements in the virtual table JS helpers. (check-in: 54c7ad7e user: stephan tags: trunk)
15:00
Initial support for virtual tables implemented in JavaScript. (check-in: a1454744 user: stephan tags: trunk)
12:51
Describe the SQLITE_DBCONFIG_RESET_DATABASE flag's policy regarding virtual tables, per /chat discussion. (check-in: 53dcb81b user: stephan tags: trunk)
10:06
More work on the JS vtable tests. (Closed-Leaf check-in: 51e3c3b5 user: stephan tags: wasm-vtab)
09:06
Got JS non-eponymous vtable working thanks to a hint from Dan. (check-in: 750719b4 user: stephan tags: wasm-vtab)
04:19
Remove some dead JS code and tweak some docs. (check-in: 0ee49545 user: stephan tags: wasm-vtab)
2022-12-07
20:09
Reduce the overhead of SQLITE_ENABLE_STMT_SCANSTATUS some. (check-in: 212927e9 user: dan tags: trunk)
19:51
Fix harmless compiler warning in the dynamic continuation prompt of the CLI. (check-in: 68947b0a user: drh tags: trunk)
19:29
Omit CLI use of pragma_table_xinfo when it is not defined in the build. (check-in: 976c2352 user: larrybr tags: trunk)
17:29
Have sqlite3_stmt_scanstatus() report cycle, loop and row counts separately for creating an automatic index and using that automatic index. (check-in: 3bc9df82 user: dan tags: trunk)
16:58
Streamline and improve testing of the locking in the memdb VFS. Follow-on to [15f0be8a640e7bfa]. (check-in: d71a0837 user: drh tags: trunk)
07:22
Work on an alternate (slightly simpler) approach to binding JS vtabs. Non-eponymous vtabs are not working, for reasons as yet unknown. (check-in: 6a0fefb9 user: stephan tags: wasm-vtab)
03:42
Add addOnDispose() method to Jaccwabyt and code-adjacent minor internal cleanups. (check-in: 6a2723fe user: stephan tags: wasm-vtab)
00:14
Fix a (harmless) off-by-one error in code generation that comes up when doing a DISTINCT query against a virtual table with an OR term in the WHERE clause and where the ORDER BY clause has 64 or more references to the result set. Forum post dfe8084751. NB: The bug is "harmless" in the sense that no harm comes of it in a production build. However, an assertion fault might occur in a debugging build given some really wonky SQL inputs without this fix. (check-in: 04af7ef7 user: drh tags: trunk)
2022-12-06
19:32
Enhance CLI .sha3sum to warn of text fields that are not to-blob-to-text reversible. (check-in: bbde0f36 user: larrybr tags: trunk)
19:25
Merge from trunk prepratory to branch end. (Closed-Leaf check-in: 1d01f848 user: larrybr tags: sha3sum_text_validation)
19:20
Avoid several -Wall warnings in textfixture build. (check-in: 03ae8680 user: larrybr tags: trunk)
18:48
For CLI .sha3sum, emit warning to stderr for any invalidly encoded text fields. (check-in: 8e833ecc user: larrybr tags: sha3sum_text_validation)
18:48
Have sqlite3_stmt_scanstatus_v2() return an NCYCLE value for all loops, not just virtual tables ones. The value returned is the sum of the NCYCLE counts for the various opcodes that move or read data from the table or index cursor associated with the loop. (check-in: 9499b2f5 user: dan tags: trunk)
17:59
Clear a few more -Wall warnings and simplify dynaprompt feature keep/omit macros. (check-in: 540e895d user: larrybr tags: trunk)
15:11
Fix compiler warnings in the new dynamic continuation prompt logic of the CLI. (check-in: 0d80500d user: drh tags: trunk)
13:12
In the unix backend, when implementing the defenses against small file descriptors, delete a file just created if it was opened with O_EXCL|O_CREAT so that it can be created again the next time through the loop. Fix for the problem described by forum post 699af709ab3a8ccf. (check-in: c0cfe058 user: drh tags: trunk)
11:41
Support an SQLITE_SCANSTAT_NCYCLE statistic for "CO-ROUTINE" elements. (check-in: d3f6a207 user: dan tags: trunk)
11:21
JS vtables: add infrastructure related to accessing and modifying sqlite3_index_info. (check-in: 0d77c348 user: stephan tags: wasm-vtab)
09:49
Remove deprecated symbol sqlite3.opfs.OpfsDb, which was renamed to sqlite3.oo1.OpfsDb on 2022-11-29. (check-in: 0ce51bed user: stephan tags: wasm-vtab)
08:46
Rename wasm.cstringToJs() to wasm.cstrToJs() for consistency with other wasm.cstr... APIs. (check-in: cbf483ea user: stephan tags: wasm-vtab)
08:39
Add wasm.cArgvToJs() to support sqlite3_module::xConnect(). (check-in: c3ebdccf user: stephan tags: wasm-vtab)
08:21
Minor internal JS code/docs cleanups. (check-in: 21331bdd user: stephan tags: wasm-vtab)
06:21
Merge trunk into wasm-vtab branch. (check-in: d106edb9 user: stephan tags: wasm-vtab)
06:16
Minor test tweaks. (check-in: f902f3b2 user: stephan tags: wasm-vtab)
06:09
Add a demonstration sqlite3_vtab/module implemented in JS, based on ext/misc/templatevtab.c. Add oo1.selectArrays() and selectObjects(). (check-in: 60482c97 user: stephan tags: wasm-vtab)
05:31
Add optional feature: A CLI continuation prompt which reflects open lexemes and parens, similarly to PG shell. (check-in: f41f18b1 user: larrybr tags: trunk)
05:09
Add optional feature: A CLI continuation prompt which reflects open lexemes and parens, similarly to PG shell. (Leaf check-in: dac2ddc2 user: larrybr tags: dynamic_prompt)
2022-12-05
19:16
Enhance the sqlite3_stmt_scanstatus() API and add sqlite3_stmt_scanstatus_v2(). For creation of enhanced query performance reports. (check-in: 4893b4e3 user: dan tags: trunk)
18:52
Update comments in sqlite.h.in to account for sqlite3_stmt_scanstatus_v2(). (Closed-Leaf check-in: 009462f2 user: dan tags: scanstatus_v2)
18:26
Merge latest trunk changes. (check-in: 1a72777b user: dan tags: scanstatus_v2)
18:19
Add loops and rows counters to "USE TEMP B-TREE FOR ORDER BY" records. Also fix the sqliteHwtime() function so that it returns a 64-bit value. (check-in: 41a0e05e user: dan tags: scanstatus_v2)
15:05
Remove two features of jaccwabyt which were fundamentally flawed, along with approx. 250 lines of unit tests which heavily relied on them. Thankfully, none of the sqlite3.js-level code used those bits. (check-in: a190abc3 user: stephan tags: wasm-vtab)
14:32
Jaccwabyt (JS) doc updates. (check-in: a329a809 user: stephan tags: wasm-vtab)
14:23
Fix a problem in the memdb vfs xLock() function allowing clients to upgrade to EXCLUSIVE locks when other connections are holding SHARED. (check-in: d18cce37 user: drh tags: branch-3.40)
14:20
Regenerate the configure script so that it includes the correct patch number. (check-in: e2ae2ea1 user: drh tags: branch-3.40)
14:20
Add test case that should have been part of previous commit. (check-in: dc7dd2d3 user: dan tags: trunk)
14:13
Expose sqlite3_get/set_auxdata() to wasm. Minor test app CSS tweaks. (check-in: 44659ad3 user: stephan tags: wasm-vtab)
14:12
Fix a problem in the memdb vfs xLock() function allowing clients to upgrade to EXCLUSIVE locks when other connections are holding SHARED. Forum post 5adb92e2baca3678. (check-in: 15f0be8a user: dan tags: trunk)
13:33
Export collation-related APIs and strncmp()/strnicmp() to wasm. (check-in: c3c56d9b user: stephan tags: wasm-vtab)
13:12
Export sqlite3_vtab_collation() to wasm. Rename 'flexible-string' JS argument adapter to 'string:flexible' for consistency. (check-in: 15f8042f user: stephan tags: wasm-vtab)
13:07
Remove SQLITE_EXPERIMENTAL tag from sqlite3_vtab_collation() and fix a related doc typo. (check-in: 35d670b3 user: stephan tags: trunk)
11:54
Rename 'static-string' argument adapter to 'string:static'. Replace JS unit tests which were lost via editing a generated copy of tester1.js instead of the original tester1.c-pp.js input file. (check-in: 9d81d51d user: stephan tags: wasm-vtab)
11:30
Export sqlite3_bind/value/result_pointer() to wasm. Add 'static-string' argument converter to support the lifetime requirements of bind/result_pointer()'s string argument. Correct an endless loop in wasm.cstrlen() when passed a non-C-string argument. (check-in: a9455243 user: stephan tags: wasm-vtab)
10:50
Remove obsolete "experimental" comments on the virtual-table interface documentation in sqlite.h.in. (check-in: 28fc32ab user: drh tags: trunk)
07:51
More work on the JS side of the virtual table APIs. (check-in: cb9881ec user: stephan tags: wasm-vtab)
05:45
Remove some dead code. Improve some error checks and comments. (check-in: 6712fbe4 user: stephan tags: wasm-vtab)
05:30
Initial infrastructure for adding virtual table/table-valued function support to WASM. (check-in: c202d7a0 user: stephan tags: wasm-vtab)
02:52
Improved query planner cost estimates. Fix for ticket [e8b674241947eb3b]. (check-in: 1b779afa user: drh tags: trunk)
02:42
Use the smaller estimated row size for searching IPK tables, but use the original larger row size estimate for scanning, since the leaves can have large rows. (Closed-Leaf check-in: df381899 user: drh tags: qp-tuning)
2022-12-04
23:20
Fix safe mode authorizer callback to reject disallowed UDFs. Reported at Forum post 07beac8056151b2f. (check-in: cefc0324 user: larrybr tags: trunk)
08:16
Export sqlite3_result_zeroblob/zeroblob64() to wasm. (check-in: a60e5662 user: stephan tags: trunk)
2022-12-03
21:24
Enhance SQLITE_SCANSTAT_NCYCLE so that it reports on virtual tables. (check-in: 622d8eb3 user: dan tags: scanstatus_v2)
19:04
Increase the nominal row size for IPK index lookups slightly, for better balance. (check-in: 1a61c500 user: drh tags: qp-tuning)
18:21
Add TOTAL rows to the output generated by tool/vdbe_profile.tcl. (check-in: 98005863 user: drh tags: qp-tuning)
18:16
Add CYCLES scanstat measurement to "USE TEMP B-TREE FOR ORDER BY" lines. (check-in: 365011ae user: dan tags: scanstatus_v2)
17:23
Add a test case to show that ticket [e8b674241947eb3b] has been fixed. (check-in: e20de6d4 user: drh tags: qp-tuning)
17:19
Make conglomerateur help with extension packaging. Otherwise a WIP check-in. (check-in: c4214d8d user: larrybr tags: extension_opts)
17:09
Further improvements to the estimated cost of sorting. Take into account the number of columns to be sorted. (check-in: f3290cf8 user: drh tags: qp-tuning)
16:09
Cause CLI .sha3sum to warn of text fields that do not survive CAST(CAST(t as BLOB) AS TEXT) due to invalid UTF encoding. (check-in: 123f2a07 user: larrybr tags: sha3sum_text_validation)
15:41
Correct a memory leak in tester1.js. (check-in: e42b052d user: stephan tags: trunk)
14:58
sqlite3.wasm.allocFromTypedArray() now optionally accepts an ArrayBuffer as its argument. (check-in: 75a1a796 user: stephan tags: trunk)
13:10
Rename wasm.xWrap.resultAdapter() X:free entries to X:dealloc for consistency with wasm.dealloc(). Add an undocumented feature to replace wasm.alloc/dealloc/realloc() with the C-standard allocators (after an allocator misuse led down a several-hour rabbit hole trying to discover a mis-free() violation). Related test updates. (check-in: d9807656 user: stephan tags: trunk)
13:05
Doc typo fix for SQLITE_MAX_ALLOCATION_SIZE in malloc.c. No code changes. (check-in: ed1ed212 user: stephan tags: trunk)
11:51
Move kvvfs xRead()/xWrite() buffer from function-local stack memory to heap memory to accommodate changes in emsdk 3.1.27. (check-in: f1da3241 user: stephan tags: trunk)
11:16
JavaScript: add sqlite3.wasm.realloc(), sqlite3.capi.SQLITE_MAX_ALLOCATION_SIZE, and related tests. (check-in: eeb84ba5 user: stephan tags: trunk)
03:06
wasm build: rename the path to the wasm docs checkout, for clarity and consistency. (check-in: b820db32 user: stephan tags: trunk)
02:42
wasm snapshot and doc-related build automation tweaks. (check-in: 13eb1abd user: stephan tags: trunk)
01:59
Rework the oo1.DB's distinct-per-VFS post-open() step to accept either a batch of SQL or a callback function. Increase OPFS's busy timeout to 10s. (check-in: 9feefe25 user: stephan tags: trunk)
00:52
Tuning the query planner by adjusting the weights that predict the relative performance of sorting and index lookup. (check-in: 9f2806da user: drh tags: qp-tuning)
2022-12-02
20:32
Enhance the sqlite3_stmt_scanstatus() API and add sqlite3_stmt_scanstatus_v2(). For creation of easier to read query performance reports. (check-in: 55800833 user: dan tags: scanstatus_v2)
18:56
Minor internal tweaks to the OPFS VFS. Resolve a missing result code which lead to a null deref in xFileSize(). (check-in: 57dd593e user: stephan tags: trunk)
18:06
OPFS VFS: translate createSyncAccessHandle() exceptions which appear to be locking violations to SQLITE_BUSY. This seems to improve concurrency considerably even with a reduced retry count of 5 (was 6). (check-in: 0d36021d user: stephan tags: trunk)
17:52
For the sqlite3_bind and sqlite3_result interfaces for UTF16 strings, round the number of bytes down to the next even number, to avoid creating a UTF16 string that is an odd number of bytes. Forum post 411199488d065f83. (check-in: b57e3c3d user: drh tags: trunk)
15:31
Use sqlite3_result_int64() instead of sqlite3_result_int() when returning potentially large values from the DBSTAT virtual table, to avoid integer overflows in the result. Forum post ada2ab044f. (check-in: 5652154a user: drh tags: trunk)
11:35
Minor touchups to the JS test index page and test server push rules. (check-in: 0881f3e9 user: stephan tags: trunk)
10:43
wasm builds: explicitly set a default stack size because emsdk 3.1.27 reduced it from 4MB to only 64kb, leading to memory corruption when kvvfs is used (it requires at least twice that for I/O). (check-in: 75811246 user: stephan tags: trunk)
09:23
wasm: after building snapshot zip file, emit instructions for pushing it to the test server. (check-in: 9615c779 user: stephan tags: trunk)
08:51
Correct the problem which triggered the rollback in [7eec635562f6]: an incorrect default db page size (not a multiple of 512 bytes). (check-in: e06e490c user: stephan tags: trunk)
08:38
Roll back the SQLITE_DEFAULT_PAGE_SIZE part of [c260895faacb34] because kvvfs does not work at all with a page size of 8kb. (check-in: 7eec6355 user: stephan tags: trunk)
08:29
sqlite3-wasm.c: code legibility and coding style tweaks. Increase SQLITE_DEFAULT_PAGE_SIZE from 4k to 8k, as that improves OPFS speedtest1 performance by roughly 12%. (check-in: c260895f user: stephan tags: trunk)
07:14
Expand JS tests for db export/import and document reason it cannot currently work with kvvfs. Fix a minor JS build dependencies bug. Update page title with PASS/FAIL prefix for tester1.js to improve overview when launching multiple test tabs. Add ability of tester1 should-run-test predicates to report why a given test is disabled. (check-in: 75f610d3 user: stephan tags: trunk)
03:37
Remove extraneous/unused sqlite3.oo1.version object. Add httpd makefile target. (check-in: 8e4d30ac user: stephan tags: trunk)
03:35
Experimental branch for more flexible selection of extensions and localization of details of incorporation by host. A WIP for now. (check-in: 98be19ba user: larrybr tags: extension_opts)
2022-12-01
15:22
sqlite3_js_create_file() now accepts an ArrayBuffer data source. Add test for OPFS-based export/re-import. The (sqlite3*) argument converter now optionally accepts sqlite3.oo1.DB instances. (check-in: 14a84b67 user: stephan tags: trunk)
04:45
Reformulate and simplify some JS tests related to the previous checkin. (check-in: 9ea2d3dc user: stephan tags: trunk)
03:55
Expand "sqlite3_vfs*" JS-to-WASM function argument conversions to accept VFS names (JS strings) and capi.sqlite3_vfs instances. Implement sqlite3_js_vfs_create_file() to facilitate creation of file-upload features which store the file in VFS-specific storage (where possible, e.g. "unix" and "opfs" VFSes). Correct an argument type check in the SQLite3Error and WasmAllocError constructors. (check-in: e1009b16 user: stephan tags: trunk)
2022-11-30
21:18
Add a testcase() macro to verify that the case of a NOT NULL error message hitting the string length limit. (check-in: 91f50964 user: drh tags: trunk)
20:22
Fix an over-zealous assert() reported by Yong Heng. (check-in: 6ee61f8c user: drh tags: trunk)
19:11
Attempt to rationalize the bits associated with ".wheretrace". Provide a decoder key in sqliteInt.h for what each bit is intended to do. (check-in: 8ec36169 user: drh tags: trunk)
18:21
Rename some JS files from X.js to X.c-pp.js to keep the maintainer, and downstream build customizers, aware that those files contain constructs specific to the c-pp preprocessor and will not run as-is in JS. (check-in: 2eade7c7 user: stephan tags: trunk)
13:44
Always use nanosleep() (instead of usleep() or sleep) if the _POSIX_C_SOURCE macro says it should be available. See Fossil Forum post ab2e2593ae307946 for driver behind this enhancement. (check-in: 6620c57b user: drh tags: trunk)
11:50
Install sqlite3_malloc/sqlite3_free() as the JS-side WASM allocator (as opposed to replacing C-level's malloc()/free() with them). All tests work and this eliminates the potential for allocator discrepancies when using the (de)serialize APIs. (check-in: 95c78f6b user: stephan tags: trunk)
10:05
Merge trunk into wasi-patches branch. (check-in: 64cf34a8 user: stephan tags: wasi-patches)
08:37
Simplify how the OPFS VFS async proxy copies initial state sent to it from the synchronous side of the connection. Make the lock-wait time a multiple of the wait-loop timeout interval. (check-in: eddafaff user: stephan tags: trunk)
07:48
OPFS VFS: remove an invalid TODO and fix a property name typo which caused xCheckReservedLock() to always report false. (check-in: 3b037caa user: stephan tags: trunk)
07:17
Rename some OPFS JS files. Prevent JS bindings of sqlite3_uri_...() from performing JS-to-C-string argument conversion on their first argument, as doing so is specifically illegal. (check-in: 79832808 user: stephan tags: trunk)
05:27
Refactor a significant chunk of the OPFS sqlite3_vfs init code into sqlite3.VfsHelper, and internal-use-only API encapsulating code relevant to creating new VFSes in JS. Intended to assist in pending experimentation with an alternative OPFS VFS. (check-in: e25d7b08 user: stephan tags: trunk)
03:08
Doc and logging text tweaks in the OPFS async proxy and test app. (check-in: 7ce8608e user: stephan tags: trunk)
2022-11-29
18:28
sqlite3.oo1.OpfsDb: default to journal_mode=persist, as current tests show it to be marginally faster than truncate/delete in Chrome v109. Also increase default busy_timeout from 2 seconds to 3, admittedly on a whim. (check-in: d0c8fa30 user: stephan tags: trunk)
18:00
OPFS speedtest1: hide a currently-broken/to-fix WASMFS-build link. (check-in: cde95d38 user: stephan tags: trunk)
17:52
Change the handling of hwtime.h to make it easier to compile performance measurement builds that make use of hwtime.h. This should not affect productions builds. (check-in: f64a2242 user: drh tags: trunk)
11:28
Fix legacy build system main.mk to include basexx.c in testfixture builds. (check-in: 8c9200b7 user: dan tags: trunk)
06:56
Rename one instance of opfs.OpfsDb to oo1.OpfsDb, as per [0c5c51f4fb04]. (check-in: 75b04c9b user: stephan tags: trunk)
06:09
Minor internal cleanups and docs in the OPFS sqlite3_vfs. (check-in: 61799b05 user: stephan tags: trunk)
05:25
Internal restructuring of the OPFS sqlite3_vfs in order to facilitate certain experimentation and improve error reporting/hints if it cannot be activated. Deprecate the name sqlite3.opfs.OpfsDb, preferring sqlite3.oo1.OpfsDb for consistency with JsStorageDb and any future DB subclasses. (check-in: 0c5c51f4 user: stephan tags: trunk)
02:23
Add an explicit warning about the current API-instability of the sqlite3.opfs namespace, which may need to be eliminated based on re-thinking of how the OPFS sqlite3_vfs is registered. Comment changes only - no code. (check-in: 0cb2fd14 user: stephan tags: trunk)
2022-11-28
21:17
Check-in [8d5b76593d82b3a5] contained an error that was causing some obscure error codes to be lost. Fixed here. (check-in: 46cdd363 user: drh tags: trunk)
21:09
Get ext/misc/basexx.c into the testfixture.exe build for MSC. (check-in: bb2c5d08 user: larrybr tags: trunk)
20:08
Fix harmless compiler warnings. (check-in: 8d5b7659 user: drh tags: trunk)
19:42
Implementation of enhancement request [695a1a53dea6b240]: The query planner has improved awareness of when indexes on expressions are covering and adjusts their costs accordingly. (check-in: e3474d79 user: drh tags: trunk)
18:41
Add the SQLITE_FCNTL_RESET_CACHE verb. Use it to ensure that the page cache is purged before and after a the recovery extension is run. (check-in: 6db0bc4b user: dan tags: trunk)
18:17
Test cases added derived from the enhancment ticket. (Leaf check-in: c022c015 user: drh tags: covering-indexed-expr)
16:11
Merge trunk changes into covering-index-expr branch. (check-in: 89d775ad user: drh tags: covering-indexed-expr)
15:23
Rework the covering index checking routine, whereIsCoveringIndex(), so that it can return a "maybe" result for aggregate queries where we are not exactly sure. The index is scored as if it is covering, but the main table is still opened. (check-in: b8eec421 user: drh tags: covering-indexed-expr)
14:51
Add (optional) base64 and base85 UDF extensions. (check-in: b44ab10c user: larrybr tags: trunk)
14:11
Sync w/trunk, zap surplus space. (Closed-Leaf check-in: b8345630 user: larrybr tags: base_convert)
13:47
Ensure the RETURNING clause is honoured when a row of a temp table is updated by an ON CONFLICT clause. (check-in: a2449bcc user: dan tags: trunk)
02:28
Conform CLI .trace arg handling to its help. (check-in: 31546ea3 user: larrybr tags: trunk)
2022-11-27
00:57
Document an OPFS API change in Chrome v108 which does not break our code but does change several formerly async methods to synchronous. No code changes. (check-in: e9dd87e2 user: stephan tags: trunk)
2022-11-26
20:52
Better reporting of when the WHERE clause analysis thinks that an index is covering. (check-in: 17ebcf31 user: drh tags: covering-indexed-expr)
20:48
Show which AggInfo.aCol an Expr node represents in the tree trace debugging logic. Does not affect production builds. (check-in: b8076f4d user: drh tags: trunk)
20:13
Merge trunk fixes into the covering-indexed-expr branch. (check-in: 9ac67ff9 user: drh tags: covering-indexed-expr)
20:12
Fix an incorrect assertion-fault in the "TREETRACE" debugging logic on select.c. The problem does not affect production builds. (check-in: f11bb422 user: drh tags: trunk)
15:24
OPFS VFS: add the opfs-unlock-asap=1 URI flag which tells the VFS to release implicit locks ASAP instead of during VFS idle time. This improves concurrency notably in the test app but brings a significant performance penalty in speedtest1 (roughly 4x slowdown). This is not the final word in OPFS concurrency, but gets us a step further. (check-in: 9542f9ce user: stephan tags: trunk)
14:19
Experimental changes to help the query planner detect when an expression index is coverting. Works somewhat, but there are tests that fail. (check-in: 968c189b user: drh tags: covering-indexed-expr)
2022-11-25
17:05
Relax restriction (8) on the push-down optimization so that it only applies if one or more columns uses a collating sequence other than BINARY. See forum post 3824ced748baa808 and check-in [346a3b12b861ce7b]. (check-in: adbca344 user: drh tags: trunk)
16:32
Fix #ifdefs so that restrictions (8) and (9) of the push-down optimization are still enforced even if compiled with SQLITE_OMIT_WINDOWFUNC. This fixes a bug introduced by check-in [346a3b12b861ce7b]. (check-in: 09e1e42e user: drh tags: trunk)
16:10
Improve the query planner such that it is able to make use of indexed expressions within an aggregate query with GROUP BY. This implements enhancement request [99378177930f87bd]. (check-in: b9190d3d user: drh tags: trunk)
15:52
Add restriction (9) to the push-down optimization: If the subquery is a compound then all arms of the compound must have the same affinity. dbsqlfuzz 3a548de406a50e896c1bf7142692d35d339d697f. (check-in: 1ad41840 user: drh tags: trunk)
13:26
Remove a redundant assert() statement. (Closed-Leaf check-in: e3e1b453 user: drh tags: agg-with-indexed-expr)
13:15
Improve the robustness of the updateAccumulator() routine against OOM. (check-in: d2844f57 user: drh tags: agg-with-indexed-expr)
13:08
Improved comments. Add assert()s to verify that the AggInfo structure is unchanged after registers have been assigned. (check-in: 5200b841 user: drh tags: agg-with-indexed-expr)
2022-11-24
23:35
Correctly deal with IF-NULL-ROW operators when dealing with indexed expressions in aggregates. (check-in: 939cb470 user: drh tags: agg-with-indexed-expr)
20:11
Speed up base85() conversions and sync w/trunk. (check-in: 17b82350 user: larrybr tags: base_convert)
19:02
Take care not to try to add comments to a TK_AGG_COLUMN opcode that does not have an associated Table object because it is a reference to an indexed expression. (check-in: 5fc23863 user: drh tags: agg-with-indexed-expr)
18:45
Change a NEVER() into an assert(). (check-in: a0fd44f4 user: drh tags: agg-with-indexed-expr)
17:58
Fix a test case in fts3expr4.test to account for different locales. (check-in: a2b6883a user: dan tags: trunk)
17:53
More work on the OPFS concurrency testing app. (Closed-Leaf check-in: c0458cac user: stephan tags: opfs-unlock-asap)
16:03
JS documentation cleanups. No code changes. (check-in: 18e89a43 user: stephan tags: trunk)
15:32
Update multiplex3.test to account for the fact that the multiplexor xDelete method may return an error even if it manages to delete the first chunk of a file. (check-in: 1a7f3254 user: dan tags: trunk)
15:04
Add NEVER() and ALWAYS() macros on branches that are believed to be unreachable. (check-in: 3a901e88 user: drh tags: agg-with-indexed-expr)
13:19
New test cases. Fix the logic so that it works for GROUP BY aggregates that do not require sorting. (check-in: ef6ebe79 user: drh tags: agg-with-indexed-expr)
02:59
Speed up base64 conversions, and add test with more data for the baseNN conversion to grind. (check-in: 6c84ae4b user: larrybr tags: base_convert)
02:35
Add sqlite3.oo1.DB.prototype.checkRc() and tests for both that method and its class-level counterpart. (check-in: f7eaa6ba user: stephan tags: trunk)
01:41
Merge the latest trunk changes into the agg-with-indexed-expr branch to simplify diffs. (check-in: 38c3d3f1 user: drh tags: agg-with-indexed-expr)
01:40
Add explanatory comment to the new optimization. And add a test case. (check-in: e6c20f61 user: drh tags: agg-with-indexed-expr)
2022-11-23
21:09
Minor JS doc updates. (check-in: 27efd63a user: stephan tags: trunk)
21:03
Add optional zSchema argument to sqlite3_js_db_export(). (check-in: 9c23644b user: stephan tags: trunk)
20:49
OPFS concurrency test: add a URL flag to enable/disable unlock-asap mode. (check-in: 1c1bf22e user: stephan tags: opfs-unlock-asap)
19:03
Add an experimental OPFS VFS-specific URI flag, opfs-unlock-asap, which tells the VFS to release implicit locks ASAP. This permits higher concurrency but hurts performance considerably. This may or may not be obsoleted by other concurrency-related experimentation. (check-in: d23c9170 user: stephan tags: opfs-unlock-asap)
18:51
Aggregates with GROUP BY now make use of expressions on indexes. This code works and gets the correct answer for the test case in the ticket. Lots more testing and documentation is needed, however. (check-in: 8dcf9f20 user: drh tags: agg-with-indexed-expr)
17:56
This attempt at modifying AggInfo to make use of indexed expressions does not work. It gets an incorrect answer for the test case shown in the ticket. (check-in: 84c06023 user: drh tags: agg-with-indexed-expr)
16:39
Initial infrastructure for adding a mode to the OPFS VFS which causes implicit locks to be released ASAP, which increases concurrency at the cost of performance. (check-in: c5b7a971 user: stephan tags: opfs-unlock-asap)
16:08
Update Makefile.in to include new target "sqlite3r.c". For generating "sqlite3r.c" and "sqlite3r.h", versions of the amalgamation that include the recover extension. To build the shell tool against these files, add -DSQLITE_HAVE_SQLITE3R. (check-in: 5f135575 user: dan tags: trunk)
15:52
Remove a bit of over-cleverness which breaks loading of sqlite3.js in some main-thread cases. Broken by [96f76e7616]. (check-in: 220cc4c6 user: stephan tags: trunk)
15:33
OPFS concurrency tester: ensure that the work interval timer does not overlap with the work time. (check-in: 8f207655 user: stephan tags: trunk)
14:13
Further foundation prep work prior to starting to flesh-out the optimizeAggregateUseOfIndexedExpr() routine. (check-in: 23145fe9 user: drh tags: agg-with-indexed-expr)
2022-11-22
22:46
Add more baseNN tests, get oversize error trapping working, and sync w/trunk (check-in: 03819e93 user: larrybr tags: base_convert)
20:58
Merge enhancements and fixes from trunk. (check-in: f8932e04 user: drh tags: agg-with-indexed-expr)
20:37
Add the stub function: optimizeAggregateUsingIndexedExpr(). The hope is that we can fill this in with a routine that does useful optimizations. (check-in: d85bb724 user: drh tags: agg-with-indexed-expr)
20:04
Avoid naming collision between the sha1 and shathree extensions. (check-in: 9ec923b5 user: mistachkin tags: trunk)
19:56
Include the treetrace bitmap comment accidentally omitted from the previous check-in. (check-in: db07471c user: drh tags: trunk)
19:51
Merge trunk fixes and enhancements into the agg-with-indexed-expr branch. (check-in: 07063478 user: drh tags: agg-with-indexed-expr)
19:49
Rename the SELECTTRACE macro to TREETRACE, so that is corresponds to the new CLI command. Renumber all of the bits in the bitmask used to enable various kinds of tracing, and add a trace bitmap decoder in sqliteInt.h. Changes to debugging logic only. No (intentional) changes to production code. (check-in: 8036445a user: drh tags: trunk)
19:12
Sync w/trunk. Ready for merge to trunk. (check-in: ff67460e user: larrybr tags: base_convert)
19:04
Add test/basexx1.test to test is_base85(t), base85(x) and base64(x). Sync w/trunk. (check-in: 4e433454 user: larrybr tags: base_convert)
18:24
Fix the error message in the CLI for "no such VFS". Forum post 1217fdd6b3. (check-in: b344f33d user: drh tags: branch-3.40)
18:24
Fix the error message in the CLI for "no such VFS". Forum post 1217fdd6b3. (check-in: 861af465 user: drh tags: trunk)
16:12
Add Makefile.in targets for sqlite3r.c and sqlite3r.h, versions of the amalgamation that include the recover extension. (Closed-Leaf check-in: 59a837cf user: dan tags: make-sqlite3r.c)
15:48
Bump the version number to 3.40.1. (check-in: d0ca348b user: drh tags: branch-3.40)
15:47
Fix last function pointer in sqlite3Apis init. Reported at forum post eba0faa96d. (check-in: b3795d28 user: drh tags: branch-3.40)
15:43
Since the memory registers used by the columns and functions of an AggInfo object are sequential, it is not neecessary to remember each register separately. We can simply remember the first one and do the math when others are needed. (check-in: dc5bd349 user: drh tags: agg-with-indexed-expr)
15:41
Fix last function pointer in sqlite3Apis init. Reported at forum post eba0faa96d. (check-in: 6d5dc9ee user: larrybr tags: trunk)
14:31
Omit the unnecessary AggInfo.mnReg field. (check-in: d79c58ef user: drh tags: agg-with-indexed-expr)
14:10
Factor out the allocation of registers for aggregates into a separate subroutine. (check-in: 4475799d user: drh tags: agg-with-indexed-expr)
13:33
This is the first in what is anticipated to be a long sequence of incremental changes aimed at improving aggregate query processing, and in particular helping aggregate queries take better advantage of indexes on expression. The end goal is to resolve ticket [99378177930f87bd], though it remains to be seen whether or not I can get there with this approach. (check-in: cba837ea user: drh tags: agg-with-indexed-expr)
12:47
Convert an ALWAYS() in sqlite3DbSpanDup() into an assert(), for a performance increase and size reduction. (check-in: 21e80a29 user: drh tags: trunk)
2022-11-21
17:40
Split out the debugging code that dumps an AggInfo object into a separate subroutine called printAggInfo() so that it can be invoked interactively during debugging. No changes to production code. (check-in: dc33cfbe user: drh tags: trunk)
16:40
Change the name of the Parse.pIdxExpr field to pIdxEpr so that the name is distinct from all other identifiers in the code and thus less confusing. (check-in: a2962d01 user: drh tags: trunk)
16:03
Merge trunk into wasi-patches branch to clean up the diff view. (check-in: 95de6742 user: stephan tags: wasi-patches)
16:00
OPFS contention test: give each worker a distinct recognizable name instead of a random one. (check-in: 5f564bf7 user: stephan tags: trunk)
15:55
Performance optimization and size reduction in insertCell() by omitting the "pRC" argument and instead returning the result code as an integer. (check-in: bee94d1b user: drh tags: trunk)
14:13
Performance optimization to sqlite3BtreeInsert(). (check-in: b8976ebf user: drh tags: trunk)
13:35
Small performance improvement in sqlite3BtreeTransferRow(). (check-in: dab959ea user: drh tags: trunk)
06:07
Add new JS tests dir to those pushed to the test server. (check-in: 07182dca user: stephan tags: trunk)
05:18
More tweaking of OPFS concurrency measures and the related test app. (check-in: a8d4da15 user: stephan tags: trunk)
04:12
Resolve missing SQLITE_LOCKED result code which triggered a new (since last checkin) exception in the OPFS VFS. Improve output of the OPFS contention tester app. (check-in: 2debbbca user: stephan tags: trunk)
03:50
Add test app for experimenting with multi-worker OPFS concurrency. Tweak OPFS VFS to significantly improve the otherwise "unfortunate" concurrency situation. (check-in: 96f76e76 user: stephan tags: trunk)
02:18
Get clean builds for MS tools. Add build examples for extension glommer (basexx.c) Make sure extensions build for dynamic load and built into shell. (check-in: da940d50 user: larrybr tags: base_convert)
00:11
Fix a base64 decode bug. Provide for convenient inclusion of extension(s) built into the CLI, to simplify testing and for its own sake. Improve comments. Cure collision between base64.c and base85.c when both are in the same translation unit. (check-in: 07543d23 user: larrybr tags: base_convert)
2022-11-20
15:30
Remove check for WASM_WASI macro when detecting wasi compilation mode, as that macro is project-specific. Rely only on __wasi__ (exposed by clang) to detect wasi compilation mode. (check-in: d469ac0c user: stephan tags: wasi-patches)
05:47
js dist: account for a file rename in the previous checkin. (check-in: 469f9011 user: stephan tags: trunk)
05:36
Further minor cleanups in the JS build related to vanilla vs ESM. (check-in: 100a5968 user: stephan tags: trunk)
04:14
Remove an obsolete reference to WASMFS from ext/wasm/index.html. (check-in: 51ff6818 user: stephan tags: trunk)
04:14
Generic cleanups and doc additions in the wasm build files. (check-in: d10f385e user: stephan tags: trunk)
04:13
Add 'snapshot' target to create distinctly-named snapshot builds of the wasm deliverables zip file. (check-in: f7620aa0 user: stephan tags: trunk)
01:15
Minor cleanups in the ESM-related preprocessor filtering. (check-in: 205884a2 user: stephan tags: trunk)
2022-11-19
20:10
New assert()s confirm that BTREE_PREFORMAT must be the same value as OPFLAG_PREFORMAT. (check-in: f40bf2c6 user: drh tags: trunk)
19:37
Performance optimization in sqlite3BtreeInsert(). (check-in: 9776fa31 user: drh tags: trunk)
18:43
Performance improvement and size reduction in balance_nonroot(). (check-in: 715bc81e user: drh tags: trunk)
18:17
Small performance improvement and size reduction in btree. (check-in: daa07149 user: drh tags: trunk)
16:16
Get tester1.js working via an ES6 worker module and add that variant to the dist zipfile. (check-in: 90480586 user: stephan tags: trunk)
15:03
Elide a wasi-incompatible shell.c block in SQLITE_WASI builds. (check-in: 9b8b15a7 user: stephan tags: wasi-patches)
14:18
Improved comments on the pageFreeArray() routine of btree.c. No changes to code. (check-in: 0c2adc6d user: drh tags: trunk)
13:09
Streamline the decodeFlags() routine in btree.c for a small performance increase. (check-in: 4cb28521 user: drh tags: trunk)
07:44
Default to SQLITE_THREADSAFE=0 and SQLITE_OMIT_LOAD_EXTENSION for wasi builds. (check-in: 382ba3b2 user: stephan tags: wasi-patches)
07:39
Account for lack of mmap(), getpid(), and shared memory APIs in wasi. (check-in: 80ff026f user: stephan tags: wasi-patches)
07:17
Preliminary patches to get sqlite3.c building as-is in WASI environments. (check-in: 19c04d71 user: stephan tags: wasi-patches)
05:26
Add build of sqlite3.mjs (ES6 module), add a test app for it, and include it in the dist build. (check-in: 2e783670 user: stephan tags: trunk)
02:58
Integrate a custom preprocessor to the JS build process to facilitate creation of both vanilla JS and ES6 Module builds from the same source files. There is still some build-level reworking pending to make an ESM build a first-class deliverable. (check-in: 10c723d9 user: stephan tags: trunk)
02:51
More work towards creation of a ES6 JS module. (Closed-Leaf check-in: 6b826e70 user: stephan tags: js-cpp)
02:39
New extensions for base85 and base64 conversion UDFs (check-in: 5cc1fe1d user: larrybr tags: base_convert)
02:32
Create new branch named "base_convert" (check-in: 0cbf5540 user: larrybr tags: base_convert)
00:22
Small performance optimization in btree.c. (check-in: f710cce1 user: drh tags: trunk)
00:08
Databases created using sqlite3_deserialize() should report their filename as an empty string, not as "x". Fix for ticket [53043c9793715f08]. (check-in: ff494449 user: drh tags: trunk)
2022-11-18
17:57
Update the version number to 3.41.0 to begin the next development cycle. (check-in: 5c669f5f user: drh tags: trunk)
17:50
Add the SQLITE_DBCONFIG_LENIENT_JSON configuration option. Modify the built-in JSON routines such that when this setting is active, arguments that that ought to be JSON but still give a reasonable result (ex: NULL) rather than raising an error. (Leaf check-in: 186db57d user: drh tags: lenient-json)
15:22
shell.c.in: on non-Windows platforms, check for $XDG_CONFIG_HOME/sqlite3/sqliterc before ~/.sqliterc, per request in forum post 7a16582b1e403c81. (check-in: 17065d09 user: stephan tags: trunk)
02:29
Replace use of cpp with the fit-to-purpose c-pp to avoid cpp's C-centric/JS-unfriendly quirks. (check-in: 49d70f07 user: stephan tags: js-cpp)
2022-11-17
19:24
Fix corner cases in UTF8 handling in the REGEXP extension. Forum post 3ffe058b04. (check-in: abb18f61 user: drh tags: trunk)
15:21
Merge trunk into js-cpp branch. (check-in: e047b33d user: stephan tags: js-cpp)
14:40
Use the log10() and log2() functions from the standard C library to implement the equivalent SQL functions, in the hope that this will prevent reported precision problems. See forum post cfceb1230bdcfd84 and the surrounding thread. (check-in: 7c572d02 user: drh tags: trunk)
13:58
Split out the documentation for sqlite3_value_encoding() into its own page and make it clear that this interface is intended for testing and debugging only. Forum thread c9f445453da950ad. Comment changes only - no changes to code. (check-in: 9048a766 user: drh tags: trunk)
01:24
Raise an error if an attempt is made to compile the CLI with the SQLITE_OMIT_COMPLETE option, since sqlite3_complete() really is necessary for the CLI to operate sanely. (check-in: a119a9e2 user: drh tags: trunk)
2022-11-16
21:52
Change a self.X JS reference to X to account for a symbol resolution discrepancy between vanilla JS and ES6 modules, as explained in forum post 801d8f77e5115141. (check-in: 0590de4d user: stephan tags: trunk)
21:39
wasm build: include FTS5 instead of FTS4, per /chat and HN discussions. (check-in: 85c3f2ac user: stephan tags: trunk)
19:57
Fix harmless typo in comment, reported by Debian in Fossil https://fossil-scm.org/forum/forumpost/15f7327318. (check-in: 5689f0d9 user: drh tags: trunk)
19:53
Avoid returning SQLITE_SCHEMA if the first query run on a connection is "SELECT nosuchcolumn" or similar. Forum post c1798f77ef (check-in: 3dc4f75d user: drh tags: trunk)
16:14
Merge version 3.40.0 into the reuse-schema branch. (check-in: 2aec00a7 user: drh tags: reuse-schema)
16:00
Merge the 3.40.0 release into the wal2 branch. (check-in: 2df915ef user: drh tags: wal2)
12:10
Version 3.40.0 (check-in: 89c459e7 user: drh tags: trunk, release, major-release, version-3.40.0)
2022-11-14
19:42
Previous change to the fake_big_file command in the test harness was not correct. This one should fix the problem. (check-in: 6ee57a2e user: drh tags: trunk)
18:57
Change the fake_big_file test command so that it fails for files larger than 2MB on Windows, as we have observed that Window10 will sometimes bluescreen when operating on very large sparse files. (check-in: d39ffd2a user: drh tags: trunk)
17:48
Avoid running bigsort.test with SQLITE_DEBUG builds. The assert() statements added in [7c96a56] make it too slow. (check-in: fa68dd89 user: dan tags: trunk)
13:41
Merge the 3.40.0 rc1 changes into the reuse-schema branch. (check-in: 886788b6 user: drh tags: reuse-schema)
13:10
Merge the 3.40.0 rc1 changes into the wal2 branch. (check-in: a5a610a6 user: drh tags: wal2)
2022-11-13
19:29
Remove some outdated code comments. No code changes. (check-in: 80ff592a user: stephan tags: trunk)
2022-11-12
17:17
Disable the ability to change the schema_version cookie when SQLITE_DBCONFIG_DEFENSIVE mode is enabled. This is a security enhancement inspired by the question in forum post 2b9cc3dae1f1e5f6. (check-in: 1d81381e user: drh tags: trunk)
2022-11-10
23:10
Remove unnecessary tabs in the ChaCha20 implementation. Forum post 0cdce5db8c. (check-in: b7179efb user: drh tags: trunk)
19:19
Avoid returning SQLITE_SCHEMA if the first query run on a connection is "SELECT nosuchcolumn" or similar. Forum post c1798f77ef (Closed-Leaf check-in: d31c019f user: dan tags: schema-error-fix)
13:22
Automatically relinquish implicitly-acquired OPFS file locks during VFS idle time in an attempt to help alleviate cross-tab locking contention like that described in forum post 58a377083cd24a. (check-in: 8daf24ff user: stephan tags: trunk)
13:14
Rework automatically acquired OPFS locks to be released during idle time. This eliminates the performance hit reported in [46304ba057707c]. (Closed-Leaf check-in: a7fe91af user: stephan tags: opfs-lock-without-xlock)
11:35
OPFS: if an op which needs a lock is called when no lock has been obtained, automatically lock it at the start of the op and unlock it at the end of that op. This is an attempt to alleviate the cross-tab contention described in forum post 58a377083cd24a but it increases speedtest1 run time by approximately 4x. Perhaps auto-lock can be combined with the older idle-time-based auto-unlock to unlock such locks (but not those from xLock()) to improve this? (check-in: 46304ba0 user: stephan tags: opfs-lock-without-xlock)
2022-11-09
11:17
Better handle an error in the fts5 integrity-check code. dbsqlfuzz e87c62f9b67ea21aebdc36ab71cab7cc3eda8dc3. (check-in: ae43e970 user: dan tags: trunk)
11:02
Additional defense against corrupt database files in dbdata.c. (check-in: 2e70d1e5 user: drh tags: trunk)
10:17
Increase the precision of the nData parameter to the dbdataValue() routine inside the sqlite_dbdata virtual table, to avoid the possibility of integer overflow. (check-in: 295447b4 user: drh tags: trunk)
2022-11-08
20:04
Fix a problem with URI formatting in calls to sqlite3rbu_vacuum(zDb, NULL) causing problems on win32. First reported here <https://sqlite.org/forum/forumpost/a7ae915a9d>. (check-in: 77ccc8ea user: dan tags: trunk)
19:36
Do not attempt to run test script dbpagefault.test with SQLITE_OMIT_VIRTUALTABLE builds. (check-in: 901918c4 user: dan tags: trunk)
15:49
Fix a problem in main.mk preventing the amalgamation-testfixture target from building. (check-in: ccf00a0e user: dan tags: trunk)
2022-11-07
19:40
Further improvements to the handling of the u32 and u16 typedefs in the shell.c source file. (check-in: 55a19677 user: drh tags: trunk)
18:36
Improve the ability of mkshellc.tcl to remove redundant typedefs from the generated shell.c code. This is needed to get shell.c to build on older C compilers. (check-in: 3645585f user: drh tags: trunk)
18:09
Update this branch to match latest trunk changes. (check-in: 833f6374 user: dan tags: reuse-schema)
18:00
Add the sqlite3rbu_rename_handler() API. To override the default routine that RBU uses to rename files. (check-in: ebbb1f88 user: dan tags: trunk)
17:21
Minor doc updates in speed-check.sh. No code changes. (check-in: d2ed4116 user: stephan tags: trunk)
15:23
Fix an obsolete comment. (check-in: e377c0a1 user: drh tags: trunk)
15:01
Fix typo in comment. (check-in: c3b94d7d user: drh tags: trunk)
13:06
Add sqlite3.wasm.alloc.impl() as a "public back door" into the low-level non-throwing allocator. Correct sqlite3.WasmAllocError constructor to behave like its usages expect it to and add tests for that. (check-in: cea8bf9a user: stephan tags: trunk)
12:21
Fix requirements marks so that they match documentation corrections. (check-in: 10d6189d user: drh tags: trunk)
12:12
Minor wasm doc touchups. No code changes. (check-in: 2c448368 user: stephan tags: trunk)
11:19
Fix the documentation regarding negative length parameters for sqlite3_result_text() interfaces, to point out that the length parameter to sqlite3_result_text64() cannot be negative. Forum post cf1d043b07. Comment/documentation change only. (check-in: 80165076 user: drh tags: trunk)
11:05
Make sure that the recoverStrlen() function (used internally by the new recovery extension) is 64-bit safe. (check-in: ea30a6bf user: drh tags: trunk)
2022-11-06
17:19
The recoverAssertMutexHeld() function is for testing and verification only and should be a harmless no-op for production builds. [forum/forumpost/b4f2c7d402|Forum post b4f2c7d402]. (check-in: d7550471 user: drh tags: trunk)
13:12
shell.c.in: on non-Windows platforms, check for $XDG_CONFIG_HOME/sqlite3/sqliterc before ~/.sqliterc, per request in forum post 7a16582b1e403c81. (Closed-Leaf check-in: 49c6e438 user: stephan tags: sqliterc-xdg-config)
2022-11-05
19:26
Update test file dbpagefault.test to account for the restriction on using SQLITE_VTAB_DIRECTONLY virtual tables from within triggers. (check-in: 2b68fc8a user: dan tags: trunk)
17:52
Fix harmless compiler warnings. (check-in: fe44e7ef user: drh tags: reuse-schema)
15:31
Merge the latest trunk enhancements into the reuse-schema branch. (check-in: 224eaf26 user: drh tags: reuse-schema)
2022-11-04
18:58
Merge the latest trunk enhancements into the wal2 branch. (check-in: ca63a1be user: drh tags: wal2)
18:32
Tweaks to recover module test scripts to work with various permutations. (check-in: 454c61e8 user: dan tags: trunk)
17:07
Another test case fix for auto-vacuum builds. (check-in: c1c47eff user: dan tags: trunk)
16:39
Fixes to recover module test scripts so that they may be used with SQLITE_DEFAULT_AUTOVACUUM and SQLITE_SECURE_DELETE builds. (check-in: 0e5597ce user: dan tags: trunk)
15:17
Fix Tcl tests so that they again build and run with SQLITE_OMIT_VIRTUALTABLE defined. (check-in: 06a9dbea user: dan tags: trunk)
12:59
Remove an unimportant testcase() macro that is no longer reachable due to the improvement in corruption detection. (check-in: cd7e3568 user: drh tags: trunk)
11:59
Add another test case for the OP_Found fix. (check-in: 6cdd64a4 user: dan tags: trunk)
11:54
Enhance the ability of the OP_Found and similar opcodes to detect truncated index records and report SQLITE_CORRUPT. dbsqlfuzz 2b12f90aeff8e081706c7e9b58834f04869f446c. Test cases in TH3. (check-in: 059a09da user: drh tags: trunk)
09:02
Correct sqlite3-wasm.c's SQLITE_DEFAULT_CACHE_SIZE (it's measured in kb, not bytes). (check-in: 479ad980 user: stephan tags: trunk)
2022-11-03
22:51
Add experimental esm target to ext/wasm/GNUmakefile to tell emcc to generate sqlite3.mjs (ES6 module) instead of sqlite3.js. Related to discussion at ed4596cf8496a39b. (check-in: e55d8eba user: stephan tags: trunk)
22:14
Experimentally use clang's C preprocessor to filter #ifdef's out of the generated sqlite3-api.js, the goal being to see if we can feasibly use cpp to include ES6 module-specific code in the main code base and conditionally filter it out. (check-in: 718a6d37 user: stephan tags: js-cpp)
21:21
Globally replace '' with "" for empty JS strings to please C preprocessor. (check-in: e92e1f42 user: stephan tags: trunk)
21:08
Experimental changes that try to identify indexes as covering when they contain expressions which do cover all data uses. This check-in does not work, because the AggInfo object might still refer to individual columns. The purpose of this check-in is to preserve the idea. I might come back to it later. (Leaf check-in: 018914a5 user: drh tags: indexed-expr-exp)
2022-11-02
14:08
Minor build cleanups and fix a harmless race condition in the OPFS part of tester1.js. (check-in: 70ee6ee0 user: stephan tags: trunk)
14:08
Clarify documentation regarding the --recovery-db option to ".recover" and the magic 789 configuration option it is associated with. (check-in: f6fa0cff user: drh tags: trunk)
13:09
Minor improvements to API documentation in comments for the recovery extension. (check-in: ed1c3515 user: drh tags: trunk)
11:53
Add sqlite3_wasm_vfs_create_file() to replace Emscripten's FS.createDataFile() in a (mostly) VFS-agnostic way. Add a test for worker1's export (to bytearray) support. Re-add worker1 open-from-bytearray using sqlite3_wasm_vfs_create_file() but it's untested (requires a new interactive test app or maybe reconsideration). (check-in: b35e1225 user: stephan tags: trunk)
11:25
Emcc seems confused by SQLITE_DEBUG, for reasons unknown. Use NDEBUG instead to simplify the #ifdef logic in sqlite3recover.c. (check-in: 2610779a user: drh tags: trunk)
08:49
Fix a symbol name typo which broke and exception-handling case in OPFS xOpen(). (check-in: 5bc83d56 user: stephan tags: trunk)
08:10
Fix a missing symbol in non-SQLITE_DEBUG builds. (check-in: 17cdcad6 user: stephan tags: trunk)
2022-11-01
21:42
Fix a harmless compiler warning. (check-in: 663a8916 user: drh tags: trunk)
19:35
Instead of (const char*), use a special type - sqlite3_filename - as the filename argument passed to VFS method xOpen(). (check-in: 90df04e5 user: dan tags: trunk)
18:56
Fix harmless compiler warnings. (Closed-Leaf check-in: de829770 user: drh tags: sqlite3_filename)
17:43
Instead of (const char*), use a special type - sqlite3_filename - as the filename argument passed to VFS method xOpen(). (check-in: bd1fe4de user: dan tags: sqlite3_filename)
14:13
Fix compilation errors in the recover API seen with MSVC. (check-in: 78d17c4f user: mistachkin tags: trunk)
13:12
Fix a #ifdef involving SQLITE_OS_KV that was adding code unnecessarily. (check-in: b6c1b6e4 user: drh tags: trunk)
12:10
Enforce affinity on materialized tables for subqueries and views. Also, do not allow UNION ALL flattening if the affinity of a result column varies between different arms of the compound. This is a fix for ticket [57c47526c34f01e8]. (check-in: 88a05141 user: drh tags: trunk)
12:01
Improvements to comments. Change the "optimization_control" TCL command in the test harness so that it returns the new optimization mask, for verification. (Closed-Leaf check-in: a3a50012 user: drh tags: tkt-57c47526)
11:09
Minor internal cleanups in the js pieces. (check-in: 271391b4 user: stephan tags: trunk)
07:49
Significant cleanups and expansion of the sqlite3.opfs utilities. Add oo1.DB.dbVfsName(). Add VFS name to worker1:open's arguments and result. (check-in: 86a341d7 user: stephan tags: trunk)
01:07
Do not flatten a UNION ALL subquery where the column affinities do not match on all arms. Force that subquery to be materialized. (check-in: 1b8a1288 user: drh tags: tkt-57c47526)
00:52
Enforce column affinity on the materialization of a subquery or view. (check-in: b6692de3 user: drh tags: tkt-57c47526)
2022-10-31
18:01
Make the UPDATE method of the sqlite_dbpage virtual table rebust against OOM errors. Forum post bbcf0dd6ca. Test case in TH3. (check-in: d15c9a4a user: drh tags: trunk)
13:50
Worker1: use a list, rather than a single slot, to manage the default db link so that we can keep the least-recently-opened db as the default. Re-introduce worker1.export() but do not yet expose it until an equivalent import() (or open() option) is implemented. (check-in: c7750c10 user: stephan tags: trunk)
11:53
Internal tweaks to the OPFS VFS result codes. (check-in: 32e1a2d2 user: stephan tags: trunk)
11:09
Add oo1.DB.exec() 'returnValue' option, which specifies what exec() should return. Defaults to the db object and enables direct return of the result rows array or a list of the individual SQL statements. Other code-adjacent internal cleanups. (check-in: 69d36a6a user: stephan tags: trunk)
10:53
Avoid a segfault that could occur when running the recover API on a database handle with memory-mapping enabled. (check-in: e02c6972 user: dan tags: trunk)
01:22
Extra OOM check in shell_error_context() of the CLI. forum post 5708841db0. (check-in: cb12ac5d user: drh tags: trunk)
2022-10-30
11:39
Add oo1.DB.selectArray() and selectObject(). (check-in: 7660db2a user: stephan tags: trunk)
11:22
Refactoring towards being able to distinguish locking-related errors from non-locking errors in OPFS VFS operations. On a branch because it's not yet clear whether this is a misuse of the SQLITE_IOERR_... codes. Edit: indeed, this is a misuse of the result codes. (Closed-Leaf check-in: 646fe2ce user: stephan tags: opfs-locking-result-codes)
10:24
Adjust automatic OPFS locking retries such that they will wait up to a total of 3 seconds spanning 4 attempts. (check-in: bbce49d8 user: stephan tags: trunk)
09:47
Minor WASM build cleanups. Enable custom Module.instantiateWasm() when not in WASMFS mode (where it doesn't work). Add sqlite3.debugModule URL param to enable some module-init-time debugging output. (check-in: 50f67884 user: stephan tags: trunk)
08:39
Reduce wasm module's starting memory from 128mb to 16mb. The latter value is needed only for WASMFS-based batch-runner.js, as WASMFS builds cannot be configured for dynamic memory growth without a tremendous performance hit. (check-in: ed9d93c4 user: stephan tags: trunk)
07:01
Minor updates to the Windows batch tools. (check-in: b42f5620 user: mistachkin tags: trunk)
2022-10-29
12:31
Update ext/wasm/README.md for recent developments. (check-in: c76ec31e user: stephan tags: trunk)
10:14
More styling of module-symbols.html. (check-in: a36f42a8 user: stephan tags: trunk)
09:45
Expand and document the wasm doc-update make rules. Extend the dist rules to fail more readily if there's a problem. (check-in: 362ec11e user: stephan tags: trunk)
07:54
Move the sqlite3.capi.wasm namespace to sqlite3.wasm. This causes a tiny bit of naming confusion with the sqlite3.wasm *file*, but seems to make more sense than having it as a sub-namespace of capi. (check-in: 3f16eb18 user: stephan tags: trunk)
2022-10-28
18:52
Fix harmless compiler warnings in testing code. (check-in: 2f536123 user: drh tags: trunk)
18:35
Add sqlite3recover() support to fuzzcheck. (check-in: e65c5bdc user: drh tags: trunk)
14:33
Remove sqlite3_interrupt() from the WASM build, as it is essentially impossible to employ in JS's threading model. (check-in: e8538759 user: stephan tags: trunk)
11:40
Add ext/wasm/module-symbols.html. Adjacent minor JS touchups. (check-in: 24f12e68 user: stephan tags: trunk)
10:36
Minor sqlite3.oo1 API reorg prompted by documenting. (check-in: 55237924 user: stephan tags: trunk)
2022-10-27
23:17
Fix a minor problem with sqlite_dbdata. (check-in: 58c2e492 user: drh tags: trunk)
20:27
Fix another crash in the recover extension triggered by a corrupt database. (check-in: d1253773 user: dan tags: trunk)
19:06
Fix another problem to do with recovering from in-memory databases. (check-in: 5a7bfd4a user: dan tags: trunk)
19:02
Ensure that the VFS wrapper in the recover extension does not attempt to invoke undefined methods on the underlying VFS. (check-in: 347c5751 user: dan tags: trunk)
18:35
Fix an assert() failure in the recover extension triggered by a zero value as the first page-number in an overflow page chain. (check-in: 44c0874c user: dan tags: trunk)
18:20
In the CLI, ensure that input to utf8_width_print is not NULL, or if it is, change it to an empty string. For for the problem reported by forum post 2961cf13eec61876. (check-in: 9ecc9d25 user: drh tags: trunk)
18:19
Change the name of the ".recover" command option "--freelist-corrupt" to "--ignore-freelist". (check-in: afce8443 user: dan tags: trunk)
14:41
speedtest1.html: when vfs==kvvfs, increase --size from 2 to 4, as enabled by [a4d40f6346e7]. --size 5 is 4.96mb out of (supposedly) 5mb, which works but is a bit too close to the edge. (check-in: a608d584 user: stephan tags: trunk)
14:28
Automatically set temp_store=MEMORY if the VFS is kvvfs. (check-in: a4d40f63 user: drh tags: trunk)
14:00
Do not accept a NULL pointer for the filename in KVVFS. (check-in: fdecbd3b user: drh tags: trunk)
12:46
The kvvfs VFS should remember the page size when writing to the database. (check-in: fc5503c8 user: drh tags: trunk)
11:32
Re-enable the .recovery and .dbinfo commands in shell.c.in in the fiddle build, as those were fixed by [3d20d77a3511] and [cd0aa27d1732]. (check-in: ba3a7a4a user: stephan tags: trunk)
11:25
Do not use sqlite3_result_text16() in the recover extension if SQLITE_OMIT_UTF16 is defined. (check-in: 3d20d77a user: dan tags: trunk)
11:12
Fix a problem with running ".recover" on an in-memory database. (check-in: 87b4cca2 user: dan tags: trunk)
10:51
Do not use sqlite3_mutex_xxx() functions in sqlite3recover.c when built with SQLITE_THREADSAFE=0. (check-in: cd0aa27d user: dan tags: trunk)
03:57
Minor doc typo fixes. (check-in: ed8d3f25 user: stephan tags: trunk)
03:56
Restructure and simplify the feature-detection #defines of the recovery support in shell.c.in and disable it when building fiddle because it uses features we elide from the wasm build (e.g. utf16), leading to link errors. (check-in: ddd10c05 user: stephan tags: trunk)
03:03
Expose sqlite3_randomness() to WASM and add a custom binding for it which can populate a JS byte array. Add WhWasmUtil.isPtr(). (check-in: 333e6707 user: stephan tags: trunk)
2022-10-26
21:14
Disable the push-down optimization for sub-queries that are INTERSECT, UNION or EXCEPT compounds. dbsqlfuzz a34f455c91ad75a0cf8cd9476841903f42930a7a. This corrects an issue that was introduce 12 days earlier by [ed14863dd72e35fa]. (check-in: 346a3b12 user: dan tags: trunk)
20:12
Remove an unused variable from the recovery extension. (check-in: a029dddf user: drh tags: trunk)
18:41
Add the "recover" extension in ext/recover/, for salvaging data from corrupt databases. (check-in: a8207925 user: dan tags: trunk)
18:29
Remove an undefined left-shift operation from the recover extension. (Leaf check-in: a6708235 user: dan tags: recover-extension)
18:22
Merge further changes from trunk, including fix to dbdata.c. (check-in: bcf6b48d user: dan tags: recover-extension)
18:04
Make the shell .recover command and the dbdata.c module more robust in the face of corrupted databases. (check-in: 4eef562a user: dan tags: trunk)
15:40
Correct misuse of localhost-mode-only symbol S in fiddle-worker.js, which should fix the outage reported in forum post 67d985ac0bbe407f. (check-in: 3b5aa50c user: stephan tags: trunk)
15:34
Corrected link to fiddle in ext/wasm/index.html (broken by [3d7b4f36b7dd]). (check-in: 6efa0bae user: stephan tags: trunk)
11:27
Replace the newly-removed oo1.DB.getFilename() with DB.dbFilename() with the hope that the distinction from the dbInstance.filename property is clearer. (check-in: 0b80543d user: stephan tags: trunk)
11:12
Remove oo1.DB.hasFilename() and getFilename(), as they are unnecessary. (check-in: 75c546b9 user: stephan tags: trunk)
11:11
Remove the sqlite3StdTypeMap global constant that was made obsolete by [aa6e908619624867]. (check-in: 3dfdfb3f user: drh tags: trunk)
06:05
Add --download-version flag to ext/wasm/version-info.c and correct dist target's output version format to match. (check-in: 6f2a40d0 user: stephan tags: trunk)
2022-10-25
16:57
Add doc page link to the wasm dist README.txt. (check-in: c2380668 user: stephan tags: trunk)
16:04
Correct -O level for fiddle build when built from the top-most directory (-Os instead of -O0). (check-in: ff4fc29c user: stephan tags: trunk)
15:59
Rename fiddle.html to index.html and move fiddle push-to-server rules from GNUmakefile into fiddle.make. (check-in: 3d7b4f36 user: stephan tags: trunk)
15:38
speedtest1: use the current (or default) vfs->xDelete method to unlink the db. This is specifically necessary when running the opfs vfs in a wasm build of speedtest1. This worked without this fix until recently because the affected test code was performing similar acrobatics in its stead. (check-in: d3c830bd user: stephan tags: trunk)
13:44
Enhance the sqlite3_strglob() and sqlite3_strlike() interfaces so that they will do sensible things with NULL string pointers. This is an extra layer of defense against bugs such as reported by forum post 730b554179. (check-in: 8ba9c884 user: drh tags: trunk)
13:42
Make the ".dump" command of the CLI more robust against malformed databases. See forum post 730b554179. (check-in: 0573edfb user: drh tags: trunk)
11:05
Merge latest trunk changes with this branch. (check-in: 757e3f58 user: dan tags: recover-extension)
08:41
Minor doc tweaks in the JS GNUmakefile. (check-in: 9c8df130 user: stephan tags: trunk)
08:15
Remove persistence from the 'reverse log order?' checkbox in tester1.js to eliminate an inconsistency between the main-thread and worker-thread modes (the latter having no option for persistence of that setting). (check-in: ecf906b0 user: stephan tags: trunk)
08:06
Minor cleanups and doc improvements in the OPFS sqlite3_vfs proxy. (check-in: 48645f7b user: stephan tags: trunk)
2022-10-24
21:58
This check-in attempts to make the SrcItem object smaller by combining the zDatabase and pSchema fields into a single union. It mostly works, but there are some issues, and the performance savings is minimal. So it is side-tracked onto this dead-end branch. (Closed-Leaf check-in: 80fbb30f user: drh tags: failed-opt-attempt)
18:42
Fix typo in comment. (check-in: f65c9565 user: drh tags: trunk)
18:33
Add a comment to a previously undescribed member of the Walker union. (check-in: 69d70422 user: drh tags: trunk)
15:51
Use the same "PRAGMA synchronous" setting for the output of a "VACUUM INTO" as are configured for the database being vacuumed. (check-in: 86cb21ca user: dan tags: trunk)
13:20
Improve the ability of the query planner to recognize covering indexes even on tables with more than 63 columns and where the index is over columns beyond the 63rd column. (check-in: f058773e user: drh tags: trunk)
12:38
Update the fuzzinvariant logic in fuzzcheck to the latest code from dbsqlfuzz. (check-in: 739ad584 user: drh tags: trunk)
11:10
Fix built-in documentation for the ".mode qbox" command in the CLI. (check-in: 3d7ea33b user: drh tags: trunk)
11:02
Test cases for covering indexes on wide tables. (Closed-Leaf check-in: 64c3777e user: drh tags: covering-index-enh)
2022-10-23
20:09
The wide-table covering index detection must take into account aggregate queries. (check-in: 9ac73f83 user: drh tags: covering-index-enh)
2022-10-22
23:09
More frequently send the complete SELECT statement into sqlite3WhereBegin() so that it can more accurately determine index coverage. (check-in: f6d09c5a user: drh tags: covering-index-enh)
20:13
Enhance the query planner with the ability to discern when an index is covering even when it indexes columns well beyond the 63rd column. (check-in: 1390417b user: drh tags: covering-index-enh)
14:16
This branch attempts to improve the detection of covering indexes. This first check-in merely improves a parameter name to sqlite3WhereBegin() to be more descriptive of what it contains, and ensures that a subroutine is not inlines so that sqlite3WhereBegin() runs slightly faster. (check-in: cadf5f6b user: drh tags: covering-index-enh)
13:49
Clarification on the meaning of SrcList and SrcItem and especially the SrcItem.colUsed and Index.colNotIdxed fields. Comment changes only - no changes to code. (check-in: d96f6cc8 user: drh tags: trunk)
2022-10-21
17:48
Add SQLITE_DQS to the compileoptions_used list, per request in forum post 8b1060122b. Force DQS=0 in sqlite3-wasm.c. (check-in: fcd9e0db user: stephan tags: trunk)
17:37
Macro name typo fix in OS_KV builds. (check-in: 9cf1142b user: stephan tags: trunk)
17:18
Ensure that the RtreeCell object in rtreeUpdate has all bytes initialized. (check-in: 1e38742b user: drh tags: trunk)
06:58
Add kvvfs tests to tester1.js. Fix a scopedAlloc() misuse in oo1.DB ctor caused by refactoring earlier this morning (and caught by these new tests). (check-in: 8e0f001a user: stephan tags: trunk)
06:26
Add timing info and OPFS sanity tests to tester1.js (check-in: 99915b00 user: stephan tags: trunk)
05:27
Expose sqlite3_vfs_unregister() to WASM and unregister kvvfs in Worker threads to avoid its unintended use there (in contexts other than local/sessionStorage). Correct registration of window functions, extend oo1.DB.createFunction() to support window functions, and add window function tests to tester1.js. Correct an incorrect 1-arg handling case for DB.exec(). Add per-test assertion counts to tester1.js. (check-in: f07ce154 user: stephan tags: trunk)
2022-10-20
23:48
Make semantics for UDF xFinal() result handling and error reporting handling more flexible. (check-in: 89f3e198 user: stephan tags: trunk)
21:28
Add more JS tests. Flesh out the aggregate UDF tests to use sqlite3_aggregate_context() so that they can each be used multiple times in the same statement. Add sqlite3_js_aggregate_context() convenience helper. (check-in: 9d034ef5 user: stephan tags: trunk)
18:58
Apply magic.txt correction and addition reported in forum post 2d2366a04a0385. (check-in: 9bf26e2a user: stephan tags: trunk)
18:31
Rename sqlite3_web_... to sqlite3_js_... Document the worker1.close.unlink option. Fix unlink usage in speedtest1.html. Minor JS build cleanups. (check-in: ac9af71b user: stephan tags: trunk)
16:30
Add a bit to the optimization disabling mask for the indexed expression optimization. (check-in: 56df1482 user: drh tags: trunk)
16:22
Add test case for previous commit. (check-in: 535867a9 user: dan tags: trunk)
16:12
Only enable the bMaybeNullRow flag on IndexedExpr for an index on an expression, not on a virtual column. But do enable it for the right operand of a right join. (check-in: a9657c87 user: drh tags: trunk)
13:36
The generalized indexed expression optimization of [2435112867fbd7b6] makes the prior [a47efb7c8520a011] enhancement from 2017 obsolete. This check-in removes the older optimization. (check-in: 56442c9b user: drh tags: trunk)
10:46
Fix minor problems in test1.c test code. (check-in: 6e545e2b user: dan tags: trunk)
05:14
Rework sqlite3_wasm_vfs_unlink(), add sqlite3_wasm_db_vfs(), update some docs. (check-in: cdd46858 user: stephan tags: trunk)
04:00
Minor internal JS cleanups. (check-in: 818ef0b5 user: stephan tags: trunk)
2022-10-19
18:04
In the CLI, never use strcmp() or strncmp() directly. Instead use wrapper functions cli_strcmp() and cli_strncmp() that work correctly even if the input is a NULL pointer. Forum post 142b868da7560d0b. (check-in: 7450a561 user: drh tags: trunk)
18:03
Move file /ext/misc/dbdata.c to the /ext/recover/ directory. (check-in: f6d5ac80 user: dan tags: recover-extension)
11:58
Fix references to "SrcList_item" in comments as that object has since [bfd5bf2c73110fcb] (2021-02-21) been called "SrcItem". Comment changes only. No changes to code. (check-in: e3648a07 user: drh tags: trunk)
10:56
If a query uses an index where one or more of the columns of the index is an expression or a virtual column, and if the corresponding expression is used elsewhere in the query, then strive to read the value of the expression out of the index, rather than recomputing it. This is the "Indexed Expression Optimizations". (check-in: 24351128 user: drh tags: trunk)
07:51
Update the wasm/js 'push' rule to account for this morning's changes. (check-in: c4a0f745 user: stephan tags: trunk)
07:34
Rename several demo/test files and include more of them in the end-user dist archive. (check-in: 9c85835f user: stephan tags: trunk)
06:14
Minor wasm/js build tweaks. (check-in: bcbee1ec user: stephan tags: trunk)
06:06
Update the dist rules for this evening's js/wasm build changes and include an index.html specifically for the subset of apps included in the dist archive. (check-in: a0ef0f32 user: stephan tags: trunk)
04:44
Apply considerable acrobatics to get the JS/WASM deliverables building to and loadable from a directory other than the one which contains the app-level code. Requires an only-slightly-leaky abstraction of passing a URL argument when loading sqlite3.js but provides much greater flexibility in where the JS/WASM files are located. (check-in: 6d468dab user: stephan tags: trunk)
01:07
Considerable wasm/js build cleanups and reworking. Remove wasmfs builds from the end-user deliverables and disable the wasmfs build by default, per /chat discussion, as it doubles our deliverable count for only marginal gain. Attempt to move the sqlite3.js/wasm files into subdirectories but rediscovered that that breaks loading in Worker mode because URI resolution of the wasm files differs depending on whether the main script is loaded from a script tag or a Worker. (check-in: 5b23e067 user: stephan tags: trunk)
2022-10-18
22:37
If a virtual column whose value is constant gets indexed, do not include that column in the IndexedExpr list. dbsqlfuzz 59ac17a99b9a5c4930ee71cc153c9428a0c0e794 (Closed-Leaf check-in: c21eb903 user: drh tags: index-expr-opt)
20:36
More work on the JS end-user deliverables. Add tool/stripccomments.c to support that. (check-in: 2156f074 user: stephan tags: trunk)
20:27
Improved byte-code comments for the OP_Column opcodes used by the indexed expression optimization. (check-in: bf6d837f user: drh tags: index-expr-opt)
16:47
Fix the indexed expression resolver for generated columns so that it picks the correct table in a self-join. (check-in: 54c3eb08 user: drh tags: index-expr-opt)
16:32
Merge recent trunk fixes into the index-expr-opt branch. (check-in: 6198ab4b user: drh tags: index-expr-opt)
15:02
Add new test file windowE.test, to test the window functions modules response to an inconsistent collation sequence. (check-in: 740a2eb0 user: dan tags: trunk)
13:27
Correct sort order for serial-type 10 entries in the database file. This is a continuation of [4fb77e96fa89a23a]. (check-in: 904b5462 user: drh tags: trunk)
11:28
Merge trunk fixes into the index-expr-opt branch. (check-in: c7b9cc64 user: drh tags: index-expr-opt)
10:27
Fix sqlite3VdbeRecordCompareWithSkip() so that it sorts the internal-use serial-type of 10 together with NULLs. dbsqlfuzz 5ff35e9d49a5fcca5051e23960ff2f483a538bab (check-in: 4fb77e96 user: drh tags: trunk)
2022-10-17
17:36
Add ext/wasm/README-dist.txt, intended to have been in the previous checkin. (check-in: c9080b65 user: stephan tags: trunk)
17:34
Initial draft of archive generation for the wasm/js deliverables. (check-in: f6cee114 user: stephan tags: trunk)
16:47
Repair version-info.c after a local mishap caused all of the intended edits from [36e197cb3d0c]/[e9b407a4d0a0] to get deleted before checkin. Simplify version-info build (only requires sqlite3.h, not the library). (check-in: 6e511df5 user: stephan tags: trunk)
16:31
Merge trunk changes into the index-expr-opt branch. (check-in: a1485ce6 user: drh tags: index-expr-opt)
16:09
Fix a potential call to strlen() with a null argument in the command-line shell following an OOM error. forum post 9c4f2ebe22. (check-in: b6413a6d user: drh tags: trunk)
15:53
Missing file-rename for the previous checkin. (check-in: e9b407a4 user: stephan tags: trunk)
15:52
Rework ext/wasm/version-info.c to make it more useful for the upcoming dist build rules. (check-in: 36e197cb user: stephan tags: trunk)
14:46
Improved comments and function names. No logic changes. (check-in: 8f460b3b user: drh tags: index-expr-opt)
14:30
Get the indexed expression optimization working for virtual generated columns. (check-in: 8a510cb0 user: drh tags: index-expr-opt)
14:29
Merge trunk enhancements into index-expr-opt branch. (check-in: 56ef97e6 user: drh tags: index-expr-opt)
10:15
Make use of alloca() in wherePathSolver() when SQLITE_USE_ALLOCA is defined. (check-in: 45752471 user: drh tags: trunk)
09:56
Remove a use of alloca() that does more harm than good. (check-in: 2ab3cf4d user: drh tags: trunk)
2022-10-16
23:33
Typo fix. (check-in: 650126c9 user: stephan tags: trunk)
18:57
Minor tweak to get bring an edge case of oo1.DB.createFunction() into aggreement with its docs. (check-in: 8d59ccd9 user: stephan tags: trunk)
18:50
Add aggregate function support to sqlite3.oo1.DB.createFunction(). Change signature of the options object used by that function so that the callback property names match those of the corresponding C APIs. (check-in: a7db6e4b user: stephan tags: trunk)
16:38
JS: add build-time-generated version info to the sqlite3.version object. Remove some stray debug output from tester1.js. (check-in: b5f462c2 user: stephan tags: trunk)
15:38
Add a top-level license and build-time version info header to generated sqlite3*.js. Correct a broken link in ext/wasm/index.html. (check-in: 0f1a06e8 user: stephan tags: trunk)
2022-10-15
19:18
Exclude slow test recovercorrupt.test from veryquick.test. (check-in: ff9a7335 user: dan tags: recover-extension)
18:26
Add missing comments and fix other code issues. (check-in: 8ed4e4a8 user: dan tags: recover-extension)
15:39
Merge latest trunk changes. (check-in: 42255ead user: dan tags: recover-extension)
12:01
Enable the index-on-expression optimization even when the expression is used as an argument to an aggregate function. (check-in: 462b3c7f user: drh tags: index-expr-opt)
11:27
Only extract an expression from an index when the index is not a null row in an outer join. (check-in: 08b033c7 user: drh tags: index-expr-opt)
2022-10-14
19:56
Merge fixes from trunk. (check-in: 1cb65f36 user: drh tags: index-expr-opt)
19:30
Fix a problem with using the push-down optimization on compound SELECTs where component SELECTs use different collation sequences. dbsqlfuzz 11516f050100243e5a845f5a2b48a90ed2efaf2e. This problem appears to go all the way back to the beginning of the push-down optimization in check-in 6df18e949d367629 in SQLite 3.8.11. (check-in: ed14863d user: dan tags: trunk)
19:21
Add missing initializer from the extension loader. Fix for check-in [d6d449978245b4fa]. (check-in: 565d74c3 user: drh tags: trunk)
15:52
Generic minor cleanups and docs in the OPFS async proxy. (check-in: a4423ca2 user: stephan tags: trunk)
15:10
Fix a problem in the LIKE and GLOB operators that may occur when the character immediately following a "%" or "*" wildcard is U+80. Reported by forum post 61bf7ccbdf. (check-in: 2da677c4 user: dan tags: trunk)
13:26
Remove a resolved TODO comment. (check-in: 32fd4ac3 user: stephan tags: trunk)
02:00
Cancel IndexExpr objects when they go out of scope. (check-in: 09635193 user: drh tags: index-expr-opt)
2022-10-13
21:08
This experimental branch attempts to use columns for an index-on-expression in place of the expression that is being indexed. This particular check-in mostly works, but there are still issues. (check-in: 2e8d4fd4 user: drh tags: index-expr-opt)
16:48
Move the rest of testing1.js into tester1.js and eliminate the dependency on jaccwabyt_test.c. Extend the list of default config-related #defines in sqlite3-wasm.c and reorganize them for maintainability. (check-in: 4e2a8aff user: stephan tags: trunk)
15:09
Optimize the IS NULL and IS NOT NULL operators so that they avoid loading large strings or blobs off of disk if all it needs to know is whether or not the string or blob is NULL. (check-in: cb943501 user: drh tags: trunk)
14:54
Improvements to the description of the OPFLAG_TYPEOFARG option to OP_Column. (Closed-Leaf check-in: 5e9c67ba user: drh tags: isnull-opt)
14:35
Adjust the implementation of sqlite3VdbeTypeofColumn() to make it easier to test (and slightly smaller). (check-in: 79fdd021 user: drh tags: isnull-opt)
14:01
Fix a typo in the documentation of the OP_Column opcode. Forum post a2b5bd6d43. (check-in: 043e76e6 user: drh tags: trunk)
12:47
Proposed optimization to the IS NULL and NOT NULL operators that avoids loading the entire content of larges strings and BLOBs. Response to forum post 3c08d4715dc05b00. (check-in: 45f17156 user: drh tags: isnull-opt)
08:03
Port the first 180-odd unit tests from testing1.* into the new tester1.*. Fix a stray-keystroke-induced typo which broke pstack.allocChunks(). (check-in: ef689e33 user: stephan tags: trunk)
2022-10-12
18:40
Updates to the fuzzer query invariant checker - tracking changes made over in dbsqlfuzz. (check-in: 4ca16a30 user: drh tags: trunk)
18:30
Changes to Makefile.msc to fix the build on Windows following the previous merge. (check-in: 368fa6b2 user: drh tags: trunk)
18:13
Merge fiddle-opfs branch into trunk. (check-in: 98f95494 user: stephan tags: trunk)
16:35
Merge trunk into fiddle-opfs as a preliminary step for a clean merge in the other direction. (Closed-Leaf check-in: 5e1848ce user: stephan tags: fiddle-opfs)
12:49
Add the sqlite3_value_encoding() interface. (check-in: d6d44997 user: drh tags: trunk)
2022-10-11
13:57
Enhance the OP_IsType opcode so that it is slightly smaller and faster and so that it works correctly with invalid serial-type codes 10 and 11. (check-in: 846f863e user: drh tags: trunk)
12:02
Improved the ability of the CLI to handle very long input lines. Potentially a fix for the bug reported by forum post fa4bb2941a. (check-in: d0e107ee user: drh tags: trunk)
2022-10-10
23:54
Enhance the "PRAGMA integrity_check" statement so that it verifies datatype constraints on non-STRICT tables: (1) Columns with TEXT affinity should not contain numeric values, and (2) columns with NUMERIC affinity should not contain TEXT values that could be converted into numbers. (check-in: aa6e9086 user: drh tags: trunk)
21:21
Code clean-up for the integrity_check enhancement. (Closed-Leaf check-in: a1401731 user: drh tags: integrity_check_datatypes)