Changeset: aff5dad33aa4 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=aff5dad33aa4
Modified Files:
gdk/gdk_hash.c
gdk/gdk_join.c
sql/backends/monet5/UDF/capi/capi.c
Branch: default
Log Message:
Merge with Mar2018 branch.
diffs (92 lines):
diff --git a/gdk/gdk_hash.c b/gdk/gdk_hash.c
--- a/gdk/gdk_hash.c
+++ b/gdk/gdk_hash.c
@@ -570,7 +570,7 @@ BAThash(BAT *b)
return GDK_FAIL;
}
#ifdef PERSISTENTHASH
- if (BBP_status(b->batCacheid) & BBPEXISTING) {
+ if (BBP_status(b->batCacheid) & BBPEXISTING && !b->theap.dirty)
{
MT_Id tid;
BBPfix(b->batCacheid);
if (MT_create_thread(&tid, BAThashsync, b,
diff --git a/gdk/gdk_join.c b/gdk/gdk_join.c
--- a/gdk/gdk_join.c
+++ b/gdk/gdk_join.c
@@ -3894,7 +3894,9 @@ BATjoin(BAT **r1p, BAT **r2p, BAT *l, BA
}
if (sl == NULL) {
lhash = BATcheckhash(l);
- if (!lhash && (parent = VIEWtparent(l)) != 0) {
+ if (lhash) {
+ lslots = ((size_t *) l->thash->heap.base)[5];
+ } else if ((parent = VIEWtparent(l)) != 0) {
BAT *b = BBPdescriptor(parent);
/* use hash on parent if the average chain
* length times the number of required probes
@@ -3913,7 +3915,9 @@ BATjoin(BAT **r1p, BAT **r2p, BAT *l, BA
}
if (sr == NULL) {
rhash = BATcheckhash(r);
- if (!rhash && (parent = VIEWtparent(r)) != 0) {
+ if (rhash) {
+ rslots = ((size_t *) r->thash->heap.base)[5];
+ } else if ((parent = VIEWtparent(r)) != 0) {
BAT *b = BBPdescriptor(parent);
/* use hash on parent if the average chain
* length times the number of required probes
diff --git a/sql/backends/monet5/UDF/capi/capi.c
b/sql/backends/monet5/UDF/capi/capi.c
--- a/sql/backends/monet5/UDF/capi/capi.c
+++ b/sql/backends/monet5/UDF/capi/capi.c
@@ -1582,29 +1582,29 @@ wrapup:
if (inputs[i]) {
if (isaBatType(getArgType(mb, pci, i))) {
bat_type = getBatType(getArgType(mb,
pci, i));
- if (bat_type == TYPE_str || bat_type ==
TYPE_date ||
- bat_type == TYPE_daytime ||
- bat_type == TYPE_timestamp ||
bat_type == TYPE_blob ||
- bat_type == TYPE_sqlblob) {
- // have to free input data
- void *data =
GetTypeData(bat_type, inputs[i]);
- if (data) {
- GDKfree(data);
+ }
+ if (bat_type == TYPE_str || bat_type ==
TYPE_date ||
+ bat_type == TYPE_daytime ||
+ bat_type == TYPE_timestamp || bat_type ==
TYPE_blob ||
+ bat_type == TYPE_sqlblob) {
+ // have to free input data
+ void *data = GetTypeData(bat_type,
inputs[i]);
+ if (data) {
+ GDKfree(data);
+ }
+ } else if (bat_type > TYPE_str) {
+ // this type was converted to
individually malloced
+ // strings
+ // we have to free all the individual
strings
+ char **data = (char
**)GetTypeData(bat_type, inputs[i]);
+ size_t count = GetTypeCount(bat_type,
inputs[i]);
+ for (j = 0; j < count; j++) {
+ if (data[j]) {
+ GDKfree(data[j]);
}
- } else if (bat_type > TYPE_str) {
- // this type was converted to
individually malloced
- // strings
- // we have to free all the
individual strings
- char **data = (char
**)GetTypeData(bat_type, inputs[i]);
- size_t count =
GetTypeCount(bat_type, inputs[i]);
- for (j = 0; j < count; j++) {
- if (data[j]) {
-
GDKfree(data[j]);
- }
- }
- if (data) {
- GDKfree(data);
- }
+ }
+ if (data) {
+ GDKfree(data);
}
}
GDKfree(inputs[i]);
_______________________________________________
checkin-list mailing list
[email protected]
https://www.monetdb.org/mailman/listinfo/checkin-list