Changeset: 9a90322010d7 for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=9a90322010d7
Modified Files:
        gdk/gdk_bbp.c
        monetdb5/mal/mal_stack.c
Branch: Dec2016
Log Message:

Backout changeset 3a9afb7a8637 and fix problem in a better way.
When freeing a MAL stack, we need to also unfix BATs.


diffs (33 lines):

diff --git a/gdk/gdk_bbp.c b/gdk/gdk_bbp.c
--- a/gdk/gdk_bbp.c
+++ b/gdk/gdk_bbp.c
@@ -1739,13 +1739,11 @@ BBPexit(void)
                                                bat tp = VIEWtparent(b);
                                                bat vtp = VIEWvtparent(b);
                                                if (tp) {
-                                                       if (BBP_desc(tp))
-                                                               
BBP_desc(tp)->batSharecnt--;
+                                                       
BBP_cache(tp)->batSharecnt--;
                                                        --BBP_lrefs(tp);
                                                }
                                                if (vtp) {
-                                                       if (BBP_desc(vtp))
-                                                               
BBP_desc(vtp)->batSharecnt--;
+                                                       
BBP_cache(vtp)->batSharecnt--;
                                                        --BBP_lrefs(vtp);
                                                }
                                                VIEWdestroy(b);
diff --git a/monetdb5/mal/mal_stack.c b/monetdb5/mal/mal_stack.c
--- a/monetdb5/mal/mal_stack.c
+++ b/monetdb5/mal/mal_stack.c
@@ -109,6 +109,10 @@ clearStack(MalStkPtr s)
                        GDKfree(v->val.pval);
                        v->vtype = 0;
                        v->val.pval = NULL;
+               } else if (BATatoms[v->vtype].atomUnfix) {
+                       BATatoms[v->vtype].atomUnfix(VALget(v));
+                       v->vtype = 0;
+                       v->val.pval = NULL;
                }
        s->stkbot = 0;
 }
_______________________________________________
checkin-list mailing list
checkin-list@monetdb.org
https://www.monetdb.org/mailman/listinfo/checkin-list

Reply via email to