Changeset: dc01defd94e4 for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=dc01defd94e4
Modified Files:
gdk/gdk.h
gdk/gdk_align.c
gdk/gdk_batop.c
gdk/gdk_cbp.c
gdk/gdk_cbp.h
gdk/gdk_col.c
gdk/gdk_delta.c
gdk/gdk_inspect.c
gdk/gdk_logger.c
gdk/gdk_search.c
gdk/gdk_storage.c
geom/monetdb5/geom.mx
monetdb5/extras/crackers/crackers_AVL_index.mx
monetdb5/extras/crackers/crackers_core_ordered.mx
monetdb5/extras/crackers/crackers_core_unordered.mx
monetdb5/extras/crackers/crackers_crackmerge.mx
monetdb5/extras/crackers/crackers_index.mx
monetdb5/extras/crackers/crackers_joins.mx
monetdb5/extras/crackers/crackers_joinselect_ops.mx
monetdb5/extras/crackers/crackers_partial_sideways.mx
monetdb5/extras/crackers/crackers_select_ops.mx
monetdb5/extras/crackers/crackers_sideways.mx
monetdb5/extras/crackers/crackers_sortmerge.mx
monetdb5/extras/crackers/crackers_updates.mx
monetdb5/extras/crackers/crackers_validation.mx
monetdb5/extras/rdf/rdf_shredder.mx
monetdb5/extras/sphinx/sphinx.c
monetdb5/mal/mal_authorize.c
monetdb5/mal/mal_box.c
monetdb5/mal/mal_dataflow.c
monetdb5/mal/mal_debugger.c
monetdb5/mal/mal_interpreter.c
monetdb5/mal/mal_profiler.c
monetdb5/mal/mal_recycle.c
monetdb5/modules/atoms/str.c
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/aggr_ri.mx
monetdb5/modules/kernel/algebra.c.mx
monetdb5/modules/kernel/group.mx
monetdb5/modules/kernel/kprelude.mx
monetdb5/modules/kernel/microbenchmark.c
monetdb5/modules/mal/cbp.c
monetdb5/modules/mal/inout.c
monetdb5/modules/mal/mat.c
monetdb5/modules/mal/mkey.c
monetdb5/modules/mal/pcrelib.c
monetdb5/modules/mal/profiler.c
monetdb5/modules/mal/remote.c
monetdb5/modules/mal/replication.c
monetdb5/modules/mal/tablet.c
monetdb5/modules/mal/tokenizer.c
monetdb5/optimizer/opt_dictionary.c
monetdb5/optimizer/opt_joinpath.c
monetdb5/optimizer/opt_statistics.c
sql/backends/monet5/sql.mx
sql/backends/monet5/sql_bpm.c
sql/backends/monet5/sql_emptyset.c
sql/backends/monet5/sql_optimizer.c
sql/backends/monet5/sql_result.mx
sql/backends/monet5/sql_user.c
sql/backends/monet5/vaults/fits.c
sql/backends/monet5/vaults/mseed.c
sql/storage/bat/bat_logger.c
sql/storage/bat/bat_storage.c
sql/storage/bat/bat_table.c
sql/storage/bat/bat_utils.c
sql/storage/bat/res_table.c
sql/storage/restrict/restrict_storage.c
sql/storage/restrict/restrict_table.c
Branch: headless
Log Message:
Globally change batCacheid to cacheid.
diffs (truncated from 7113 to 300 lines):
diff --git a/gdk/gdk.h b/gdk/gdk.h
--- a/gdk/gdk.h
+++ b/gdk/gdk.h
@@ -757,7 +757,7 @@
* @verbatim
* typedef struct {
* // static COL properties
- * bat batCacheid; // bat id: index in CBPcache
+ * bat cacheid; // bat id: index in CBPcache
* int batPersistence; // persistence mode
* bit batCopiedtodisk; // COL is saved on disk?
* bit batSet; // all tuples in the COL are unique?
@@ -778,7 +778,7 @@
* bit hsorted; // are head values currently ordered?
* bit hvarsized; // for speed: head type is varsized?
* bit hnonil; // head has no nils
- * oid halign; // alignment OID for head.
+ * oid halign; // alignment OID for head.
* // Head storage
* int hloc; // byte-offset in oid for head elements
* Heap *hheap; // heap for varsized head values
@@ -832,7 +832,7 @@
typedef struct {
/* static bat properties */
- bat batCacheid; /* index into CBP */
+ bat cacheid; /* index into CBP */
/* dynamic column properties */
str id; /* label for head/tail column */
@@ -1936,14 +1936,14 @@
/* macros that nicely check parameters */
#define CBPdirty(x) (CBP_dirty=(x))
-#define CBPcacheid(b) ((b)->batCacheid)
+#define CBPcacheid(b) ((b)->cacheid)
#define CBPstatus(i) (CBPcheck((i),"CBPstatus")?CBP_status(i):-1)
#define CBPcurstamp() CBP_curstamp
#define CBPrefs(i) (CBPcheck((i),"CBPrefs")?CBP_refs(i):-1)
#define CBPcache(i) (CBPcheck((i),"CBPcache")?CBP_cache(i):(COL*) NULL)
#define CBPname(i) (CBPcheck((i),"CBPname")?((i) > 0 ||
CBP_logical(i))?CBP_logical(i):CBP_logical(-(i)):"")
#define CBPvalid(i) (CBP_logical(i) != NULL && *CBP_logical(i) != '.')
-#define COLgetId(b) CBPname((b)->batCacheid)
+#define COLgetId(b) CBPname((b)->cacheid)
#define CBPfix(i) CBPincref((i), FALSE)
#define CBPunfix(i) CBPdecref((i), FALSE)
@@ -2848,10 +2848,10 @@
#define isVIEW(x) \
(!(x)->lview && \
((x)->heap.parentid || \
- ((x)->vheap && (x)->vheap->parentid != (x->batCacheid))))
+ ((x)->vheap && (x)->vheap->parentid != (x->cacheid))))
#define VIEWparent(x) ((x)->lview?0:(x)->heap.parentid)
-#define VIEWvparent(x)
(((x)->lview||(x)->vheap==NULL||(x)->vheap->parentid==(x->batCacheid))?0:(x)->vheap->parentid)
+#define VIEWvparent(x)
(((x)->lview||(x)->vheap==NULL||(x)->vheap->parentid==(x->cacheid))?0:(x)->vheap->parentid)
/* VIEWparentcol(b) tells whether the head column was inherited from the parent
* "as is". We must check whether the type was not overridden in the view.
diff --git a/gdk/gdk_align.c b/gdk/gdk_align.c
--- a/gdk/gdk_align.c
+++ b/gdk/gdk_align.c
@@ -170,7 +170,7 @@
return (b1->seqbase == b2->seqbase);
/* then try that they are */
- if (b1->batCacheid == b2->batCacheid)
+ if (b1->cacheid == b2->cacheid)
return 1; /* same bat. trivial case */
if (b1->count == 0)
return 1; /* empty bats of same type. trivial case */
@@ -222,7 +222,7 @@
if (h->type == TYPE_void)
hp = 0;
if ((hp == 0 && h->type != TYPE_void) || h->heap.copied)
- hp = h->batCacheid;
+ hp = h->cacheid;
if (hp)
CBPshare(hp);
bn->width = h->width;
@@ -305,7 +305,7 @@
p = COLfirst(b);
q = COLlast(b);
assert(cnt >= q - p);
- ALGODEBUG THRprintf(GDKout, "#COLmaterialize(%d);\n", (int)
b->batCacheid);
+ ALGODEBUG THRprintf(GDKout, "#COLmaterialize(%d);\n", (int) b->cacheid);
if (!COLdense(b) || b->type != TYPE_void) {
/* no voids */
@@ -374,7 +374,7 @@
/* unlink heaps shared with parent */
assert(b->vheap == NULL || b->vheap->parentid > 0);
- if (b->vheap && b->vheap->parentid != b->batCacheid)
+ if (b->vheap && b->vheap->parentid != b->cacheid)
b->vheap = NULL;
/* unlink properties shared with parent */
@@ -412,15 +412,15 @@
memset(&tail, 0, sizeof(Heap));
memset(&th, 0, sizeof(Heap));
- n = COLdescriptor(b->batCacheid); /* normalized */
+ n = COLdescriptor(b->cacheid); /* normalized */
if (n == NULL)
goto bailout;
- bs = CBP_desc(n->batCacheid);
+ bs = CBP_desc(n->cacheid);
cnt = n->count + 1;
- nme = CBP_physical(n->batCacheid);
+ nme = CBP_physical(n->cacheid);
nmelen = nme ? strlen(nme) : 0;
- assert(n->batCacheid > 0);
+ assert(n->cacheid > 0);
assert(tp || !b->type);
if (n->type) {
@@ -477,7 +477,7 @@
if (n->vheap == NULL)
goto bailout;
*n->vheap = th;
- n->vheap->parentid = n->batCacheid;
+ n->vheap->parentid = n->cacheid;
}
n->sharecnt = 0;
@@ -495,14 +495,14 @@
/* insert all of v in n, and quit */
COLins(n, v, FALSE);
CBPreclaim(v);
- CBPunfix(n->batCacheid);
+ CBPunfix(n->cacheid);
}
return b;
bailout:
if (v != NULL)
CBPreclaim(v);
if (n != NULL)
- CBPunfix(n->batCacheid);
+ CBPunfix(n->cacheid);
HEAPfree(&tail);
HEAPfree(&th);
return NULL;
diff --git a/gdk/gdk_batop.c b/gdk/gdk_batop.c
--- a/gdk/gdk_batop.c
+++ b/gdk/gdk_batop.c
@@ -1657,7 +1657,7 @@
return NULL;
if (tpe == TYPE_bat)
- v = &((COL *) v)->batCacheid;
+ v = &((COL *) v)->cacheid;
bn->nonil = (ATOMcmp(tpe, v, ATOMnilptr(tpe)) != 0);
diff --git a/gdk/gdk_cbp.c b/gdk/gdk_cbp.c
--- a/gdk/gdk_cbp.c
+++ b/gdk/gdk_cbp.c
@@ -460,7 +460,7 @@
bs = GDKzalloc(sizeof(COL));
if (bs == NULL)
GDKfatal("CBPinit: cannot allocate memory for COL.");
- bs->batCacheid = bid;
+ bs->cacheid = bid;
COLcol_name(bs, NULL);
bs->persistence = PERSISTENT;
bs->copiedtodisk = 1;
@@ -727,12 +727,12 @@
fclose(fd);
if (bs == 0)
return 0;
- bs->batCacheid = 0;
+ bs->cacheid = 0;
CBPinsert(bs);
CBPcacheit(bs, 0);
- CBP_refs(bs->batCacheid)++;
- CBP_lrefs(bs->batCacheid)++;
+ CBP_refs(bs->cacheid)++;
+ CBP_lrefs(bs->cacheid)++;
/* re-adjust the files to become symbolic links */
snprintf(bufhead, BUFSIZ, "%s%c%s%c%s.tail", bbpdir, DIR_SEP, COLDIR,
DIR_SEP, nme);
@@ -743,7 +743,7 @@
if (bs->type != TYPE_void) {
lstat(bufhead, &st);
- GDKfilepath(path, COLDIR, CBP_physical(bs->batCacheid), "tail");
+ GDKfilepath(path, COLDIR, CBP_physical(bs->cacheid), "tail");
GDKcreatedir(path);
IODEBUG mnstr_printf(GDKerr, "#symlink %s ->%s\n", bufhead,
path);
if (symlink(bufhead, path) < 0) {
@@ -757,10 +757,10 @@
GDKfree(bs->heap.filename);
bs->heap.filename = 0;
}
- HEAPload(&bs->heap, CBP_physical(bs->batCacheid), "tail", TRUE);
+ HEAPload(&bs->heap, CBP_physical(bs->cacheid), "tail", TRUE);
if (bs->varsized) {
lstat(bufhheap, &st);
- GDKfilepath(path, COLDIR, CBP_physical(bs->batCacheid),
"theap");
+ GDKfilepath(path, COLDIR, CBP_physical(bs->cacheid),
"theap");
GDKcreatedir(path);
IODEBUG mnstr_printf(GDKerr, "#symlink %s ->%s\n",
bufhheap, path);
if (symlink(bufhheap, path) < 0) {
@@ -770,14 +770,14 @@
}
if (bs->vheap == 0)
bs->vheap = (Heap *) GDKzalloc(sizeof(Heap));
- bs->vheap->parentid = bs->batCacheid;
+ bs->vheap->parentid = bs->cacheid;
bs->vheap->free = bs->vheap->size = (size_t) st.st_size;
bs->vheap->storage = (bs->vheap->size <
REMAP_PAGE_MAXSIZE) ? STORE_MEM : STORE_MMAP;
if (bs->vheap->filename) {
GDKfree(bs->vheap->filename);
bs->vheap->filename = 0;
}
- HEAPload(bs->vheap, CBP_physical(bs->batCacheid),
"theap", TRUE);
+ HEAPload(bs->vheap, CBP_physical(bs->cacheid), "theap",
TRUE);
}
}
COLsetaccess(bs, COL_READ);
@@ -785,7 +785,7 @@
COLpropcheck(bs, COLPROPS_QUICK);
}
- return bs->batCacheid;
+ return bs->cacheid;
#endif
}
@@ -972,7 +972,7 @@
assert(i > 0);
assert(i < CBPsize);
assert(CBP[i].cache);
- assert(CBP[i].cache->batCacheid == i);
+ assert(CBP[i].cache->cacheid == i);
if (mnstr_printf(s, SSZFMT " %d %s %s %d %u " OIDFMT " " OIDFMT " "
OIDFMT " " OIDFMT " " OIDFMT " %u %u", /* COL info */
(ssize_t) i,
@@ -1421,7 +1421,7 @@
if (++CBP_curstamp < 0)
CBP_curstamp = 0;
- bs->batCacheid = i;
+ bs->cacheid = i;
bs->stamp = CBP_curstamp;
bs->tid = MT_getpid();
@@ -1457,7 +1457,7 @@
void
CBPcacheit(COL *bs, int lock)
{
- bat i = bs->batCacheid;
+ bat i = bs->cacheid;
int mode;
if (lock)
@@ -1470,7 +1470,7 @@
if (bs->vheap)
bs->vheap->parentid = i;
}
- assert(bs->batCacheid > 0);
+ assert(bs->cacheid > 0);
if (lock)
gdk_set_lock(GDKswapLock(i), "CBPcacheit");
@@ -1578,12 +1578,12 @@
* also be assigned a name, that also has to be globally unique. The batId is
* the same as the logical COL name.
*
- * The default logical name of a COL is tmp_X, where X is the batCacheid.
+ * The default logical name of a COL is tmp_X, where X is the cacheid.
* Apart from being globally unique, new logical bat names cannot be of the
- * form tmp_X, unless X is the batCacheid.
+ * form tmp_X, unless X is the cacheid.
*
* Physical names consist of a directory name followed by a logical name
suffix.
- * The directory name is derived from the batCacheid, and is currently
organized
+ * The directory name is derived from the cacheid, and is currently organized
* in a hierarchy that puts max 64 bats in each directory (see CBPgetsubdir).
*
* Concerning the physical suffix: it is almost always bat_X. This saves us
@@ -1913,7 +1913,7 @@
int
CBPkeepref(COL *b)
{
- int i = b->batCacheid;
+ int i = b->cacheid;
if (i == bat_nil)
return 0;
assert(i > 0);
@@ -1931,7 +1931,7 @@
CBPreleaselref(COL *b)
{
int lock = locked_by ? MT_getpid() != locked_by : 1;
- int i = b->batCacheid;
+ int i = b->cacheid;
_______________________________________________
Checkin-list mailing list
[email protected]
http://mail.monetdb.org/mailman/listinfo/checkin-list