Changeset: e9e61ab04829 for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=e9e61ab04829
Modified Files:
monetdb5/modules/mal/pqueue.c
sql/test/BugTracker-2013/Tests/All
Branch: default
Log Message:
Merge with Feb2013 branch.
diffs (49 lines):
diff --git a/monetdb5/modules/mal/pqueue.c b/monetdb5/modules/mal/pqueue.c
--- a/monetdb5/modules/mal/pqueue.c
+++ b/monetdb5/modules/mal/pqueue.c
@@ -1067,11 +1067,12 @@ PQinit(int *ret, int *bid, wrd *maxsize)
}
static void
-PQtopn_sorted_min( BAT **bn, BAT *b, wrd N )
+PQtopn_sorted_min( BAT **bn, BAT *b, wrd _N )
{
- ssize_t cnt = BATcount(b);
+ BUN cnt = BATcount(b), N = (BUN) _N;
+ assert(_N >= 0);
if (b->tsorted) {
- b = BATslice(b, (cnt-N)<0?0:cnt-N, cnt);
+ b = BATslice(b, N>=cnt?0:cnt-N, cnt);
*bn = BATsort_rev(b);
BBPreleaseref(b->batCacheid);
} else
@@ -1079,13 +1080,14 @@ PQtopn_sorted_min( BAT **bn, BAT *b, wrd
}
static void
-PQtopn_sorted_max( BAT **bn, BAT *b, wrd N )
+PQtopn_sorted_max( BAT **bn, BAT *b, wrd _N )
{
- ssize_t cnt = BATcount(b);
+ BUN cnt = BATcount(b), N = (BUN) _N;
+ assert(_N >= 0);
if (b->tsorted)
*bn = BATslice(b, 0, N>=cnt?cnt:N);
else {
- b = BATslice(b, (cnt-N)<0?0:cnt-N, cnt);
+ b = BATslice(b, N>=cnt?0:cnt-N, cnt);
*bn = BATsort_rev(b);
BBPreleaseref(b->batCacheid);
}
diff --git a/sql/test/BugTracker-2013/Tests/All
b/sql/test/BugTracker-2013/Tests/All
--- a/sql/test/BugTracker-2013/Tests/All
+++ b/sql/test/BugTracker-2013/Tests/All
@@ -26,7 +26,7 @@ add_boolean.Bug-3289
prepare-smallint.Bug-3297
psm_functions_and_accessrights.Bug-3300
decimal-cast.Bug-3310
-hashed_exp.Bug-3313
+HAVE_GEOM?hashed_exp.Bug-3313
mitosis-floor.Bug-3330
avg_needs_abort_on_error.Bug-3329
unique_constraint_on_declared_table.Bug-3319
_______________________________________________
checkin-list mailing list
[email protected]
https://www.monetdb.org/mailman/listinfo/checkin-list