/ Check-in [dedf5f23]
Login

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

Overview
Comment:Fix a bug in the ".show" command of the CLI. Ticket #2942. (CVS 4792)
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: dedf5f230bf34a207f2ee0a8349a2ea602a38aba
User & Date: drh 2008-02-15 17:38:06
Context
2008-02-16
16:21
The power-of-two first-fit memory allocator is now working. (CVS 4793) check-in: d134d29c user: drh tags: trunk
2008-02-15
17:38
Fix a bug in the ".show" command of the CLI. Ticket #2942. (CVS 4792) check-in: dedf5f23 user: drh tags: trunk
14:33
Do not apply the query flattening optimization when the outer query is an aggregate and the inner query contains an ORDER BY clause. Ticket #2943. (CVS 4791) check-in: 6d33cbd9 user: drh tags: trunk
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to src/shell.c.

     8      8   **    May you find forgiveness for yourself and forgive others.
     9      9   **    May you share freely, never taking more than you give.
    10     10   **
    11     11   *************************************************************************
    12     12   ** This file contains code to implement the "sqlite" command line
    13     13   ** utility for accessing SQLite databases.
    14     14   **
    15         -** $Id: shell.c,v 1.174 2008/01/21 16:22:46 drh Exp $
           15  +** $Id: shell.c,v 1.175 2008/02/15 17:38:06 drh Exp $
    16     16   */
    17     17   #include <stdlib.h>
    18     18   #include <string.h>
    19     19   #include <stdio.h>
    20     20   #include <assert.h>
    21     21   #include "sqlite3.h"
    22     22   #include <ctype.h>
................................................................................
   332    332   #define MODE_Column   1  /* One record per line in neat columns */
   333    333   #define MODE_List     2  /* One record per line with a separator */
   334    334   #define MODE_Semi     3  /* Same as MODE_List but append ";" to each line */
   335    335   #define MODE_Html     4  /* Generate an XHTML table */
   336    336   #define MODE_Insert   5  /* Generate SQL "insert" statements */
   337    337   #define MODE_Tcl      6  /* Generate ANSI-C or TCL quoted elements */
   338    338   #define MODE_Csv      7  /* Quote strings, numbers are plain */
   339         -#define MODE_NUM_OF   8  /* The number of modes (not a mode itself) */
   340         -#define MODE_Explain  9  /* Like MODE_Column, but do not truncate data */
          339  +#define MODE_Explain  8  /* Like MODE_Column, but do not truncate data */
   341    340   
   342         -static const char *modeDescr[MODE_NUM_OF] = {
          341  +static const char *modeDescr[] = {
   343    342     "line",
   344    343     "column",
   345    344     "list",
   346    345     "semi",
   347    346     "html",
   348    347     "insert",
   349    348     "tcl",
   350    349     "csv",
          350  +  "explain",
   351    351   };
   352    352   
   353    353   /*
   354    354   ** Number of elements in an array
   355    355   */
   356    356   #define ArraySize(X)  (sizeof(X)/sizeof(X[0]))
   357    357