Make sure VACUUM cleans up after itself. Ticket #2071. (CVS 3514)

FossilOrigin-Name: 2fdc147d0059dcdfff2da33bd9fedb0bee057aa1
This commit is contained in:
drh 2006-11-18 20:20:21 +00:00
parent f72442be68
commit c28e3a1828
3 changed files with 13 additions and 10 deletions

View File

@ -1,5 +1,5 @@
C Store\sminimal\sterms\sin\sinterior\snodes.\s\sWhenever\sthere's\sa\sbreak\nbetween\sleaf\snodes,\sinstead\sof\sstoring\sthe\sentire\sleftmost\sterm\sof\sthe\nrightmost\schild,\sstore\sonly\sthat\sportion\sof\sthe\sleftmost\sterm\nnecessary\sto\sdistinguish\sit\sfrom\sthe\srightmost\sterm\sof\sthe\sleftmost\nchild.\s(CVS\s3513)
D 2006-11-18T00:12:45
C Make\ssure\sVACUUM\scleans\sup\safter\sitself.\s\sTicket\s#2071.\s(CVS\s3514)
D 2006-11-18T20:20:22
F Makefile.in 8e14898d41a53033ecb687d93c9cd5d109fb9ae3
F Makefile.linux-gcc 2d8574d1ba75f129aba2019f0b959db380a90935
F README 9c4e2d6706bdcc3efdd773ce752a8cdab4f90028
@ -120,7 +120,7 @@ F src/trigger.c 8c55d31876013ed4e97ee7ce24478fbe00db49bb
F src/update.c 951f95ef044cf6d28557c48dc35cb0711a0b9129
F src/utf.c 67ecb1032bc0b42c105e88d65ef9d9f626eb0e1f
F src/util.c 91d4cb189476906639ae611927d939691d1365f6
F src/vacuum.c f6a7943f1f1002cb82ef2ea026cb1975a5b687cb
F src/vacuum.c b620ffff5a84af88b970894a92bb330bd2b9fc45
F src/vdbe.c 3e31f2e49423955afb2ac905ceacf54c679b1f28
F src/vdbe.h 9720cae673359dc2bdcb106285ecf686b7d3ef24
F src/vdbeInt.h 1ca07f2d7446c90230346aed7fbf990c032460bc
@ -421,7 +421,7 @@ F www/tclsqlite.tcl bb0d1357328a42b1993d78573e587c6dcbc964b9
F www/vdbe.tcl 87a31ace769f20d3627a64fa1fade7fed47b90d0
F www/version3.tcl 890248cf7b70e60c383b0e84d77d5132b3ead42b
F www/whentouse.tcl 97e2b5cd296f7d8057e11f44427dea8a4c2db513
P f30771d5c7ef2b502af95d81a18796b75271ada4
R ef562280fdedbce7ff0fcbb49811b62c
U shess
Z 674bc601b7eaf4b058181b0cf2143d33
P f6e0b080dcfaf554b2c05df5e7d4db69d012fba3
R ad774b2735ecc59c61fa373df002cbdb
U drh
Z bebd3b34dccaadcb360a71274b94137f

View File

@ -1 +1 @@
f6e0b080dcfaf554b2c05df5e7d4db69d012fba3
2fdc147d0059dcdfff2da33bd9fedb0bee057aa1

View File

@ -14,7 +14,7 @@
** Most of the code in this file may be omitted by defining the
** SQLITE_OMIT_VACUUM macro.
**
** $Id: vacuum.c,v 1.64 2006/10/10 13:07:36 drh Exp $
** $Id: vacuum.c,v 1.65 2006/11/18 20:20:22 drh Exp $
*/
#include "sqliteInt.h"
#include "vdbeInt.h"
@ -83,7 +83,7 @@ int sqlite3RunVacuum(char **pzErrMsg, sqlite3 *db){
char *zSql = 0; /* SQL statements */
int saved_flags; /* Saved value of the db->flags */
Db *pDb = 0; /* Database to detach at end of vacuum */
char zTemp[SQLITE_TEMPNAME_SIZE+1]; /* Name of the TEMP file */
char zTemp[SQLITE_TEMPNAME_SIZE+20]; /* Name of the TEMP file */
/* Save the current value of the write-schema flag before setting it. */
saved_flags = db->flags;
@ -259,6 +259,9 @@ end_of_vacuum:
pDb->pSchema = 0;
}
sqlite3OsDelete(zTemp);
strcat(zTemp, "-journal");
sqlite3OsDelete(zTemp);
sqliteFree( zSql );
sqlite3ResetInternalSchema(db, 0);