diff options
author | drh <drh@noemail.net> | 2015-03-19 13:30:41 +0000 |
---|---|---|
committer | drh <drh@noemail.net> | 2015-03-19 13:30:41 +0000 |
commit | 657b4a87e57148b16f876038ae1c61a9ca39d281 (patch) | |
tree | 6538a839264cc872f6377f7df8995334cd72b863 /src | |
parent | 2b3f1409dbd7f4e0111ba6f11319cdec311f7a03 (diff) | |
download | sqlite-657b4a87e57148b16f876038ae1c61a9ca39d281.tar.gz sqlite-657b4a87e57148b16f876038ae1c61a9ca39d281.zip |
Fix a bug in error handling in the ".trace" command of the command-line shell.
FossilOrigin-Name: 6a48b5d794e891fdd167547c76835d677eb5e31d
Diffstat (limited to 'src')
-rw-r--r-- | src/shell.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/shell.c b/src/shell.c index cf2481a37..436c23d47 100644 --- a/src/shell.c +++ b/src/shell.c @@ -3841,12 +3841,12 @@ static int do_meta_command(char *zLine, ShellState *p){ if( c=='t' && strncmp(azArg[0], "trace", n)==0 ){ open_db(p, 0); - output_file_close(p->traceOut); if( nArg!=2 ){ fprintf(stderr, "Usage: .trace FILE|off\n"); rc = 1; goto meta_command_exit; } + output_file_close(p->traceOut); p->traceOut = output_file_open(azArg[1]); #if !defined(SQLITE_OMIT_TRACE) && !defined(SQLITE_OMIT_FLOATING_POINT) if( p->traceOut==0 ){ |