Commit Graph

28661 Commits

Author SHA1 Message Date
drh
95f35b64da Redirect timer output just like any other text.
FossilOrigin-Name: 3b5ae21074958788b23ccf449e52fbbad1f81779e07a6ca62ad8395f88a37286
2024-09-25 14:09:47 +00:00
drh
62d96919f6 Improvements to ".www" and ".output -w" so that text that is not part of
query output is shown using <pre>.

FossilOrigin-Name: f8ef65c52305b2180ec56760f5762ac5638584cd504c79d57e86f61736901aa4
2024-09-25 13:56:05 +00:00
drh
2a9254cf2c Add the "www" output mode that include <table> in the HTML output.
Add the ".www" command and the "-w" option to ".once".

FossilOrigin-Name: b06fd9e6bcce09f12c994dc34f329a8d267ea0601bb07c9b00903c5017d55d42
2024-09-25 13:29:03 +00:00
drh
9e59c06fb1 Always include a UTF-8 BOM at the beginning of the output CSV when using
the ".excel" command on Windows, as the actual Excel program requires the
BOM in order to work correctly.

FossilOrigin-Name: 04727fc00207325a76a5d5f20549c00232810ac727dedb70bc9e8112e60b3f56
2024-09-25 12:56:44 +00:00
drh
853520ddbf Fix stray fputs() calls in the CLI.
FossilOrigin-Name: 1ee3fa0f0e87a61b5700abd56547c4acefe999317b0d53d66d890d9e09d8b7d9
2024-09-25 11:38:00 +00:00
drh
38b4158aba Use sqlite3_fgets() instead of fgetc() to end the startup debugging pause
in the CLI.

FossilOrigin-Name: 869b3c05e852a797b5801a81d30a1f7955c31afad0274327f7af2284b555f23a
2024-09-25 11:27:59 +00:00
drh
8f1f9ef09f Merge trunk enhancements, and especially the zero- and double-width character
processing for columnar outputs into the cli-stdlib branch.

FossilOrigin-Name: d6262a4bcd7b0334b23ae4d194ca2bce7c6554ee6c678666b24c830e4c14a467
2024-09-25 09:43:05 +00:00
drh
8cd30e3f5b In the CLI, for columnar output formats, try to account for the presence of
zero-width and double-width characters in the output and adjust column widths
accordingly.

FossilOrigin-Name: 9592b9ba3ad7a842cdd4c4010da278485a6fdec7e811bda01ebe640162a8c3b6
2024-09-25 09:39:11 +00:00
drh
f4382b2415 Improvements to comments on data structures and subroutines.
FossilOrigin-Name: b217e3004b58af0e777726bdd652b999ad41815261299ef4ce8f8d2f6b0afe8d
2024-09-25 09:33:14 +00:00
drh
18e2ace468 Fix over-length lines in the shell source code.
FossilOrigin-Name: f3fdf76a0d3abeb5202f2b6f26318815396da7df680073955bde60b13f84e797
2024-09-24 19:47:12 +00:00
drh
697c3fb25b Fix error messages in the shell.
FossilOrigin-Name: aeef82e974c24071e3211588001a92c7f122fbaf02d9dcf7fa5aaf30d2729f64
2024-09-24 19:19:53 +00:00
drh
63558eae54 Get fiddle working again on this branch.
FossilOrigin-Name: 0f228317c6ea1388d82df46f44c166b2aa9be63361ff9b81569ebee63c930f2e
2024-09-24 18:01:50 +00:00
drh
6ba175f0c8 Port sqlite3_analyzer.exe to use sqlite3_stdio.
FossilOrigin-Name: 7c1c1226d803dbaf8e75085b1cc2aad88aef4c3168288e587c8c736633d09054
2024-09-24 17:49:06 +00:00
drh
a55901a27c Port sqldiff over to use sqlite3_stdio.
FossilOrigin-Name: 18f784c47d4252bc3696a7e084a1afb9f51f006cf2021292f2103531b8235226
2024-09-24 17:40:54 +00:00
drh
0be2dd9a1b Get output redirection working again in the CLI.
FossilOrigin-Name: 086034c3508d95e4f620c5e0580fae770e85410b0c8bd94f600fc0fd25088947
2024-09-24 16:09:50 +00:00
dan
29057f3d18 Fix a memory leak in sqlite3expert.c introduced by [f1d76c86].
FossilOrigin-Name: 42bb941584a1ac922ee6b0b6ecadce71c9259555563cf49913a6f820f3f9b887
2024-09-24 15:11:34 +00:00
drh
57b32ef924 Add the sqlite3_stdio.h library for Windows console I/O.
FossilOrigin-Name: fcd0ecffc9889f8c855ea340f075ec42cdca482df82d6e67dc9c32613e8d5846
2024-09-24 13:46:32 +00:00
dan
3c90b86372 Avoid an error in sqlite3expert if the database has existing indexes on expressions.
FossilOrigin-Name: f1d76c8636866424fe0b57d8814b8bb1a0ed4e2ca1b75d8e308d4b962ad8dc3b
2024-09-24 11:26:21 +00:00
drh
4e34558f1b Use _wfopen() instead of fopen() on Windows in the CLI.
FossilOrigin-Name: 21a8cac5e9a0d5ead29ca1114be7520d182348f7e2e2e2416852b827d7e09f21
2024-09-24 10:30:07 +00:00
drh
118ac6a7ad Always use fputws() for output to a Windows command-line prompt.
FossilOrigin-Name: 33950a8c3f3e48e5107fe56647da05147aa84f9c3eccbe7c8671f5b502ebb70b
2024-09-24 09:51:53 +00:00
drh
7d24e6b080 Remove an ALWAYS() that can sometimes be false, with wildly incorrect SQL
inputs.  dbsqlfuzz 707afcf73930de2624cdeca0ad1f0deea982dfea

FossilOrigin-Name: 766cf5535b9f51decd88c1736b988def929a90f68eb6a52bcaa21bb321586a08
2024-09-24 00:53:27 +00:00
drh
415acd09d7 In the CLI, when displaying results in a columnar format, take into account
zero-width and double-width Unicode characters.

FossilOrigin-Name: 47cfad71eddc6fc4414ff853ee172da72527620eee743721806072c6e0a80caa
2024-09-24 00:01:47 +00:00
drh
1d9db01065 CLI uses only lib-c for I/O on Windows. No calls to Win32. Works on Win11,
at least.  Reads and writes unicode to/from the console and UTF-8 to/from files.
Prototype code only - must testing and additional work required.

FossilOrigin-Name: 5c54530d5a0a4125a1ba44f22537c4f63d5e5708f347c43cbac3e1832c4335da
2024-09-23 20:23:43 +00:00
dan
253695caf3 Fix a couple of problems with the sessions streaming interfaces.
FossilOrigin-Name: 9a1fc8d36b5b262f9d17a4743b4b9bb54510cf257d2d9778ebc42d5224856b1e
2024-09-23 19:32:06 +00:00
drh
5e419c1048 Add the run-fuzzcheck target to the MSVC makefile.
FossilOrigin-Name: 2e5194407a1b34dd0659c350ea8098bfef7b3f11aa5b2a07ecd2bce5582655a2
2024-09-21 17:27:47 +00:00
drh
38f2c5f81c If the database filename pointer passed to sqlite3_open(), change it
into ":memory:".

FossilOrigin-Name: 62e11a3a78edf9853b74d6495ccd8ae9ac1966c7d78eb3682cf2d5885e3740ec
2024-09-21 15:57:06 +00:00
drh
8a894cd804 Fix comment typo in the fileio.c extension. No changes to code.
FossilOrigin-Name: bf2c5b368ac094e048ca33a5e9175fe6a1fb5e2b1e392935eb29388e8999c40b
2024-09-20 17:41:05 +00:00
drh
7f0e0c7dbf New assert()s to help verify union access. No logic changes. Testing and
validation code only.

FossilOrigin-Name: b7b64c53f5d7f6b405ee3f1f1be1d84230aa79db5a502c8ad78d3e524f4384fb
2024-09-20 12:58:15 +00:00
drh
db467f5777 Fix harmless compiler warning in the vfstrace extension.
FossilOrigin-Name: c8b4d092a22d87f1231424c8e3fa6a02f17fb965cb2a931621e1b51f4d215de7
2024-09-19 15:44:41 +00:00
drh
f8305e4616 Improved rebustness to malformed UTF-16 inputs to sqlite3_prepare16_v2().
FossilOrigin-Name: 7b3a517b3e16ea487ca77a2c88a0c11d737de366524fc911aa1bdd6bfb7ad148
2024-09-19 13:39:06 +00:00
mistachkin
8513eb6ba8 Remove a stray newline.
FossilOrigin-Name: 77f587dc3bbc784e8884c1b56b53fa90bbd76f4bd121bd572ab529a2b9796e57
2024-09-19 00:05:18 +00:00
drh
0e8cbd5e78 Improvements to the scope of valueFromFunction().
FossilOrigin-Name: a0f39419cb5bdfa42ab2978cf3819e3d7821212996571f8251d2efbeaa26c603
2024-09-18 16:33:07 +00:00
dan
704561f346 Fix the preupdate hook so that it works when the "old.*" row has a column with a non-NULL default value that was added by ALTER TABLE ADD COLUMN after the current record was created.
FossilOrigin-Name: 6a8c687904e92f00c1a5f768947545d2920ab9025bf8649adb0ea8053f5aec4e
2024-09-18 15:52:05 +00:00
drh
ae2a4acf8d Fix sqlite3-rsync so that it recognizes drive-letters on the front of pathnames
in Windows, and does not misinterpret them as hostnames.

FossilOrigin-Name: 54a3bbd5781f76bd73f5276b632d1107312f7a789134910793262317edd8359c
2024-09-18 15:38:05 +00:00
dan
38b31a93b3 Fix the preupdate hook so that it works when the "old.*" row has a column with a non-NULL default value that was added by ALTER TABLE ADD COLUMN after the current record was created.
FossilOrigin-Name: 00a398cf900179aa5a8aab09fe4a671d99e7a31583282848ef39390f2ef246eb
2024-09-18 15:02:27 +00:00
drh
eaa50b8660 Fix harmless static analyzer warning in sqlite3-rsync.
FossilOrigin-Name: a63e412b6b2939422ecfa99d91fccb7a9c61e1533bb0db20ff12f3815ef41a2c
2024-09-17 22:57:08 +00:00
drh
87dce45f96 Add assert() statements to some of the sqlite3_bind() APIs that help human
readers and static analyzers, both, reason about the code and verify that it
is memory safe.

FossilOrigin-Name: 97528788145b83a1486dbaf09326ebedbc07bd0b47a57cdff773885b0b984604
2024-09-17 21:42:04 +00:00
drh
ff60709d68 In sqlite3-rsync, do not allow the '/' character to appear anywhere in the
USER@HOST: prefix to one of the argument databases.

FossilOrigin-Name: 6089a90463dcb3ba8e1584cfc5e2528fbc131311c6df7834fb41a5614a8ca9e8
2024-09-17 10:36:33 +00:00
drh
3b204ec8bb Fix a typo in an error message in sqlite3-rsync.
FossilOrigin-Name: 3f25d6c8eac25de4afff486b134a339bc06404ddaed15b46db48c6770535b1e6
2024-09-16 20:53:52 +00:00
drh
61e3067529 Cleanup the sqlite3-rsync executable as part of "make clean"
FossilOrigin-Name: 8c5e481b49d86d97fefa345d0c1b96c050846ef9fc51d8b9dd203ee35afd6f6d
2024-09-16 14:11:14 +00:00
drh
d70fbffc1a In sqlite3-rsync,
open the replica database using ATTACH since the sqlite3_dbpage virtual table
is technically a part of "main".  This avoids locking problems.

FossilOrigin-Name: 39c56c836a8ae52c5b42cc0d04b92f7c0e6889a03c4fdffd301209383b7c1f87
2024-09-16 10:58:11 +00:00
drh
f8cafd7b11 Improved error message in sqlite3-rsync if the SQL statement for ORIGIN_TXN
fails.

FossilOrigin-Name: 73bde71ed10f52b851e220de35519d5fb7e65a932437ab82a194faff490b7930
2024-09-16 09:12:11 +00:00
drh
a95620c141 Provide more opportunity for the remote side in sqlite3-rsync to send error
messages back to the local side.  Be sure to invoke pclose2() when done.

FossilOrigin-Name: 23a63505152ff995e4ce0963dc4ab9f76ed55da7e7f5e1b85a2577473642e3ad
2024-09-15 18:37:34 +00:00
drh
d87a4f8bdd Merge subsequent changes to sqlite-rsync that were accidentally missed by
the prior check-in.

FossilOrigin-Name: 50762ba0783a04e0dcd9456a1ae17d875b0a9272f2f09854a23d9d5253761e9f
2024-09-14 16:52:45 +00:00
drh
dbff02abc5 Enhancements to sqlite_dbpage() so that it accepts INSERT statements that can
extend or truncate the database.  Add the sqlite3-rsync utility program that
make a copy of a live database over SSH.

FossilOrigin-Name: b7a8ce4c8c5fc6a3b4744d412d96f99d2452eb4086ad84472511da3b4d6afec6
2024-09-14 16:39:02 +00:00
stephan
11e1defc8f CLI arg handling robustness improvements.
FossilOrigin-Name: 129aca54f6b791c222b51f3eb01569e1e569269860e153b005140eb65af378b9
2024-09-14 16:30:01 +00:00
drh
3d56d59adc Add the --version option.
FossilOrigin-Name: 9961334c8007e7cb6ae55885075b74acddc4fa701b359cf67e0f3c237d7eba4a
2024-09-14 16:28:38 +00:00
drh
7154803d4c New debugging options: --logfile, --errorfile, --remote-errorfile.
If page 1 changes, always send it last.

FossilOrigin-Name: 2d8cd76691554578e987ce682cf0c42c083711dd1511a178148978182ef43ba2
2024-09-14 16:03:16 +00:00
drh
df9b488799 Always show the -v traffic message even if there are multiple -v options.
FossilOrigin-Name: fc05a5b7f77cdbfcc659d49eb09569a64a172362cb90199e2861028085178f10
2024-09-14 11:38:46 +00:00
drh
15e05eab32 Add the --logfile FILE option for debugging.
FossilOrigin-Name: 30e1b92d5663e24d2f325f2bab35f81b55848ef39d15688e40b9005269626303
2024-09-14 11:23:57 +00:00