Changeset: 976e16e04954 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB/rev/976e16e04954
Modified Files:
sql/storage/bat/bat_storage.c
Branch: Dec2023
Log Message:
Partial backout of changeset a10aa621f79d (only the incorrect bit).
A bug had accidentally been introduced in merge_updates.
diffs (58 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
@@ -730,6 +730,18 @@ 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;
@@ -751,35 +763,6 @@ 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;
_______________________________________________
checkin-list mailing list -- [email protected]
To unsubscribe send an email to [email protected]