Changeset: 14c15734949b for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=14c15734949b
Modified Files:
        monetdb5/optimizer/opt_pushselect.c
Branch: Jun2020
Log Message:

fix small leak after changed pushdown optimization


diffs (46 lines):

diff --git a/monetdb5/optimizer/opt_pushselect.c 
b/monetdb5/optimizer/opt_pushselect.c
--- a/monetdb5/optimizer/opt_pushselect.c
+++ b/monetdb5/optimizer/opt_pushselect.c
@@ -680,10 +680,9 @@ OPTpushselectImplementation(Client cntxt
        for (j=1; j<i; j++)
                if (old[j] && oclean[j])
                        freeInstruction(old[j]);
-       for (; i<limit; i++)
+       for (; i<slimit; i++)
                if (old[i])
                        freeInstruction(old[i]);
-                       //pushInstruction(mb,old[i]);
        GDKfree(vars);
        GDKfree(nvars);
        GDKfree(slices);
@@ -691,19 +690,19 @@ OPTpushselectImplementation(Client cntxt
        GDKfree(oclean);
        GDKfree(old);
 
-    /* Defense line against incorrect plans */
-    if( actions > 0){
-        msg = chkTypes(cntxt->usermodule, mb, FALSE);
-        if (msg == MAL_SUCCEED) 
-               msg = chkFlow(mb);
-        if( msg == MAL_SUCCEED) 
-               msg = chkDeclarations(mb);
-    }
+       /* Defense line against incorrect plans */
+       if (actions > 0) {
+               msg = chkTypes(cntxt->usermodule, mb, FALSE);
+               if (msg == MAL_SUCCEED) 
+                       msg = chkFlow(mb);
+               if( msg == MAL_SUCCEED) 
+                       msg = chkDeclarations(mb);
+       }
 wrapup:
-    /* keep all actions taken as a post block comment */
+       /* keep all actions taken as a post block comment */
        usec = GDKusec()- usec;
-    snprintf(buf,256,"%-20s actions=%2d time=" LLFMT " 
usec","pushselect",actions, usec);
-    newComment(mb,buf);
+       snprintf(buf,256,"%-20s actions=%2d time=" LLFMT " 
usec","pushselect",actions, usec);
+       newComment(mb,buf);
        if( actions > 0)
                addtoMalBlkHistory(mb);
        return msg;
_______________________________________________
checkin-list mailing list
[email protected]
https://www.monetdb.org/mailman/listinfo/checkin-list

Reply via email to