Commit Graph

25509 Commits

Author SHA1 Message Date
stephan
69141f52be Update ext/wasm/README-dist.txt for the bundler-friendly build.
FossilOrigin-Name: 6a5c4f6b19aa0704efe7f789102f757a1ed05d6542f37c7aa37a4439783944a3
2023-01-27 20:25:39 +00:00
stephan
6a3e2d3776 Add a feature idea note to DB.exec(), derived from a forum discussion.
FossilOrigin-Name: 792f43209c4b6e85386b6b3906814b7f2ad310d50ba563b3fd1cb37e55adf8db
2023-01-27 19:56:40 +00:00
stephan
aca8ce1535 Extract emcc version in JS build and use it to conditionally set build flags. Initially a workaround for [https://github.com/emscripten-core/emscripten/issues/18610|Emscripten ticket #18610] but may have other uses.
FossilOrigin-Name: 3773934e91c20ca2433cc414aaba75de9a4a4318fd1126fb781dba510ddefd94
2023-01-27 17:14:55 +00:00
stephan
c64a3fa6c6 Work around upstream emscripten 3.1.31 bug [https://github.com/emscripten-core/emscripten/issues/18609].
FossilOrigin-Name: fa784101775b795077a23c211b5b16f51ad5a13967c284511f310dfcbfa9f77a
2023-01-27 05:14:34 +00:00
stephan
a0013fbe87 More work on creating a separate sqlite3.js build which is hopefully friendly to JS bundlers.
FossilOrigin-Name: b7b896fb448a7f46eb88eadadb1359255aec637a384cabcdd526276a02f4f0b4
2023-01-27 03:18:16 +00:00
stephan
67bfea4ea6 Resolve a nested if-block bug in ext/wasm/c-pp.c which caused output after a nested block to be unduly elided. Remove a kludge, added in the previous check-in, which worked around that bug.
FossilOrigin-Name: 7a026a4b24d57c1b0970923b972dd42c3f1bb5b282f908079075468b2e1bf601
2023-01-27 02:21:16 +00:00
stephan
0cd38cd2b9 Beginnings of a bundler-friendly build of sqlite3.mjs. Not yet ready for downstream testing.
FossilOrigin-Name: 4271bf5f41df091696f1dcfc4ffe7a60d24066fc75c896941e0b56de95fe5f89
2023-01-27 01:33:12 +00:00
stephan
0945197a39 End-of-line whitespace cleanups and doc typo fixes. No code changes.
FossilOrigin-Name: bdfd72a083fadd724030c4c89adae71426e1ddd402c6bc5abf40801ecf3253cf
2023-01-26 20:08:59 +00:00
dan
3db12cd7c4 Have some RBU tests run as part of veryquick.test/testrunner.tcl.
FossilOrigin-Name: f51406e3bf92f2b46f13d08fb7c7fe7683feba68b5a8fa18f6f6b8845662deac
2023-01-26 18:16:51 +00:00
drh
3c12ebd4a3 Improved fix to allow sqlite3_vtab_in_first() to reliably return SQLITE_ERROR.
FossilOrigin-Name: b25eec1c13f6a8c7ba993e5a55e26798f3b67a8b9571998459671cb570cbdfb4
2023-01-26 02:18:53 +00:00
drh
e3d71c078b Fix a harmless compiler warning in FTS3.
FossilOrigin-Name: 68d02d3c2ab1b4afff2d3a71516ceee404fad0d2b717369ad732832c4f9b19a8
2023-01-25 21:28:30 +00:00
drh
e9b20a9c4b Defer calling the destructor for the user data on a module until after the
module has disconnected.
[forum:/forumpost/b68391eb71fdff73|Forum post b68391eb71fdff73].

FossilOrigin-Name: 1ab122289fe6ac4cb3b0c47d17ac22627fcdfed80c941a57e6e6cc4d9dbd9273
2023-01-25 19:05:04 +00:00
drh
b604f1456e Enhance the sqlite3_vtab_in_first() and sqlite3_vtab_in_next() interfaces so
that they reliably return SQLITE_ERROR (and not SQLITE_MISUSE) if they are
invoked on a parameter that did not have multi-value IN processing enabled
via a prior call to sqlite3_vtab_in().  See
[forum:/forumpost/a823d4a3d5f73def|forum thread a823d4a3d5f73def].

FossilOrigin-Name: 144326dc171025dc8b5a77bebd8de3c19d5244ab807f5aa41f95313a25b880bc
2023-01-25 16:56:24 +00:00
dan
a0fe1e7d13 Fix a problem with fts3 auxiliary functions and one or more NEAR expressions ORed together.
FossilOrigin-Name: de4690a10ad4631e7452ccbb05b177a821d9dda387a854d216a6c54c7a189ead
2023-01-25 15:45:45 +00:00
dan
0fa2bbf9e1 Fix another problem with fts3/4 auxiliary functions and NEAR expressions that consist entirely of deferred tokens.
FossilOrigin-Name: a8c91c132f6157b7e3649f57a799984b1d7f8a18fd434515c875617d4195db29
2023-01-25 13:42:55 +00:00
dan
f36fa4e902 Add scalar SQL function unhex().
FossilOrigin-Name: 890e9629a7480138c9c1d3acc2d1e7b3c05e0d156e5c5fba428bc1aeb790fbfb
2023-01-24 20:17:43 +00:00
dan
a50db438eb Update unhex() to allow a second argument, specifying a set of characters that are permitted to appear between pairs of hexadecimal digits.
FossilOrigin-Name: 66c8562690b19f17972589611810e1dccad3a48777acb05208289c1f77076f71
2023-01-24 17:19:47 +00:00
dan
e35d1e1e6a Fix a problem with using fts3 auxiliary functions with expressions like "E AND ...", where E is a NEAR expression that consists entirely of deferred tokens.
FossilOrigin-Name: 39bfae4c4698a13e07c4a0725f2790955e03b601fe64e17a000c691def1bdcb8
2023-01-24 11:24:28 +00:00
drh
f648389a2e Suppress a harmless compiler warning.
[forum:forumpost/e3f72e9291189925|Forum post e3f72e9291189925].  The code
was legal and correct. The revised code is actually less clear in its intent.
But at least now there will (hopefully) be no warning.

FossilOrigin-Name: 48bb7c88787bf5de1d70cf3cc81ada38c6c02e476dbdff12c8676c6d5ee19aed
2023-01-23 21:41:41 +00:00
drh
c3f616597c Due to a coding error, check-in [8efd61e8518594e3] did not actually use
just read transactions if the operation is read-only and the
SQLITE_MAX_ATTACHED macro is set to 31 or more.  This was due to a misuse
of the writeMask field of Parse, pointed out by
[forum:/forumpost/aa173c18d5|forum post aa173c18d5].

FossilOrigin-Name: 8760566893b64325874c7ec0aff8014026ce525e7fff1489027d2ce698495e76
2023-01-23 20:45:47 +00:00
drh
a794af53b4 Add the missing CARRAY_BLOB macro to the carray.h extension header.
FossilOrigin-Name: 10bf639cd169147d4608918543f9a9b15417c10a231590b961c91500a1856f6e
2023-01-23 16:16:00 +00:00
dan
e3c11d55db Add experimental user function unhex().
FossilOrigin-Name: dbe424b5db33ce2c7562dfb44daf2969cf3074234cc891eb9b8d0d907faf6a78
2023-01-23 14:11:34 +00:00
larrybr
f75e485ea7 Give CLI .version a place in .help output.
FossilOrigin-Name: 5f2dfdcc345453ee0a05311f6826d90b7c1d7b95fdaf77a0a8383923a8fc7213
2023-01-22 21:54:17 +00:00
stephan
0bcded30e5 Minor API doc cleanups and JS code simplification.
FossilOrigin-Name: f608a3a45609693c1c0237f12c394275ec9a6225fa986e62345f21af763293a0
2023-01-21 16:53:01 +00:00
drh
3fdb05e883 Fix a memory leak in the TCL test harness associated with carray.
FossilOrigin-Name: 5a316f9fd94b73fc54ef94a1dab2f13bdd16c4fb13d2620b7c907d104d5b4d7a
2023-01-21 00:59:20 +00:00
drh
c1b54fa225 Fix harmless compiler warnings.
FossilOrigin-Name: ded60f5b3431283d70eb8c41761c0fa9727021e6309d0df0ae3fb0a5274c1299
2023-01-21 00:19:29 +00:00
drh
a96cd076fe Extend the carray extension to allow the use of BLOB values to be bound
as an array of "struct iovec" objects.

FossilOrigin-Name: e117a03ca6560e958884f277db827c51ae337a970c17143a0a5f9b150f52f87a
2023-01-20 21:00:03 +00:00
drh
42d652c047 Two branches associated with memdb are now always taken (I believe). Tag
them with ALWAYS() to verify this.

FossilOrigin-Name: 20b9b5aa4fa6136059cf1123f00d86cb7bd8fb0f0f86f971e9714f22725e60b5
2023-01-20 19:19:24 +00:00
dan
d993b15aa3 Ensure that the database encoding cannot be changed while there are statements running. And that the connection is left in a valid state after an obscure OOM within sqlite3_deserialize().
FossilOrigin-Name: a02da71f3a80dd8e817e89cdaa775c95e38c90d2471f8fec516bed086539e2c0
2023-01-20 17:50:24 +00:00
dan
ab5ebc4082 Add tests for changing the database encoding via RESET_DATABASE/VACUUM. And test that it is not possible to trick another connection with this.
FossilOrigin-Name: b869054acb8f171cbc16808eb87be85e6e38d5c5670522ff4e49aef92250d5b2
2023-01-20 15:13:30 +00:00
drh
3601db8f86 The json_group_array(), json_group_object(), and fts5_source_id() functions
should all be deterministic and innocuous.

FossilOrigin-Name: edcb83fa0d3c832d044b267d608fed31a2ac841b81c7c9406b2136ac43d61a1a
2023-01-20 13:34:14 +00:00
dan
b8f9913baf Fix numbering issue in and remove duplicate test from windowB.test.
FossilOrigin-Name: fa10e561f5dcdb23af862c2e486e877d379f12eae077ae5fd3da6028f1c20b49
2023-01-19 18:16:09 +00:00
stephan
8a45f68b1c Emit sqlite3-api.(m)js during the JS build process, which are the JS APIs without the Emscripten/wasm-loading parts. They are hypothetically useful for arbitrary build environments/toolchains but have notable caveats related to the wasm imports, as elaborated on in the makefile.
FossilOrigin-Name: 966b55c513a14c6ab3ec128cfe6d157ecd9bec32e3fce2f559f130249cec50ab
2023-01-18 17:39:04 +00:00
dan
ae2e7fcc4c Fix another issue with very large compressed LSM databases.
FossilOrigin-Name: d71154265a294a1ece89d257f55f6855db7c30aec55ea0dc4eeb61bce1e8fad3
2023-01-17 19:34:01 +00:00
drh
f06067f0b2 Change an now unreachable testcase() into an assert().
FossilOrigin-Name: 517b2c4c4ee9afc50e5457a6877e5af34358a6267d8dad669d25410c124866ac
2023-01-17 19:00:22 +00:00
drh
d37aabe53f Fix harmless compiler warnings in the CLI.
FossilOrigin-Name: 7cf282d307a23697b38f5fd4b46f13f63a9e6f7cc74ccd66297d88c00aa8f454
2023-01-17 18:40:54 +00:00
dan
19ab86f3ff Update virtual tables json_each and json_tree so that adding "ORDER BY rowid" to a query does not require an external sort.
FossilOrigin-Name: ce18f0ed684824e67ed6c09acab8e735fef2c52b2ed32270dee1a2a67802c59b
2023-01-17 15:46:27 +00:00
drh
c37af308fa Add test cases to confirm that the schema parsing quirk in which an
ON CONFLICT clause is accepted and ignored on table CHECK constraints but
raises an error on column CHECK constraints.  We want to continue supporting
this harmless quirk to avoid breaking legacy applications and databases that
accidentally use it.

FossilOrigin-Name: 92b6a9cd0fb027fe675b3913aa07c75445bba0cfac9530d08d7e48f7869c04cc
2023-01-17 13:33:51 +00:00
larrybr
e8f114baa6 Cause .clone to not trip over sequence table as reported at [forum:/forumpost/71ff9e6c4c|forum post 71ff9e6c4c].
FossilOrigin-Name: b44d04f7b051d807a81152a6e4f15a765f7b9ed1f01b48b40dc5420c11e0c251
2023-01-16 21:49:37 +00:00
drh
5b17533994 In the CLI, create our own private version of strncpy() to work around
false-positive compiler warnings from Alpine Linux.

FossilOrigin-Name: 83f21285fe86430a66ce6841606e3ad7c27da52ac75a034c6a00c7a9fdb9791d
2023-01-16 18:13:00 +00:00
drh
57003792df Omit the long-disused FTS1 and FTS2 implements from the active source tree.
The code will persist forever in the source repository, but there is no point
in carrying it around in the latest tarballs where it is never used.

FossilOrigin-Name: 2bb50d5aedef0fd216d94058f477a58d88aa3a68bbadc94fa67998b7c391a8ff
2023-01-14 19:53:42 +00:00
larrybr
3f7b9944b8 Add OOM check, per tip at [forum:/forumpost/933479b2d5|forum post 933479b2d5]
FossilOrigin-Name: eda84dcffee6016fb3f8588d96c7ffb6275edd626b11f6fe12e81be90226c7d8
2023-01-14 19:27:40 +00:00
larrybr
58abb646c5 Doc-only fix, per [forum:/forumpost/0cfaf6876b|forum post 0cfaf6876b]
FossilOrigin-Name: eac135fd6a5dd220a0f7c1b61f987bbd801faabdb76846c4417fef0dd03fcb87
2023-01-14 19:09:26 +00:00
dan
2bb3a4d6d6 Fix another lsm compression-mode bug.
FossilOrigin-Name: f9fafc941370f805f6656ac13543333b36ee52f1ad44c891252b99a74bd2ddf4
2023-01-13 20:49:42 +00:00
drh
475e76d43e 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:/forumpost/d010a26798915b53|forum post d010a26798915b53].

FossilOrigin-Name: 0819a1869a39d54a405259ea323365506a182962a02affdef16a03446005da64
2023-01-13 19:29:46 +00:00
drh
bd8e3d7d0a Add missing "const" on variables in recent RBU fixes.
FossilOrigin-Name: 9b8dcd79050f9bfa745271f51377b38cfed4d8ce41a36b773a30799d69f7b943
2023-01-13 18:20:40 +00:00
drh
b28b5f348b Enhance query planning so that it check for sqlite3_interrupt() calls and
periodically invokes the progress handler callback (if any) during long
query analyses.

FossilOrigin-Name: bd8fa10e59f58886e10c84ea9934fa1b5f491aac2eff302757a76d2d36d59b69
2023-01-13 15:54:25 +00:00
drh
b928141edc Update documentation for sqlite3_progress_handler().
FossilOrigin-Name: 41b4c407b7f6968f4493fb9a0b220c55a6f6a353a8e6cb054efd3eb01bdd11dc
2023-01-13 15:31:24 +00:00
drh
7ef26cbffa Remove an incorrect legacy assert().
FossilOrigin-Name: 3006b3b32fb1efedde3ade418c19c35b6e9a4af1e6a7cb5d5c72a080ec1f6f3c
2023-01-13 11:31:49 +00:00
drh
94effc8a05 Reduce the frequency of calls to sqlite3ProgressCheck().
FossilOrigin-Name: 795aca4a269ea4ede547844037c218ac714c40e8bee003e4d9b786befc9cf97a
2023-01-12 20:36:43 +00:00