From: drh <> Date: Sat, 22 Nov 2025 16:43:52 +0000 (+0000) Subject: Ignore semicolons at the end of dot-commands, if the compatibility date is X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=494811810c95438916c23c7f4162d26f733207fb;p=thirdparty%2Fsqlite.git Ignore semicolons at the end of dot-commands, if the compatibility date is 20251115 or later. [forum:/forumpost/72d084ed552|Forum thread 2025-10-09T21:12:32z] FossilOrigin-Name: 7a9e753e977ff61ceee50c4e0e5f9b1fc179e91acd9ac88378c888b3e45ebe3a --- diff --git a/manifest b/manifest index 7eec1b40e0..2636f2ff82 100644 --- a/manifest +++ b/manifest @@ -1,5 +1,5 @@ -C Cherrypick\s[e0b33b51229a]\sfor\sthe\slatest\swasmutil/jaccwabyt\s-\sall\stests\sare\shappy.\sFix\sa\smake\sdeps\sbug\swhich\scan\sbreak\sparallel\sbuilds\sinvolving\sfiddle. -D 2025-11-22T15:49:45.613 +C Ignore\ssemicolons\sat\sthe\send\sof\sdot-commands,\sif\sthe\scompatibility\sdate\sis\n20251115\sor\slater.\n[forum:/forumpost/72d084ed552|Forum\sthread\s2025-10-09T21:12:32z] +D 2025-11-22T16:43:52.886 F .fossil-settings/binary-glob 61195414528fb3ea9693577e1980230d78a1f8b0a54c78cf1b9b24d0a409ed6a x F .fossil-settings/empty-dirs dbb81e8fc0401ac46a1491ab34a7f2c7c0452f2f06b54ebb845d024ca8283ef1 F .fossil-settings/ignore-glob 35175cdfcf539b2318cb04a9901442804be81cd677d8b889fcc9149c21f239ea @@ -735,7 +735,7 @@ F src/random.c 606b00941a1d7dd09c381d3279a058d771f406c5213c9932bbd93d5587be4b9c F src/resolve.c 5616fbcf3b833c7c705b24371828215ad0925d0c0073216c4f153348d5753f0a F src/rowset.c 8432130e6c344b3401a8874c3cb49fefe6873fec593294de077afea2dce5ec97 F src/select.c ba9cd07ffa3277883c1986085f6ddc4320f4d35d5f212ab58df79a7ecc1a576a -F src/shell.c.in 471f872bdcffaeac73cc370f1b903c1a77206f67c1d9140a9d034250873a0e1c +F src/shell.c.in 49dde03ed4d62877d1f53317122a7d153a8227c47bad499c361d55c5f2092ac0 F src/sqlite.h.in f1363321ca55cc2feaa289e9fe6dfb08102a28c54edf005564711a2348b06eef F src/sqlite3.rc 015537e6ac1eec6c7050e17b616c2ffe6f70fca241835a84a4f0d5937383c479 F src/sqlite3ext.h 5d5330f5f8461f5ce74960436ddcfa53ecd09c2b8b23901e22ae38aec3243998 @@ -2178,9 +2178,8 @@ F tool/version-info.c 33d0390ef484b3b1cb685d59362be891ea162123cea181cb8e6d2cf6dd F tool/warnings-clang.sh bbf6a1e685e534c92ec2bfba5b1745f34fb6f0bc2a362850723a9ee87c1b31a7 F tool/warnings.sh d924598cf2f55a4ecbc2aeb055c10bd5f48114793e7ba25f9585435da29e7e98 F tool/win/sqlite.vsix deb315d026cc8400325c5863eef847784a219a2f -P 4bbd3f7ead50c0babd7843f58972e2e1762a84866cc4ed88a2a74375b13da11c -Q +e0b33b51229a977cc3fa8a5a6c8ea59669f8bf566b2a6330fd24da1ad886a716 -R f6b721d7685989e37470bf1784a31d71 -U stephan -Z 5210094d728f9a00c8b58ce19311c7b6 +P 0be777bd6cc6c6b4f52d948cdba7e9c30ad062a35c659512b3f3f89f53aaba25 +R 01594865404e1ab58a6f35aacce2aa10 +U drh +Z 92b456698c1c3479e6554d126d2e8568 # Remove this line to create a well-formed Fossil manifest. diff --git a/manifest.uuid b/manifest.uuid index 98774b67bf..a68a19722e 100644 --- a/manifest.uuid +++ b/manifest.uuid @@ -1 +1 @@ -0be777bd6cc6c6b4f52d948cdba7e9c30ad062a35c659512b3f3f89f53aaba25 +7a9e753e977ff61ceee50c4e0e5f9b1fc179e91acd9ac88378c888b3e45ebe3a diff --git a/src/shell.c.in b/src/shell.c.in index 597818a71b..043629b4de 100644 --- a/src/shell.c.in +++ b/src/shell.c.in @@ -8424,9 +8424,10 @@ dotCmdOutput_error: sqlite3_free(zFile); return 1; } + /* -** Parse input line zLine up into individual arguments. Retain the -** parse in the p->dot substructure. +** Enlarge the space allocated in p->dot so that it can hold more +** than nArg parsed command-line arguments. */ static void parseDotRealloc(ShellState *p, int nArg){ p->dot.nAlloc = nArg+22; @@ -8437,15 +8438,29 @@ static void parseDotRealloc(ShellState *p, int nArg){ p->dot.abQuot = realloc(p->dot.abQuot,p->dot.nAlloc); shell_check_oom(p->dot.abQuot); } + + +/* +** Parse input line zLine up into individual arguments. Retain the +** parse in the p->dot substructure. +*/ static void parseDotCmdArgs(const char *zLine, ShellState *p){ char *z; int h = 1; int nArg = 0; + size_t szLine; p->dot.zOrig = zLine; free(p->dot.zCopy); z = p->dot.zCopy = strdup(zLine); shell_check_oom(z); + szLine = strlen(z); + while( szLine>0 && IsSpace(z[szLine-1]) ) szLine--; + if( szLine>0 && z[szLine-1]==';' && p->iCompat>=20251115 ){ + szLine--; + while( szLine>0 && IsSpace(z[szLine-1]) ) szLine--; + } + z[szLine] = 0; parseDotRealloc(p, 2); while( z[h] ){ while( IsSpace(z[h]) ){ h++; }