]> git.ipfire.org Git - thirdparty/sqlite.git/commitdiff
Better fix than (3860) for the same problem. (3860) could leave file-handles open...
authordanielk1977 <danielk1977@noemail.net>
Thu, 19 Apr 2007 14:48:37 +0000 (14:48 +0000)
committerdanielk1977 <danielk1977@noemail.net>
Thu, 19 Apr 2007 14:48:37 +0000 (14:48 +0000)
FossilOrigin-Name: 5ad645339b2a3a280651447dceda67645ff8e96d

manifest
manifest.uuid
src/vtab.c

index 34f6d295b3632d6f1c6b07d851d35a36b0a83ec7..ac0f1f874cfe26bfb17967bc54200e0af759d2bd 100644 (file)
--- a/manifest
+++ b/manifest
@@ -1,5 +1,5 @@
-C Fix\sa\scrash\sthat\scan\soccur\sif\san\serror\shappens\sin\sa\svirtual\stable\sxSync()\sfunction.\s(CVS\s3860)
-D 2007-04-19T14:28:09
+C Better\sfix\sthan\s(3860)\sfor\sthe\ssame\sproblem.\s(3860)\scould\sleave\sfile-handles\sopen\sin\ssome\scircumstances.\s(CVS\s3861)
+D 2007-04-19T14:48:37
 F Makefile.in 8cab54f7c9f5af8f22fd97ddf1ecfd1e1860de62
 F Makefile.linux-gcc 2d8574d1ba75f129aba2019f0b959db380a90935
 F README 9c4e2d6706bdcc3efdd773ce752a8cdab4f90028
@@ -131,7 +131,7 @@ F src/vdbeapi.c 1fca7ff056d03f131caa6b1296bb221da65ed7f4
 F src/vdbeaux.c ef59545f53f90394283f2fd003375d3ebbf0bd6e
 F src/vdbefifo.c 3ca8049c561d5d67cbcb94dc909ae9bb68c0bf8f
 F src/vdbemem.c 981a113405bd9b80aeb71fe246a2f01708e8a8f7
-F src/vtab.c 6aad2b5cb117142be42047abb85919b98ef187c4
+F src/vtab.c 89a0d5f39c1beba65a77fdb4d507b831fc5e6baf
 F src/where.c fce0dad6b230eb7ea844e8b8667c074d07e3fdd5
 F tclinstaller.tcl 046e3624671962dc50f0481d7c25b38ef803eb42
 F test/aggerror.test a867e273ef9e3d7919f03ef4f0e8c0d2767944f2
@@ -459,7 +459,7 @@ F www/tclsqlite.tcl bb0d1357328a42b1993d78573e587c6dcbc964b9
 F www/vdbe.tcl 87a31ace769f20d3627a64fa1fade7fed47b90d0
 F www/version3.tcl 890248cf7b70e60c383b0e84d77d5132b3ead42b
 F www/whentouse.tcl fc46eae081251c3c181bd79c5faef8195d7991a5
-P b7ed0e1e88a019c830f56abb14658104a30a1c43
-R 5c592b147b197caa08e0e4cc017292eb
+P d1afdd8c9c756409275c116e662fc1e04bbe829e
+R e0ac378b1e04524ec63414232c30004b
 U danielk1977
-Z 2c6cb30f9dd37ebc0e4aab421a093117
+Z 48ec2de0834caf9ea891bc39f546937e
index 6ec79500ad5b01625d9f7f6eb83dc79979d44584..589f52e8467b67c7c054b8634447e4f75047b344 100644 (file)
@@ -1 +1 @@
-d1afdd8c9c756409275c116e662fc1e04bbe829e
\ No newline at end of file
+5ad645339b2a3a280651447dceda67645ff8e96d
\ No newline at end of file
index 645281785b29cf52301ffc5edd2092e6efa0391e..4b885b62415defc52673aace5ae259e5440b6412 100644 (file)
@@ -11,7 +11,7 @@
 *************************************************************************
 ** This file contains code used to help implement virtual tables.
 **
-** $Id: vtab.c,v 1.44 2007/04/19 14:28:09 danielk1977 Exp $
+** $Id: vtab.c,v 1.45 2007/04/19 14:48:37 danielk1977 Exp $
 */
 #ifndef SQLITE_OMIT_VIRTUALTABLE
 #include "sqliteInt.h"
@@ -533,16 +533,18 @@ int sqlite3VtabCallDestroy(sqlite3 *db, int iDb, const char *zTab)
 */
 static void callFinaliser(sqlite3 *db, int offset){
   int i;
-  for(i=0; i<db->nVTrans && db->aVTrans && db->aVTrans[i]; i++){
-    sqlite3_vtab *pVtab = db->aVTrans[i];
-    int (*x)(sqlite3_vtab *);
-    x = *(int (**)(sqlite3_vtab *))((char *)pVtab->pModule + offset);
-    if( x ) x(pVtab);
-    sqlite3VtabUnlock(db, pVtab);
+  if( db->aVTrans ){
+    for(i=0; i<db->nVTrans && db->aVTrans[i]; i++){
+      sqlite3_vtab *pVtab = db->aVTrans[i];
+      int (*x)(sqlite3_vtab *);
+      x = *(int (**)(sqlite3_vtab *))((char *)pVtab->pModule + offset);
+      if( x ) x(pVtab);
+      sqlite3VtabUnlock(db, pVtab);
+    }
+    sqliteFree(db->aVTrans);
+    db->nVTrans = 0;
+    db->aVTrans = 0;
   }
-  sqliteFree(db->aVTrans);
-  db->nVTrans = 0;
-  db->aVTrans = 0;
 }
 
 /*