Changeset: cf4b781498de for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=cf4b781498de
Modified Files:
gdk/Makefile.ag
monetdb5/extras/compiler/mal_compiler.c
monetdb5/extras/crackers/crackers_core_unordered.mx
monetdb5/extras/crackers/crackers_crackmerge.mx
monetdb5/extras/crackers/crackers_joins.mx
monetdb5/extras/crackers/crackers_sideways.mx
monetdb5/extras/crackers/crackers_sortmerge.mx
monetdb5/extras/rdf/rdf_shredder.mx
monetdb5/mal/mal.h
monetdb5/mal/mal_authorize.h
monetdb5/mal/mal_box.h
monetdb5/mal/mal_client.h
monetdb5/mal/mal_debugger.c
monetdb5/mal/mal_debugger.h
monetdb5/mal/mal_instruction.c
monetdb5/mal/mal_interpreter.c
monetdb5/mal/mal_interpreter.h
monetdb5/mal/mal_listing.c
monetdb5/mal/mal_profiler.c
monetdb5/mal/mal_profiler.h
monetdb5/mal/mal_recycle.c
monetdb5/mal/mal_resolve.c
monetdb5/mal/mal_runtime.c
monetdb5/mal/mal_scenario.c
monetdb5/mal/mal_session.c
monetdb5/mal/mal_type.c
monetdb5/modules/atoms/colxml.c
monetdb5/modules/atoms/mtime.c
monetdb5/modules/atoms/str.c
monetdb5/modules/kernel/aggr_be_avg.mx
monetdb5/modules/kernel/aggr_be_count.mx
monetdb5/modules/kernel/aggr_be_minmax.mx
monetdb5/modules/kernel/aggr_be_prod.mx
monetdb5/modules/kernel/aggr_be_sum.mx
monetdb5/modules/kernel/aggr_bge_avg.mx
monetdb5/modules/kernel/aggr_bge_count.mx
monetdb5/modules/kernel/aggr_bge_minmax.mx
monetdb5/modules/kernel/aggr_bge_prod.mx
monetdb5/modules/kernel/aggr_bge_sum.mx
monetdb5/modules/kernel/algebra.mx
monetdb5/modules/kernel/array.mx
monetdb5/modules/kernel/calc.mx
monetdb5/modules/kernel/colcalc.mx
monetdb5/modules/kernel/colcast.mx
monetdb5/modules/kernel/colcolor.mx
monetdb5/modules/kernel/colifthen.mx
monetdb5/modules/kernel/colstr.mx
monetdb5/modules/kernel/column.mx
monetdb5/modules/kernel/group.mx
monetdb5/modules/mal/cbp.c
monetdb5/modules/mal/extensions.c
monetdb5/modules/mal/groupby.c
monetdb5/modules/mal/inout.c
monetdb5/modules/mal/inout.h
monetdb5/modules/mal/inspect.c
monetdb5/modules/mal/mat.c
monetdb5/modules/mal/mkey.c
monetdb5/modules/mal/pcrelib.c
monetdb5/modules/mal/pqueue.mx
monetdb5/modules/mal/remote.c
monetdb5/modules/mal/replication.c
monetdb5/modules/mal/tablet.c
monetdb5/modules/mal/tablet.h
monetdb5/modules/mal/tokenizer.c
monetdb5/optimizer/opt_dictionary.c
monetdb5/optimizer/opt_garbagecollector.c
monetdb5/optimizer/opt_mapreduce.c
monetdb5/optimizer/opt_statistics.c
monetdb5/optimizer/opt_support.c
monetdb5/optimizer/opt_tarantula.c
monetdb5/scheduler/run_octopus.c
Branch: headless
Log Message:
BBP->CBP stuff
diffs (truncated from 2613 to 300 lines):
diff --git a/gdk/Makefile.ag b/gdk/Makefile.ag
--- a/gdk/Makefile.ag
+++ b/gdk/Makefile.ag
@@ -43,7 +43,7 @@
# gdk_search.mx \
# gdk_setop.mx gdk_utils.c gdk_atoms.mx \
# gdk_relop.mx \
- gdk_tm.c gdk_align.mx gdk_bbp.c \
+ gdk_tm.c gdk_align.mx gdk_cbp.c \
gdk_heap.c \
gdk_qsort.c gdk_ssort.c gdk_storage.c gdk_col.c \
gdk_delta.c \
diff --git a/monetdb5/extras/compiler/mal_compiler.c
b/monetdb5/extras/compiler/mal_compiler.c
--- a/monetdb5/extras/compiler/mal_compiler.c
+++ b/monetdb5/extras/compiler/mal_compiler.c
@@ -215,7 +215,7 @@
if (val->vtype == TYPE_str) {
mnstr_printf(f, "\"%s\"", val->val.sval);
} else {
- tostr = BATatoms[val->vtype].atomToStr;
+ tostr = COLatoms[val->vtype].atomToStr;
(*tostr) (&buf, &sz, VALptr(val));
c = strchr(buf, '@');
if (c && *(c + 1) == '0')
diff --git a/monetdb5/extras/crackers/crackers_core_unordered.mx
b/monetdb5/extras/crackers/crackers_core_unordered.mx
--- a/monetdb5/extras/crackers/crackers_core_unordered.mx
+++ b/monetdb5/extras/crackers/crackers_core_unordered.mx
@@ -836,7 +836,7 @@
/* @1: the type; e.g., chr bte sht int oid wrd flt dbl lng str */
str MyBuf = NULL;
int MyBufLen = 0;
- (void)(*BATatoms[TYPE_@1].atomToStr) (&MyBuf, &MyBufLen, (ptr)(&@2));
+ (void)(*COLatoms[TYPE_@1].atomToStr) (&MyBuf, &MyBufLen, (ptr)(&@2));
printf("%s \n", MyBuf);
GDKfree(MyBuf);
}
diff --git a/monetdb5/extras/crackers/crackers_crackmerge.mx
b/monetdb5/extras/crackers/crackers_crackmerge.mx
--- a/monetdb5/extras/crackers/crackers_crackmerge.mx
+++ b/monetdb5/extras/crackers/crackers_crackmerge.mx
@@ -100,7 +100,7 @@
/* @1: the type; e.g., chr bte sht int oid wrd flt dbl lng str */
str MyBuf = NULL;
int MyBufLen = 0;
- (void)(*BATatoms[TYPE_@1].atomToStr) (&MyBuf, &MyBufLen, (ptr)(&@2));
+ (void)(*COLatoms[TYPE_@1].atomToStr) (&MyBuf, &MyBufLen, (ptr)(&@2));
printf("%s @3 \n", MyBuf);
GDKfree(MyBuf);
}
@@ -515,7 +515,7 @@
{
str MyBuf = NULL;
int MyBufLen = 0;
- (void)(*BATatoms[TYPE_@1].atomToStr) (&MyBuf, &MyBufLen, (ptr)(&@2));
+ (void)(*COLatoms[TYPE_@1].atomToStr) (&MyBuf, &MyBufLen, (ptr)(&@2));
printf("%s @3 \n", MyBuf);
GDKfree(MyBuf);
}
diff --git a/monetdb5/extras/crackers/crackers_joins.mx
b/monetdb5/extras/crackers/crackers_joins.mx
--- a/monetdb5/extras/crackers/crackers_joins.mx
+++ b/monetdb5/extras/crackers/crackers_joins.mx
@@ -289,8 +289,8 @@
int r_key = r->hkey;
BUN r_cur, r_lim;
int loc, var;
- BATiter li = col_iterator(l);
- BATiter ri = col_iterator(r);
+ COLiter li = col_iterator(l);
+ COLiter ri = col_iterator(r);
if (BATtordered(l) & 1) {
BUN i;
@@ -405,8 +405,8 @@
BUN p, q;
int any;
lng T1=GDKusec(), T2;
- BATiter li = col_iterator(l);
- BATiter ri = col_iterator(r);
+ COLiter li = col_iterator(l);
+ COLiter ri = col_iterator(r);
COLaccessBegin(r, USE_HEAD, MMAP_SEQUENTIAL);
if (COLprepareHash(r)){
@@ -1428,7 +1428,7 @@
/* @1: the type; e.g., chr bte sht int oid wrd flt dbl lng str */
str MyBuf = NULL;
int MyBufLen = 0;
- (void)(*BATatoms[TYPE_@1].atomToStr) (&MyBuf, &MyBufLen, (ptr)(&@2));
+ (void)(*COLatoms[TYPE_@1].atomToStr) (&MyBuf, &MyBufLen, (ptr)(&@2));
printf("%s @3 \n", MyBuf);
GDKfree(MyBuf);
}
diff --git a/monetdb5/extras/crackers/crackers_sideways.mx
b/monetdb5/extras/crackers/crackers_sideways.mx
--- a/monetdb5/extras/crackers/crackers_sideways.mx
+++ b/monetdb5/extras/crackers/crackers_sideways.mx
@@ -1562,7 +1562,7 @@
{
str MyBuf = NULL;
int MyBufLen = 0;
- (void)(*BATatoms[TYPE_@1].atomToStr) (&MyBuf, &MyBufLen, (ptr)(&@3));
+ (void)(*COLatoms[TYPE_@1].atomToStr) (&MyBuf, &MyBufLen, (ptr)(&@3));
printf("\n @2 %s \n", MyBuf);
GDKfree(MyBuf);
}
diff --git a/monetdb5/extras/crackers/crackers_sortmerge.mx
b/monetdb5/extras/crackers/crackers_sortmerge.mx
--- a/monetdb5/extras/crackers/crackers_sortmerge.mx
+++ b/monetdb5/extras/crackers/crackers_sortmerge.mx
@@ -781,7 +781,7 @@
{
str MyBuf = NULL;
int MyBufLen = 0;
- (void)(*BATatoms[TYPE_@1].atomToStr) (&MyBuf, &MyBufLen, (ptr)(&@2));
+ (void)(*COLatoms[TYPE_@1].atomToStr) (&MyBuf, &MyBufLen, (ptr)(&@2));
printf("%s @3 \n", MyBuf);
GDKfree(MyBuf);
}
diff --git a/monetdb5/extras/rdf/rdf_shredder.mx
b/monetdb5/extras/rdf/rdf_shredder.mx
--- a/monetdb5/extras/rdf/rdf_shredder.mx
+++ b/monetdb5/extras/rdf/rdf_shredder.mx
@@ -374,7 +374,7 @@
BAT *ctref= NULL;
#endif
#ifdef _TKNZR_H
- BATiter bi, mi;
+ COLiter bi, mi;
BUN p, d, r;
oid *bt;
diff --git a/monetdb5/mal/mal.h b/monetdb5/mal/mal.h
--- a/monetdb5/mal/mal.h
+++ b/monetdb5/mal/mal.h
@@ -57,7 +57,7 @@
*/
#define GRPthreads ( 1 | PARMASK)
#define GRPmemory (MEMMASK | ALLOCMASK )
-#define GRPproperties (CHECKMASK | PROPMASK | BATMASK )
+#define GRPproperties (CHECKMASK | PROPMASK | COLMASK )
#define GRPio (IOMASK | PERFMASK )
#define GRPtransactions ( TMMASK | DELTAMASK | TEMMASK)
#define GRPmodules (DLMASK | LOADMASK)
diff --git a/monetdb5/mal/mal_authorize.h b/monetdb5/mal/mal_authorize.h
--- a/monetdb5/mal/mal_authorize.h
+++ b/monetdb5/mal/mal_authorize.h
@@ -36,7 +36,7 @@
mal_export str AUTHremoveScenario(Client *c, str *username, str *scenario);
mal_export str AUTHresolveUser(str *ret, oid *uid);
mal_export str AUTHgetUsername(str *ret, Client *c);
-mal_export str AUTHgetUsers(BAT **ret, Client *c, bat *scenarios);
+mal_export str AUTHgetUsers(COL **ret, Client *c, bat *scenarios);
mal_export str AUTHgetPasswordHash(str *ret, Client *c, str *username);
mal_export str AUTHrequireAdmin(Client *c);
@@ -51,11 +51,11 @@
/*
* Authorisation is based on a password. The passwords are stored hashed
- * in a BAT. Access to this BAT is ok from the MAL level, and in
+ * in a COL. Access to this COL is ok from the MAL level, and in
* particular SQL needs it to dump (and later restore) users.
- * The database administrator can unlock the BAT that stores the password
+ * The database administrator can unlock the COL that stores the password
* (the vault) by supplying the master password which is the key for the
- * cypher algorithm used to store the data. The BAT will never
+ * cypher algorithm used to store the data. The COL will never
* contain the plain hashes, as they will be decyphered on the fly when
* needed. A locked vault means noone can log into the system, hence, the
* vault needs to be unlocked as part of the server startup ritual.
diff --git a/monetdb5/mal/mal_box.h b/monetdb5/mal/mal_box.h
--- a/monetdb5/mal/mal_box.h
+++ b/monetdb5/mal/mal_box.h
@@ -42,7 +42,6 @@
mal_export int depositBox(Box box, str name, int type, ValPtr val);
mal_export void insertToBox(Box box, str name, str val);
mal_export int takeBox(Box box, str name, ValPtr val, int tpe);
-mal_export int bindBAT(Box box, str name, str location);
mal_export int releaseBox(Box box, str name);
mal_export int discardBox(Box box, str name);
mal_export str getBoxName(Box box, lng i);
diff --git a/monetdb5/mal/mal_client.h b/monetdb5/mal/mal_client.h
--- a/monetdb5/mal/mal_client.h
+++ b/monetdb5/mal/mal_client.h
@@ -96,7 +96,7 @@
lng timer; /* trace time in usec */
lng bigfoot; /* maximum virtual memory use */
lng vmfoot; /* virtual memory use */
- lng memory; /* memory claimed for keeping BATs */
+ lng memory; /* memory claimed for keeping columns */
BUN cnt; /* bat count */
#define timerFlag 1
diff --git a/monetdb5/mal/mal_debugger.c b/monetdb5/mal/mal_debugger.c
--- a/monetdb5/mal/mal_debugger.c
+++ b/monetdb5/mal/mal_debugger.c
@@ -743,8 +743,8 @@
}
static void
-printBATproperties(stream *f, COL *b){
- mnstr_printf(f, " count=" BUNFMT " lrefs=%d ", COLcount(b),
CBP_lrefs((b->batCacheid));
+printCOLproperties(stream *f, COL *b){
+ mnstr_printf(f, " count=" BUNFMT " lrefs=%d ", COLcount(b),
CBP_lrefs(b->batCacheid));
if( CBP_refs(b->batCacheid) - 1)
mnstr_printf(f, " refs=%d ", CBP_refs(b->batCacheid) );
if( b->sharecnt)
@@ -1111,7 +1111,7 @@
}
case 'b':
if (strncmp(b, "bbp",3) == 0) {
- int i,limit, inuse = 0;
+ int i,limit;
skipWord(cntxt, b);
/* bbp change tracing enabling */
@@ -1135,15 +1135,14 @@
/* watchout, you don't want to wait for locks
by others */
mnstr_printf(out,"CBP contains %d
entries\n",limit);
for (; i < limit; i++)
- if ( ( CBP[i].lrefs || CBP[i].refs) &&
CBP[i].b[0]){
+ if ( ( CBP[i].lrefs || CBP[i].refs) &&
CBP[i].b ){
mnstr_printf(out,"#[%d]
%-15s",i,CBP[i].nme[0]);
- if ( CBP[i].b[0])
-
printBATproperties(out,CBP[i].b[0]);
+ if ( CBP[i].b)
+ printCOLproperties(out,
CBP[i].b);
if( (*b=='d' && CBP_refs(i)==0)
|| CBP_cache(i) == 0){
mnstr_printf(out,"\n");
continue;
}
- inuse++;
if (COLdirty(CBP_cache(i)) )
mnstr_printf(out, "
dirty");
if( *CBP_logical(i) =='.')
@@ -1152,11 +1151,11 @@
mnstr_printf(out, "
loaded ");
if( CBPstatus(i) & CBPSWAPPED)
mnstr_printf(out, "
swapped ");
- if( CBPstatus(i) & CBP)
+ if( CBPstatus(i) & CBPTMP)
mnstr_printf(out, " tmp
");
if( CBPstatus(i) & CBPDELETED)
mnstr_printf(out, "
deleted ");
- if( CBPstatus(i) & CBPEXSIING)
+ if( CBPstatus(i) & CBPEXISTING)
mnstr_printf(out, "
existing ");
if( CBPstatus(i) & CBPNEW)
mnstr_printf(out, " new
");
@@ -1164,7 +1163,6 @@
mnstr_printf(out, "
persistent ");
mnstr_printf(out, "\n");
}
- mnstr_printf(out,"Entries displayed
%d\n",inuse);
continue;
}
if (strncmp(b, "breakpoints",11) == 0) {
@@ -1732,7 +1730,7 @@
if (b) {
tpe = getTypeName(newColType(COLtype(b)));
mnstr_printf(f, ":%s ",tpe);
- printBATproperties(f,b);
+ printCOLproperties(f,b);
/* perform property checking */
COLpropcheck(b,COLPROPS_QUICK);
mnstr_printf(f,"\n");
@@ -1746,7 +1744,7 @@
if (bs == NULL)
mnstr_printf(f, "Failed to take chunk\n");
else {
- COLmultiprintf(f, 2, &bs, TRUE, 0, TRUE);
+ COLmultiprintf(f, 2, &bs);
CBPunfix(bs->batCacheid);
}
}
@@ -1826,6 +1824,7 @@
if (b == NULL) {
mnstr_printf(f, "Could not access descriptor\n");
return;
+ }
if (cnt <= COLcount(b))
mnstr_printf(f, "Sample " BUNFMT " out of " BUNFMT
"\n", cnt, COLcount(b));
@@ -1836,11 +1835,10 @@
if (bs == NULL)
mnstr_printf(f, "Failed to take chunk\n");
else
- COLmultiprintf(f, 2, &bs, TRUE, 0, TRUE);
+ COLmultiprintf(f, 2, &bs);
CBPunfix(bs->batCacheid);
-
CBPunfix(b->batCacheid);
- }
+ }
}
void
@@ -1857,7 +1855,7 @@
b = COLdescriptor(ret);
if (b == NULL)
return;
- COLmultiprintf(f, 2, &b, TRUE, 0, TRUE);
+ COLmultiprintf(f, 2, &b);
CBPunfix(b->batCacheid);
_______________________________________________
Checkin-list mailing list
[email protected]
http://mail.monetdb.org/mailman/listinfo/checkin-list