Changeset: c68387a3a584 for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=c68387a3a584
Modified Files:
monetdb5/modules/mal/attach.c
monetdb5/modules/mal/cbp.c
monetdb5/modules/mal/extensions.c
Branch: headless
Log Message:
Adjustments to COL definitions
diffs (77 lines):
diff --git a/monetdb5/modules/mal/attach.c b/monetdb5/modules/mal/attach.c
--- a/monetdb5/modules/mal/attach.c
+++ b/monetdb5/modules/mal/attach.c
@@ -52,7 +52,7 @@
(void) cntxt;
(void) mb;
- CBPimportEntry(fnme);
+ *ret = CBPimportEntry(fnme);
return MAL_SUCCEED;
#endif
}
@@ -74,11 +74,10 @@
if ((b = COLdescriptor(bid)) == NULL)
throw(MAL, "attach.bind", INTERNAL_COL_ACCESS);
- view = VIEWcreate_(b, b, TRUE);
+ view = VIEWcreate_(b, TRUE);
VIEWbounds(b, view, (oid) low, hgh );
- COLseqbase(view, low);
*ret = CBPkeepref(view);
- CBPunfix(b->batCacheid);
+ CBPreleaseref(b);
}
return msg;
}
@@ -92,7 +91,7 @@
throw(MAL,"attach.location",RUNTIME_OBJECT_UNDEFINED);
snprintf(path,BUFSIZ,"%s%c%s%c",GDKgetenv("gdk_dbfarm"),DIR_SEP,
GDKgetenv("gdk_dbname"), DIR_SEP);
- GDKfilepath(path+strlen(path), BATDIR, ( b->T->heap.filename ?
b->T->heap.filename: b->H->heap.filename), 0);
+ GDKfilepath(path+strlen(path), COLDIR, b->heap.filename, 0);
s= strrchr(path,'.');
if( s) *s = 0;
*fnme = GDKstrdup(path);
diff --git a/monetdb5/modules/mal/cbp.c b/monetdb5/modules/mal/cbp.c
--- a/monetdb5/modules/mal/cbp.c
+++ b/monetdb5/modules/mal/cbp.c
@@ -40,7 +40,7 @@
if (h == 0 || h->filename == 0 || h->storage != STORE_MMAP)
return;
/* reduce disk footprint */
- snprintf(buf, PATHLENGTH, "%s/%s.%s", BATDIR, fnme,
(strrchr(h->filename,'.')? strrchr(h->filename,'.')+1:""));
+ snprintf(buf, PATHLENGTH, "%s/%s.%s", COLDIR, fnme,
(strrchr(h->filename,'.')? strrchr(h->filename,'.')+1:""));
if ((f = fopen(buf, "w")) == NULL) {
IODEBUG mnstr_printf(GDKstdout, "#failed to truncate: %s\n",
strerror(errno));
} else
@@ -59,7 +59,7 @@
if ( h && h->filename && h->base && h->storage == STORE_MMAP){
snprintf(buf2,PATHLENGTH,"%s.%s",fnme,(strrchr(h->filename,'.')?
strrchr(h->filename,'.')+1:""));
- GDKfilepath(buf, BATDIR, buf2, "gz");
+ GDKfilepath(buf, COLDIR, buf2, "gz");
fp = open_gzwstream(buf);
if ( fp ) {
if ( (ssize_t) h->size !=
mnstr_write(fp,(void*)h->base,1,h->size) ){
@@ -92,7 +92,7 @@
return -9;
snprintf(buf2,PATHLENGTH,"%s.%s",fnme,(strrchr(h->filename,'.')?
strrchr(h->filename,'.')+1:""));
- GDKfilepath(buf, BATDIR, buf2, "gz");
+ GDKfilepath(buf, COLDIR, buf2, "gz");
fp = open_gzrstream(buf);
if ( fp && !mnstr_errnr(fp)){
if ( HEAPextend(hn,h->size) < 0)
diff --git a/monetdb5/modules/mal/extensions.c
b/monetdb5/modules/mal/extensions.c
--- a/monetdb5/modules/mal/extensions.c
+++ b/monetdb5/modules/mal/extensions.c
@@ -57,7 +57,7 @@
cap = (BUN) lcap;
}
- if (ht == TYPE_any || tt == TYPE_any)
+ if (ht == TYPE_any )
throw(MAL, "col.new", SEMANTIC_TYPE_ERROR);
return (str) BKCnewCOL(res, &ht, &cap);
}
_______________________________________________
Checkin-list mailing list
[email protected]
http://mail.monetdb.org/mailman/listinfo/checkin-list