]> git.ipfire.org Git - thirdparty/sqlite.git/commitdiff
Promote the --protocol option to sqlite3_rsync from being an undocumented
authordrh <>
Sat, 3 May 2025 10:35:32 +0000 (10:35 +0000)
committerdrh <>
Sat, 3 May 2025 10:35:32 +0000 (10:35 +0000)
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

manifest
manifest.uuid
tool/sqlite3_rsync.c

index 1b3a9d2a063943129fbdd1ae9d0ee2fec95deaf4..634407e347d4a9b8fcf51bc03360a661f5efd630 100644 (file)
--- a/manifest
+++ b/manifest
@@ -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.
index b8cdd4302e9cf5553a5ec8840d3a92a23b826f18..79dd0229bf5bdef0a6a74d3785b47a1229defb4d 100644 (file)
@@ -1 +1 @@
-e5d87aaa8fe1e8c8cb63813d26851183e77809a3d36e4c16c37f88b4b4724d6d
+4855e04e44e8fce2d6e37dd468eb6e9f4565c36cbc964156e65ac0449d7c212f
index 760559aec275fbb893a422d13fbf112421dbc147..6607e1fb06816099be79d367275f1bbc0f957468 100644 (file)
@@ -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 */