Changeset: 9d373db2375f for MonetDB URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=9d373db2375f 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/extras/jaql/jaqlgencode.c monetdb5/modules/mal/Makefile.ag monetdb5/modules/mal/Tests/All monetdb5/modules/mal/mal_init.mal sql/backends/monet5/sql_optimizer.c Branch: default Log Message:
Merged from Oct2012 diffs (truncated from 1197 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 @@ -200,7 +200,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); @@ -880,9 +879,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 @@ -779,8 +779,8 @@ vheapinit(COLrec *col, const char *buf, return n; } -static BATstore * -BBPreadEntries(FILE *fp, char *src, int *min_stamp, int *max_stamp, int oidsize, int bbpversion) +static void +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) { @@ -910,62 +905,37 @@ BBPreadEntries(FILE *fp, char *src, int BBP_refs(bid) = 0; BBP_lrefs(bid) = 1; /* any BAT we encounter here is persistent, so has a logical reference */ } - return NULL; } static int -BBPheader(FILE *fp, bat *limit, oid *BBPoid, int *OIDsize, int silent) +BBPheader(FILE *fp, oid *BBPoid, int *OIDsize) { char buf[BUFSIZ]; int sz, bbpversion, ptrsize, oidsize; char *s; if (fgets(buf, sizeof(buf), fp) == NULL) { - if (silent) { - GDKerror("BBPinit: BBP.dir is empty"); - return -1; - } GDKfatal("BBPinit: BBP.dir is empty"); } if (sscanf(buf, "BBP.dir, GDKversion %d\n", &bbpversion) != 1) { GDKerror("BBPinit: old BBP without version number"); GDKerror("dump the database using a compatible version,"); GDKerror("then restore into new database using this version.\n"); - if (silent) - return -1; exit(1); } if (bbpversion != GDKLIBRARY && bbpversion != GDKLIBRARY_SORTED_BYTE && bbpversion != GDKLIBRARY_CHR && bbpversion != GDKLIBRARY_PRE_VARWIDTH) { - if (silent) { - GDKerror("BBPinit: incompatible BBP version: expected 0%o, got 0%o.", GDKLIBRARY, bbpversion); - return -1; - } GDKfatal("BBPinit: incompatible BBP version: expected 0%o, got 0%o.", GDKLIBRARY, bbpversion); } if (fgets(buf, sizeof(buf), fp) == NULL) { - if (silent) { - GDKerror("BBPinit: short BBP"); - return -1; - } GDKfatal("BBPinit: short BBP"); } if (sscanf(buf, "%d %d", &ptrsize, &oidsize) != 2) { - if (silent) { - GDKerror("BBPinit: BBP.dir has incompatible format: pointer and OID sizes are missing"); - return -1; - } GDKfatal("BBPinit: BBP.dir has incompatible format: pointer and OID sizes are missing"); } if (ptrsize != SIZEOF_SIZE_T || oidsize != SIZEOF_OID) { - if (silent) { - GDKerror("BBPinit: database created with incompatible server:\n" - "expected pointer size %d, got %d, expected OID size %d, got %d.", - (int) SIZEOF_SIZE_T, ptrsize, (int) SIZEOF_OID, oidsize); - return -1; - } #if SIZEOF_SIZE_T == 8 && SIZEOF_OID == 8 if (ptrsize != SIZEOF_SIZE_T || oidsize != SIZEOF_INT) #endif @@ -976,198 +946,18 @@ BBPheader(FILE *fp, bat *limit, oid *BBP if (OIDsize) *OIDsize = oidsize; if (fgets(buf, sizeof(buf), fp) == NULL) { - if (silent) { - GDKerror("BBPinit: short BBP"); - return -1; - } GDKfatal("BBPinit: short BBP"); } *BBPoid = OIDread(buf); if ((s = strstr(buf, "BBPsize")) != NULL) { sscanf(s, "BBPsize=%d", &sz); sz = (int) (sz * BATMARGIN); - if (sz > *limit) - *limit = sz; + if (sz > BBPsize) + BBPsize = sz; } 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); _______________________________________________ checkin-list mailing list checkin-list@monetdb.org http://mail.monetdb.org/mailman/listinfo/checkin-list