]> git.ipfire.org Git - thirdparty/sqlite.git/commitdiff
Fix output redirect bug reported in [forum:/forumposts/cbf4933cfeee74bb|the forum].
authorlarrybr <larrybr@noemail.net>
Thu, 23 Nov 2023 07:06:21 +0000 (07:06 +0000)
committerlarrybr <larrybr@noemail.net>
Thu, 23 Nov 2023 07:06:21 +0000 (07:06 +0000)
FossilOrigin-Name: 2ab256bc0bb351c16feaf0d4917ad9c3f55e39821cc7d319d86c6f0752188af7

ext/consio/console_io.c
manifest
manifest.uuid
test/shell1.test

index b1a750f507787f385731c4c692545225b3733813..6b412feef282aa237e2bec1d27dcf98cb1d02d57 100755 (executable)
@@ -343,8 +343,8 @@ static PerStreamTags * getDesignatedEmitStream(FILE *pf, unsigned chix,
 ** chix equals 1 or 2, or for an arbitrary stream when chix == 0.
 ** In either case, ppst references a caller-owned PerStreamTags
 ** struct which may be filled in if none of the known writable
-** streams is being held by consoleInfo. The ppf parameter is an
-** output when chix!=0 and an input when chix==0.
+** streams is being held by consoleInfo. The ppf parameter is a
+** byref output when chix!=0 and a byref input when chix==0.
  */
 static PerStreamTags *
 getEmitStreamInfo(unsigned chix, PerStreamTags *ppst,
@@ -357,7 +357,7 @@ getEmitStreamInfo(unsigned chix, PerStreamTags *ppst,
       ppstTry = &consoleInfo.pstSetup[chix];
       pfEmit = ppst->pf;
     }else pfEmit = ppstTry->pf;
-    if( !isValidStreamInfo(ppst) ){
+    if( !isValidStreamInfo(ppstTry) ){
       pfEmit = (chix > 1)? stderr : stdout;
       ppstTry = ppst;
       streamOfConsole(pfEmit, ppstTry);
index 6872fa53ef8152f434c1c8aae57b23533b4d4e5e..76a5521d2a569048c51a507a499c0b15236e1765 100644 (file)
--- a/manifest
+++ b/manifest
@@ -1,5 +1,5 @@
-C Correct\sthe\sURL\sfor\sloading\ssqlite3-worker1-bundler-friendly.mjs\sfrom\ssqlite3-worker1-promiser-bundler-friendly.js,\sso\sthat\sthe\spromiser\scan\sbe\sused\sin\sbundler-using\senvironments.\sProblem\sreported\svia\semail.
-D 2023-11-22T17:13:27.040
+C Fix\soutput\sredirect\sbug\sreported\sin\s[forum:/forumposts/cbf4933cfeee74bb|the\sforum].
+D 2023-11-23T07:06:21.374
 F .fossil-settings/empty-dirs dbb81e8fc0401ac46a1491ab34a7f2c7c0452f2f06b54ebb845d024ca8283ef1
 F .fossil-settings/ignore-glob 35175cdfcf539b2318cb04a9901442804be81cd677d8b889fcc9149c21f239ea
 F LICENSE.md df5091916dbb40e6e9686186587125e1b2ff51f022cc334e886c19a0e9982724
@@ -50,7 +50,7 @@ F ext/README.md fd5f78013b0a2bc6f0067afb19e6ad040e89a10179b4f6f03eee58fac5f169bd
 F ext/async/README.txt e12275968f6fde133a80e04387d0e839b0c51f91
 F ext/async/sqlite3async.c 6f247666b495c477628dd19364d279c78ea48cd90c72d9f9b98ad1aff3294f94
 F ext/async/sqlite3async.h 46b47c79357b97ad85d20d2795942c0020dc20c532114a49808287f04aa5309a
-F ext/consio/console_io.c 6413a38e3d67ed9b6e0b8f33f051bdab1c2ebdbcdcdfaebd5ac7b31b23c56881 x
+F ext/consio/console_io.c e048bd69f3a357a4b6b5da01c504728631d944ad5735ad83c44800c80a91e978 x
 F ext/consio/console_io.h d18bcc50f4e4d42b65be8fecba72918364ae77182c86360aca842e44b823384e
 F ext/expert/README.md b321c2762bb93c18ea102d5a5f7753a4b8bac646cb392b3b437f633caf2020c3
 F ext/expert/expert.c d548d603a4cc9e61f446cc179c120c6713511c413f82a4a32b1e1e69d3f086a4
@@ -1563,7 +1563,7 @@ F test/sharedA.test 64bdd21216dda2c6a3bd3475348ccdc108160f34682c97f2f51c19fc0e21
 F test/sharedB.test 1a84863d7a2204e0d42f2e1606577c5e92e4473fa37ea0f5bdf829e4bf8ee707
 F test/shared_err.test 32634e404a3317eeb94abc7a099c556a346fdb8fb3858dbe222a4cbb8926a939
 F test/sharedlock.test 5ede3c37439067c43b0198f580fd374ebf15d304
-F test/shell1.test 0bb36232873d7df2ba627ed25cff1332f6d98c0f7f244b425702c1ab1850bd15
+F test/shell1.test c7127a5e780ffc9e14c476773127fdf292c6db226529c44c1676f37b3793123f
 F test/shell2.test 35226c070a8c7f64fd016dfac2a0db2a40f709b3131f61daacd9dad61536c9cb
 F test/shell3.test 91febeac0412812bf6370abb8ed72700e32bf8f9878849414518f662dfd55e8a
 F test/shell4.test 9abd0c12a7e20a4c49e84d5be208d2124fa6c09e728f56f1f4bee0f02853935f
@@ -2141,9 +2141,8 @@ F vsixtest/vsixtest.tcl 6a9a6ab600c25a91a7acc6293828957a386a8a93
 F vsixtest/vsixtest.vcxproj.data 2ed517e100c66dc455b492e1a33350c1b20fbcdc
 F vsixtest/vsixtest.vcxproj.filters 37e51ffedcdb064aad6ff33b6148725226cd608e
 F vsixtest/vsixtest_TemporaryKey.pfx e5b1b036facdb453873e7084e1cae9102ccc67a0
-P d295f48e8f367b066b881780c98bdf980a1d550397d5ba0b0e49842c95b3e8b4
-Q +753a75218913c3b9c7ec5438387107369c34d1775d68b04d19ae18197e558605
-R 4b7ba487b757ab805318622dbc4de35b
-U stephan
-Z e38c61ec1d77fe4f09dd9b893d0aa227
+P b1128838f9508ba8e4b735a386c5dd42c1faf84705b95fb069ab724637341170
+R 621b765884454f1a48649b57f4993185
+U larrybr
+Z 4f89d162c88964e26929a47d99d49dec
 # Remove this line to create a well-formed Fossil manifest.
index 5a4604fff58f8342ea6ed5fdd75855bd7089f4c2..ecceb9448d1e04baf4c64874d0d5b552e200c7ef 100644 (file)
@@ -1 +1 @@
-b1128838f9508ba8e4b735a386c5dd42c1faf84705b95fb069ab724637341170
\ No newline at end of file
+2ab256bc0bb351c16feaf0d4917ad9c3f55e39821cc7d319d86c6f0752188af7
\ No newline at end of file
index fb42e45cf5611124faadd9e308c9d83e1606d7b5..5d4243f47a93eab48aa31d20feef0064e87727b3 100644 (file)
@@ -496,11 +496,16 @@ do_test shell1-3.14.3 {
 
 # .output FILENAME       Send output to FILENAME
 do_test shell1-3.15.1 {
-  catchcmd "test.db" ".output"
-} {0 {}}
+  catchcmd "test.db" ".output
+.print x"
+} {0 x}
 do_test shell1-3.15.2 {
-  catchcmd "test.db" ".output FOO"
-} {0 {}}
+  catchcmd "test.db" ".output FOO
+.print x
+.output
+SELECT readfile('FOO');"
+} {0 {x
+}}
 do_test shell1-3.15.3 {
   # too many arguments
   catchcmd "test.db" ".output FOO BAD"