From: drh <> Date: Thu, 11 Jun 2026 23:11:14 +0000 (+0000) Subject: Comment improvements on the ".ar -x" command of the CLI. No changes to code. X-Git-Url: http://git.ipfire.org/gitweb/?a=commitdiff_plain;h=b14202f86edf699c8258513ecb4dcbf5452172e8;p=thirdparty%2Fsqlite.git Comment improvements on the ".ar -x" command of the CLI. No changes to code. FossilOrigin-Name: 5b939fb1a284088c4bd46adf517cf598816e2262cd77ee2d9caaab1cef2ce9a1 --- diff --git a/manifest b/manifest index 74fb7203d6..363873121e 100644 --- a/manifest +++ b/manifest @@ -1,5 +1,5 @@ -C Fix\sharmless\scompiler\swarnings. -D 2026-06-11T22:48:16.038 +C Comment\simprovements\son\sthe\s".ar\s-x"\scommand\sof\sthe\sCLI.\s\sNo\schanges\sto\scode. +D 2026-06-11T23:11:14.635 F .fossil-settings/binary-glob 61195414528fb3ea9693577e1980230d78a1f8b0a54c78cf1b9b24d0a409ed6a x F .fossil-settings/empty-dirs dbb81e8fc0401ac46a1491ab34a7f2c7c0452f2f06b54ebb845d024ca8283ef1 F .fossil-settings/ignore-glob 35175cdfcf539b2318cb04a9901442804be81cd677d8b889fcc9149c21f239ea @@ -739,7 +739,7 @@ F src/random.c 606b00941a1d7dd09c381d3279a058d771f406c5213c9932bbd93d5587be4b9c F src/resolve.c d0724113da9f5c0430d2052808ce59519f51ae7c4fbb1f5ef21fe3a832956086 F src/rowset.c 8432130e6c344b3401a8874c3cb49fefe6873fec593294de077afea2dce5ec97 F src/select.c 5c3a5e3c1e6c3f8ccabeb414e18dce64e6f3e797de225ee93034f2c9e76f289c -F src/shell.c.in b856edfafe2616aeb250ff9f20a63c5cd25dbf248963a1b45e9678248816c589 +F src/shell.c.in ab34cbf5b85285e504eca645ba879ee190c02fbbfa6d4e7f7504a424775e8729 F src/sqlite.h.in 749454ec71c875bc130d399ff9a7e47191d143d1b9d8b4af3839b6028df9eda9 F src/sqlite3.rc 015537e6ac1eec6c7050e17b616c2ffe6f70fca241835a84a4f0d5937383c479 F src/sqlite3ext.h 9788c301f95370fa30e808861f1d2e6f022a816ddbe2a4f67486784c1b31db2e @@ -2209,8 +2209,8 @@ F tool/warnings-clang.sh bbf6a1e685e534c92ec2bfba5b1745f34fb6f0bc2a362850723a9ee F tool/warnings.sh a554d13f6e5cf3760f041b87939e3d616ec6961859c3245e8ef701d1eafc2ca2 F tool/win/sqlite.vsix deb315d026cc8400325c5863eef847784a219a2f F tool/winmain.c 00c8fb88e365c9017db14c73d3c78af62194d9644feaf60e220ab0f411f3604c -P 6149b938c7a1e95a0fb8600a81557dd0e3efb7b312f3806e2c09d03acf9f4b17 -R a0606a21fad69d7542fa0d0b872023d1 +P dd0c161fcd1619518cd4671d64afb6afeec44c140ec176ccb8616d381a88f42f +R 0089f7a58023190900b7f739403086ea U drh -Z e26fba28c41e639c51be3ca147718eef +Z 13f7465d66bf893ba8348c67ac5c7171 # Remove this line to create a well-formed Fossil manifest. diff --git a/manifest.uuid b/manifest.uuid index 6b60608457..fa53018746 100644 --- a/manifest.uuid +++ b/manifest.uuid @@ -1 +1 @@ -dd0c161fcd1619518cd4671d64afb6afeec44c140ec176ccb8616d381a88f42f +5b939fb1a284088c4bd46adf517cf598816e2262cd77ee2d9caaab1cef2ce9a1 diff --git a/src/shell.c.in b/src/shell.c.in index f0a94dbdf8..ed07ad1239 100644 --- a/src/shell.c.in +++ b/src/shell.c.in @@ -7337,6 +7337,14 @@ static int arRemoveCommand(ArCommand *pAr){ ** Implementation of .ar "eXtract" command. */ static int arExtractCommand(ArCommand *pAr){ + /* The zSql1[] string is a template for the query that does the + ** extraction. Notes: + ** + ** * $dir is the directory into which the archive is to be extracted + ** * $pass is the integer pass number: 0, 1, or 2 + ** * The dest CTE is created so that realpath($dir) only needs + ** to be called once. + */ const char *zSql1 = "WITH dest(dpath,dlen) AS (\n" #ifdef _WIN32 @@ -7348,14 +7356,15 @@ static int arExtractCommand(ArCommand *pAr){ ")\n" "SELECT\n" " ($dir || name),\n" - " CASE $dryrun\n" + " CASE $dryrun\n" /* vv--- azExtraArg */ " WHEN 0 THEN writefile($dir||name, %s, mode, mtime)\n" " WHEN 1 THEN 0\n" " ELSE shell_putsnl(format('writefile(%%Q,%%s,%%0o,%%d)'," "$dir||name,quote(%s),mode,mtime)) IS NULL\n" - " END\n" + " END\n" /* ^^--- azExtraArg */ " FROM dest CROSS JOIN %s\n" - " WHERE (%s)\n" + " WHERE (%s)\n" /* ^^-- pAr->zSrcTable */ + /* ^^--- zWhere */ " AND (CASE $pass WHEN 0 THEN (mode&0xf000)<>0xa000\n" " WHEN 1 THEN (mode&0xf000)=0xa000\n" " ELSE data IS NULL END)\n" @@ -7389,7 +7398,10 @@ static int arExtractCommand(ArCommand *pAr){ } shellPreparePrintf(pAr->db, &rc, &pSql, zSql1, - azExtraArg[pAr->bZip], azExtraArg[pAr->bZip], pAr->zSrcTable, zWhere + azExtraArg[pAr->bZip], + azExtraArg[pAr->bZip], + pAr->zSrcTable, + zWhere ); if( rc==SQLITE_OK ){