SQLite

Check-in [0ab0b030de]
Login

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

Overview
Comment:Added reminder message to terminate SQL statements with a semicolon on shell startup. This closes #3099. (CVS 5325)
Downloads: Tarball | ZIP archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 0ab0b030dea03ec6693358b733329328828cf802
User & Date: mihailim 2008-06-28 11:29:23.000
Context
2008-06-28
15:33
Remove an assert() that was failing if there were any open incremental blob handles when a statement transaction was rolled back. (CVS 5326) (check-in: f66491ab2b user: danielk1977 tags: trunk)
11:29
Added reminder message to terminate SQL statements with a semicolon on shell startup. This closes #3099. (CVS 5325) (check-in: 0ab0b030de user: mihailim tags: trunk)
11:23
Rearrange some ENABLE_LOCKING_STYLE related code in os_unix.c. (CVS 5324) (check-in: f70d552bcd user: danielk1977 tags: trunk)
Changes
Side-by-Side Diff Ignore Whitespace Patch
Changes to src/shell.c.
8
9
10
11
12
13
14
15

16
17
18
19
20
21
22
8
9
10
11
12
13
14

15
16
17
18
19
20
21
22







-
+







**    May you find forgiveness for yourself and forgive others.
**    May you share freely, never taking more than you give.
**
*************************************************************************
** This file contains code to implement the "sqlite" command line
** utility for accessing SQLite databases.
**
** $Id: shell.c,v 1.182 2008/06/26 10:41:19 danielk1977 Exp $
** $Id: shell.c,v 1.183 2008/06/28 11:29:23 mihailim Exp $
*/
#include <stdlib.h>
#include <string.h>
#include <stdio.h>
#include <assert.h>
#include "sqlite3.h"
#include <ctype.h>
2058
2059
2060
2061
2062
2063
2064
2065


2066
2067
2068
2069
2070
2071
2072
2058
2059
2060
2061
2062
2063
2064

2065
2066
2067
2068
2069
2070
2071
2072
2073







-
+
+







    */
    if( stdin_is_interactive ){
      char *zHome;
      char *zHistory = 0;
      int nHistory;
      printf(
        "SQLite version %s\n"
        "Enter \".help\" for instructions\n",
        "Enter \".help\" for instructions\n"
        "Enter SQL statements terminated with a \";\"\n",
        sqlite3_libversion()
      );
      zHome = find_home_dir();
      if( zHome && (zHistory = malloc(nHistory = strlen(zHome)+20))!=0 ){
        sqlite3_snprintf(nHistory, zHistory,"%s/.sqlite_history", zHome);
      }
#if defined(HAVE_READLINE) && HAVE_READLINE==1