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

small fix for bug 7173, ie save segments also after a truncate/delete all


diffs (20 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
@@ -3085,12 +3085,12 @@ log_table_append(sql_trans *tr, sql_tabl
 static int
 log_storage(sql_trans *tr, sql_table *t, storage *s, sqlid id)
 {
-       int ok = LOG_OK;
-       if (ok == LOG_OK && s->cs.cleared)
-               return tr_log_cs(tr, t, &s->cs, s->segs->h, t->base.id);
+       int ok = LOG_OK, cleared = s->cs.cleared;
+       if (ok == LOG_OK && cleared)
+               ok =  tr_log_cs(tr, t, &s->cs, s->segs->h, t->base.id);
        if (ok == LOG_OK)
                ok = log_segments(tr, s->segs, id);
-       if (ok == LOG_OK)
+       if (ok == LOG_OK && !cleared)
                ok = log_table_append(tr, t, s->segs);
        return ok;
 }
_______________________________________________
checkin-list mailing list
[email protected]
https://www.monetdb.org/mailman/listinfo/checkin-list

Reply via email to