Changeset: d665549cc018 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=d665549cc018
Modified Files:
gdk/gdk.h
sql/backends/monet5/sql.c
Branch: candidate-exceptions
Log Message:
Use the result of the binary search by not hiding the variable.
diffs (35 lines):
diff --git a/gdk/gdk.h b/gdk/gdk.h
--- a/gdk/gdk.h
+++ b/gdk/gdk.h
@@ -1256,7 +1256,8 @@ BUNtoid(BAT *b, BUN p)
const oid *exc = (oid *) b->tvheap->base;
BUN hi = 0;
if (nexc > 1024) {
- BUN lo = 0, hi = nexc - 1;
+ BUN lo = 0;
+ hi = nexc - 1;
while (hi > lo + 1) {
BUN mid = (lo + hi) / 2;
if (exc[mid] == o) {
@@ -1271,8 +1272,8 @@ BUNtoid(BAT *b, BUN p)
}
for (; hi < nexc; hi++)
if (o + hi < exc[hi])
- return o + hi;
- return o + nexc;
+ break;
+ return o + hi;
}
static inline BATiter
diff --git a/sql/backends/monet5/sql.c b/sql/backends/monet5/sql.c
--- a/sql/backends/monet5/sql.c
+++ b/sql/backends/monet5/sql.c
@@ -2264,7 +2264,6 @@ SQLtid(Client cntxt, MalBlkPtr mb, MalSt
BBPunfix(o->batCacheid);
if (ret != GDK_SUCCEED)
throw(MAL, "sql.tids", SQLSTATE(45003) "TIDdeletes
failed");
-
#else
BAT *diff;
diff = BATdiff(tids, d, NULL, NULL, false, false, BUN_NONE);
_______________________________________________
checkin-list mailing list
[email protected]
https://www.monetdb.org/mailman/listinfo/checkin-list