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
This commit is contained in:
drh 2020-06-24 11:45:35 +00:00
parent 9e44f265a7
commit e6b430b178
3 changed files with 8 additions and 7 deletions

View File

@ -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

View File

@ -1 +1 @@
780e8aaa231b2b585505c3886d5a13d39dba546fdd8020331ad4de2ae92922b0
d45c27a3e5edaa2bd9ff0473e18c6536aa5d15f9a4d22dfee894a5ee4347f8d7

View File

@ -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