Changeset: a10aa621f79d for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB/rev/a10aa621f79d
Modified Files:
sql/storage/bat/bat_storage.c
tools/merovingian/daemon/merovingian.c
Branch: Jun2023
Log Message:
small workaround for gcc on freebsd, ie allocate samewhat larger array of file
descriptors.
diffs (71 lines):
diff --git a/sql/storage/bat/bat_storage.c b/sql/storage/bat/bat_storage.c
--- a/sql/storage/bat/bat_storage.c
+++ b/sql/storage/bat/bat_storage.c
@@ -703,18 +703,6 @@ merge_updates( BAT *ui, BAT **UV, BAT *o
int err = 0;
BAT *uv = *UV;
BUN cnt = BATcount(ui)+BATcount(oi);
- BAT *ni = bat_new(TYPE_oid, cnt, SYSTRANS);
- BAT *nv = uv?bat_new(uv->ttype, cnt, SYSTRANS):NULL;
-
- if (!ni || (uv && !nv)) {
- bat_destroy(ni);
- bat_destroy(nv);
- bat_destroy(ui);
- bat_destroy(uv);
- bat_destroy(oi);
- bat_destroy(ov);
- return NULL;
- }
BATiter uvi;
BATiter ovi;
@@ -736,6 +724,35 @@ merge_updates( BAT *ui, BAT **UV, BAT *o
uipt = uii.base;
if (!BATtdensebi(&oii))
oipt = oii.base;
+
+ if (uiseqb == oiseqb && uie == oie) { /* full overlap, no values */
+ if (uv) {
+ bat_iterator_end(&uvi);
+ bat_iterator_end(&ovi);
+ }
+ bat_iterator_end(&uii);
+ bat_iterator_end(&oii);
+ if (uv) {
+ *UV = uv;
+ } else {
+ bat_destroy(uv);
+ }
+ bat_destroy(oi);
+ bat_destroy(ov);
+ return ui;
+ }
+ BAT *ni = bat_new(TYPE_oid, cnt, SYSTRANS);
+ BAT *nv = uv?bat_new(uv->ttype, cnt, SYSTRANS):NULL;
+
+ if (!ni || (uv && !nv)) {
+ bat_destroy(ni);
+ bat_destroy(nv);
+ bat_destroy(ui);
+ bat_destroy(uv);
+ bat_destroy(oi);
+ bat_destroy(ov);
+ return NULL;
+ }
while (uip < uie && oip < oie && !err) {
oid uiid = (uipt)?uipt[uip]: uiseqb+uip;
oid oiid = (oipt)?oipt[oip]: oiseqb+oip;
diff --git a/tools/merovingian/daemon/merovingian.c
b/tools/merovingian/daemon/merovingian.c
--- a/tools/merovingian/daemon/merovingian.c
+++ b/tools/merovingian/daemon/merovingian.c
@@ -257,7 +257,8 @@ logListener(void *x)
if (w->pid > 0)
nfds += 2;
}
- pfd = malloc(nfds * sizeof(struct pollfd));
+ /* +1 for freebsd compiler issue with stringop-overflow error */
+ pfd = malloc((nfds+1) * sizeof(struct pollfd));
nfds = 0;
for (w = d; w != NULL; w = w->next) {
if (w->pid <= 0)
_______________________________________________
checkin-list mailing list -- [email protected]
To unsubscribe send an email to [email protected]