SQLite

Timeline
Login

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

100 check-ins occurring around bd87d107fe474cee.

2022-07-01
21:03
Do not attempt the OP_Count optimization on queries with HAVING clauses. This fixes a problem exposed by [2cf373b10c9bc4cb]. (check-in: 566b7842 user: dan tags: trunk)
19:42
Performance improvement in resolveP2Values(). Save over 1 million CPU cycles by omitting the loop termination condition and exiting when the OP_Init (always the first opcode in any VDBE program) is encountered. (check-in: bb179140 user: drh tags: trunk)
12:09
In the sqlite_stmt virtual table, add two ALWAYS() macros on branches that have been come always true due to the [84a91c255e3d7772] optimization. REVISED: Dbsqlfuzz found a case where the ALWAYS() is false. (Closed-Leaf check-in: bf34eddb user: drh tags: mistake)
2022-06-30
22:46
Small performance improvement to sqlite3_finalize(). (check-in: 8a6913b6 user: drh tags: trunk)
14:19
Fix documentation and test-script typos and a dependency problem on a Makefile. Fix the sqlite_stmt extension virtual table so that it shows the state of all prepared statements for a single instant in time. (check-in: 0a9e08be user: drh tags: branch-3.39)
11:01
Add missing "finish_test" command to the end of test script merge1.test. (check-in: 13cb3f1e user: dan tags: trunk)
2022-06-29
15:16
Have the sqlite_stmt table buffer all data for the current scan within the xFilter method. (check-in: 84a91c25 user: dan tags: trunk)
2022-06-28
21:52
Merge latest fixes from begin-concurrent-pnu-wal2 branch. (Leaf check-in: 77fe7376 user: dan tags: begin-concurrent-report-wal2)
2022-06-27
21:43
Merge in fix for wal2 recovery. (check-in: 41d4f14b user: dan tags: begin-concurrent-pnu-wal2)
21:42
Fix a problem causing false corruption reports following recovery of a *-wal file that contains one or more transactions and a *-wal2 file that contains a valid header but no valid transactions. (check-in: f6eafb65 user: dan tags: wal2)
11:28
Fix a missing dependency for json.lo in Makefile.in (check-in: 65930a5c user: drh tags: trunk)
2022-06-25
21:41
wasm: corrected the isInt32() check to account for negative values. (check-in: 7223f4bb user: stephan tags: wasm-cleanups)
20:32
Put an ALWAYS() on an unreachable branch. (check-in: 58caa50a user: drh tags: trunk)
19:43
Allow flattening of a subquery that is the right operand of a LEFT JOIN in an aggregate query as long as there is no GROUP BY clause. (The GROUP BY clause will interfere with the operation of the TK_IF_NULL_ROW expression nodes.) (check-in: 2cf373b1 user: drh tags: trunk)
19:30
Increase the version number to 3.40.0 so as to begin the next development cycle. (check-in: 4542e323 user: drh tags: trunk)
19:07
wasm: added bindings for sqlite3_extended_result_codes(), sqlite3_open_v2(), and the SQLITE_OPEN_... flags. (check-in: ac876ab9 user: stephan tags: wasm-cleanups)
18:55
Fix documentation type. forum post 8d900996ed. (check-in: 869061f1 user: drh tags: trunk)
18:18
wasm: lots of doc additions and refactoring. Refactored the WASM memory heap usage to hopefully eventually account for a runtime-growable heap. Differentiate between supported TypedArray types for input SQL strings vs binding/fetching blobs. Might (untested) have implemented the ability to bind UtfNNArray values as blobs, where NN is one of 16 or 32. (check-in: e10d57df user: stephan tags: wasm-cleanups)
17:20
Merge version 3.39.0 into the reuse-schema branch. (check-in: bee9903d user: drh tags: reuse-schema)
17:08
Merge version 3.39.0 into the begin-concurrent-pnu-wal2 branch. (check-in: 09cfef38 user: drh tags: begin-concurrent-pnu-wal2)
16:53
Merge version 3.39.0 into the wal2 branch. (check-in: ad3a7005 user: drh tags: wal2)
16:43
Merge version 3.39.0 into the begin-concurrent-report branch. (check-in: 7726389c user: drh tags: begin-concurrent-report)
16:24
Merge version 3.39.0 into the begin concurrent branch. (check-in: fb45624a user: drh tags: begin-concurrent)
14:57
Version 3.39.0 (check-in: 14e166f4 user: drh tags: trunk, release, major-release, version-3.39.0)
10:30
wasm: added utility C code to generate a JSON-format "enum" of the numerous SQLITE_xyz constants so that we do not risk those getting out of sync in the JS code. Renamed initSqlite3Module to sqlite3InitModule. Cleanups in the TypedArray handling. (check-in: 778062e3 user: stephan tags: wasm-cleanups)
07:42
wasm: eliminated the need for Stmt objects to keep ahold of memory allocated for bound strings and blobs. Added alternate string/blob bind impls which are hypothetically more efficient but not yet proven to be so. (check-in: da1d3151 user: stephan tags: wasm-cleanups)
06:46
wasm: eliminated the dependency on the deprecated emcc-provided allocate() function. Adjacent cleanups in blob binding. (check-in: 140618b2 user: stephan tags: wasm-cleanups)
03:53
wasm: corrected the propagation of text/blob values via UDFs. DB.exec()'s sql may now be an array of strings which get concatenated together before passing it on to sqlite3_prepare_v2(). DB.exec()'s callback now applies to the first statement which has result columns instead of only the first statement. Fixed a precedence but which caused isInt32() to report false positives. (check-in: 37a8fecb user: stephan tags: wasm-cleanups)
02:54
Minor wasm doc tweaks. (check-in: 42dc5008 user: stephan tags: wasm-cleanups)
02:39
Change a harmless assert() into a testcase(). The actually test case code is in TH3. Fix for the problem described at forum post ed29e196d5c4f3d5. (check-in: cd6254fc user: drh tags: trunk)
02:37
wasm binding: consolidated the two sqlite3_prepare_v2() bindings behind a single dispathcer. Various internal cleanups and refactoring. Branched because trunk is in pencils-down mode for pending 3.39 release. (check-in: ab3e50da user: stephan tags: wasm-cleanups)
2022-06-24
16:15
Merge the 3.39.0 release candidate 1 changes into the reuse-schema branch. (check-in: 506a3e6f user: drh tags: reuse-schema)
15:26
Merge the latest changes into the begin-concurrent-pnu-wal2 branch. (check-in: d3fa6921 user: drh tags: begin-concurrent-pnu-wal2)
15:15
Merge 3.39.0 release candidate 1 into the wal2 branch. (check-in: 5a5e6e36 user: drh tags: wal2)
15:04
Merge the version 3.39.0 release candidate 1 changes into the begin-concurrent-report branch. (check-in: 1b28ad2c user: drh tags: begin-concurrent-report)
14:55
Merge 3.39.0 release candidate 1 changes into the begin-concurrent branch. (check-in: 5ae706a4 user: drh tags: begin-concurrent)
12:56
Fix a harmless UBSAN warning associated with PRAGMA schema_version found by OSSFuzz. (check-in: e93fd170 user: drh tags: trunk)
11:05
In sqlite3WhereBegin, do not proceed with coding the loop if an error is detected as part of WHERE expression analysis. For for the assertion-fault described by forum post c3496cf6b1. (check-in: db5266de user: dan tags: trunk)
11:02
A minor fix to test/fuzzinvariants.c so that it works even with column names that originally contain a ':' and that are disambiguated. (check-in: 8d9b1fff user: drh tags: trunk)
2022-06-23
22:43
New test cases for query flattening with LEFT JOIN. (Closed-Leaf check-in: 27f68e47 user: drh tags: flatten-left-join)
20:56
Reintroduce flattener constraint (3c), but this time make it apply only if the outer query holds a GROUP BY, not if the outer query is an aggregate. (check-in: 641dfb91 user: drh tags: flatten-left-join)
15:15
Add back the ability to flatten a LEFT JOIN subquery - previously removed due to ticket [cad1ab4cb7b0fc344]. (check-in: f8fe936a user: drh tags: flatten-left-join)
12:36
Minor correction to a comment. No code changes. (check-in: 5fa00959 user: drh tags: trunk)
2022-06-22
18:51
Enhance the TCL scrip that generates sqlite3-all.c so that it outputs all text in its original order. (check-in: 83ff1a28 user: drh tags: trunk)
18:33
Fix requirements marks that changed due to typo fixes in the documentation. (check-in: 5247df05 user: drh tags: trunk)
15:55
More comment fixes. No changes to code. (check-in: 5c9133ef user: drh tags: trunk)
14:43
Allow more line with on the debugging output for SrcItem elements in the parse tree. This affects debugging builds only and is a no-op for production builds. (check-in: edbe24e7 user: drh tags: trunk)
14:25
Additional enhancements to comments. No changes to code. (check-in: d9a32044 user: drh tags: trunk)
14:00
Give dbtotxt an option to prepend .open --hexdb (check-in: afeee612 user: larrybr tags: trunk)
12:54
Fix a typo in a comment. No changes to code. (check-in: ef9de201 user: drh tags: trunk)
2022-06-21
18:38
Disable the short-cut query planner if the NOT INDEXED modifier is used. Forum post 454d706296. (check-in: bd87d107 user: drh tags: trunk)
13:41
Allow a HAVING clause on any aggregate query, even if there is no GROUP BY clause. This brings SQLite into closer agreement with PostgreSQL and fixes the concern raised by forum post 1a7fea4651. (check-in: 9322a7c2 user: drh tags: trunk)
12:54
When doing a push-down of a WHERE clause into an aggregate subquery that has no FROM clause, do not convert the WHERE clause into a HAVING clause as should normally be done for an aggregate, but leave it as a WHERE clause. We will use a different approach to address forum post 1a7fea4651. (Leaf check-in: 1f575841 user: drh tags: backout)
2022-06-20
19:12
Add an ALWAYS() macro to an always-true branch. (check-in: 364645d8 user: drh tags: trunk)
18:26
Do not allow FROM-clause terms on the left side of a RIGHT or FULL JOIN to be reordered. forum post 6650cd40b5634f35. This is probably more strict that necessary to get correct behavior, but for the first release that supports RIGHT/FULL JOIN it is perhaps better to be correct than fast. A less strict constraint might be to prohibit FROM-clause terms that originate on the left side of a RIGHT JOIN from crossing from the right side to the left side of a LEFT JOIN. Revisit this later. (check-in: 238453ff user: drh tags: trunk)
17:04
Do not allow an ON clause to references tables to its right if there is a RIGHT or FULL join anywhere in the query. Other RDBMSes prohibit this always, but SQLite must allow ON clauses to reference tables to their right for legacy compatibility, unless there is a RIGHT or FULL join someplace in the query, in which case there is no legacy to support. (check-in: e615dbe0 user: drh tags: trunk)
12:42
The fix at [cab9b4cccd13bf0a] was incomplete, as demonstrated by forum post 57bdf2217d. This check-in should complete the fix. (check-in: fb0a23b6 user: drh tags: trunk)
2022-06-19
16:55
Follow-up to check-in [0057bbb508e7662b] - ensure that the database page has been initialized prior to continuing with the optimization. If the page is not initialized, that indicates that the database is corrupt. dbsqlfuzz 09ee46becd5e6d1b2a55c9f8ad767335a90aadb0. (check-in: 11162446 user: drh tags: trunk)
2022-06-18
20:20
Enable query invariant checking in fuzzcheck by default. There is no way to turn it off. Update the invariant checking logic to be consistant with dbsqlfuzz. (check-in: 66ca729b user: drh tags: trunk)
14:50
Abandon a query-invariant check in fuzzcheck if the call to sqlite3_bind_value() returns anything other than SQLITE_OK or SQLITE_RANGE. (check-in: d31e1cd2 user: drh tags: trunk)
10:26
In the --query-invariants option of fuzzcheck, correctly deal with OOMs causing the return value of sqlite3_column_name() to be NULL. (check-in: eabbee4a user: drh tags: trunk)
2022-06-17
21:31
Fix the OP_Concat operator such that when concatenating a BLOB with an odd number of bytes on a database that is UTF16, the size of the resulting string is reduced to a multiple of two. (check-in: 5eb2c236 user: drh tags: trunk)
17:11
Omit the --query-invariants processing in fuzzcheck for queries that contain the implies_nonnull_row() test function. (check-in: 0602a084 user: drh tags: trunk)
16:52
Do not run --query-invariants on statements that make use of sqlite_offset(). (check-in: c5ac4cbf user: drh tags: trunk)
16:39
Various fixes and improvements to the --query-invariants option of fuzzcheck. (check-in: 09aca89b user: drh tags: trunk)
16:32
Allow integers and floating point numbers to compare equal. (Closed-Leaf check-in: 0fe2e465 user: drh tags: query-invariants)
16:09
Improve query-invariants to the point that it would have discovered the [f23a429d4153518d] bug if that bug had not already been fixed. (check-in: 2a7251ed user: drh tags: query-invariants)
15:52
Only run query-invariant checks after the original query has run to completion, so that we know it does not error-out on a subsequent row. (check-in: d1fc857b user: drh tags: query-invariants)
15:11
Fix the virtual table detection mechanism to avoid false-positives that were blocking all failures. Then fix a few of the additional problems that are revealed by that fix. More fixes are needed. (check-in: 42b2e667 user: drh tags: query-invariants)
12:25
Fix the new --query-invariants option on fuzzcheck so that it does not use an unprotected sqlite3_value object as an argument to sqlite3_value_int64(). (check-in: d9f82015 user: drh tags: trunk)
11:39
Avoid omitting the rhs of FULL JOINs in cases where it is only correct to omit the rhs of a LEFT JOIN. Fix for the problem reported by forum post 5610c17c3d. (check-in: f23a429d user: dan tags: trunk)
00:24
Tiny fiddle cleanups. (Closed-Leaf check-in: 01969ba5 user: stephan tags: fiddle-indexeddb)
2022-06-16
23:55
fiddle: initial proof of concept of using Emscripten's IndexedDB virtual filesystem for a persistent db. There's still much work to do to integrate this into something useful for clients but the concept is now proven. (check-in: 65c152d3 user: stephan tags: fiddle-indexeddb)
20:29
Minor fix to the query invariant testing logic of fuzzcheck. (check-in: 447e62a0 user: drh tags: trunk)
13:57
Merge the latest trunk enhancements into the reuse-schema branch. (check-in: 7f405fe2 user: drh tags: reuse-schema)
13:56
Merge the latest trunk enhancements into the begin-concurrent-pnu-wal2 branch. (check-in: 82e7e836 user: drh tags: begin-concurrent-pnu-wal2)
13:44
Merge the latest trunk enhancements into the wal2 branch. (check-in: c8ad8699 user: drh tags: wal2)
13:44
Merge the latest trunk enhancements into the begin-concurrent-report branch. (check-in: 8b446d0b user: drh tags: begin-concurrent-report)
13:37
Merge the latest trunk enhancements into the begin-concurrent branch. (check-in: 221e07ed user: drh tags: begin-concurrent)
2022-06-15
20:18
Improvements to query invariants in fuzzcheck. (check-in: 3a461f61 user: drh tags: trunk)
16:26
Improvements to query invariant checking in fuzzcheck. (check-in: 56c60a35 user: drh tags: trunk)
14:57
When running an incremental vacuum, detect growth in the size of the database file (which can only occur if the file is corrupt) and fail with SQLITE_CORRUPT. (check-in: cd7a4412 user: drh tags: trunk)
12:50
Add the --query-invariants option to fuzzcheck. No changes to the SQLite core. (check-in: fef282f9 user: drh tags: trunk)
12:32
Dbsqlfuzz discovered a case where a bytecode branch is in fact taken, so change the designator from VdbeCoverageNeverTaken() to VdbeCoverage(). Test case in TH3. (check-in: 988a2a75 user: drh tags: trunk)
10:46
Add the --query-invariants flag to fuzzcheck. The query invariant checks are only run if that flag is enabled. (Closed-Leaf check-in: d13b4621 user: drh tags: query-invariant-tests)
10:37
Improvements to query invariant testing. Almost working now. (check-in: e0398204 user: drh tags: query-invariant-tests)
2022-06-14
22:21
Fix the OP_NullRow opcode so that it works even if it applied to an ephemeral cursor that has not yet been created. (check-in: 0e925654 user: drh tags: trunk)
21:34
Add missing SQLITE_FCNTL_SIZE_HINT call to a path taken during transaction rollback. (check-in: 6c3266c1 user: dan tags: trunk)
19:12
Attempt to enhance fuzzcheck to do some simple invariant testing on queries. This is an incremental check-in for a work-in-progress. (check-in: ce2d7801 user: drh tags: query-invariant-tests)
2022-06-13
12:42
Do not remove the EP_CanBeNull flag from expressions during a LEFT JOIN strength reduction if the query also contains a RIGHT JOIN. Fix for the problem identified by [forum/forumpost/b40696f50145d21c|forum post b40696f50145d21c]. (check-in: b1be2259 user: drh tags: trunk)
2022-06-10
16:41
The same restrictions on the use of WHERE clause terms to drive indexes in the presence of RIGHT JOINs also apply to the use of WHERE clause terms to manufacture automatic indexes. This fixes a problem identified by forum post 51e6959f61. (check-in: 342c501f user: drh tags: trunk)
15:43
fiddle: minor style tweaks, including using swapped colors for the input/output fields to help (hopefully) reduce the "which field is which?" dissonance. (check-in: e25dad86 user: stephan tags: trunk)
11:28
Do not allow constant propagation between WHERE-clause terms and ON-clause terms as this can confuse RIGHT JOIN. Fix for the problem reported by forum post 8e4c352937e82929. (check-in: cab9b4cc user: drh tags: trunk)
10:10
Fix a faulty assert() statement identified by forum post 0b91a75039. (check-in: 1f132bb0 user: drh tags: trunk)
09:31
fiddle: modernized the UI based on related code in fossil's /pikchrshow. Changed the color scheme to match sqlite.org. (check-in: c4523ffc user: stephan tags: trunk)
2022-06-09
20:26
Do not allow the subtype of a value to cross a subquery boundary. This fixes the problem identified by forum post 3d9caa45cbe38c78. (check-in: bbaf1f2e user: drh tags: trunk)
17:17
Prevent subtype values from slipping across a subquery boundry when the subquery is implemented as a co-routine. (Closed-Leaf check-in: 9e51a6c0 user: drh tags: subtype-subquery)
16:19
The subtype of a value should not propagate across a subquery boundary. Proposed fix for the problem reported by forum post 3d9caa45cbe38c78. Additional works is needed as not all cases are covered. (check-in: 08af1fe2 user: drh tags: subtype-subquery)
2022-06-08
18:29
Move an #ifdef in shell.c to avoid a harmless "unused function" compiler warning. (check-in: 5abb5ef5 user: drh tags: trunk)
18:20
Avoid zeroing the value returned by sqlite3_changes() when a DML statement is automatically reprepared in sqlite3_step(). (check-in: 09c8f9f1 user: dan tags: trunk)