From: drh Date: Wed, 24 Jun 2020 11:45:35 +0000 (+0000) Subject: Fix the ".selecttrace" command in the CLI (only available when compiled X-Git-Tag: version-3.33.0~103 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=e6b430b1789a14c6d8e19d7bf07e60836c6cb343;p=thirdparty%2Fsqlite.git Fix the ".selecttrace" command in the CLI (only available when compiled with the non-standard -DSQLITE_ENABLE_SELECTTRACE option) so that it does not segfault if invoked without any arguments. FossilOrigin-Name: d45c27a3e5edaa2bd9ff0473e18c6536aa5d15f9a4d22dfee894a5ee4347f8d7 --- diff --git a/manifest b/manifest index 82b7e9a8cf..f122862586 100644 --- a/manifest +++ b/manifest @@ -1,16 +1,17 @@ B 7a876209a678a34c198b54ceef9e3c041f128a14dc73357f6a57cadadaa6cf7b -C Enhance\sthe\s--testset\soption\son\sspeedtest1\sso\sthat\sit\scan\saccept\sa\ncomma-separated\slist\sof\stest\smodules\sto\srun\sin\sorder. -D 2020-06-23T20:03:57.052 +C Fix\sthe\s".selecttrace"\scommand\sin\sthe\sCLI\s(only\savailable\swhen\scompiled\nwith\sthe\snon-standard\s-DSQLITE_ENABLE_SELECTTRACE\soption)\sso\sthat\sit\sdoes\nnot\ssegfault\sif\sinvoked\swithout\sany\sarguments. +D 2020-06-24T11:45:35.660 F Makefile.in 50fc38e4f846af70c248542d2ad4e3bca3d80e3f1b9137ce79b047743d4b642c F autoconf/Makefile.am a8d1d24affe52ebf8d7ddcf91aa973fa0316618ab95bb68c87cabf8faf527dc8 F ext/lsm1/lsm_unix.c 11e0a5c19d754a4e1d93dfad06de8cc201f10f886b8e61a4c599ed34e334fc24 F main.mk f3c3de159abc51086a16a72d0b48077d2dda6a8dfb96963f8a010136bfd98108 F src/build.c ba1bbe563a3dc02d5fed20537603181e5289c13ea30ae5e775f552e7557adbfa +F src/shell.c.in bfb9ec7f65a7e927fa92e5060ae483f0be761169dcbdd45ab17f603058387fdc F test/speedtest1.c ea201573f9b27542ea1e74a68e74f121e0eb04c89e67039f40ed68f1b833339f F tool/mkautoconfamal.sh f62353eb6c06ab264da027fd4507d09914433dbdcab9cb011cdc18016f1ab3b8 F tool/mksqlite3c.tcl f4ef476510eca4124c874a72029f1e01bc54a896b1724e8f9eef0d8bfae0e84c F tool/mksqlite3h.tcl 1f5e4a1dbbbc43c83cc6e74fe32c6c620502240b66c7c0f33a51378e78fc4edf -P be3e7814e4cdbc09eaa5112d7d4135b3a2cedbfe66217d9973b1b39a44464e93 -R 47e65a6f24865bd9ab4c304f87268263 +P 780e8aaa231b2b585505c3886d5a13d39dba546fdd8020331ad4de2ae92922b0 +R 02d76fc8b8c227f35efd0949114aadd4 U drh -Z f8b3e680afb6982734a50031a1a2994e +Z d59dbd45aeaabbf8493240f870daafd0 diff --git a/manifest.uuid b/manifest.uuid index b7330e92e5..43642dcc6f 100644 --- a/manifest.uuid +++ b/manifest.uuid @@ -1 +1 @@ -780e8aaa231b2b585505c3886d5a13d39dba546fdd8020331ad4de2ae92922b0 \ No newline at end of file +d45c27a3e5edaa2bd9ff0473e18c6536aa5d15f9a4d22dfee894a5ee4347f8d7 \ No newline at end of file diff --git a/src/shell.c.in b/src/shell.c.in index ccb6f7848d..4aa6ad89d6 100644 --- a/src/shell.c.in +++ b/src/shell.c.in @@ -9136,7 +9136,7 @@ static int do_meta_command(char *zLine, ShellState *p){ #if defined(SQLITE_DEBUG) && defined(SQLITE_ENABLE_SELECTTRACE) if( c=='s' && n==11 && strncmp(azArg[0], "selecttrace", n)==0 ){ - sqlite3SelectTrace = (int)integerValue(azArg[1]); + sqlite3SelectTrace = nArg>=2 ? (int)integerValue(azArg[1]) : 0xffff; }else #endif