drh
84c1079220
Add a missing open_db() call in the new ".dbstat" command of the CLI.
...
FossilOrigin-Name: a138e44a243466f8679e9652421f8c893a4a1bc0addc86736588d9aee51cf090
2026-04-15 11:58:54 +00:00
drh
c8d866294b
Add the .dbstat command to the CLI.
...
FossilOrigin-Name: fdba76df2b3a5b4d56ba79f80fd8b16d5faebca1fb07a266262be2ea635e6f94
2026-04-15 11:41:50 +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
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
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
57ed7f322f
Check-in [495e4851d4296b49] breaks the build for Windows. Fixed here.
...
FossilOrigin-Name: 5b004348c3ec15a02dd657b3619502b6f8ba1c6f46918108b3de9534622076a0
2026-04-14 18:06:41 +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
a10e79d91a
Minor README typo fix reported off-list by BrickViking.
...
FossilOrigin-Name: aa3432af90b2b9ab0b92f56a8e9c926930b9859e986500bd00d5600c1dd036bf
2026-04-14 02:09:43 +00:00
drh
d20673a95f
Fix typos and inaccuracies in comments. No changes to code.
...
FossilOrigin-Name: a6c2d7ce84f4f5f8a82cc566a27f98f5418f251e87f1f264ae57935fb10399f7
2026-04-13 17:33:34 +00:00
drh
f02d100e08
".prompt" command improvements in the CLI: Guard against mistakenly saying
...
".prompt show" without the "--" before "show". Add the --hard-reset option
to .prompt to make it more easily testable.
FossilOrigin-Name: 495e4851d4296b49a37b963edd8410314de1510b2ae0b9dbe9dc0307c466c3b5
2026-04-13 12:22:16 +00:00
drh
4c8f0621fd
Improvements to the prompt_filename() function in the CLI so that it finds
...
the database filename even if the connection is not yet fully open.
FossilOrigin-Name: efb3e808a0281014512a812920d526a4909467e925ea000956606318bb6f2e65
2026-04-13 11:34:15 +00:00
stephan
6abc21cfb8
Latest upstream jimsh0.c.
...
FossilOrigin-Name: 414ae4dd65182ce571a6abb1a1a2ba2c169b204156f4f8923c42f64805a3ef9f
2026-04-13 10:56:14 +00:00
stephan
20079bb358
Doc typo fix which broke the docsrc build, reported by BrickViking.
...
FossilOrigin-Name: 3c212b5d85338f90a5f1a2d1484e54c0bf699eedef19a16f4c0de76a76dd9d07
2026-04-12 17:47:57 +00:00
drh
3d6fa49c54
Bug fix in the revised ".prompt" command of the CLI, with test cases.
...
FossilOrigin-Name: 7583385593354f90a9818d1820543841109f253dffcec5ca5ed7629336e29fac
2026-04-12 10:46:35 +00:00
stephan
4df365e5a7
Fix a typo which causes .headers to not show up in the shell's .help.
...
FossilOrigin-Name: d379b14a48d331933240fb99ab43c3cc978638d7ad0a8d5975bb211a72eaef2b
2026-04-12 05:41:28 +00:00
drh
9d8bf6f04a
Change the prompt escape design yet again, to use / as the escape character,
...
since % and just about every other punctuation character is special to
cmd.exe, batch files, and nmake, on Windows.
FossilOrigin-Name: 79a8d3edf8207d72f0c4650272ee239a1c7783a07f907fbf0cf5a7ad99b27a2a
2026-04-11 23:58:15 +00:00
drh
c0026ff7a6
CLI prompt design change: The escape character is changed from \ to
...
%#37;. This avoids lots of quoting problems when trying to specify prompt
strings in various programming languages and shells.
FossilOrigin-Name: e7e6ecc45dfe1a163d259be26877bd7e528ce154e73b3ca8ab7edc5aa94d2d02
2026-04-11 22:58:25 +00:00
drh
1e3f888acf
Two C-preprocessor macros SQLITE_PS1 and SQLITE_PS2 can be set to override
...
the default prompt strings in the CLI.
FossilOrigin-Name: 6fa0216a19c2f165110121227d3f9b9119369f8cd61f9c6d13eaa1ae42a60d60
2026-04-11 22:18:05 +00:00
drh
2d4dfbccdc
Make sqlite3_incomplete() available to extensions.
...
FossilOrigin-Name: 50d81300ba0f021f388aab1e86e97d688ed762cee408c610cf70977f7b488803
2026-04-11 20:53:53 +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
drh
42ae7e7f34
Fix harmless UB in sqlite3_incomplete().
...
FossilOrigin-Name: 8dfdff559faefd943b97827dc3c7100fc4469e2f8353a264fb322e23af5cb669
2026-04-11 20:41:54 +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
drh
d08caad3a5
Fix harmless compiler warnings.
...
FossilOrigin-Name: 3b4cc8d3beab8c910dd954bf8093f7ab499e4690b9cf882f981c4415dd7a7540
2026-04-11 17:47:31 +00:00
drh
28456958ca
Initial test cases for the CLI prompt enhancements.
...
FossilOrigin-Name: b7ecc84735d41e9cdb498020b86d8219efa18ca5b40aef1031a14809f1ac2d38
2026-04-11 16:12:12 +00:00
drh
3b27ffa534
Add --reset, --show, and -- options to the ".prompt" command of the CLI.
...
FossilOrigin-Name: 8075576ba2324a458440bae398baecc7872b6528574b7fe6681a3a30b62d58ef
2026-04-11 15:45:45 +00:00
drh
fc2c730c87
Enhancements to shell_prompt_test() for better testing. Enhance the
...
".open" command so that it does ~/ expansion on filenames.
FossilOrigin-Name: ec6830fe60b73bc606d3c2a5d407a39db53f6dadee760829410abfa1df46389e
2026-04-11 14:11:56 +00:00
drh
cd28797117
Remove arbitrary limits on the length of CLI prompts. Use environment
...
variables SQLITE_PS1 and SQLITE_PS2 (if they exist) as the default
CLI prompts.
FossilOrigin-Name: a46ceaeab968d8f376c5a225c23c0be8619fed4511b7e567baf3a8d7736c19d1
2026-04-11 12:35:53 +00:00
drh
c8b130f255
Fix the \B escape for prompts so that it uses wcwidth() instead of
...
strlen() to compute spacing.
FossilOrigin-Name: c6ff4f701d9cf963cf2472ed72ad4e201227560dde2ba8d48602af2e49170e89
2026-04-11 11:24:09 +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
01e1be854b
Fix minor issues on Windows.
...
FossilOrigin-Name: 48e40d3f6a193d6c4d1b8deda36415a690602dbe33d49984a9d92c6d40d8da5c
2026-04-10 20:44:38 +00:00
drh
70868a5ae3
Fix prompt for in-memory databases. Fix the continuation mechanism so that
...
it looks at all accumulated lines, not just the most recent line.
FossilOrigin-Name: 166894725569cafa96c434aa14db0428db6791a8296fcc2990bec4ec819fd876
2026-04-10 20:29:35 +00:00
drh
d0065c8118
Replace the former dynamic-continuation prompt logic with backslash-escape
...
prompt expansion, include some expansions that serve the same role as the
old dynamic-continuation prompts. This allows greater user
configurability.
FossilOrigin-Name: 052631202e4dd930d93434b7003e73b23557934421ace5d2f382f041638d5518
2026-04-10 20:14:16 +00:00
drh
bd574dbaee
Add the \B escape for CLI prompts. Change the default prompts to
...
use \f, \H, and \B.
FossilOrigin-Name: 354325b6f396bda38bbb82e7d38aa50d3d6441e1ebb9b578aed8e0bcf62f9911
2026-04-10 20:06:34 +00:00
drh
7632922625
The \H escape on a prompt string fills in with the characters needed
...
to make the input "complete". Add the shell_expand_prompt() SQL function
for testing purposes.
FossilOrigin-Name: 6aafb76c74b73aafef74250dae9c8cbe73226c0efb606e8f80ea761b3293cf9d
2026-04-10 19:33:15 +00:00
drh
49998a6d25
Merge trunk fixes and enhancements into the cli-prompt-redo branch
...
FossilOrigin-Name: f3354ebf51e684ef680986bef9b606f63786c254f1c8774bcaf7a7f3d0d37056
2026-04-10 18:53: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
drh
1a315c0d51
Use sqlite3_malloc() for memory allocation inside of sqlite3_str_vappendf(),
...
since it invokes sqlite3_initialize(), whereas sqlite3DbMallocRaw() does
not.
FossilOrigin-Name: a2f84c56316ea746c134aa6e5a2b46021f67c6642161beae8122f73daeddda92
2026-04-10 17:11:16 +00:00
drh
3a8d38ffc0
Fix the printf() optimization added at [ccb6b6c4ac21742d] so that
...
sqlite3_snprintf() does not incorrectly truncate floating-point
conversions that are close to filling the buffer, as reported in
[forum:/forumpost/2026-04-10T13:48:12z|forum post 2026-04-10T13:48:12z].
FossilOrigin-Name: a50521a16068e555aa08ee25726b081bb4cd33e3ea388b82dcbaa691c2576284
2026-04-10 15:55:08 +00:00