Changeset: 9fbe7d4f2cc8 for MonetDB URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=9fbe7d4f2cc8 Modified Files: gdk/gdk_bat.c Branch: default Log Message:
When making a bat writable, also create new copy if shared and already writable. BATsetaccess creates a new copy if a bat is made writable but it there are views on it. However, it didn't do this if the mode was already the same. This is part of the fix for bug 3149. diffs (12 lines): diff --git a/gdk/gdk_bat.c b/gdk/gdk_bat.c --- a/gdk/gdk_bat.c +++ b/gdk/gdk_bat.c @@ -2650,7 +2650,7 @@ BATsetaccess(BAT *b, int newmode) } bakmode = b->batRestricted; bakdirty = b->batDirtydesc; - if (bakmode != newmode) { + if (bakmode != newmode || (b->batSharecnt && newmode != BAT_READ)) { int existing = BBP_status(b->batCacheid) & BBPEXISTING; int wr = (newmode == BAT_WRITE); int rd = (bakmode == BAT_WRITE); _______________________________________________ Checkin-list mailing list Checkin-list@monetdb.org http://mail.monetdb.org/mailman/listinfo/checkin-list