Changeset: 2d42d6d8b007 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB/rev/2d42d6d8b007
Modified Files:
        sql/storage/bat/bat_storage.c
Branch: Oct2020
Log Message:

merged


diffs (29 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
@@ -2392,6 +2392,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);
@@ -2424,11 +2425,13 @@ tr_update_delta( sql_trans *tr, sql_delt
                cbat->cached = NULL;
                if (!obat->bid) {
                        cur = temp_descriptor(obat->ibid);
-                       obat->bid = obat->ibid;
-                       obat->cnt = obat->ibase = BATcount(cur);
-                       obat->ibid = e_bat(cur->ttype);
+                       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);
-                       obat->cleared = 0;
                }
                return ok;
        }
_______________________________________________
checkin-list mailing list
checkin-list@monetdb.org
https://www.monetdb.org/mailman/listinfo/checkin-list

Reply via email to