]> git.ipfire.org Git - thirdparty/sqlite.git/log
thirdparty/sqlite.git
9 months agoMerge latest trunk changes into this branch. snapshot_get-locking
dan [Wed, 2 Oct 2024 11:11:29 +0000 (11:11 +0000)] 
Merge latest trunk changes into this branch.

FossilOrigin-Name: 2b3945e6a597e6853cac567052e92926c8cb6d7a029ac64c2d45c321bbe2e94d

9 months agoUpdate docs for sqlite3_snapshot_get().
dan [Wed, 2 Oct 2024 11:11:00 +0000 (11:11 +0000)] 
Update docs for sqlite3_snapshot_get().

FossilOrigin-Name: 78c3892ab777a39406da8a9df84d0634397514e25512b0363a13bff3b8bc8925

9 months agoNew #ifdefs to omit code that is unused when SQLITE_USE_LONG DOUBLE is defined.
drh [Tue, 1 Oct 2024 19:10:47 +0000 (19:10 +0000)] 
New #ifdefs to omit code that is unused when SQLITE_USE_LONG DOUBLE is defined.

FossilOrigin-Name: 98066e2d226e7d2eceec1931a1432baea956f49bf3c708d8a6d511fa4e864ca3

9 months agoAnother comment about the LONGDOUBLE wasm topic. No code changes.
stephan [Tue, 1 Oct 2024 17:57:55 +0000 (17:57 +0000)] 
Another comment about the LONGDOUBLE wasm topic. No code changes.

FossilOrigin-Name: 1755831cb1ac58241e0b11d8d003b5eca39b65aa3cb84229b215662028b1b3c0

9 months agoUse the new SQLITE_USE_LONG_DOUBLE to disable long-double support in WASM builds...
stephan [Tue, 1 Oct 2024 17:08:23 +0000 (17:08 +0000)] 
Use the new SQLITE_USE_LONG_DOUBLE to disable long-double support in WASM builds, as they cannot be represented in JS and this saves approximately 5.5kb in the resulting wasm file.

FossilOrigin-Name: fa7b56f776b715d061581fad6f04b871504ff5d808e7364419d1d6cdef82c5ee

9 months agoAdd compile-time option -DSQLITE_USE_LONG_DOUBLE=0 to omit all attempts to use
drh [Tue, 1 Oct 2024 16:55:30 +0000 (16:55 +0000)] 
Add compile-time option -DSQLITE_USE_LONG_DOUBLE=0 to omit all attempts to use
"long double".  Or =1 to omit attempts to use the Dekker algorithms to achieve
high-resolution floating point.

FossilOrigin-Name: ca5964ef70efad3332e0bf9c158eb5fd5006d3022051d1ac506c097c427735a1

9 months agoAdd an #if'd-out block to sqlite3-wasm.c mentioning the LONGDOUBLE_TYPE, as brought...
stephan [Tue, 1 Oct 2024 10:49:30 +0000 (10:49 +0000)] 
Add an #if'd-out block to sqlite3-wasm.c mentioning the LONGDOUBLE_TYPE, as brought up in [forum:cbfb0d0ac0a4e349 | forum post cbfb0d0ac]. No functional changes.

FossilOrigin-Name: 0b83e8f1ef53b35a9dda0740b4922b8691428f7484f3058833a961f3f8d0b178

9 months agoFix the character width tables for the CLI such that all unicode code-points
drh [Mon, 30 Sep 2024 18:19:38 +0000 (18:19 +0000)] 
Fix the character width tables for the CLI such that all unicode code-points
less than 0x300 have a width of 1.  This is in fact the case for Mac, Ubuntu,
and Windows.

FossilOrigin-Name: f0c5a86fefecded07e098e1326dd54c72504b0bb480f710e395d4041a322dfcb

9 months agoIn fts5, avoid starting a new merge of level L if there exists already an ongoing...
dan [Mon, 30 Sep 2024 17:28:45 +0000 (17:28 +0000)] 
In fts5, avoid starting a new merge of level L if there exists already an ongoing merge of a level less than L.

FossilOrigin-Name: 350c6e75ce3c1e81458d1baa73045df489284206e8b279ab3c2f5e3d011c262a

9 months agoFix the CLI so that the --bom option only outputs a single BOM, not two.
drh [Sat, 28 Sep 2024 19:52:38 +0000 (19:52 +0000)] 
Fix the CLI so that the --bom option only outputs a single BOM, not two.

FossilOrigin-Name: 76b6331e6a705a420a64820a18214f07cf4c1d5151e7158d6fff09964e63f352

9 months agoAdd another missing mkdir to the wasm build process.
stephan [Sat, 28 Sep 2024 15:13:49 +0000 (15:13 +0000)] 
Add another missing mkdir to the wasm build process.

FossilOrigin-Name: e815055b321085deda8607ac3279ef1a1c890fe3bf9d9b9c0a74028e87857a7d

9 months agoComplete a line of documentation which was interrupted mid-sentence.
stephan [Sat, 28 Sep 2024 13:51:47 +0000 (13:51 +0000)] 
Complete a line of documentation which was interrupted mid-sentence.

FossilOrigin-Name: c9cbbeda3d1ec4215396aaaf94428b829c4f53329431fa61251914c195f8a9a1

9 months agowasm: move the makefile-eval-generated fiddle rules into mkwasmbuilds.c. Squelch...
stephan [Sat, 28 Sep 2024 12:01:10 +0000 (12:01 +0000)] 
wasm: move the makefile-eval-generated fiddle rules into mkwasmbuilds.c. Squelch some warnings from grep when running 'make clean' on a clean tree.

FossilOrigin-Name: 0485d1360b0dbf9987d16ab1df47b6b7a25595881581799f87889f6d4eeb60f4

9 months agoEnsure that the temporary build dir is mkdir'd by wasm deps which depend on it.
stephan [Sat, 28 Sep 2024 11:23:09 +0000 (11:23 +0000)] 
Ensure that the temporary build dir is mkdir'd by wasm deps which depend on it.

FossilOrigin-Name: cabdf9797281090ab3f95c9f4c2a79878d1c64d1f2a09e433e2309abe5e19e59

9 months agoFor wasm builds: automatically use higher optimization (but slower build) levels...
stephan [Sat, 28 Sep 2024 11:03:00 +0000 (11:03 +0000)] 
For wasm builds: automatically use higher optimization (but slower build) levels when a target related to deliverables (as opposed to dev mode) is explicitly invoked.

FossilOrigin-Name: 45361ab9744ccac3419d97fe8951838f14bd28220e3f7f747b39e46cfc3b5a1d

9 months agoMinor makefile doc fixes. No functional changes.
stephan [Sat, 28 Sep 2024 00:39:19 +0000 (00:39 +0000)] 
Minor makefile doc fixes. No functional changes.

FossilOrigin-Name: b3ad58e1fc73941f2d32bab0e0fac0b95849ae69f84788a431e65bb072e42db5

9 months agoMerge wasm-build-rework branch into trunk. Summary: 1) add optional bare-bones build...
stephan [Sat, 28 Sep 2024 00:02:52 +0000 (00:02 +0000)] 
Merge wasm-build-rework branch into trunk. Summary: 1) add optional bare-bones build, stripped of many optional library features, 2) replace much of the hyper-spaghetti wasm-specific makefile code with a more legible static code generator.

FossilOrigin-Name: 208c27714646c9bc26eef11266086a71da04bc24e87078de0955e7beb68a821e

9 months agoFix fiddle build broken by recent build-level reworks. Remove a stale reference to... wasm-build-rework
stephan [Fri, 27 Sep 2024 23:45:40 +0000 (23:45 +0000)] 
Fix fiddle build broken by recent build-level reworks. Remove a stale reference to an old CSS file.

FossilOrigin-Name: f904b3b7842da036c3e8423bae02cdf207573c92dc379a601eae289eb3c5f547

9 months agoSquash sign-comparison warnings reported in [forum:5e605a763a65c3f8 | forum post...
stephan [Fri, 27 Sep 2024 16:20:03 +0000 (16:20 +0000)] 
Squash sign-comparison warnings reported in [forum:5e605a763a65c3f8 | forum post 5e605a763a65c3f8].

FossilOrigin-Name: e74fce93c518296bdb0a4273cd5fd3f785d37d27750ca456b61a3502135775f9

9 months agoFix a harmless compiler warning in the CLI.
drh [Thu, 26 Sep 2024 22:25:13 +0000 (22:25 +0000)] 
Fix a harmless compiler warning in the CLI.

FossilOrigin-Name: 27ef1909bb0c4d9470c6074b40500632c68341127a079a3eb3b6a19dbfb2aeac

9 months agoAdd the ext/misc/sqlite3_stdio.c portability interface and incorporate it
drh [Thu, 26 Sep 2024 19:38:34 +0000 (19:38 +0000)] 
Add the ext/misc/sqlite3_stdio.c portability interface and incorporate it
into the CLI, sqldiff, and sqlite3_analyzer.  Enhance the CLI with the new
".www" dot-command and related options on .once and .output.

FossilOrigin-Name: f97f9944b829a49da12786f934da0a5ad51591afd6d8a19a4a0835f51bbdbff2

9 months agoProvide SQLITE_U8TEXT_ONLY and SQLITE_U8TEXT_STDIO compile-time options cli-stdlib
drh [Thu, 26 Sep 2024 19:16:20 +0000 (19:16 +0000)] 
Provide SQLITE_U8TEXT_ONLY and SQLITE_U8TEXT_STDIO compile-time options
to the sqlite3_stdio.c module.

FossilOrigin-Name: f31588520e3f45b50dcaa9eecab17f52ebb56bb53d0f9bdb88cc596d1a156353

9 months agoResolve a harmless compiler warning in QNX builds.
stephan [Thu, 26 Sep 2024 18:13:10 +0000 (18:13 +0000)] 
Resolve a harmless compiler warning in QNX builds.

FossilOrigin-Name: 2916460179c6089375188c6e4e3cff1fca5bbbbb7280a10c919e09e75d1f11f8

9 months agoWhen possible, avoid taking wal file read-lock 0 in sqlite3_snapshot_get().
dan [Thu, 26 Sep 2024 18:02:17 +0000 (18:02 +0000)] 
When possible, avoid taking wal file read-lock 0 in sqlite3_snapshot_get().

FossilOrigin-Name: 34b6ac3d76dbc6819778ec2a0f81cbcdcc0cd1a6303381d97f1c479e4ecdd132

9 months agoClarification of the meaning of the nByte parameter to sqlite3_prepare().
drh [Thu, 26 Sep 2024 13:12:19 +0000 (13:12 +0000)] 
Clarification of the meaning of the nByte parameter to sqlite3_prepare().
Comment and documentation change only - no changes to the code.

FossilOrigin-Name: 92d71eee4f3a5edb3877c108d14972d80654982b0de3e635d9d008e9d3b6591f

9 months agoFix shell test cases to account for recent additions to the ".help" output.
drh [Thu, 26 Sep 2024 01:29:22 +0000 (01:29 +0000)] 
Fix shell test cases to account for recent additions to the ".help" output.

FossilOrigin-Name: 54c22bc6165affbea0d1166a0912d19939300ccc4ae33a6b2ed8c510ab61c574

9 months agoAlways show HTML table headers in ".www" output mode.
drh [Wed, 25 Sep 2024 16:11:27 +0000 (16:11 +0000)] 
Always show HTML table headers in ".www" output mode.

FossilOrigin-Name: 660ca5ce6600d897cc2b00b9d39e5d993c1c0e71ec0d5dc706246c053a163281

9 months agoAdd the --plain option to the ".www" dot-command.
drh [Wed, 25 Sep 2024 15:55:52 +0000 (15:55 +0000)] 
Add the --plain option to the ".www" dot-command.

FossilOrigin-Name: a9209519f612e66cfe11c89e70efd8285a0185ac0d3e5795846aafbd05d7a21f

9 months agoHave the zipfile and fileio extensions use sqlite3_stdio.c when it is
drh [Wed, 25 Sep 2024 15:26:37 +0000 (15:26 +0000)] 
Have the zipfile and fileio extensions use sqlite3_stdio.c when it is
available - such as when those extensions are preloaded into the CLI.

FossilOrigin-Name: 74bbb2b2b4507d9acbd91209a2ce341968e9ff64f3aebe9e817bfe488d39ae03

9 months agoRedirect timer output just like any other text.
drh [Wed, 25 Sep 2024 14:09:47 +0000 (14:09 +0000)] 
Redirect timer output just like any other text.

FossilOrigin-Name: 3b5ae21074958788b23ccf449e52fbbad1f81779e07a6ca62ad8395f88a37286

9 months agoImprovements to ".www" and ".output -w" so that text that is not part of
drh [Wed, 25 Sep 2024 13:56:05 +0000 (13:56 +0000)] 
Improvements to ".www" and ".output -w" so that text that is not part of
query output is shown using <pre>.

FossilOrigin-Name: f8ef65c52305b2180ec56760f5762ac5638584cd504c79d57e86f61736901aa4

9 months agoAdd the "www" output mode that include <table> in the HTML output.
drh [Wed, 25 Sep 2024 13:29:03 +0000 (13:29 +0000)] 
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

9 months agoAlways include a UTF-8 BOM at the beginning of the output CSV when using
drh [Wed, 25 Sep 2024 12:56:44 +0000 (12:56 +0000)] 
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

9 months agoFix stray fputs() calls in the CLI.
drh [Wed, 25 Sep 2024 11:38:00 +0000 (11:38 +0000)] 
Fix stray fputs() calls in the CLI.

FossilOrigin-Name: 1ee3fa0f0e87a61b5700abd56547c4acefe999317b0d53d66d890d9e09d8b7d9

9 months agoUse sqlite3_fgets() instead of fgetc() to end the startup debugging pause
drh [Wed, 25 Sep 2024 11:27:59 +0000 (11:27 +0000)] 
Use sqlite3_fgets() instead of fgetc() to end the startup debugging pause
in the CLI.

FossilOrigin-Name: 869b3c05e852a797b5801a81d30a1f7955c31afad0274327f7af2284b555f23a

9 months agoMerge trunk enhancements, and especially the zero- and double-width character
drh [Wed, 25 Sep 2024 09:43:05 +0000 (09:43 +0000)] 
Merge trunk enhancements, and especially the zero- and double-width character
processing for columnar outputs into the cli-stdlib branch.

FossilOrigin-Name: d6262a4bcd7b0334b23ae4d194ca2bce7c6554ee6c678666b24c830e4c14a467

9 months agoIn the CLI, for columnar output formats, try to account for the presence of
drh [Wed, 25 Sep 2024 09:39:11 +0000 (09:39 +0000)] 
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

9 months agoImprovements to comments on data structures and subroutines. variable-width-char
drh [Wed, 25 Sep 2024 09:33:14 +0000 (09:33 +0000)] 
Improvements to comments on data structures and subroutines.

FossilOrigin-Name: b217e3004b58af0e777726bdd652b999ad41815261299ef4ce8f8d2f6b0afe8d

9 months agoMinor wasmfs speedtest1 build tweaks. Disable one wasmfs demo which was broken by...
stephan [Tue, 24 Sep 2024 21:54:37 +0000 (21:54 +0000)] 
Minor wasmfs speedtest1 build tweaks. Disable one wasmfs demo which was broken by Emscripten-side changes.

FossilOrigin-Name: 5ccc85d8f5809d961602dff557dca1ed34f5db61203912387272034e4da02614

9 months agoFix over-length lines in the shell source code.
drh [Tue, 24 Sep 2024 19:47:12 +0000 (19:47 +0000)] 
Fix over-length lines in the shell source code.

FossilOrigin-Name: f3fdf76a0d3abeb5202f2b6f26318815396da7df680073955bde60b13f84e797

9 months agoFix error messages in the shell.
drh [Tue, 24 Sep 2024 19:19:53 +0000 (19:19 +0000)] 
Fix error messages in the shell.

FossilOrigin-Name: aeef82e974c24071e3211588001a92c7f122fbaf02d9dcf7fa5aaf30d2729f64

9 months agoGet fiddle working again on this branch.
drh [Tue, 24 Sep 2024 18:01:50 +0000 (18:01 +0000)] 
Get fiddle working again on this branch.

FossilOrigin-Name: 0f228317c6ea1388d82df46f44c166b2aa9be63361ff9b81569ebee63c930f2e

9 months agoPort sqlite3_analyzer.exe to use sqlite3_stdio.
drh [Tue, 24 Sep 2024 17:49:06 +0000 (17:49 +0000)] 
Port sqlite3_analyzer.exe to use sqlite3_stdio.

FossilOrigin-Name: 7c1c1226d803dbaf8e75085b1cc2aad88aef4c3168288e587c8c736633d09054

9 months agoPort sqldiff over to use sqlite3_stdio.
drh [Tue, 24 Sep 2024 17:40:54 +0000 (17:40 +0000)] 
Port sqldiff over to use sqlite3_stdio.

FossilOrigin-Name: 18f784c47d4252bc3696a7e084a1afb9f51f006cf2021292f2103531b8235226

9 months agoGet output redirection working again in the CLI.
drh [Tue, 24 Sep 2024 16:09:50 +0000 (16:09 +0000)] 
Get output redirection working again in the CLI.

FossilOrigin-Name: 086034c3508d95e4f620c5e0580fae770e85410b0c8bd94f600fc0fd25088947

9 months agoFix a memory leak in sqlite3expert.c introduced by [f1d76c86].
dan [Tue, 24 Sep 2024 15:11:34 +0000 (15:11 +0000)] 
Fix a memory leak in sqlite3expert.c introduced by [f1d76c86].

FossilOrigin-Name: 42bb941584a1ac922ee6b0b6ecadce71c9259555563cf49913a6f820f3f9b887

9 months agoAdd the sqlite3_stdio.h library for Windows console I/O.
drh [Tue, 24 Sep 2024 13:46:32 +0000 (13:46 +0000)] 
Add the sqlite3_stdio.h library for Windows console I/O.

FossilOrigin-Name: fcd0ecffc9889f8c855ea340f075ec42cdca482df82d6e67dc9c32613e8d5846

9 months agoMinor tweaks in mkwasmbuilds.c.
stephan [Tue, 24 Sep 2024 13:00:21 +0000 (13:00 +0000)] 
Minor tweaks in mkwasmbuilds.c.

FossilOrigin-Name: cee43280727435440b9e01b302a790a1a102aea930bc821ebc737ea519458cef

9 months agoWasm build cleanups. Fix the wasm speedtest1 builds broken by yesterday's refactoring.
stephan [Tue, 24 Sep 2024 12:16:05 +0000 (12:16 +0000)] 
Wasm build cleanups. Fix the wasm speedtest1 builds broken by yesterday's refactoring.

FossilOrigin-Name: 5d4a090230d1d7609e70b9c28d662dc8b0f8dd4d70a254f3ce6e449c68a25897

9 months agoAvoid an error in sqlite3expert if the database has existing indexes on expressions.
dan [Tue, 24 Sep 2024 11:26:21 +0000 (11:26 +0000)] 
Avoid an error in sqlite3expert if the database has existing indexes on expressions.

FossilOrigin-Name: f1d76c8636866424fe0b57d8814b8bb1a0ed4e2ca1b75d8e308d4b962ad8dc3b

9 months agoUse _wfopen() instead of fopen() on Windows in the CLI.
drh [Tue, 24 Sep 2024 10:30:07 +0000 (10:30 +0000)] 
Use _wfopen() instead of fopen() on Windows in the CLI.

FossilOrigin-Name: 21a8cac5e9a0d5ead29ca1114be7520d182348f7e2e2e2416852b827d7e09f21

9 months agoAlways use fputws() for output to a Windows command-line prompt.
drh [Tue, 24 Sep 2024 09:51:53 +0000 (09:51 +0000)] 
Always use fputws() for output to a Windows command-line prompt.

FossilOrigin-Name: 33950a8c3f3e48e5107fe56647da05147aa84f9c3eccbe7c8671f5b502ebb70b

9 months agoRemove an ALWAYS() that can sometimes be false, with wildly incorrect SQL
drh [Tue, 24 Sep 2024 00:53:27 +0000 (00:53 +0000)] 
Remove an ALWAYS() that can sometimes be false, with wildly incorrect SQL
inputs.  dbsqlfuzz 707afcf73930de2624cdeca0ad1f0deea982dfea

FossilOrigin-Name: 766cf5535b9f51decd88c1736b988def929a90f68eb6a52bcaa21bb321586a08

9 months agoFurther wasm build cleanups and tweaks. No functional changes.
stephan [Tue, 24 Sep 2024 00:31:08 +0000 (00:31 +0000)] 
Further wasm build cleanups and tweaks. No functional changes.

FossilOrigin-Name: 3b72a143431537ec275aefae739e56330c1d445c9ea80885882a2b9aa2201179

9 months agoIn the CLI, when displaying results in a columnar format, take into account
drh [Tue, 24 Sep 2024 00:01:47 +0000 (00:01 +0000)] 
In the CLI, when displaying results in a columnar format, take into account
zero-width and double-width Unicode characters.

FossilOrigin-Name: 47cfad71eddc6fc4414ff853ee172da72527620eee743721806072c6e0a80caa

9 months agoTypo fix in makefile comments.
stephan [Mon, 23 Sep 2024 22:56:54 +0000 (22:56 +0000)] 
Typo fix in makefile comments.

FossilOrigin-Name: a4a1287fe8205d7c24556ec2e7ae09cda37a36dbe405ea70cd756cf488549036

9 months agowasm: replace much of the eval makefile spaghetti with equivalent code generated...
stephan [Mon, 23 Sep 2024 21:22:09 +0000 (21:22 +0000)] 
wasm: replace much of the eval makefile spaghetti with equivalent code generated from a small C app. It turns out that's easier to read and write than doing the same thing from shell or tcl code, due entirely to C's lack of need for escaping dollar signs.

FossilOrigin-Name: 5440de48903e94f91090e2df65702ec0c504e33dd5cbd50f684cf30988f20b02

9 months agoCLI uses only lib-c for I/O on Windows. No calls to Win32. Works on Win11,
drh [Mon, 23 Sep 2024 20:23:43 +0000 (20:23 +0000)] 
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

9 months agoFix a couple of problems with the sessions streaming interfaces.
dan [Mon, 23 Sep 2024 19:32:06 +0000 (19:32 +0000)] 
Fix a couple of problems with the sessions streaming interfaces.

FossilOrigin-Name: 9a1fc8d36b5b262f9d17a4743b4b9bb54510cf257d2d9778ebc42d5224856b1e

9 months agoMerge current trunk into this branch.
stephan [Mon, 23 Sep 2024 17:06:06 +0000 (17:06 +0000)] 
Merge current trunk into this branch.

FossilOrigin-Name: ed47d7f9a44b2af8ab7dd956495e71ea9a159cec438d1909f7022254a779e068

9 months agoAdd the run-fuzzcheck target to the MSVC makefile.
drh [Sat, 21 Sep 2024 17:27:47 +0000 (17:27 +0000)] 
Add the run-fuzzcheck target to the MSVC makefile.

FossilOrigin-Name: 2e5194407a1b34dd0659c350ea8098bfef7b3f11aa5b2a07ecd2bce5582655a2

9 months agoIf the database filename pointer passed to sqlite3_open(), change it
drh [Sat, 21 Sep 2024 15:57:06 +0000 (15:57 +0000)] 
If the database filename pointer passed to sqlite3_open(), change it
into ":memory:".

FossilOrigin-Name: 62e11a3a78edf9853b74d6495ccd8ae9ac1966c7d78eb3682cf2d5885e3740ec

9 months agoFix comment typo in the fileio.c extension. No changes to code.
drh [Fri, 20 Sep 2024 17:41:05 +0000 (17:41 +0000)] 
Fix comment typo in the fileio.c extension.  No changes to code.

FossilOrigin-Name: bf2c5b368ac094e048ca33a5e9175fe6a1fb5e2b1e392935eb29388e8999c40b

9 months agoNew assert()s to help verify union access. No logic changes. Testing and
drh [Fri, 20 Sep 2024 12:58:15 +0000 (12:58 +0000)] 
New assert()s to help verify union access.  No logic changes.  Testing and
validation code only.

FossilOrigin-Name: b7b64c53f5d7f6b405ee3f1f1be1d84230aa79db5a502c8ad78d3e524f4384fb

9 months agoFix harmless compiler warning in the vfstrace extension.
drh [Thu, 19 Sep 2024 15:44:41 +0000 (15:44 +0000)] 
Fix harmless compiler warning in the vfstrace extension.

FossilOrigin-Name: c8b4d092a22d87f1231424c8e3fa6a02f17fb965cb2a931621e1b51f4d215de7

9 months agoImproved rebustness to malformed UTF-16 inputs to sqlite3_prepare16_v2().
drh [Thu, 19 Sep 2024 13:39:06 +0000 (13:39 +0000)] 
Improved rebustness to malformed UTF-16 inputs to sqlite3_prepare16_v2().

FossilOrigin-Name: 7b3a517b3e16ea487ca77a2c88a0c11d737de366524fc911aa1bdd6bfb7ad148

9 months agoRemove a stray newline.
mistachkin [Thu, 19 Sep 2024 00:05:18 +0000 (00:05 +0000)] 
Remove a stray newline.

FossilOrigin-Name: 77f587dc3bbc784e8884c1b56b53fa90bbd76f4bd121bd572ab529a2b9796e57

9 months agoImprovements to the scope of valueFromFunction().
drh [Wed, 18 Sep 2024 16:33:07 +0000 (16:33 +0000)] 
Improvements to the scope of valueFromFunction().

FossilOrigin-Name: a0f39419cb5bdfa42ab2978cf3819e3d7821212996571f8251d2efbeaa26c603

9 months agoFix the preupdate hook so that it works when the "old.*" row has a column with a...
dan [Wed, 18 Sep 2024 15:52:05 +0000 (15:52 +0000)] 
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

9 months agoFix sqlite3-rsync so that it recognizes drive-letters on the front of pathnames
drh [Wed, 18 Sep 2024 15:38:05 +0000 (15:38 +0000)] 
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

9 months agoFix the preupdate hook so that it works when the "old.*" row has a column with a... preupdate-hook-fix
dan [Wed, 18 Sep 2024 15:02:27 +0000 (15:02 +0000)] 
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

9 months agoFix harmless static analyzer warning in sqlite3-rsync.
drh [Tue, 17 Sep 2024 22:57:08 +0000 (22:57 +0000)] 
Fix harmless static analyzer warning in sqlite3-rsync.

FossilOrigin-Name: a63e412b6b2939422ecfa99d91fccb7a9c61e1533bb0db20ff12f3815ef41a2c

9 months agoAdd assert() statements to some of the sqlite3_bind() APIs that help human
drh [Tue, 17 Sep 2024 21:42:04 +0000 (21:42 +0000)] 
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

9 months agoIn sqlite3-rsync, do not allow the '/' character to appear anywhere in the
drh [Tue, 17 Sep 2024 10:36:33 +0000 (10:36 +0000)] 
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

9 months agoFix a typo in an error message in sqlite3-rsync.
drh [Mon, 16 Sep 2024 20:53:52 +0000 (20:53 +0000)] 
Fix a typo in an error message in sqlite3-rsync.

FossilOrigin-Name: 3f25d6c8eac25de4afff486b134a339bc06404ddaed15b46db48c6770535b1e6

9 months agoCleanup the sqlite3-rsync executable as part of "make clean"
drh [Mon, 16 Sep 2024 14:11:14 +0000 (14:11 +0000)] 
Cleanup the sqlite3-rsync executable as part of "make clean"

FossilOrigin-Name: 8c5e481b49d86d97fefa345d0c1b96c050846ef9fc51d8b9dd203ee35afd6f6d

9 months agoIn sqlite3-rsync,
drh [Mon, 16 Sep 2024 10:58:11 +0000 (10:58 +0000)] 
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

9 months agoImproved error message in sqlite3-rsync if the SQL statement for ORIGIN_TXN
drh [Mon, 16 Sep 2024 09:12:11 +0000 (09:12 +0000)] 
Improved error message in sqlite3-rsync if the SQL statement for ORIGIN_TXN
fails.

FossilOrigin-Name: 73bde71ed10f52b851e220de35519d5fb7e65a932437ab82a194faff490b7930

9 months agoProvide more opportunity for the remote side in sqlite3-rsync to send error
drh [Sun, 15 Sep 2024 18:37:34 +0000 (18:37 +0000)] 
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

9 months agoMerge subsequent changes to sqlite-rsync that were accidentally missed by
drh [Sat, 14 Sep 2024 16:52:45 +0000 (16:52 +0000)] 
Merge subsequent changes to sqlite-rsync that were accidentally missed by
the prior check-in.

FossilOrigin-Name: 50762ba0783a04e0dcd9456a1ae17d875b0a9272f2f09854a23d9d5253761e9f

9 months agoEnhancements to sqlite_dbpage() so that it accepts INSERT statements that can
drh [Sat, 14 Sep 2024 16:39:02 +0000 (16:39 +0000)] 
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

9 months agoCLI arg handling robustness improvements. sqlite3-rsync
stephan [Sat, 14 Sep 2024 16:30:01 +0000 (16:30 +0000)] 
CLI arg handling robustness improvements.

FossilOrigin-Name: 129aca54f6b791c222b51f3eb01569e1e569269860e153b005140eb65af378b9

9 months agoAdd the --version option.
drh [Sat, 14 Sep 2024 16:28:38 +0000 (16:28 +0000)] 
Add the --version option.

FossilOrigin-Name: 9961334c8007e7cb6ae55885075b74acddc4fa701b359cf67e0f3c237d7eba4a

9 months agoNew debugging options: --logfile, --errorfile, --remote-errorfile.
drh [Sat, 14 Sep 2024 16:03:16 +0000 (16:03 +0000)] 
New debugging options:  --logfile, --errorfile, --remote-errorfile.
If page 1 changes, always send it last.

FossilOrigin-Name: 2d8cd76691554578e987ce682cf0c42c083711dd1511a178148978182ef43ba2

9 months agoAlways show the -v traffic message even if there are multiple -v options.
drh [Sat, 14 Sep 2024 11:38:46 +0000 (11:38 +0000)] 
Always show the -v traffic message even if there are multiple -v options.

FossilOrigin-Name: fc05a5b7f77cdbfcc659d49eb09569a64a172362cb90199e2861028085178f10

9 months agoAdd the --logfile FILE option for debugging.
drh [Sat, 14 Sep 2024 11:23:57 +0000 (11:23 +0000)] 
Add the --logfile FILE option for debugging.

FossilOrigin-Name: 30e1b92d5663e24d2f325f2bab35f81b55848ef39d15688e40b9005269626303

9 months agoImproved error messages coming out of sqlite3-rsync.
drh [Sat, 14 Sep 2024 10:59:32 +0000 (10:59 +0000)] 
Improved error messages coming out of sqlite3-rsync.

FossilOrigin-Name: 452fb6de3984c3cb10d30b51dcdb2574578ca128a0c519b2bd43df0bdd343083

9 months agoMake the output from sqlite3-rsync with a single -v option the same as it
drh [Sat, 14 Sep 2024 10:48:05 +0000 (10:48 +0000)] 
Make the output from sqlite3-rsync with a single -v option the same as it
is with regular rsync.  Only show the SSH command with two or more -v options,
or if there is an error in popen2().

FossilOrigin-Name: 105ec44b470318fc9ff1773027c4064343f224068c9b6e71c5618f18f7dfcc3f

9 months agoMerge sqlite_dbpage fixes into the sqlite3-rsync branch.
drh [Fri, 13 Sep 2024 23:41:16 +0000 (23:41 +0000)] 
Merge sqlite_dbpage fixes into the sqlite3-rsync branch.

FossilOrigin-Name: dff76b7a3436031ea5a61b8a44ddfa1d40ea20c983f3d34a8501cd7074db68b8

9 months agoBug fix in the enhanced sqlite_dbpage for when truncating two or more dbpage
drh [Fri, 13 Sep 2024 21:47:57 +0000 (21:47 +0000)] 
Bug fix in the enhanced sqlite_dbpage for when truncating two or more
ATTACH-ed databases within the same transaction.

FossilOrigin-Name: 6aa9c8e79b440c6419e65990d9ceba8f00a6f975455138cf2aa82b113daec825

9 months agoFix harmless compiler warning on Windows.
drh [Fri, 13 Sep 2024 16:12:54 +0000 (16:12 +0000)] 
Fix harmless compiler warning on Windows.

FossilOrigin-Name: 86e0219d977c493ac19d00c3ddcf560eb317d506c7cf6e4ef17e92daa91e1762

9 months agoClose the db as sqlite3_analyzer exits. (See [forum:af384c2315d9718a|forum post,...
larrybr [Fri, 13 Sep 2024 16:10:04 +0000 (16:10 +0000)] 
Close the db as sqlite3_analyzer exits. (See [forum:af384c2315d9718a|forum post, "sqlite3_analyzer not closing WAL-mode db cleanly" ].)

FossilOrigin-Name: 94ceac98845e31249b656dcdb8a58f456b9212dc83968ea333852a66d72a0dae

9 months agoImproved informational output from sqlite3-rsync.
drh [Fri, 13 Sep 2024 13:53:20 +0000 (13:53 +0000)] 
Improved informational output from sqlite3-rsync.

FossilOrigin-Name: e55e3e8ec2fe3a9190872d999cee55c85bde92667040cc166233faaa2fa34266

9 months agoPreveious check-in was actually doing an 8-round KeccakF1600. This one
drh [Fri, 13 Sep 2024 12:35:04 +0000 (12:35 +0000)] 
Preveious check-in was actually doing an 8-round KeccakF1600.  This one
corrects that to just 6 rounds.

FossilOrigin-Name: 3c36f5814f25483586c4fd49ef2fe5c7c0ff8c59672b1622c92061ec0ba8547a

9 months agoChange the hash algorithm from SHA1 to a 6-round KeccakF1600 with a rate
drh [Fri, 13 Sep 2024 12:28:11 +0000 (12:28 +0000)] 
Change the hash algorithm from SHA1 to a 6-round KeccakF1600 with a rate
of 160.  This uses about 1/3rd fewer CPU cycles.

FossilOrigin-Name: 96c7f47a8f59e5078bd296979421c1b57fbcb7be261f8a7a0b1d22a4b5914db0

9 months agoFurther enhancement to PTRMAP display in showdb: Show the details of invalid
drh [Fri, 13 Sep 2024 11:14:10 +0000 (11:14 +0000)] 
Further enhancement to PTRMAP display in showdb:  Show the details of invalid
entries that are within the range of the database file.  Continue to ignore
invalid entries beyond the end of the database file.

FossilOrigin-Name: 4cad385b90eaca2d90e3375e473472145af4134160b81097a8535d06638c2e4a

9 months agoBetter initialization of new database files in sqlite3-rsync.
drh [Thu, 12 Sep 2024 23:30:29 +0000 (23:30 +0000)] 
Better initialization of new database files in sqlite3-rsync.

FossilOrigin-Name: 75d5a8eb3d4ece06900109ad4022ba2a3e82de2f0acb012e3a02bfb4326bfa6d

9 months agoEnhancement to the "showdb" utility such that the "ptrmap" command shows
drh [Thu, 12 Sep 2024 21:58:31 +0000 (21:58 +0000)] 
Enhancement to the "showdb" utility such that the "ptrmap" command shows
PTRMAP entries that extend off the end of the database, as long as they
appear to be well-formatted.

FossilOrigin-Name: a9f95fe5ce90ab9864165e603f3a34013c3c98d03f1db689996f4a32086e2ed6

9 months agoAdd RSYNC_OPT to the sqlite3-rsync build flags.
stephan [Thu, 12 Sep 2024 21:03:11 +0000 (21:03 +0000)] 
Add RSYNC_OPT to the sqlite3-rsync build flags.

FossilOrigin-Name: b2a3497e5525dd33faf70961107a0529f476735fef756953c66e105747271c6d

9 months agoPort some of the shell's CLI flag-handling code into sqlite3-rsync to make the arg...
stephan [Thu, 12 Sep 2024 18:15:28 +0000 (18:15 +0000)] 
Port some of the shell's CLI flag-handling code into sqlite3-rsync to make the arg handling more robust.

FossilOrigin-Name: 53fb9b11807ff7accd8cd41f9cb6516d2503f161ea976940437a1d3aae868665