Changeset: 5cdaa8f53037 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB/rev/5cdaa8f53037
Branch: Jun2020-mmt
Log Message:
Merged with Jun2020
diffs (76 lines):
diff --git a/common/utils/mstring.h b/common/utils/mstring.h
--- a/common/utils/mstring.h
+++ b/common/utils/mstring.h
@@ -29,7 +29,10 @@ strcpy_len(char *restrict dst, const cha
if ((dst[i] = src[i]) == 0)
return i;
}
- dst[n - 1] = 0;
+ /* for correctness, the decrement isn't needed (just assigning 0
+ * to dst[n-1] would be sufficient), but to work around a too
+ * strict GNU C compiler, we do need it */
+ dst[--n] = 0;
/* in some versions of GCC (at least gcc (Ubuntu 7.5.0-3ubuntu1~18.04)
* 7.5.0), the error just can't be turned off when using
* --enable-strict, so we just use the (more) expensive way of getting the
diff --git a/gdk/gdk_project.c b/gdk/gdk_project.c
--- a/gdk/gdk_project.c
+++ b/gdk/gdk_project.c
@@ -812,11 +812,7 @@ BATprojectchain(BAT **bats)
o -= ba[i].hlo;
o = ba[i].ci.s ? canditer_idx(&ba[i].ci, o) :
ba[i].t[o];
}
- if (bunfastappTYPE(oid, bn, &o) != GDK_SUCCEED)
- goto bunins_failed;
- if (ATOMputFIX(bn->ttype, d, &o) != GDK_SUCCEED)
- goto bunins_failed;
- d++;
+ *d++ = o;
}
} else if (!ATOMvarsized(tpe)) {
const void *v;
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
@@ -2370,6 +2370,7 @@ tr_handle_snapshot( sql_trans *tr, sql_d
bat->bid = bat->ibid;
bat->cnt = bat->ibase = BATcount(ins);
bat->ibid = e_bat(ins->ttype);
+ bat->cleared = 0;
BATmsync(ins);
}
bat_destroy(ins);
@@ -2388,6 +2389,7 @@ tr_update_delta( sql_trans *tr, sql_delt
/* for cleared tables the bid is reset */
if (cbat->bid == 0) {
+ assert(cbat->cleared);
cbat->bid = obat->bid;
if (cbat->bid)
temp_dup(cbat->bid);
@@ -2406,7 +2408,7 @@ tr_update_delta( sql_trans *tr, sql_delt
if(!cur)
return LOG_ERR;
}
- if (!obat->bid && tr != gtrans) {
+ if ((!obat->bid || !cbat->bid) && tr != gtrans) {
if (obat->next)
destroy_bat(obat->next);
destroy_delta(obat);
@@ -2418,6 +2420,16 @@ tr_update_delta( sql_trans *tr, sql_delt
cbat->cleared = 0;
cbat->name = NULL;
cbat->cached = NULL;
+ if (!obat->bid) {
+ cur = temp_descriptor(obat->ibid);
+ if (BATcount(cur) > SNAPSHOT_MINSIZE) {
+ obat->bid = obat->ibid;
+ obat->cnt = obat->ibase = BATcount(cur);
+ obat->ibid = e_bat(cur->ttype);
+ obat->cleared = 0;
+ }
+ bat_destroy(cur);
+ }
return ok;
}
ins = temp_descriptor(cbat->ibid);
_______________________________________________
checkin-list mailing list
[email protected]
https://www.monetdb.org/mailman/listinfo/checkin-list