Commit Graph

5965 Commits

Author SHA1 Message Date
drh
1768ec5ba7 Merge recent trunk enhancements into the begin-concurrent branch.
FossilOrigin-Name: 7f954a9e2fa4203b55825dfd70a46ffde7c985a4c8b940208d74d97441f3fd04
2026-04-22 19:50:38 +00:00
drh
5c6404aa77 Fix a integer type bug in the previous check-in.
FossilOrigin-Name: 5e1b5ff1c170e94956bf77bd38afcad6369cb9f9333864711212af045281ad0e
2026-04-22 13:41:20 +00:00
drh
429369f4aa QRF and the CLI preserve zero bytes when outputing unformatted BLOB values.
FossilOrigin-Name: dbc1d6f0a3452607e4e92155df0fdb1c5ea4ea5ad1654664f86383faf6c105ef
2026-04-22 12:22:32 +00:00
drh
9529894a29 Fix harmless compiler warning in QRF.
FossilOrigin-Name: dcfb505ac7762f7a3102e1c3853a83dca1d1ef436cc8981949b63c7d7992cc5b
2026-04-21 22:19:38 +00:00
drh
4ebed2a4e5 Fix an off-by-one buffer size calculation in the decimal.c extension.
FossilOrigin-Name: 24df42104d5fd1cf974f2bf539fa7515808e21e68d64899c39f5fcf3bee49a48
2026-04-21 16:07:15 +00:00
stephan
d3abfd77f5 Reformulate how the OPFS async proxy Worker is loaded for the bundler-friendly builds to work around a bug in Vite in which it incompatibly rewrites the Worker's URL arguments. Addresses the discussion at [https://github.com/sqlite/sqlite-wasm/pull/159|npm package PR 159] and patch validated by Jure Rotar.
FossilOrigin-Name: ec877a30f5c5db30b9154745140744c5cc80d89673d79e50901d7377599cf2b4
2026-04-21 10:19:38 +00:00
drh
63984b6ab7 Fix the fileio extension for Windows builds so that it does not depend on
the sqlite3_win32_utf8_to_unicode() and sqlite3_win32_unicode_to_utf()
routines that are found in the SQLite core.
[forum:/forumpost/2026-04-20T02:02:56Z|Forum post 2026-04-20T02:02:56Z].

FossilOrigin-Name: fe0414a9a3caf6af67f53a5f3534efd5d4bf4978ebce1c591ef62d6961e55701
2026-04-20 10:28:19 +00:00
drh
a2116f86b0 The sqlite3_str_new() interface never returns NULL, even after an OOM.
Code that uses that interface should invoke sqlite3_str_errcode() to see
if an OOM has occurred.

FossilOrigin-Name: cb910047edc591102dd4ed0d57c863b366981b8aa1d3085d5f95b1fbbabf6c31
2026-04-15 14:41:25 +00:00
drh
ade9289540 Improve the analyze() extension so that it returns a simple error message
as text (it does not throw an error) if the database is empty or is "temp"
or does not exist.

FossilOrigin-Name: 35379f60922f14d4f6d231ae627df066ad4e4510208bcc244505b9afb279f2fa
2026-04-15 12:47:37 +00:00
drh
dfba4eb34a Fix harmless compiler warnings seen by MSVC in the previous check-in.
Also add ext/misc/analyze.c to the makefile dependencies for the CLI.

FossilOrigin-Name: 5a0ee6e227042e41ac64869c75f961798b252458670c18662175fe5bfa8b87d3
2026-04-15 12:35:23 +00:00
drh
b57d2a5a51 Add the analyze() SQL function implemented the ext/misc/analyze.c extension
(but not part of the amalgamation).  Make that function available in the
CLI and add a new ".dbinfo" command to the CLI using that function.

FossilOrigin-Name: 4c4988e56df3c668b8891e2a55887a6618f5b84e9111e562b93059ddb9a662dc
2026-04-15 12:20:11 +00:00
drh
c8d866294b Add the .dbstat command to the CLI.
FossilOrigin-Name: fdba76df2b3a5b4d56ba79f80fd8b16d5faebca1fb07a266262be2ea635e6f94
2026-04-15 11:41:50 +00:00
dan
ec2ea68d1f Avoid a potentially undefined left-shift in the fts5 porter tokenizer.
FossilOrigin-Name: 46a288e43e4c48fca6610bce6a2db418aaa3c8a1dcb115b7a0bfad2063355e58
2026-04-15 11:23:30 +00:00
drh
9efde40a5d Compute the average fanout for b-trees of depth 2 or more.
FossilOrigin-Name: 2f8598bb09f32100f22dd1d9465f3fa0f7f8d81f5d67c34de9919708345f090b
2026-04-15 10:49:14 +00:00
drh
09f37099a7 Code simplifications. Return NULL is the specified SCHEMA does not exist.
FossilOrigin-Name: 953969c88149ea2f589942b98a0a96d907956319e5aa09e2d5a3ae76d3e7d70a
2026-04-14 23:19:02 +00:00
dan
1b14a925dc Have the session module detect some corrupt changesets earlier.
FossilOrigin-Name: 0de91ff0d798cff21289d893cc441b89fc37b051d5cdf611d92d3ae2bc41cdf2
2026-04-14 20:17:41 +00:00
drh
526acc1834 Merge trunk enhancements and fixes into the analyze-sql-func branch.
FossilOrigin-Name: bb4a9beac87796b4186efce416bf03f840041bc588be6702c5a444d643df684e
2026-04-14 20:17:03 +00:00
drh
d962afef2d Various minor tweaks and refinements to the analyze() function.
FossilOrigin-Name: 48d94e72eaec443011dd1f7a7264e5222c05bb515c84deaf20ed4195b74d45ff
2026-04-14 20:07:29 +00:00
dan
839433d457 Handle a special case of a corrupt changeset in sqlite3changegroup_add().
FossilOrigin-Name: 49b3bac482c831f503c7f90c35959e7ea731950e991baba86b2ab95987d2539b
2026-04-14 20:02:49 +00:00
drh
395ac6c1bc Implementation of the analyze() SQL function is now mostly complete.
FossilOrigin-Name: 1ca0386ab2df0d88ed52941469d459114f483ecf6b7e4691bcc32e909636cb7d
2026-04-14 19:36:33 +00:00
drh
e9d0bc6b68 Much, but not all, of the report generation is added. An incremental check-in.
FossilOrigin-Name: 289fefc3edfeecb06dc11897d3ff24763fd9e25db44e369eeec29b9ed3de5ccc
2026-04-14 19:02:40 +00:00
dan
ab6a63ec67 In RBU vacuum commands, do as SQLite does and ignore any trailing SQL statements in the sql column of the sqlite_schema table.
FossilOrigin-Name: cf7dad1b105ab35cd7180efec735b7cbeaf42b8d53dfec5582b63cd121c3425c
2026-04-14 18:08:30 +00:00
drh
34c2c8dc47 Further fixes and clarifications. Now ready to start generating the
actual report.

FossilOrigin-Name: 037a0e586c4aa81a53aea164080e739f9d5b87197d04fdd68feb0ab5eb01020b
2026-04-14 13:18:04 +00:00
drh
3f9df1f5fb Further improvements to error messages and robustness.
FossilOrigin-Name: 45917c1124310fd77daca47865959d3261154f7b0c6771d3689e6d345a3fd153
2026-04-14 12:46:12 +00:00
drh
2eeac123c8 Improved error messages and robustness.
FossilOrigin-Name: c09ed9eb914bde96cdc5157e29b6384ce488262a2dadc7321c44941a1d08a187
2026-04-14 12:23:11 +00:00
drh
64a123a216 Initial prototype implementation of a new run-time loadable SQL function
to do approximately the same work as sqlite3_analyze.

FossilOrigin-Name: 03934b5a6c88a97117a4743a68ee36d30bcbdcebcf11342d30ac42daf9f10874
2026-04-14 11:25:22 +00:00
stephan
6142310e08 When fiddle terminal mode is enabled, add a link to the jquery.terminal project in the About box.
FossilOrigin-Name: d64f0c8845104008d6c251f9a1406c6ff717a916c13b64014aa1d154501d5fab
2026-04-11 20:43:49 +00:00
stephan
57cf5c2dfc fiddle: disable jquery.terminal's pre-processing of user input, as discussed in [forum:c6665017c0dbba1f|forum post c6665017c0dbba1f], with many thanks to the jquery.terminal team for this workaround.
FossilOrigin-Name: ea7e121ab2a7b2fee5372ca12a2a53c7e98ffa1b49d85944f7ce4a7251a777c8
2026-04-11 20:31:03 +00:00
drh
a212476ad2 Improvements to the interactive prompt in the CLI:
(1) CLI honors SQLITE_PS1 and SQLITE_PS2 envvars as prompt strings,
(2) CLI prompt strings expand various backslash escapes,
(3) No arbitrary length limits on CLI prompt strings,
(4) New default prompt shows the database filename using the \f
escape,
(5) SQLite core adds the sqlite3_incomplate() API, used by
the \H escape in prompt string rendering,
(6) Enhancements to the ".prompt" dot-command.

FossilOrigin-Name: 55af98054e073d6eee3e85fd7564c83eca935ae205da68f5e8f1b561e7f08c00
2026-04-11 18:38:54 +00:00
stephan
7a0a0a22e7 Ensure that sqlite3-opfs-async-proxy.js is copied into the fiddle target dirs.
FossilOrigin-Name: 149200861e4690dab5f2e690b62f355b13a8370dccaab5546caa6842b4ff963a
2026-04-10 23:31:29 +00:00
stephan
504cfd5ec7 Ensure that sqlite3-opfs-async-proxy.js is copied into the fiddle target dirs.
FossilOrigin-Name: 7c9998de1b839cfbe12c4328ac5176f5fae981e139c5f8888b100752f5e4756b
2026-04-10 23:25:57 +00:00
stephan
9d950aa13b A protype of .prompt support in fiddle but its utility there is in doubt because .open does not work there, so there's very little dynamic info worth showing in a prompt. Also, ANSI colorization can't work there, nor can we colorize the prompts using HTML because of limitations in jquery.terminal.
FossilOrigin-Name: 3b17500dc6338df23d1ed0572cd71593da5a9b048731f73242e27b9a76553a27
2026-04-10 23:05:41 +00:00
stephan
b709ba8108 Expose the main /fiddle object to the browser dev console as globalThis.fiddle for experimenting with a dynamic prompt.
FossilOrigin-Name: 8574e5c9da3b167384faafb8ec0d01953578676cc42536bb6f7d0e73408ced36
2026-04-10 21:58:13 +00:00
drh
92c435cda7 Improve defenses in QRF against trying to run the same prepared statement
twice, concurrently.

FossilOrigin-Name: 6ab6f622be3e1ad93166d139b5fccf9628c86d1c14c6dfb4464cb8cf52c94785
2026-04-10 18:14:33 +00:00
stephan
35f8abcfd0 API doc correction for sqlite3_js_retry_busy(). No code changes.
FossilOrigin-Name: 749c537812b907164b7e7ad1fddc1aee8106c59875d2686fe83d602cd0e07611
2026-04-10 17:55:31 +00:00
dan
535b1f2875 Fix some buffer overreads that might occur in the session module when handling corrupt changesets.
FossilOrigin-Name: 8fcf92e15d87487703afc1129f3a89a8d4d72cb30d30a1a9151a5596473069bd
2026-04-09 05:33:19 +00:00
drh
0eb678758b Merge all the latest trunk fixes into the begin-concurrent branch.
FossilOrigin-Name: 258f10197f361490c1370fe16236a19dd0e25c7dd34f904ba22363ccca4d398b
2026-04-08 19:08:48 +00:00
stephan
0d979c217f Fix a few doc typos and inconsistencies. No code changes.
FossilOrigin-Name: 025abd4cf409fb9938e116289f23dc5bcd6d14feb46066221e691b146ee9b354
2026-04-07 15:54:35 +00:00
drh
606c64a543 Fix redundant typedef in qrf.c when that file is amalgamated into
tclsqlite3.c.

FossilOrigin-Name: b8f0c71b48953cb6d5a8b3d33d004a31b63c59d59d455f285bf8fa91c3b07129
2026-04-07 11:31:41 +00:00
stephan
eefe3aa9ad Replace a doc reference to a renamed file, as reported by [forum:5d9d70c618|forum post 5d9d70c618]. No code changes.
FossilOrigin-Name: c8121593fa455cd43b3878f8b65ebac47c07dab4b8ce081aa34b14fc9440afbc
2026-04-07 09:15:21 +00:00
stephan
d4b74b9fac Add some comments to the OPFS async proxy about potential future experimentation. No code changes.
FossilOrigin-Name: 9c14ee74305a5db3be95dbd9ae8d1db0abf39b323001be4e2f02b7226e6ca0d3
2026-04-04 08:07:25 +00:00
drh
217c590688 Fix Tcl9 compatibility issues in test_session.c.
FossilOrigin-Name: 1387b5819085146cafb0e8740410faaa48bfb5aefc78ff763aaa8e85744d48b3
2026-04-03 11:48:00 +00:00
drh
7693d9d087 Merge all the latest trunk enhancements into the begin-concurrent branch.
FossilOrigin-Name: 51cda102d2c8e682076c962f7517b4d546392e31e50de4748d4647799c25c5bc
2026-04-02 11:52:29 +00:00
dan
62f3150204 Fix a potential 4-byte overread in the sessions module when processing a corrupt changeset.
FossilOrigin-Name: c1c7e024c34da8eb0258ce552f3f81921280ccf0f1fea59374f381c0c7b43b74
2026-04-01 17:43:22 +00:00
drh
34e139d3a3 Always use sqlite3_malloc64() in extensions, where possible.
FossilOrigin-Name: 6194f3b5314ef98b5d73060450de8e3497272494b47e6f96992453418894ded1
2026-04-01 16:56:48 +00:00
dan
6e6598c8ff Fix a problem in the sessions module allowing a NULL pointer to be passed to memcpy().
FossilOrigin-Name: 91ead3c62dd7b1db3fdfd318e3c35a42fb33e8fa2e347b682eecbff2f4e8677b
2026-04-01 16:11:47 +00:00
stephan
eb8edc0bac Doc cleanups in opfs-wl. No code changes.
FossilOrigin-Name: 009b576dcd5fccaaa52459dbfaa1b2a6fcf6d372e4b8d63553dfa88aab9a759c
2026-04-01 11:39:13 +00:00
drh
d6226a9c27 Add appropriate headers to ext/session/sqlite3session.h so that the
documentation generator will pick up the API documentation for the
new one-at-a-time changegroup APIs.

FossilOrigin-Name: da514f10b7804fd0affaf0fd4b8089012288ba99c165ef4ab78ab28edd331211
2026-03-31 18:49:23 +00:00
dan
5e4fb95edf Update this branch with changes from trunk.
FossilOrigin-Name: 716e62e3d1d6ff96f6e4906175818439103e9534e89bec4a86776265a04954b9
2026-03-31 10:52:00 +00:00
drh
25a7567583 Merge the latest trunk enhancements into the begin-concurrent branch
FossilOrigin-Name: 5d5433ab96b5a254b205042edb6395f96e8f45eef51056376b63e097f9f8a9bc
2026-03-27 12:05:13 +00:00