Changeset: 9c575861a9de for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB/rev/9c575861a9de
Modified Files:
        monetdb5/modules/mal/querylog.c
Branch: Jul2021
Log Message:

The querylog is only appended to, so set access mode accordingly.


diffs (22 lines):

diff --git a/monetdb5/modules/mal/querylog.c b/monetdb5/modules/mal/querylog.c
--- a/monetdb5/modules/mal/querylog.c
+++ b/monetdb5/modules/mal/querylog.c
@@ -166,12 +166,16 @@ QLOGcreate(str hnme, str tnme, int tt)
 
        snprintf(buf, 128, "querylog_%s_%s", hnme, tnme);
        b = BATdescriptor(BBPindex(buf));
-       if (b)
-               return b;
+       if (b) {
+               /* make append-only in case this wasn't done when created */
+               return BATsetaccess(b, BAT_APPEND);
+       }
 
        b = COLnew(0, tt, 1 << 16, PERSISTENT);
        if (b == NULL)
                return NULL;
+       if ((b = BATsetaccess(b, BAT_APPEND)) == NULL)
+               return NULL;
 
        if (BBPrename(b->batCacheid, buf) != 0 ||
                BATmode(b, false) != GDK_SUCCEED) {
_______________________________________________
checkin-list mailing list
checkin-list@monetdb.org
https://www.monetdb.org/mailman/listinfo/checkin-list

Reply via email to