Changeset: 736bab42b13e for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB/rev/736bab42b13e
Modified Files:
        monetdb5/mal/mal_interpreter.c
        monetdb5/optimizer/opt_mitosis.c
        monetdb5/optimizer/opt_pushselect.c
Branch: default
Log Message:

small cleanup back ported from pipelines


diffs (50 lines):

diff --git a/monetdb5/mal/mal_interpreter.c b/monetdb5/mal/mal_interpreter.c
--- a/monetdb5/mal/mal_interpreter.c
+++ b/monetdb5/mal/mal_interpreter.c
@@ -1075,7 +1075,8 @@ runMALsequence(Client cntxt, MalBlkPtr m
                                                                                
                                   (pci), name));
                                         }
                        }
-                       stkpc++;
+                       if (stkpc != stoppc)
+                               stkpc++;
                        break;
                case LEAVEsymbol:
                case REDOsymbol:
diff --git a/monetdb5/optimizer/opt_mitosis.c b/monetdb5/optimizer/opt_mitosis.c
--- a/monetdb5/optimizer/opt_mitosis.c
+++ b/monetdb5/optimizer/opt_mitosis.c
@@ -116,6 +116,8 @@ OPTmitosisImplementation(Client cntxt, M
                        continue;
                if (p->argc > 6)
                        continue;                       /* already partitioned 
*/
+               if (getFunctionId(p) == tidRef && p->argc > 4)
+                       continue;                       /* already partitioned 
*/
                /*
                 * The SQL optimizer already collects the counts of the base
                 * table and passes them on as a row property.  All pieces for a
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
@@ -305,7 +305,7 @@ OPTpushselectImplementation(Client ctx, 
                                int var = getArg(p, 1);
                                InstrPtr q = mb->stmt[vars[var]];       /* 
BEWARE: the optimizer may not add or remove statements ! */
 
-                               if (isLikeOp(q) && !isaBatType(getArgType(mb, 
q, 2)) && isVarConstant(mb, getArg(q, 2)) &&      /* pattern is a value */
+                               if (q && isLikeOp(q) && 
!isaBatType(getArgType(mb, q, 2)) && isVarConstant(mb, getArg(q, 2)) && /* 
pattern is a value */
                                        isVarConstant(mb, getArg(q, 3)) &&      
/* escape is a value */
                                        isVarConstant(mb, getArg(q, 4)) &&      
/* isensitive flag is a value */
                                        getArg(q, 0) == getArg(p,
@@ -430,10 +430,8 @@ OPTpushselectImplementation(Client ctx, 
        slices = (int *) ma_zalloc(ta, sizeof(int) * mb->vtop);
        rslices = (bool *) ma_zalloc(ta, sizeof(bool) * mb->vtop);
        oclean = (bool *) ma_zalloc(ta, sizeof(bool) * mb->vtop);
-       if (!nvars || !slices || !rslices || !oclean
-               || newMalBlkStmt(mb,
-                                                mb->stop + (5 * 
push_down_delta) + (2 * nr_topn)) <
-               0) {
+       if (!nvars || !slices || !rslices || !oclean ||
+               newMalBlkStmt(mb, mb->stop + (5 * push_down_delta) + (2 * 
nr_topn)) < 0) {
                mb->stmt = old;
                goto wrapup;
        }
_______________________________________________
checkin-list mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to