1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-11-06 15:49:35 +03:00

Fix the ".dump" command in the shell so that it works with AUTOVACUUM.

This is related to ticket #1095. (CVS 2310)

FossilOrigin-Name: 76c4a96c5a2148f253cc5e034567b16317343be7
This commit is contained in:
drh
2005-02-03 00:42:34 +00:00
parent 4c7f941cfc
commit f8eb96ab9c
3 changed files with 13 additions and 9 deletions

View File

@@ -12,7 +12,7 @@
** 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 $
** $Id: shell.c,v 1.121 2005/02/03 00:42:35 drh Exp $
*/
#include <stdlib.h>
#include <string.h>
@@ -656,7 +656,11 @@ static int dump_callback(void *pArg, int nArg, char **azArg, char **azCol){
zType = azArg[1];
zSql = azArg[2];
fprintf(p->out, "%s;\n", zSql);
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;