dan
52d5d474f5
Instead of (const char*), use a special type - sqlite3_filename - as the filename argument passed to VFS method xOpen().
...
FossilOrigin-Name: bd1fe4de8a2e8b8de19a7f90b9fdafb641ad11a6f0c96c0b4495d5bf80885675
2022-11-01 17:43:19 +00:00
mistachkin
11980a6b8e
Fix compilation errors in the recover API seen with MSVC.
...
FossilOrigin-Name: 78d17c4fedc1629bf161f9858f2b8bf35506155ccaa0acc084b419d244d4f75d
2022-11-01 14:13:05 +00:00
drh
dddec5cadd
Fix a #ifdef involving SQLITE_OS_KV that was adding code unnecessarily.
...
FossilOrigin-Name: b6c1b6e4a3bc21c40d6faca6f70842df5201f21c96a076a895410660630461c0
2022-11-01 13:12:20 +00:00
drh
be44e188e3
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].
FossilOrigin-Name: 88a05141c28e5ff1357c3c599493e4ffb8f3821bab04be80244deac62e49135c
2022-11-01 12:10:39 +00:00
drh
dc5e8c63bd
Improvements to comments. Change the "optimization_control" TCL command
...
in the test harness so that it returns the new optimization mask, for
verification.
FossilOrigin-Name: a3a500127d4752ee05c183e9ac97a2bc27768bf7063b04b5c1405cd3fd3931f5
2022-11-01 12:01:10 +00:00
stephan
0f32760e3c
Minor internal cleanups in the js pieces.
...
FossilOrigin-Name: 271391b4e32220ab4c32d69f579ecd2b03eb99da898955a1ef8fffc27216719d
2022-11-01 11:09:34 +00:00
stephan
49048b148e
Significant cleanups and expansion of the sqlite3.opfs utilities. Add oo1.DB.dbVfsName(). Add VFS name to worker1:open's arguments and result.
...
FossilOrigin-Name: 86a341d7e061f946b39e8647ddd4743013b851b33ae9e6e755d8dbc53fba5286
2022-11-01 07:49:49 +00:00
drh
b6d9167945
Do not flatten a UNION ALL subquery where the column affinities do not match
...
on all arms. Force that subquery to be materialized.
FossilOrigin-Name: 1b8a128832c1633cbb86999d347fef64ac45fe134dac61132112fc97f24676a0
2022-11-01 01:07:29 +00:00
drh
5fdb9a352c
Enforce column affinity on the materialization of a subquery or view.
...
FossilOrigin-Name: b6692de374d7f489d8cf8877bdfef19501bc5ecb0781d42750807eeb58f2e7cd
2022-11-01 00:52:22 +00:00
drh
c7dd9b60eb
Make the UPDATE method of the sqlite_dbpage virtual table rebust against
...
OOM errors. [forum:/forumpost/bbcf0dd6ca|Forum post bbcf0dd6ca]. Test case
in TH3.
FossilOrigin-Name: d15c9a4a323b825eb80e706e12e9df95e5db458024f51e6e537940efc8234d8b
2022-10-31 18:01:05 +00:00
stephan
02d15a7ebd
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.
...
FossilOrigin-Name: c7750c101d9b7baa31496731bc34ea0a9b2bad0c11e2b3e92a8c7b327135c1bb
2022-10-31 13:50:05 +00:00
stephan
43b442a626
Internal tweaks to the OPFS VFS result codes.
...
FossilOrigin-Name: 32e1a2d2eb8738ae1635e413829f6cf7f64c63d2a86b72940a573de89948e529
2022-10-31 11:53:34 +00:00
stephan
1acfe91582
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.
...
FossilOrigin-Name: 69d36a6aa5e2cd79d26c0fd3e0d20fe8838fd1be97db07725233bfff1dfe6643
2022-10-31 11:09:14 +00:00
dan
549907fd67
Avoid a segfault that could occur when running the recover API on a database handle with memory-mapping enabled.
...
FossilOrigin-Name: e02c697281a777c33070168af784b2d291397e488244a217620897f40aed7158
2022-10-31 10:53:23 +00:00
drh
1e84e1e632
Extra OOM check in shell_error_context() of the CLI.
...
[forum:/forumpost/5708841db0|forum post 5708841db0].
FossilOrigin-Name: cb12ac5de17e677f089d7b0b46803efbd9a9178972ffb0454a8b557b06633658
2022-10-31 01:22:38 +00:00
stephan
50ef01398d
Add oo1.DB.selectArray() and selectObject().
...
FossilOrigin-Name: 7660db2a2e9c4f3a6a9343d6929744ad0f4be6820976411f9080165491da59b7
2022-10-30 11:39:47 +00:00
stephan
9163ef1f4d
Adjust automatic OPFS locking retries such that they will wait up to a total of 3 seconds spanning 4 attempts.
...
FossilOrigin-Name: bbce49d81abc491ca666474040a53057e26e99131fea9449de253f88f4415ded
2022-10-30 10:24:53 +00:00
stephan
1fc6ffccc5
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.
...
FossilOrigin-Name: 50f678846a2b3c3d0818f0bae89f2ee86252a2e6a9c7029ebaae3953ca0fa14c
2022-10-30 09:47:33 +00:00
stephan
af9cee12c1
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.
...
FossilOrigin-Name: ed9d93c48752ba6e18edc1238a8ccdbf6bb65c74fb52a89d515f8b0ab6bea13a
2022-10-30 08:39:18 +00:00
mistachkin
f5e7691e2b
Minor updates to the Windows batch tools.
...
FossilOrigin-Name: b42f56205fa8e06431fb1a45c48257d93605fea0ed95bd766f71e27292d1af33
2022-10-30 07:01:31 +00:00
stephan
1cc77c9543
Update ext/wasm/README.md for recent developments.
...
FossilOrigin-Name: c76ec31ebf4d80ec8cbd2aa2017e1d6bc32eae66bfbcc130c053ddb403599c6b
2022-10-29 12:31:50 +00:00
stephan
da27e4aa02
More styling of module-symbols.html.
...
FossilOrigin-Name: a36f42a8364b745c410a6f837d005a193f6a93134cac087ac18bee2897cad730
2022-10-29 10:14:56 +00:00
stephan
df52a0bc78
Expand and document the wasm doc-update make rules. Extend the dist rules to fail more readily if there's a problem.
...
FossilOrigin-Name: 362ec11ec09f441b745cbd8ac8366b6bc998aba6e2b70782a88f189a3ffa9923
2022-10-29 09:45:01 +00:00
stephan
8948fbee29
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.
...
FossilOrigin-Name: 3f16eb18d6186ca972fca952ccac18649e7a905213f589e53c0c9333e695448d
2022-10-29 07:54:10 +00:00
drh
053bb22f35
Fix harmless compiler warnings in testing code.
...
FossilOrigin-Name: 2f53612388507f9b1ecbec3c15281825beab54b8062d97d0ab6f009c5fed347b
2022-10-28 18:52:05 +00:00
drh
71b65e88e8
Add sqlite3recover() support to fuzzcheck.
...
FossilOrigin-Name: e65c5bdc5bd6e1989c3de59798ff0a761125fc490fdec8c7671ca70ed688c4f8
2022-10-28 18:35:06 +00:00
stephan
ffbc653d85
Remove sqlite3_interrupt() from the WASM build, as it is essentially impossible to employ in JS's threading model.
...
FossilOrigin-Name: e85387590061edbb6cdc04de792ab86f43afaa5c8d1b0792206cb5b481c7d76a
2022-10-28 14:33:50 +00:00
stephan
f03ddcca32
Add ext/wasm/module-symbols.html. Adjacent minor JS touchups.
...
FossilOrigin-Name: 24f12e681e06e3b71a6ac9c82255fe0270953a74c711405841f7e385eeafe874
2022-10-28 11:40:46 +00:00
stephan
e681b651eb
Minor sqlite3.oo1 API reorg prompted by documenting.
...
FossilOrigin-Name: 55237924ca363c5a3e0f8c82620eb6626a98311615866197375a86876b9da3a1
2022-10-28 10:36:18 +00:00
drh
c97bb14fab
Fix a minor problem with sqlite_dbdata.
...
FossilOrigin-Name: 58c2e49279c8f77f006b0c2ce351776bc711633f9c1a39c7a37969838d49ec0b
2022-10-27 23:17:49 +00:00
dan
676d1cda92
Fix another crash in the recover extension triggered by a corrupt database.
...
FossilOrigin-Name: d125377378916fb3147612a536fde15ee955176eea9ea6eaa4a2ee5f1e8e1cbe
2022-10-27 20:27:45 +00:00
dan
10f5525410
Fix another problem to do with recovering from in-memory databases.
...
FossilOrigin-Name: 5a7bfd4a217cd80882a1827674b479cdc547419a785e06e0ee82cb8cfca42701
2022-10-27 19:06:42 +00:00
dan
ac16a4716b
Ensure that the VFS wrapper in the recover extension does not attempt to invoke undefined methods on the underlying VFS.
...
FossilOrigin-Name: 347c575108bc8112613a02afda1247bdbed24c15def7eb412d0b27aba047715b
2022-10-27 19:02:51 +00:00
dan
895f12dfe7
Fix an assert() failure in the recover extension triggered by a zero value as the first page-number in an overflow page chain.
...
FossilOrigin-Name: 44c0874c33e76ce708022e5c38c74f75565a8cea9f4c5b067cc0a54079aeee20
2022-10-27 18:35:09 +00:00
drh
4853aa18f0
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:/forumpost/2961cf13eec61876|forum post 2961cf13eec61876].
FossilOrigin-Name: 9ecc9d25ea62a7777bbf621989a5c577b612784121a20465cda4d4023fa9634d
2022-10-27 18:20:08 +00:00
dan
f7fea5b4b8
Change the name of the ".recover" command option "--freelist-corrupt" to "--ignore-freelist".
...
FossilOrigin-Name: afce8443ace57c3c99c6810be98f05ed716ae504b68098726c869843c643bbf0
2022-10-27 18:19:45 +00:00
stephan
674b312ed7
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.
...
FossilOrigin-Name: a608d584a8a68ebaf8566cffc9c33f59309b710e7b29229a15bef529702f35d5
2022-10-27 14:41:38 +00:00
drh
fd6080637c
Automatically set temp_store=MEMORY if the VFS is kvvfs.
...
FossilOrigin-Name: a4d40f6346e7eb2a5239684dba86f297358122768a4d4bf6786b6028f4300e04
2022-10-27 14:28:15 +00:00
drh
9c17ee4f93
Do not accept a NULL pointer for the filename in KVVFS.
...
FossilOrigin-Name: fdecbd3b5bcdeb358015f461ac6c863f12ab180ab4624ed50734e41e557d8186
2022-10-27 14:00:21 +00:00
drh
f7b58da831
The kvvfs VFS should remember the page size when writing to the database.
...
FossilOrigin-Name: fc5503c8acb085042e877c9de43256a4fee27f63ab35e2ddad18e40734ed00d4
2022-10-27 12:46:17 +00:00
stephan
bb5136e5cb
Re-enable the .recovery and .dbinfo commands in shell.c.in in the fiddle build, as those were fixed by [3d20d77a3511] and [cd0aa27d1732].
...
FossilOrigin-Name: ba3a7a4a9997f62b78467d78d95fa5b58a03ecb2e2ccb68f4d316fc08fd02f86
2022-10-27 11:32:20 +00:00
dan
340b1d1a71
Do not use sqlite3_result_text16() in the recover extension if SQLITE_OMIT_UTF16 is defined.
...
FossilOrigin-Name: 3d20d77a3511bb223474da8491e1da8aec098c41c1b81ab78ff80fbd37d5b568
2022-10-27 11:25:08 +00:00
dan
48a4a4b73d
Fix a problem with running ".recover" on an in-memory database.
...
FossilOrigin-Name: 87b4cca2b84845cee603d40fbf16c9635d6dc2d19d2f37ae86abfeff716c9a85
2022-10-27 11:12:54 +00:00
dan
21fd7ce098
Do not use sqlite3_mutex_xxx() functions in sqlite3recover.c when built with SQLITE_THREADSAFE=0.
...
FossilOrigin-Name: cd0aa27d1732abc61c8a8440118ff629f7dca185d2f515ce1f6090c49d8dc890
2022-10-27 10:51:49 +00:00
stephan
4f975c3379
Minor doc typo fixes.
...
FossilOrigin-Name: ed8d3f25a4d6ac04d9f7918c791d8d2c6f23ce846278ca63f8fbadb7ea27369f
2022-10-27 03:57:48 +00:00
stephan
3d420836fd
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.
...
FossilOrigin-Name: ddd10c05c5d16d7205c347c5c1e73a75faecb2b7ec88a4a15875856765e1b143
2022-10-27 03:56:01 +00:00
stephan
de868175c3
Expose sqlite3_randomness() to WASM and add a custom binding for it which can populate a JS byte array. Add WhWasmUtil.isPtr().
...
FossilOrigin-Name: 333e67076b4bc967bb543ef8e265c63f6e3498c38ac121a7d1eff4a1d7a71c63
2022-10-27 03:03:16 +00:00
dan
195687f1bf
Disable the push-down optimization for sub-queries that are INTERSECT, UNION or EXCEPT compounds. dbsqlfuzz a34f455c91ad75a0cf8cd9476841903f42930a7a.
...
FossilOrigin-Name: 346a3b12b861ce7ba369e98cd336f79a1d4f7a7bb9acd7a4f63f37b391755bf5
2022-10-26 21:14:21 +00:00
drh
07dd481010
Remove an unused variable from the recovery extension.
...
FossilOrigin-Name: a029dddff4f4ed7275538610cbd9cea658b905b72924860ec9cda9e76dabcfac
2022-10-26 20:12:46 +00:00
dan
387f468591
Add the "recover" extension in ext/recover/, for salvaging data from corrupt databases.
...
FossilOrigin-Name: a820792548da596ed0f8ab3fd1c04ec16647abbe51a2a5aac9e17c4f58be6d97
2022-10-26 18:41:12 +00:00