Changeset: 98b535c0e727 for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=98b535c0e727
Modified Files:
MonetDB/src/gdk/gdk_bbp.mx
Branch: default
Log Message:
Merge with Oct2010 branch.
diffs (57 lines):
diff -r 4c3d36c2a7f5 -r 98b535c0e727 MonetDB/src/gdk/gdk_bbp.mx
--- a/MonetDB/src/gdk/gdk_bbp.mx Wed Oct 13 17:44:26 2010 +0200
+++ b/MonetDB/src/gdk/gdk_bbp.mx Wed Oct 13 18:00:34 2010 +0200
@@ -2107,6 +2107,12 @@
b = getBBPdescriptor(hp, lock);
bs->B.H->heap.base = b->H->heap.base + (size_t)
bs->B.H->heap.base;
}
+ /* if we shared the hash before, share it again
+ note that if the parent's hash is
+ destroyed, we also don't have a hash
+ anymore */
+ if (bs->B.H->hash == (Hash *) -1)
+ bs->B.H->hash = b->H->hash;
}
if (tp) {
incref(tp, 0, lock);
@@ -2115,6 +2121,12 @@
b = getBBPdescriptor(tp, lock);
bs->B.T->heap.base = b->H->heap.base + (size_t)
bs->B.T->heap.base;
}
+ /* if we shared the hash before, share it again
+ note that if the parent's hash is
+ destroyed, we also don't have a hash
+ anymore */
+ if (bs->B.T->hash == (Hash *) -1)
+ bs->B.T->hash = b->H->hash;
}
if (hvp)
incref(hvp, 0, lock);
@@ -2205,6 +2217,15 @@
b->H != b->T &&
!b->P->lview)
b->T->heap.base = (char *)
(b->T->heap.base - BBP_cache(tp)->H->heap.base);
+ /* if a view shared the hash with its
+ parent, indicate this, but only if
+ view isn't getting destroyed */
+ if (hp && b->H->hash &&
+ b->H->hash == BBP_cache(hp)->H->hash)
+ b->H->hash = (Hash *) -1;
+ if (tp && b->T->hash &&
+ b->T->hash == BBP_cache(tp)->H->hash)
+ b->T->hash = (Hash *) -1;
hvp = VIEWvhparent(b);
tvp = VIEWvtparent(b);
}
diff -r 4c3d36c2a7f5 -r 98b535c0e727 MonetDB/src/gdk/gdk_search.mx
--- a/MonetDB/src/gdk/gdk_search.mx Wed Oct 13 17:44:26 2010 +0200
+++ b/MonetDB/src/gdk/gdk_search.mx Wed Oct 13 18:00:34 2010 +0200
@@ -624,7 +624,7 @@
if (p)
hp = BBP_cache(p);
- if (!hp || b->H->hash != hp->H->hash) {
+ if ((!hp || b->H->hash != hp->H->hash) && b->H->hash != (Hash
*) -1) {
HEAPfree(b->H->hash->heap);
if (b->H->hash->heap->storage != STORE_MEM)
HEAPdelete(b->H->hash->heap,
BBP_physical(b->batCacheid), (b->batCacheid > 0) ? "hhash" : "thash");
_______________________________________________
Checkin-list mailing list
[email protected]
http://mail.monetdb.org/mailman/listinfo/checkin-list