diff options
author | drh <> | 2025-05-03 10:35:32 +0000 |
---|---|---|
committer | drh <> | 2025-05-03 10:35:32 +0000 |
commit | d7b83224bb86ccbbca340bb0c39b3366cd185bcd (patch) | |
tree | c5179011a5b19b73f87d1b1c866832ae008e6f96 | |
parent | f4d435dc0dd409167dd5cc28d3643052e91993a7 (diff) | |
download | sqlite-d7b83224bb86ccbbca340bb0c39b3366cd185bcd.tar.gz sqlite-d7b83224bb86ccbbca340bb0c39b3366cd185bcd.zip |
Promote the --protocol option to sqlite3_rsync from being an undocumented
debug option to being a supported and user-visible option. This is
sometimes needed to work around bugs in prior versions running on the
remote.
FossilOrigin-Name: 4855e04e44e8fce2d6e37dd468eb6e9f4565c36cbc964156e65ac0449d7c212f
-rw-r--r-- | manifest | 13 | ||||
-rw-r--r-- | manifest.uuid | 2 | ||||
-rw-r--r-- | tool/sqlite3_rsync.c | 33 |
3 files changed, 23 insertions, 25 deletions
@@ -1,5 +1,5 @@ -C Enhance\ssqlite3_rsync\s(in\sa\sbackwards-compatible\sway)\sso\sthat\sit\shas\sthe\nability\sto\ssend\shashes\sfor\sblocks\sof\spages\sin\saddition\sto\sindividual\spages.\nBy\sjudicious\suse\sof\sthis\scapability,\snetwork\sbandwidth\srequirement\sto\ssync\stwo\nsimilar\sdatabases\sis\sreduced. -D 2025-05-03T08:17:46.240 +C Promote\sthe\s--protocol\soption\sto\ssqlite3_rsync\sfrom\sbeing\san\sundocumented\ndebug\soption\sto\sbeing\sa\ssupported\sand\suser-visible\soption.\s\sThis\sis\s\nsometimes\sneeded\sto\swork\saround\sbugs\sin\sprior\sversions\srunning\son\sthe\nremote. +D 2025-05-03T10:35:32.727 F .fossil-settings/binary-glob 61195414528fb3ea9693577e1980230d78a1f8b0a54c78cf1b9b24d0a409ed6a x F .fossil-settings/empty-dirs dbb81e8fc0401ac46a1491ab34a7f2c7c0452f2f06b54ebb845d024ca8283ef1 F .fossil-settings/ignore-glob 35175cdfcf539b2318cb04a9901442804be81cd677d8b889fcc9149c21f239ea @@ -2189,7 +2189,7 @@ F tool/spellsift.tcl 52b4b04dc4333c7ab024f09d9d66ed6b6f7c6eb00b38497a09f338fa55d F tool/split-sqlite3c.tcl 07e18a1d8cc3f6b3a4a1f3528e63c9b29a5c8a7bca0b8d394b231da464ce1247 F tool/sqldiff.c 134be7866be19f8beb32043d5aea5657f01aaeae2df8d33d758ff722c78666b9 F tool/sqlite3_analyzer.c.in 14f02cb5ec3c264cd6107d1f1dad77092b1cf440fc196c30b69ae87b56a1a43b -F tool/sqlite3_rsync.c 756ad79858feaf050a9ff60ffdb201a7a2b6a1ee620ede5743a0cef51defcdc0 +F tool/sqlite3_rsync.c 2b054aedddb9a8d042f865bcf7e6d056a538c6ea370075a45a1b1d5321336506 F tool/sqltclsh.c.in 1bcc2e9da58fadf17b0bf6a50e68c1159e602ce057210b655d50bad5aaaef898 F tool/sqltclsh.tcl 862f4cf1418df5e1315b5db3b5ebe88969e2a784525af5fbf9596592f14ed848 F tool/src-verify.c d00f93263aa2fa6ba0cba0106d95458e6effb94fdb5fc634f56834f90c05bbb4 @@ -2207,9 +2207,8 @@ F tool/version-info.c 3b36468a90faf1bbd59c65fd0eb66522d9f941eedd364fabccd7227350 F tool/warnings-clang.sh bbf6a1e685e534c92ec2bfba5b1745f34fb6f0bc2a362850723a9ee87c1b31a7 F tool/warnings.sh 49a486c5069de041aedcbde4de178293e0463ae9918ecad7539eedf0ec77a139 F tool/win/sqlite.vsix deb315d026cc8400325c5863eef847784a219a2f -P 660a035b6ce6684d429b882133e032181cc1664f4efadf1bc0e4ae27d45071c4 4f5a06e42010c3e047429f736ffb8e2e89a1eb599277c176945b57710f6713ca -R 2857adf0e10b56883ce6697a283afd6e -T +closed 4f5a06e42010c3e047429f736ffb8e2e89a1eb599277c176945b57710f6713ca +P e5d87aaa8fe1e8c8cb63813d26851183e77809a3d36e4c16c37f88b4b4724d6d +R 274803538653b39ce860d97f8dde4625 U drh -Z c3005ffc7ac3fefab06e6e18950a9819 +Z 61278ff2cbea7da5e237a83fadf41915 # Remove this line to create a well-formed Fossil manifest. diff --git a/manifest.uuid b/manifest.uuid index b8cdd4302..79dd0229b 100644 --- a/manifest.uuid +++ b/manifest.uuid @@ -1 +1 @@ -e5d87aaa8fe1e8c8cb63813d26851183e77809a3d36e4c16c37f88b4b4724d6d +4855e04e44e8fce2d6e37dd468eb6e9f4565c36cbc964156e65ac0449d7c212f diff --git a/tool/sqlite3_rsync.c b/tool/sqlite3_rsync.c index 760559aec..6607e1fb0 100644 --- a/tool/sqlite3_rsync.c +++ b/tool/sqlite3_rsync.c @@ -30,12 +30,13 @@ static const char zUsage[] = "\n" "OPTIONS:\n" "\n" - " --exe PATH Name of the sqlite3_rsync program on the remote side\n" - " --help Show this help screen\n" - " --ssh PATH Name of the SSH program used to reach the remote side\n" - " -v Verbose. Multiple v's for increasing output\n" - " --version Show detailed version information\n" - " --wal-only Do not sync unless both databases are in WAL mode\n" + " --exe PATH Name of the sqlite3_rsync program on the remote side\n" + " --help Show this help screen\n" + " --protocol N Use sync protocol version N.\n" + " --ssh PATH Name of the SSH program used to reach the remote side\n" + " -v Verbose. Multiple v's for increasing output\n" + " --version Show detailed version information\n" + " --wal-only Do not sync unless both databases are in WAL mode\n" ; typedef unsigned char u8; @@ -2029,6 +2030,15 @@ int main(int argc, char const * const *argv){ ctx.eVerbose += numVs(z); continue; } + if( strcmp(z, "-protocol")==0 ){ + ctx.iProtocol = atoi(cli_opt_val); + if( ctx.iProtocol<1 ){ + ctx.iProtocol = 1; + }else if( ctx.iProtocol>PROTOCOL_VERSION ){ + ctx.iProtocol = PROTOCOL_VERSION; + } + continue; + } if( strcmp(z, "-ssh")==0 ){ zSsh = cli_opt_val; continue; @@ -2089,17 +2099,6 @@ int main(int argc, char const * const *argv){ zRemoteDebugFile = cli_opt_val; continue; } - if( strcmp(z, "-protocol")==0 ){ - /* DEBUG OPTION: --protocool N - ** Set the protocol version to N */ - ctx.iProtocol = atoi(cli_opt_val); - if( ctx.iProtocol<1 ){ - ctx.iProtocol = 1; - }else if( ctx.iProtocol>PROTOCOL_VERSION ){ - ctx.iProtocol = PROTOCOL_VERSION; - } - continue; - } if( strcmp(z,"-commcheck")==0 ){ /* DEBUG ONLY */ /* Run a communication check with the remote side. Do not attempt ** to exchange any database connection */ |