1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-11-03 16:53:36 +03:00

Fix a bug in error handling in the ".trace" command of the command-line shell.

FossilOrigin-Name: 6a48b5d794e891fdd167547c76835d677eb5e31d
This commit is contained in:
drh
2015-03-19 13:30:41 +00:00
parent 2b3f1409db
commit 657b4a87e5
4 changed files with 29 additions and 11 deletions

View File

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