Fossil

Check-in [31f5b295fa]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Ignore unfinalized statements when shutting down the SQLite command-line shell. Ticket [891cd78969e03ec3009].
Downloads: Tarball | ZIP archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 31f5b295fafdd3a50f4a87d92a5469fadd072a3e
User & Date: drh 2010-12-08 03:31:05.000
Context
2010-12-08
20:44
Add the --nochange and -n options to the "merge" command. check-in: 000af3234f user: drh tags: trunk
03:31
Ignore unfinalized statements when shutting down the SQLite command-line shell. Ticket [891cd78969e03ec3009]. check-in: 31f5b295fa user: drh tags: trunk
2010-12-07
14:20
Update the precompiled download page to include an OpenBSD binary. check-in: 57f374a7f4 user: drh tags: trunk
Changes
Unified Diff Ignore Whitespace Patch
Changes to src/shell.c.
34
35
36
37
38
39
40



41
42
43
44

45
46
47
48
49
50
51
# include <sys/types.h>
#endif

#ifdef __OS2__
# include <unistd.h>
#endif




#if defined(HAVE_READLINE) && HAVE_READLINE==1
# include <readline/readline.h>
# include <readline/history.h>
#else

# define readline(p) local_getline(p,stdin)
# define add_history(X)
# define read_history(X)
# define write_history(X)
# define stifle_history(X)
#endif








>
>
>



|
>







34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
# include <sys/types.h>
#endif

#ifdef __OS2__
# include <unistd.h>
#endif

#ifdef HAVE_EDITLINE
# include <editline/editline.h>
#endif
#if defined(HAVE_READLINE) && HAVE_READLINE==1
# include <readline/readline.h>
# include <readline/history.h>
#endif
#if !defined(HAVE_EDITLINE) && (!defined(HAVE_READLINE) || HAVE_READLINE!=1)
# define readline(p) local_getline(p,stdin)
# define add_history(X)
# define read_history(X)
# define write_history(X)
# define stifle_history(X)
#endif

2725
2726
2727
2728
2729
2730
2731
2732
2733
2734
2735
2736
2737
2738
2739
      free(zHome);
    }else{
      rc = process_input(&data, stdin);
    }
  }
  set_table_name(&data, 0);
  if( data.db ){
    if( sqlite3_close(data.db)!=SQLITE_OK ){
      fprintf(stderr,"Error: cannot close database \"%s\"\n",
              sqlite3_errmsg(db));
      rc++;
    }
  }
  return rc;
}







|
<
<
<
<



2729
2730
2731
2732
2733
2734
2735
2736




2737
2738
2739
      free(zHome);
    }else{
      rc = process_input(&data, stdin);
    }
  }
  set_table_name(&data, 0);
  if( data.db ){
    sqlite3_close(data.db);




  }
  return rc;
}