/ Check-in [653f37c3]
Login

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

Overview
Comment:Add the ability to do a single .command as the second argument to the command-line shell. (CVS 321)
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1:653f37c365a0b5d59c11b7dbba57905ffaeff2dc
User & Date: drh 2001-11-25 13:18:24
Context
2001-12-05
00:21
Bug fix: sqlite_exec() would sometimes return SQLITE_PROTOCOL when it should have returned SQLITE_BUSY. There was also a deadlock that the previous bug was masking. (CVS 322) check-in: 585ed5eb user: drh tags: trunk
2001-11-25
13:18
Add the ability to do a single .command as the second argument to the command-line shell. (CVS 321) check-in: 653f37c3 user: drh tags: trunk
2001-11-24
13:50
Fix typos. (CVS 320) check-in: 3be8a189 user: drh tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to src/shell.c.

8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
...
903
904
905
906
907
908
909





910

911
912

913
914
915
916
917
918
919
**    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.39 2001/11/24 00:31:46 drh Exp $
*/
#include <stdlib.h>
#include <string.h>
#include <stdio.h>
#include "sqlite.h"
#include <ctype.h>
#ifdef OS_UNIX
................................................................................
      exit(1);
    }else{
      fprintf(stderr,"Database \"%s\" opened READ ONLY!\n", argv[1]);
    }
  }
  data.out = stdout;
  if( argc==3 ){





    if( sqlite_exec(db, argv[2], callback, &data, &zErrMsg)!=0 && zErrMsg!=0 ){

      fprintf(stderr,"SQL error: %s\n", zErrMsg);
      exit(1);

    }
  }else{
    extern int isatty();
    if( isatty(0) ){
      printf(
        "SQLite version %s\n"
        "Enter \".help\" for instructions\n",







|







 







>
>
>
>
>
|
>
|
|
>







8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
...
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
**    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.40 2001/11/25 13:18:24 drh Exp $
*/
#include <stdlib.h>
#include <string.h>
#include <stdio.h>
#include "sqlite.h"
#include <ctype.h>
#ifdef OS_UNIX
................................................................................
      exit(1);
    }else{
      fprintf(stderr,"Database \"%s\" opened READ ONLY!\n", argv[1]);
    }
  }
  data.out = stdout;
  if( argc==3 ){
    if( argv[2][0]=='.' ){
      do_meta_command(argv[2], db, &data);
      exit(0);
    }else{
      int rc;
      rc = sqlite_exec(db, argv[2], callback, &data, &zErrMsg);
      if( rc!=0 && zErrMsg!=0 ){
        fprintf(stderr,"SQL error: %s\n", zErrMsg);
        exit(1);
      }
    }
  }else{
    extern int isatty();
    if( isatty(0) ){
      printf(
        "SQLite version %s\n"
        "Enter \".help\" for instructions\n",

Changes to www/changes.tcl.

12
13
14
15
16
17
18





19
20
21
22
23
24
25
}


proc chng {date desc} {
  puts "<DT><B>$date</B></DT>"
  puts "<DD><P><UL>$desc</UL></P></DD>"
}






chng {2001 Nov 23 (2.1.3)} {
<li>Fix the behavior of comparison operators 
    (ex: "<b>&lt</b>", "<b>==</b>", etc.)
    so that they are consistent with the order of entries in an index.</li>
<li>Correct handling of integers in SQL expressions that are larger than
    what can be represented by the machine integer.</li>







>
>
>
>
>







12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
}


proc chng {date desc} {
  puts "<DT><B>$date</B></DT>"
  puts "<DD><P><UL>$desc</UL></P></DD>"
}

chng {2001 Nov ?? (2.1.4)} {
<li>Add the ability to put a single .command in the second argument
    of the sqlite shell</li>
}

chng {2001 Nov 23 (2.1.3)} {
<li>Fix the behavior of comparison operators 
    (ex: "<b>&lt</b>", "<b>==</b>", etc.)
    so that they are consistent with the order of entries in an index.</li>
<li>Correct handling of integers in SQL expressions that are larger than
    what can be represented by the machine integer.</li>