]> git.ipfire.org Git - thirdparty/sqlite.git/commitdiff
Make sure VACUUM cleans up after itself. Ticket #2071. (CVS 3514)
authordrh <drh@noemail.net>
Sat, 18 Nov 2006 20:20:21 +0000 (20:20 +0000)
committerdrh <drh@noemail.net>
Sat, 18 Nov 2006 20:20:21 +0000 (20:20 +0000)
FossilOrigin-Name: 2fdc147d0059dcdfff2da33bd9fedb0bee057aa1

manifest
manifest.uuid
src/vacuum.c

index 5d275357c669635cfa4a228344b1c2c5c76eb411..abfb3a6c9e95efdba2ace51238986a6db4bdf78c 100644 (file)
--- a/manifest
+++ b/manifest
@@ -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
index f6e6ca6a8f297d9d8a8460a3ffaab44b8b338de8..78faf40c9497c9ad86ea956782d84372e184fb59 100644 (file)
@@ -1 +1 @@
-f6e0b080dcfaf554b2c05df5e7d4db69d012fba3
\ No newline at end of file
+2fdc147d0059dcdfff2da33bd9fedb0bee057aa1
\ No newline at end of file
index 3f50b1ffb232e88ae69715e025c5ce8eb4977243..510390a0108c792687fe70da4006f7609d0508bf 100644 (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);