/ Check-in [76c4a96c]
Login

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

Overview
Comment:Fix the ".dump" command in the shell so that it works with AUTOVACUUM. This is related to ticket #1095. (CVS 2310)
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 76c4a96c5a2148f253cc5e034567b16317343be7
User & Date: drh 2005-02-03 00:42:35
Context
2005-02-03
01:08
Get AUTOINCREMENT and VACUUM working together. Ticket #1095. (CVS 2311) check-in: 332a531d user: drh tags: trunk
00:42
Fix the ".dump" command in the shell so that it works with AUTOVACUUM. This is related to ticket #1095. (CVS 2310) check-in: 76c4a96c user: drh tags: trunk
00:29
Make sure the rc variable in OsWrite of os_win.c is always initialized. Also assert that the amt parameter is always greater than zero. Ticket #1094. (CVS 2309) check-in: 4b399ae7 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
...
652
653
654
655
656
657
658

659



660
661
662
663
664
665
666
**    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.120 2005/01/23 23:43:22 danielk1977 Exp $
*/
#include <stdlib.h>
#include <string.h>
#include <stdio.h>
#include <assert.h>
#include "sqlite3.h"
#include <ctype.h>
................................................................................
  struct callback_data *p = (struct callback_data *)pArg;

  if( nArg!=3 ) return 1;
  zTable = azArg[0];
  zType = azArg[1];
  zSql = azArg[2];
  

  fprintf(p->out, "%s;\n", zSql);




  if( strcmp(zType, "table")==0 ){
    sqlite3_stmt *pTableInfo = 0;
    char *zSelect = 0;
    char *zTableInfo = 0;
    char *zTmp = 0;
   







|







 







>
|
>
>
>







8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
...
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
**    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.121 2005/02/03 00:42:35 drh Exp $
*/
#include <stdlib.h>
#include <string.h>
#include <stdio.h>
#include <assert.h>
#include "sqlite3.h"
#include <ctype.h>
................................................................................
  struct callback_data *p = (struct callback_data *)pArg;

  if( nArg!=3 ) return 1;
  zTable = azArg[0];
  zType = azArg[1];
  zSql = azArg[2];
  
  if( strcasecmp(zTable,"sqlite_sequence")!=0 ){
    fprintf(p->out, "%s;\n", zSql);
  }else{
    fprintf(p->out, "DELETE FROM sqlite_sequence;\n");
  }

  if( strcmp(zType, "table")==0 ){
    sqlite3_stmt *pTableInfo = 0;
    char *zSelect = 0;
    char *zTableInfo = 0;
    char *zTmp = 0;