/ Check-in [507d8e6f]
Login
SQLite training in Houston TX on 2019-11-05 (details)
Part of the 2019 Tcl Conference

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

Overview
Comment:Fix a bug in the ".databases" command of the command-line shell. Ticket #973 (CVS 2030)
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 507d8e6f5cff308116289b27b3138e5bbfd55352
User & Date: drh 2004-10-26 00:08:11
Context
2004-10-26
16:33
Mark the affinity.html file as obsolete. (CVS 2031) check-in: 09de96b6 user: drh tags: trunk
00:08
Fix a bug in the ".databases" command of the command-line shell. Ticket #973 (CVS 2030) check-in: 507d8e6f user: drh tags: trunk
2004-10-25
20:33
Minor optimizations in the pragma module. (CVS 2029) check-in: 63efd50a 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.116 2004/10/07 00:32:40 drh Exp $
           15  +** $Id: shell.c,v 1.117 2004/10/26 00:08:11 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>
................................................................................
   878    878       open_db(p);
   879    879       memcpy(&data, p, sizeof(data));
   880    880       data.showHeader = 1;
   881    881       data.mode = MODE_Column;
   882    882       data.colWidth[0] = 3;
   883    883       data.colWidth[1] = 15;
   884    884       data.colWidth[2] = 58;
          885  +    data.cnt = 0;
   885    886       sqlite3_exec(p->db, "PRAGMA database_list; ", callback, &data, &zErrMsg);
   886    887       if( zErrMsg ){
   887    888         fprintf(stderr,"Error: %s\n", zErrMsg);
   888    889         sqlite3_free(zErrMsg);
   889    890       }
   890    891     }else
   891    892