Changeset: f694a691b23f for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=f694a691b23f
Modified Files:
Branch: jacqueline
Log Message:
Merged from default
diffs (97 lines):
diff --git a/debian/control b/debian/control
--- a/debian/control
+++ b/debian/control
@@ -144,7 +144,7 @@ Description: MonetDB Ruby client module
Package: monetdb-client-testing
Architecture: any
-Depends: ${shlibs:Depends}, libmonetdb-client-odbc1, monetdb5-server,
perl-monetdb-client, php5-monetdb-client, python-monetdb, monetdb5-sql
+Depends: ${shlibs:Depends}, libmonetdb-client-odbc, monetdb5-server,
perl-monetdb-client, php5-monetdb-client, python-monetdb, monetdb5-sql
Description: MonetDB client testing tools
MonetDB is a database management system that is developed from a
main-memory perspective with use of a fully decomposed storage model,
diff --git a/gdk/gdk_rangejoin.mx b/gdk/gdk_rangejoin.mx
--- a/gdk/gdk_rangejoin.mx
+++ b/gdk/gdk_rangejoin.mx
@@ -52,6 +52,7 @@ gdk_export BAT *BATbandjoin(BAT *l, BAT
#include "gdk.h"
#include "gdk_private.h"
#include "gdk_rangejoin.h"
+#include <math.h>
BAT *BATrangejoin(BAT *l, BAT *rl, BAT *rh, bit li, bit hi)
{
@@ -126,6 +127,7 @@ break;
BATiter rhi = bat_iterator(rh);
BUN p, q;
BUN v, w;
+ BUN cap = bn->batCapacity, cnt = 0;
BATloop(l, p, q) {
@1 x1 = *(@1 *) BUNtloc(li, p);
@@ -138,6 +140,16 @@ break;
}
}
}
+ /* re-adjust the capacity if needed */
+ cnt++;
+ if ( BATcount(bn) > cap ){
+ BUN sze = (BUN)ceil((double) BATcount(bn) /cnt);
+ if ( BATextend(bn, BATcount(l) * sze ) == NULL ){
+ BBPreclaim(bn);
+ return NULL;
+ }
+ cap = bn->batCapacity - sze -1; /* trigger before
BATextend in mainloop */
+ }
}
}
@= rangejoin_any
@@ -147,6 +159,7 @@ break;
BATiter rhi = bat_iterator(rh);
BUN p, q;
BUN v, w;
+ BUN cap = bn->batCapacity, cnt = 0;
int (*cmp)(void*,void*) = BATatoms[l->ttype].atomCmp;
if (!ATOMlinear(l->ttype)) {
@@ -164,6 +177,16 @@ break;
}
}
}
+ /* re-adjust the capacity if needed */
+ cnt++;
+ if ( BATcount(bn) > cap ){
+ BUN sze = (BUN)ceil((double) BATcount(bn) /cnt);
+ if ( BATextend(bn, BATcount(l) * sze ) == NULL ){
+ BBPreclaim(bn);
+ return NULL;
+ }
+ cap = bn->batCapacity - sze -1; /* trigger before
BATextend in mainloop */
+ }
}
}
@
diff --git a/monetdb5/modules/kernel/algebra.mx
b/monetdb5/modules/kernel/algebra.mx
--- a/monetdb5/modules/kernel/algebra.mx
+++ b/monetdb5/modules/kernel/algebra.mx
@@ -235,7 +235,7 @@ address ALGhsort
comment "Returns a BAT copy sorted on the head column.";
command sortReverse( b:bat[:any_1,:any_2]) :bat[:any_1,:any_2]
address ALGhsort_rev
-comment "Returns a BAT copy reversely sorted on the tail column.";
+comment "Returns a BAT copy reversely sorted on the head column.";
command sortTail( b:bat[:any_1,:any_2]) :bat[:any_1,:any_2]
address ALGtsort
diff --git a/monetdb5/optimizer/opt_commonTerms.mx
b/monetdb5/optimizer/opt_commonTerms.mx
--- a/monetdb5/optimizer/opt_commonTerms.mx
+++ b/monetdb5/optimizer/opt_commonTerms.mx
@@ -205,7 +205,7 @@ OPTcommonTermsImplementation(Client cntx
cnt = mb->stop / 128 < 32? 32 : mb->stop/128; /* limit search
depth */
if ( !prop)
for (; cnt > 0 && j ; cnt--, j = list[j])
- if ( (q=getInstrPtr(mb,j))->fcn == p->fcn ){
+ if ( getFunctionId(q=getInstrPtr(mb,j)) ==
getFunctionId(p) && getModuleId(q) == getModuleId(p) ){
#ifdef DEBUG_OPT_COMMONTERMS_MORE
mnstr_printf(cntxt->fdout,"#CANDIDATE %d, %d %d %d ",
i, j,
hasSameSignature(mb, p, q, p->retc),
_______________________________________________
Checkin-list mailing list
[email protected]
http://mail.monetdb.org/mailman/listinfo/checkin-list