Changeset: 66290883ee78 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB/rev/66290883ee78
Modified Files:
sql/storage/bat/bat_storage.c
Branch: Jan2022
Log Message:
make sure we log the changes to an extend bat
diffs (30 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
@@ -3303,11 +3303,6 @@ tr_log_cs( sql_trans *tr, sql_table *t,
if (GDKinmemory(0))
return LOG_OK;
- /*
- if (cs->cleared && log_bat_clear(store->logger, id) != GDK_SUCCEED)
- return LOG_ERR;
- */
-
if (cs->cleared) {
assert(cs->ucnt == 0);
BAT *ins = temp_descriptor(cs->bid);
@@ -3366,6 +3361,14 @@ log_table_append(sql_trans *tr, sql_tabl
assert(BATcount(ins) >= cur->end);
ok = log_bat(store->logger, ins, c->base.id,
cur->start, cur->end-cur->start);
bat_destroy(ins);
+ if (ok == GDK_SUCCEED && cs->ebid) {
+ BAT *ins = temp_descriptor(cs->ebid);
+ assert(ins);
+ if (BUNlast(ins) > ins->batInserted)
+ ok = log_bat(store->logger,
ins, -c->base.id, ins->batInserted, BATcount(ins)-ins->batInserted);
+ BATcommit(ins, BATcount(ins));
+ bat_destroy(ins);
+ }
}
if (t->idxs) {
for (node *n = ol_first_node(t->idxs); n && ok;
n = n->next) {
_______________________________________________
checkin-list mailing list
[email protected]
https://www.monetdb.org/mailman/listinfo/checkin-list