diff insert.cpp @ 321:da2272e029b3 large_adb

Added --adb_feature_root=path filename prefix for locating LARGE_ADB features with relative paths at QUERY time. Also added convenience argument --adb_root=path prefix for -d database command option.
author mas01mc
date Thu, 21 Aug 2008 19:16:21 +0000
parents a995e5ad999a
children
line wrap: on
line diff
--- a/insert.cpp	Wed Aug 20 13:50:58 2008 +0000
+++ b/insert.cpp	Thu Aug 21 19:16:21 2008 +0000
@@ -492,8 +492,10 @@
       }
     }
     // CLEAN UP
-    munmap(indata,statbuf.st_size);
-    close(infid);
+    if(indata)
+      munmap(indata,statbuf.st_size);
+    if(infid>0)
+      close(infid);
   } while(!filesIn->eof());
 
   VERB_LOG(0, "%s %s %u vectors %ju bytes.\n", COM_BATCHINSERT, dbName, totalVectors, (intmax_t) (totalVectors * dbH->dim * sizeof(double)));