drh
57366d8cec
Small performance optimization on the OP_Insert opcode.
...
FossilOrigin-Name: 781fdcb9ce85aa2844ef8c00cf908f1a87eeff80dadaf73a71f88b4279260e57
2022-12-22 17:36:02 +00:00
stephan
913dcaf0ca
sessionfuzz.c: use lt/gt brackets instead of double-quotes when #including zlib.h, as reported in [forum:91a104bd65 | forum post 91a104bd65].
...
FossilOrigin-Name: 7d7780c350f3239f9c9feb91924a01a4eba31b88060946c766719c9d50c16bcd
2022-12-22 10:53:08 +00:00
drh
79b9bc4452
More efficient implementation of large precisions on the "%c" format for
...
the built-in printf(). This is an effort to avoid a reported
timeout on a (ridiculous) query generated by OSSFuzz.
FossilOrigin-Name: 371f9b88387a44a5f820279d79733d1deb7eafc72f320ec47a11679bbdbb49ef
2022-12-21 19:11:56 +00:00
drh
fe83892bc1
Ensure that the expression of a virtual column really is an expression and
...
not just a reference to another column, as a real expression is necessary for
the indexed expression coverage optimization to work properly.
[forum:/forumpost/07b36e3899a9ae21|Forum thread 07b36e3899a9ae21].
FossilOrigin-Name: 40549bacb3923e439627b0103bedd7da30258b69a46960040f7176e060f51f2f
2022-12-21 14:13:49 +00:00
drh
4f0c36b327
New WHERETRACE entries for adding and removing objects from the
...
Parse.pIdxEpr list as part of indexed expression coverage. Debug and
testing changes only - no affect on production builds.
FossilOrigin-Name: 4dc438a951bdbe27fbd5ee7cfb907e30ec0efbf8ce02109f18997cc221e0ad3b
2022-12-21 12:18:06 +00:00
drh
87bdc152a1
Add about 150 new fuzzer cases to test/fuzzdata8.db.
...
FossilOrigin-Name: a8d8d9cd65e64e0a492a80c00050f54ab75de82651230049f65c9d2b78a164f2
2022-12-20 15:22:57 +00:00
drh
2656b1b0a0
Add ALWAYS() to always-true branches in the locking logic of the memdb VFS.
...
FossilOrigin-Name: 01fa760212a40cec5b43da99b917ab6389561c96d0567a9f67f516bdfa8f5f3d
2022-12-20 15:02:44 +00:00
drh
1379b9f51a
Improvement to the dbsqlfuzz fix of [f113eebdbe68246f].
...
FossilOrigin-Name: 79d62956f206cb2987891d4ba5985cece21fc8c8c1158f46c2951f65c0dcf4e8
2022-12-20 14:02:35 +00:00
drh
98164c3452
Do not use indexed expressions to replace the expression being indexed on a
...
RIGHT JOIN as that leads to problems, as shown by
dbsqlfuzz a644e70d7683a7ca59c71861a153c1dccf8850b9.
FossilOrigin-Name: f113eebdbe68246fd38d640b0cdf0fd73ab5d2abad9226274dfa2e41fe286bf0
2022-12-20 01:48:43 +00:00
dan
73e460c932
Fix a faulty assert() in fts5.
...
FossilOrigin-Name: 569018170b928cadfa0745db631981084e595d90a8c3d1e236c42adae161018f
2022-12-19 20:14:22 +00:00
drh
b7fe3cb890
Remove an unused variable.
...
FossilOrigin-Name: 5c4d94147d290d4a68ac0d5ae8f9e6bbfe7522ad58b2298e387f8c699048e111
2022-12-19 19:04:32 +00:00
stephan
c6c1d7bfbd
Minor sed script tweak in the wasm GNUmakefile for BSD portability, as reported in [forum:4a97813fcbd4f63e|forum post 4a97813fcbd4f63e].
...
FossilOrigin-Name: 49efcf6d9f894c28a3ffb350a7c5f0ffd12c7cbf61f5c27f76eb7f777b8a24c5
2022-12-19 14:46:17 +00:00
stephan
3ce8badcba
Update test-opfs-vfs.js to account for recent API changes. Reported in [forum:4a97813fcbd4f63e|forum post 4a97813fcbd4f63e].
...
FossilOrigin-Name: 2a636746360c109f1d39fc352b9f1c83a739735520252a264c774e848597475d
2022-12-19 14:43:17 +00:00
dan
1532f9d155
Fix an assert() in fts5. Simplify memdb xLock/xUnlock some.
...
FossilOrigin-Name: 7fe158aa8071acadd959b2b4a4b66e8a7f7eecec207ba681abf516b0457c2921
2022-12-19 14:06:36 +00:00
drh
a4569bd5d0
Fix a minor problem with the printAggInfo() routine (used on during
...
debugging).
FossilOrigin-Name: c8329967f32efedfc8244631a5682f7f7d21c1b3fcd7d5cc67716555716d4926
2022-12-19 12:25:41 +00:00
stephan
ba1e6f8279
JS namespace updates in ext/wasm/api/README.md.
...
FossilOrigin-Name: ca59e736b1839c30a820dd5795b4534e1565387ef701423451ea4c503a9701ea
2022-12-18 12:00:10 +00:00
drh
b7959e3419
Fix an unnecessarily restrictive assert() in the aggregate logic.
...
dbsqlfuzz 699bee2aa26c5dc84afabf6894685c316d936485
FossilOrigin-Name: 8cc0af81ad03ac65f230d78cf97e1448c2d93d556467ea3ef700d5abd4a3890c
2022-12-17 22:10:05 +00:00
larrybr
88fbe16154
Remove slew of inadvertant tabs in favor of spaces.
...
FossilOrigin-Name: 0aa6da69e12e483b5561bb9a054ec27a99f51772340c950783e342e6dd39beb9
2022-12-17 19:56:28 +00:00
drh
1c70429569
Add NEVER/ALWAYS to branches that have become unreachable due to recent
...
enhancements.
FossilOrigin-Name: b4281db4e4762773684d27b809ef911da08b81cb953b3666e535b990d4d5f701
2022-12-17 12:49:04 +00:00
stephan
a4d04c59ba
Update wasmfs.make to get WASMFS building again, but changes made to OPFS-over-WASMFS since we last tested it have made it incompatible with how we used it. It can now only be used from worker threads, eliminating the one benefit it had over the sqlite3_vfs OPFS implementation. Remove/amend references to WASMFS in the docs and remove all WASMFS-specific test app links from index.html.
...
FossilOrigin-Name: 32dc98c8001387b1970623192ec6cb89445000fa49bda5f4bd7c525bbe20bb5b
2022-12-17 11:14:35 +00:00
drh
a9d18d83fc
Disallow some of the query invariant tests on SQL statements that contain
...
a GROUP BY since output terms that are no covered by the GROUP BY are
indeterminant.
FossilOrigin-Name: 28ba1fec4519e7ca9466f1a2f787c905f2cf880d38a004639f99f948e46a51e7
2022-12-16 18:32:07 +00:00
stephan
e9f740e484
Expose a JS-friendly subset of sqlite3_config() to JS, with the notable caveats that (1) setting up the JS bindings requires starting the library, making sqlite3_config() illegal to call and (2) calling sqlite3_shutdown() in order to make it legal to call sqlite3_config() may undo certain JS-side library initialization. Move sqlite3_(de)serialize() into the int64-mode-only bindings because of their int64 args.
...
FossilOrigin-Name: 62e0c931ac952219f68e22d64e20836781bf330b4581e4662266172a97c9289b
2022-12-16 13:04:21 +00:00
drh
d980442188
In the fuzzer invariant checker, do not add new WHERE clause terms that
...
make use of an ambiguous column name.
FossilOrigin-Name: d5b46541c30bcbeb7e57b5b5951856d564e81f7f9638d66d205157797964418c
2022-12-16 12:07:48 +00:00
stephan
7c1c5b6232
Add a test confirming that exceptions are not passed through C-space if a JS-side sqlite3_set_authorizer() callback throws.
...
FossilOrigin-Name: 5a77c2c7aaa556007274e1b85790934665c2c12661ca11d896eb7d09cd49ce72
2022-12-16 11:33:42 +00:00
stephan
d83ab0cf85
Add sqlite3_set_authorizer() support and related tests to JS.
...
FossilOrigin-Name: 551b848894c249cb3c9d237643d2ed53ffcb3b003d0cf3f797a535df1731ce39
2022-12-16 11:13:32 +00:00
drh
00d6b2755f
Create a new affinity called FLEXNUM that works like NUMERIC except that it
...
never tries to convert integer to real or real to integer. The affinity is
only used internally - it is not possible to create a table column with this
affinity. This affinity is used on subqueries and views that are built off
of a compound SELECT and where the datatype is controlled by a CAST expression.
dbsqlfuzz c9ee6f9a0a8b8fefb02cf69de2a8b67ca39525c8
FossilOrigin-Name: 44135d6ea84f7ba6b36549954b38a8bc048d5ffea5a9779e35950afa4eb2dfb2
2022-12-15 20:03:08 +00:00
dan
118b53bd21
Fix an incompatibility between the Tcl interface and the "memdb" vfs by allowing memdb to accept filenames that begin with '\' characters.
...
FossilOrigin-Name: bd537f2057a4800bd30e7dd57405c3e57df649471104c80bd32573a89568029e
2022-12-15 18:56:12 +00:00
stephan
a51e044a5b
Added a couple missing 'not part of the public API' tags on functions in sqlite3-wasm.c. No code changes.
...
FossilOrigin-Name: eb27feecea508f3491a09699f2339951facd2345d479cfd3020183dc2af703b2
2022-12-15 18:50:30 +00:00
drh
f000c9b638
Omit the columnTypeImpl() function from the build when SQLITE_OMIT_DECLTYPE
...
is defined, because it is no longer used in that case.
FossilOrigin-Name: 751e344f4cd2045caf97920cc9f4571caf0de1ba83b94ded902a03b36c10a389
2022-12-15 15:37:52 +00:00
drh
569aef04b0
Fix harmless compiler warnings.
...
FossilOrigin-Name: ddb260cc52efce6472b9423cbc6b788d8c38746f1842c9f1c184c08c651b3387
2022-12-15 13:45:49 +00:00
dan
8b58fbf5ee
Update a test case in scanstatus2.test to account for recent planner enhancements.
...
FossilOrigin-Name: 53e07dc6b6521bb7757d0bc2cf12a501bb929afafdb16737058496afca8e6742
2022-12-15 11:39:12 +00:00
dan
7acee13eb2
Fix an unsafe use of sqlite3_mprintf() in sqlite3_overload_function() identified by forum post: < https://sqlite.org/forum/forumpost/95b338860d >.
...
FossilOrigin-Name: 9fa2b94c2e0fd43c1a9c15a79fe1325afa1699f0685dcd039024a80185cc5658
2022-12-15 11:31:11 +00:00
stephan
73b471964b
Internal refactoring of how sqlite3.wasm.xWrap() handles JS-to-C function pointer conversions, to enable similar conversions to be added more easily.
...
FossilOrigin-Name: 10cfe3fae6f680d3ecc3b0afbbf628ce91e34e3757b19dd27c231f0daf44232a
2022-12-15 02:28:55 +00:00
stephan
d60061616f
Remove an unnecessary/obsolete Emscripten-specific export.
...
FossilOrigin-Name: fa278022afd6dd6e499d26f74a8359f3e9973e1680772059ce331b64e77ec582
2022-12-15 02:26:13 +00:00
drh
da69802e92
Fix minor problems in the new sqlite3ExprDataType() function.
...
FossilOrigin-Name: c1d5261b222bbf94c20e558089f3d2eae6a88b6d739225ee4f7d0338e0e59994
2022-12-14 23:53:29 +00:00
drh
70ac36e877
Adjust the query planner to be more aggressive about using co-routines rather
...
than materializing subqueries and views. Implementation of enhancement
request [73ebbb3a3d1a7bd3].
FossilOrigin-Name: 0b58d1b354a0f91bafeafee102acedd4654dc420afdf4eb4aaac9bf5bcb63c1f
2022-12-14 18:34:05 +00:00
stephan
1a1d8bbdc3
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.
...
FossilOrigin-Name: cc86f03ed698a071cd02ef3dfaba69092226bff20c917d662f808061627ad285
2022-12-14 18:06:01 +00:00
drh
604314d94e
Merge all the latest trunk enhancements into the coroutines-exp2 enhancement
...
branch.
FossilOrigin-Name: ea278438b72e85d217e72c836cbefd68bd8b336baf33507b2d8d12ef436424cd
2022-12-14 17:52:15 +00:00
drh
daa46142ec
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.
FossilOrigin-Name: 27655c9353620aa58105e87d1e171d1f0a637deedde41c081824078385cd49ac
2022-12-14 17:46:35 +00:00
stephan
e5e61d40e9
Slight reformulation of some test code to test multi-arg wasm.peek() call form.
...
FossilOrigin-Name: 349bb28f614bc210b3283ed1c1144c45fbc7d9e2ffc3dc6193ccb9932d347efb
2022-12-14 16:40:17 +00:00
drh
ed07d0ea76
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).
FossilOrigin-Name: 6ebb178c6b688ebd632e91a5ec4c748567833037c679ab3d72fb770deb230fe1
2022-12-14 14:41:35 +00:00
stephan
8a5c032b07
Use the new peek/poke() variants throughout tester1.js.
...
FossilOrigin-Name: ef7b783552f7783a728837fcfc81e493b135a7aac59747397e7e3d28f4309f95
2022-12-14 14:40:36 +00:00
stephan
feb9123a8c
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).
...
FossilOrigin-Name: 14e3fc01b929fa3f9a2fdbd93deb4a8aad58c111d46369c772def0437152fa75
2022-12-14 14:28:54 +00:00
drh
a8b5c8739c
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:/forumpost/6f842bc5b2dadcb2|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.
FossilOrigin-Name: fe5a77bcc4de8f49cc4fe6bd2e2e1f31da8d3bc84120daaa99eb853b06291d15
2022-12-14 09:06:45 +00:00
stephan
bca56f384f
Add a test to demonstrate/verify which object acts as "this" in a oo1.DB.exec() callback.
...
FossilOrigin-Name: 8fc4b3f10f61e965853a22bf7a64ad2511ef656d66658a7910bac35b0f9805ec
2022-12-14 08:12:01 +00:00
stephan
b943df9323
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.
...
FossilOrigin-Name: 82a6c7fdf59729c182545b15c084b136e34513f340e87a7b6e5aa199117357b0
2022-12-14 08:01:34 +00:00
dan
5d75eb3fbf
Fix a comment in ext/session/test_session.c.
...
FossilOrigin-Name: bd814af14b6d67c4f8cf6482a0657f9437811a2820196ea6ccf22514291fe360
2022-12-13 19:52:23 +00:00
dan
e1dcb44307
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.
...
FossilOrigin-Name: f9cd23dffba06b1982c0a5e5362dba53eba768120a2daa985b4f649d3fea1427
2022-12-13 19:40:56 +00:00
drh
c799217cc8
Remove an unused variable from sqlite3SubqueryColumnTypes().
...
FossilOrigin-Name: c6e3ff396947e6954e77195419b35de8b39bd540d3f4bff456bab25b512e1792
2022-12-13 16:59:09 +00:00
drh
177b8c9c28
Use standard datatype names for the column datatypes in views and subqueries.
...
FossilOrigin-Name: baf2c2413346feb72ecb0bac800be9b945ebb4e01b42212132434d8ddef9cad0
2022-12-13 16:55:23 +00:00