Changeset: 004ae65b3081 for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=004ae65b3081
Removed Files:
        monetdb5/modules/mal/Tests/attach00.mal
        monetdb5/modules/mal/Tests/attach00.stable.err
        monetdb5/modules/mal/Tests/attach00.stable.out
        monetdb5/modules/mal/attach.c
        monetdb5/modules/mal/attach.h
        monetdb5/modules/mal/attach.mal
Modified Files:
        NT/installer32/MonetDB5-SQL-Installer.vdproj
        NT/installer64/MonetDB5-SQL-Installer.vdproj
        clients/Tests/exports.stable.out
        debian/monetdb5-server.install
        gdk/gdk_bbp.c
        gdk/gdk_bbp.h
        monetdb5/ChangeLog.Oct2012
        monetdb5/modules/mal/Makefile.ag
        monetdb5/modules/mal/Tests/All
        monetdb5/modules/mal/mal_init.mal
        sql/backends/monet5/sql_optimizer.c
Branch: Oct2012
Log Message:

Removed module attach and supporting code.
The module wasn't used and wasn't tested.


diffs (truncated from 862 to 300 lines):

diff --git a/NT/installer32/MonetDB5-SQL-Installer.vdproj 
b/NT/installer32/MonetDB5-SQL-Installer.vdproj
--- a/NT/installer32/MonetDB5-SQL-Installer.vdproj
+++ b/NT/installer32/MonetDB5-SQL-Installer.vdproj
@@ -393,12 +393,6 @@
         }
         "Entry"
         {
-        "MsmKey" = "8:_73C1A2E428774320A035162BB0427503"
-        "OwnerKey" = "8:_UNDEFINED"
-        "MsmSig" = "8:_UNDEFINED"
-        }
-        "Entry"
-        {
         "MsmKey" = "8:_740A0A7308D847629EAE5DA1A5A09B25"
         "OwnerKey" = "8:_UNDEFINED"
         "MsmSig" = "8:_UNDEFINED"
@@ -2171,26 +2165,6 @@
             "IsDependency" = "11:FALSE"
             "IsolateTo" = "8:"
             }
-            
"{1FB2D0AE-D3B9-43D4-B9DD-F88EC61E35DE}:_73C1A2E428774320A035162BB0427503"
-            {
-            "SourcePath" = "8:lib\\monetdb5\\attach.mal"
-            "TargetName" = "8:attach.mal"
-            "Tag" = "8:"
-            "Folder" = "8:_B593DAA0787744D6A44D17884E0C3951"
-            "Condition" = "8:"
-            "Transitive" = "11:FALSE"
-            "Vital" = "11:TRUE"
-            "ReadOnly" = "11:FALSE"
-            "Hidden" = "11:FALSE"
-            "System" = "11:FALSE"
-            "Permanent" = "11:FALSE"
-            "SharedLegacy" = "11:FALSE"
-            "PackageAs" = "3:1"
-            "Register" = "3:1"
-            "Exclude" = "11:FALSE"
-            "IsDependency" = "11:FALSE"
-            "IsolateTo" = "8:"
-            }
             
"{1FB2D0AE-D3B9-43D4-B9DD-F88EC61E35DE}:_740A0A7308D847629EAE5DA1A5A09B25"
             {
             "SourcePath" = "8:stethoscope.bat"
diff --git a/NT/installer64/MonetDB5-SQL-Installer.vdproj 
b/NT/installer64/MonetDB5-SQL-Installer.vdproj
--- a/NT/installer64/MonetDB5-SQL-Installer.vdproj
+++ b/NT/installer64/MonetDB5-SQL-Installer.vdproj
@@ -375,12 +375,6 @@
         }
         "Entry"
         {
-        "MsmKey" = "8:_7DF78105CD3F477BBF540F5878631C7D"
-        "OwnerKey" = "8:_UNDEFINED"
-        "MsmSig" = "8:_UNDEFINED"
-        }
-        "Entry"
-        {
         "MsmKey" = "8:_7E6F0DD7ED2F472C836206FC14A644BE"
         "OwnerKey" = "8:_UNDEFINED"
         "MsmSig" = "8:_UNDEFINED"
@@ -2111,26 +2105,6 @@
             "IsDependency" = "11:FALSE"
             "IsolateTo" = "8:"
             }
-            
"{1FB2D0AE-D3B9-43D4-B9DD-F88EC61E35DE}:_7DF78105CD3F477BBF540F5878631C7D"
-            {
-            "SourcePath" = "8:lib\\monetdb5\\attach.mal"
-            "TargetName" = "8:attach.mal"
-            "Tag" = "8:"
-            "Folder" = "8:_B593DAA0787744D6A44D17884E0C3951"
-            "Condition" = "8:"
-            "Transitive" = "11:FALSE"
-            "Vital" = "11:TRUE"
-            "ReadOnly" = "11:FALSE"
-            "Hidden" = "11:FALSE"
-            "System" = "11:FALSE"
-            "Permanent" = "11:FALSE"
-            "SharedLegacy" = "11:FALSE"
-            "PackageAs" = "3:1"
-            "Register" = "3:1"
-            "Exclude" = "11:FALSE"
-            "IsDependency" = "11:FALSE"
-            "IsolateTo" = "8:"
-            }
             
"{1FB2D0AE-D3B9-43D4-B9DD-F88EC61E35DE}:_7E6F0DD7ED2F472C836206FC14A644BE"
             {
             "SourcePath" = "8:lib\\monetdb5\\createdb\\10_math.sql"
diff --git a/clients/Tests/exports.stable.out b/clients/Tests/exports.stable.out
--- a/clients/Tests/exports.stable.out
+++ b/clients/Tests/exports.stable.out
@@ -190,7 +190,6 @@ BAT *BBPdescriptor(bat b);
 int BBPdir(int cnt, bat *subcommit);
 BATstore *BBPgetdesc(bat i);
 void BBPhot(bat b);
-bat BBPimportEntry(char *nme);
 int BBPin;
 int BBPincref(bat b, int logical);
 bat BBPindex(const char *nme);
@@ -786,9 +785,6 @@ str ARRAYmultiply_sht_int(int *ret, int 
 str ARRAYmultiply_sht_lng(int *ret, int *bid, int *rid);
 str ARRAYproduct(int *ret, int *bid, int *rid);
 str ARRAYproject(int *ret, int *bid, int *cst);
-str ATTbind(Client cntxt, MalBlkPtr mb, MalStkPtr stk, InstrPtr pci);
-str ATTbindPartition(Client cntxt, MalBlkPtr mb, MalStkPtr stk, InstrPtr pci);
-str ATTlocation(str *fnme, int *bid);
 str AUTHaddUser(oid *ret, Client *c, str *user, str *pass);
 str AUTHchangePassword(Client *c, str *oldpass, str *passwd);
 str AUTHchangeUsername(Client *c, str *olduser, str *newuser);
diff --git a/debian/monetdb5-server.install b/debian/monetdb5-server.install
--- a/debian/monetdb5-server.install
+++ b/debian/monetdb5-server.install
@@ -10,7 +10,6 @@ debian/tmp/usr/lib/monetdb5/alarm.mal us
 debian/tmp/usr/lib/monetdb5/algebra.mal usr/lib/monetdb5
 #debian/tmp/usr/lib/monetdb5/algebraExtensions.mal usr/lib/monetdb5
 debian/tmp/usr/lib/monetdb5/array.mal usr/lib/monetdb5
-debian/tmp/usr/lib/monetdb5/attach.mal usr/lib/monetdb5
 debian/tmp/usr/lib/monetdb5/bat*.mal usr/lib/monetdb5
 debian/tmp/usr/lib/monetdb5/bbp.mal usr/lib/monetdb5
 debian/tmp/usr/lib/monetdb5/blob.mal usr/lib/monetdb5
diff --git a/gdk/gdk_bbp.c b/gdk/gdk_bbp.c
--- a/gdk/gdk_bbp.c
+++ b/gdk/gdk_bbp.c
@@ -780,7 +780,7 @@ vheapinit(COLrec *col, const char *buf, 
 }
 
 static BATstore *
-BBPreadEntries(FILE *fp, char *src, int *min_stamp, int *max_stamp, int 
oidsize, int bbpversion)
+BBPreadEntries(FILE *fp, int *min_stamp, int *max_stamp, int oidsize, int 
bbpversion)
 {
        bat bid = 0;
        char buf[4096];
@@ -832,16 +832,13 @@ BBPreadEntries(FILE *fp, char *src, int 
                        *s++ = DIR_SEP;
 #endif
 
-               if (src && strcmp(src, filename) != 0)
-                       continue;
-
                bid = (bat) batid;
                if ((bat) batid >= BBPsize) {
                        BBPsize = (bat) batid + 1;
                        if (BBPsize >= BBPlimit)
                                BBPextend(FALSE);
                }
-               if (src == 0 && BBP_desc(bid) != NULL)
+               if (BBP_desc(bid) != NULL)
                        GDKfatal("BBPinit: duplicate entry in BBP.dir.");
                bs = GDKzalloc(sizeof(BATstore));
                if (bs == NULL)
@@ -881,8 +878,6 @@ BBPreadEntries(FILE *fp, char *src, int 
                if (buf[nread] == ' ')
                        options = buf + nread + 1;
 
-               if (src)
-                       return bs;
                BBP_desc(bid) = bs;
                BBP_status(bid) = BBPEXISTING;  /* do we need other status 
bits? */
                if ((s = strchr(headname, '~')) != NULL && s == headname) {
@@ -992,182 +987,6 @@ BBPheader(FILE *fp, bat *limit, oid *BBP
        return bbpversion;
 }
 
-/*
- * In a distributed version of MonetDB, it would be nice to easily
- * share the BATs with other server instances. Although concurrency
- * control issues should be handled with care, it can avoid excessive
- * communication costs. The BBPimportEntry creates a BATdescriptor
- * using symbolic links to its source. Presumably this would lead to a
- * transparent behavior.
- */
-#ifndef WIN32
-static int
-linkHeap(BAT *bn, COLrec *col, const char *file, const char *ext)
-{
-       struct stat st;
-       long_str path;
-
-       if (lstat(file, &st) < 0) {
-               GDKerror("BBPimportEntry: file '%s' does not exist.\n", file);
-               BBPdestroy(bn);
-               return 0;
-       }
-       GDKfilepath(path, BATDIR, BBP_physical(bn->batCacheid), ext);
-       GDKcreatedir(path);
-       IODEBUG mnstr_printf(GDKstdout, "#symlink %s ->%s\n", file, path);
-       if (symlink(file, path) < 0) {
-               GDKerror("BBPimportEntry: cannot link '%s' -> '%s'\n", path, 
file);
-               BBPdestroy(bn);
-               return 0;
-       }
-       col->heap.free = col->heap.size = (size_t) st.st_size;
-       col->heap.storage = (col->heap.size < REMAP_PAGE_MAXSIZE) ? STORE_MEM : 
STORE_MMAP;
-       if (col->heap.filename) {
-               GDKfree(col->heap.filename);
-               col->heap.filename = 0;
-       }
-       if (HEAPload(&col->heap, BBP_physical(bn->batCacheid), ext, TRUE) < 0) {
-               GDKerror("BBPimportEntry: cannot read heap file '%s'\n", file);
-               BBPdestroy(bn);
-               return 0;
-       }
-       return 1;
-}
-
-static int
-linkvHeap(BAT *bn, COLrec *col, const char *file, const char *ext)
-{
-       struct stat st;
-       long_str path;
-
-       if (lstat(file, &st) < 0) {
-               GDKerror("BBPimportEntry: file '%s' does not exist.\n", file);
-               BBPdestroy(bn);
-               return 0;
-       }
-       GDKfilepath(path, BATDIR, BBP_physical(bn->batCacheid), ext);
-       GDKcreatedir(path);
-       IODEBUG mnstr_printf(GDKstdout, "#symlink %s ->%s\n", file, path);
-       if (symlink(file, path) < 0) {
-               GDKerror("BBPimportEntry: cannot link '%s' -> '%s'\n", path, 
file);
-               BBPdestroy(bn);
-               return 0;
-       }
-       if (col->vheap == 0)
-               col->vheap = (Heap *) GDKzalloc(sizeof(Heap));
-       col->vheap->parentid = bn->batCacheid;
-       col->vheap->free = col->vheap->size = (size_t) st.st_size;
-       col->vheap->storage = (col->vheap->size < REMAP_PAGE_MAXSIZE) ? 
STORE_MEM : STORE_MMAP;
-       if (col->vheap->filename) {
-               GDKfree(col->vheap->filename);
-               col->vheap->filename = 0;
-       }
-       if (HEAPload(col->vheap, BBP_physical(bn->batCacheid), ext, TRUE) < 0) {
-               GDKerror("BBPimportEntry: cannot read heap file '%s'\n", file);
-               BBPdestroy(bn);
-               return 0;
-       }
-       return 1;
-}
-#endif
-
-bat
-BBPimportEntry(char *nme)
-{
-#ifdef WIN32
-       GDKerror("BBPimportEntry: not tested under Windows");
-       return 0;
-#else
-       char *s;
-       FILE *fd;
-       int min_stamp = 0x7fffffff, max_stamp = 0;
-       BAT *bn = 0;
-       BATstore *bs;
-       char bbpdir[BUFSIZ];
-       char bufhead[BUFSIZ];
-       char buftail[BUFSIZ];
-       char bufhheap[BUFSIZ];
-       char buftheap[BUFSIZ];
-       char path[BUFSIZ];
-       oid BBPoid;
-       bat limit;
-       int bbpversion;
-
-       IODEBUG mnstr_printf(GDKstdout,"#importEntry %s\n",nme);
-       if (strlen(nme) >= sizeof(bbpdir)) {
-               GDKerror("BBPimportEntry: file name too long\n");
-               return 0;
-       }
-       strcpy(bbpdir,nme);
-       s= strstr(bbpdir,BATDIR);
-       if (s == 0)
-               return 0;
-       *s = 0;
-       nme = s + strlen(BATDIR) + 1;
-       snprintf(path, BUFSIZ, "%s%c%s%cBBP.dir",
-                bbpdir, DIR_SEP, BATDIR, DIR_SEP);
-       fd = fopen(path,"r");
-       if (fd == 0) {
-               snprintf(path, BUFSIZ, "%s%c%s%cBBP.bak",
-                        bbpdir, DIR_SEP, BATDIR, DIR_SEP);
-               fd = fopen(path,"r");
-               if (fd == 0) {
-                       snprintf(path, BUFSIZ, "%s%c%s%cBACKUP%cBBP.dir",
-                                bbpdir, DIR_SEP, BATDIR, DIR_SEP, DIR_SEP);
-                       fd = fopen(path,"r");
-                       if (fd == 0)
-                               return 0;
-               }
-       }
-
-       if ((bbpversion = BBPheader(fd, &limit, &BBPoid, NULL, TRUE)) < 0) {
-               fclose(fd);
-               return 0;
-       }
-       bs = BBPreadEntries(fd, nme, &min_stamp, &max_stamp, 0, bbpversion);
-       fclose(fd);
-       if (bs == 0)
-               return 0;
-       bs->B.batCacheid = 0;
-
-       BBPinsert(bs);
_______________________________________________
Checkin-list mailing list
[email protected]
http://mail.monetdb.org/mailman/listinfo/checkin-list

Reply via email to