/ Check-in [fc8d25ea]
Login

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

Overview
Comment::-) (CVS 68)
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: fc8d25ea1fffa115fad15b9eb8bb0b0aaaff0431
User & Date: drh 2000-06-07 02:04:23
Context
2000-06-07
14:42
:-) (CVS 1697) check-in: 5d773b5d user: drh tags: trunk
02:04
:-) (CVS 68) check-in: fc8d25ea user: drh tags: trunk
01:33
:-) (CVS 67) check-in: 8bff1bee user: drh tags: trunk
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to src/shell.c.

    20     20   **   drh@hwaci.com
    21     21   **   http://www.hwaci.com/drh/
    22     22   **
    23     23   *************************************************************************
    24     24   ** This file contains code to implement the "sqlite" command line
    25     25   ** utility for accessing SQLite databases.
    26     26   **
    27         -** $Id: shell.c,v 1.11 2000/06/07 01:33:42 drh Exp $
           27  +** $Id: shell.c,v 1.12 2000/06/07 02:04:23 drh Exp $
    28     28   */
    29     29   #include <stdlib.h>
    30     30   #include <string.h>
    31     31   #include <stdio.h>
    32     32   #include "sqlite.h"
    33     33   #include <unistd.h>
    34     34   #include <ctype.h>
................................................................................
   208    208             int j;
   209    209             for(j=0; z[j] && z[j]!=p->escape && z[j]!='\\'; j++){}
   210    210             if( j>0 ){
   211    211               fprintf(p->out, "%.*s", j, z);
   212    212             }
   213    213             if( z[j] ){
   214    214               fprintf(p->out, "\\%c", z[j]);
   215         -            z = &z[j+1];
          215  +            z++;
   216    216             }
   217    217             z += j;
   218    218           }
   219    219           fprintf(p->out, "%s", i==nArg-1 ? "\n" : p->separator);
   220    220         }
   221    221         break;
   222    222       }
................................................................................
   252    252     if( nArg!=3 ) return 1;
   253    253     fprintf(pData->out, "%s;\n", azArg[2]);
   254    254     if( strcmp(azArg[1],"table")==0 ){
   255    255       struct callback_data d2;
   256    256       char zSql[1000];
   257    257       d2 = *pData;
   258    258       d2.mode = MODE_List;
          259  +    d2.escape = '\t';
   259    260       strcpy(d2.separator,"\t");
   260    261       fprintf(pData->out, "COPY '%s' FROM STDIN;\n", azArg[0]);
   261    262       sprintf(zSql, "SELECT * FROM '%s'", azArg[0]);
   262    263       sqlite_exec(pData->db, zSql, callback, &d2, 0);
   263    264       fprintf(pData->out, "\\.\n");
   264    265     }
   265    266     fprintf(pData->out, "VACUUM '%s';\n", azArg[0]);

Changes to src/tokenize.c.

    23     23   *************************************************************************
    24     24   ** An tokenizer for SQL
    25     25   **
    26     26   ** This file contains C code that splits an SQL input string up into
    27     27   ** individual tokens and sends those tokens one-by-one over to the
    28     28   ** parser for analysis.
    29     29   **
    30         -** $Id: tokenize.c,v 1.8 2000/06/06 21:56:08 drh Exp $
           30  +** $Id: tokenize.c,v 1.9 2000/06/07 02:04:23 drh Exp $
    31     31   */
    32     32   #include "sqliteInt.h"
    33     33   #include <ctype.h>
    34     34   #include <stdlib.h>
    35     35   
    36     36   /*
    37     37   ** All the keywords of the SQL language are stored as in a hash
................................................................................
   333    333             trace = stderr;
   334    334             sqliteParserTrace(trace, "parser: ");
   335    335           }else if( sqliteStrNICmp(z,"--parser-trace-off--", 20)==0 ){
   336    336             trace = 0;
   337    337             sqliteParserTrace(trace, "parser: ");
   338    338           }else if( sqliteStrNICmp(z,"--vdbe-trace-on--",17)==0 ){
   339    339             pParse->db->flags |= SQLITE_VdbeTrace;
   340         -        }else if( sqliteStrNICmp(z,"--vdbe-trace-off--", 19)==0 ){
          340  +        }else if( sqliteStrNICmp(z,"--vdbe-trace-off--", 18)==0 ){
   341    341             pParse->db->flags &= ~SQLITE_VdbeTrace;
   342    342           }
   343    343           break;
   344    344         }
   345    345         case TK_ILLEGAL:
   346    346           sqliteSetNString(pzErrMsg, "illegal token: \"", -1, 
   347    347              pParse->sLastToken.z, pParse->sLastToken.n, 0);