Changeset: d3229e1d6296 for MonetDB URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=d3229e1d6296 Modified Files: monetdb5/optimizer/opt_commonTerms.c Branch: default Log Message:
Be more defensive in keeping instructions around for re-use diffs (18 lines): diff --git a/monetdb5/optimizer/opt_commonTerms.c b/monetdb5/optimizer/opt_commonTerms.c --- a/monetdb5/optimizer/opt_commonTerms.c +++ b/monetdb5/optimizer/opt_commonTerms.c @@ -170,9 +170,11 @@ OPTcommonTermsImplementation(Client cntx i, getArg(p,p->argc-1), HASHinstruction(p), hash[HASHinstruction(p)]); fprintInstruction(stderr, mb, 0, p, LIST_MAL_ALL); #endif - list[i] = hash[HASHinstruction(p)]; - hash[HASHinstruction(p)] = i; - pushInstruction(mb,p); + if ( !mayhaveSideEffects(cntxt, mb, p, TRUE) && !isUnsafeFunction(p) && !isUpdateInstruction(p) &&){ + list[i] = hash[HASHinstruction(p)]; + hash[HASHinstruction(p)] = i; + pushInstruction(mb,p); + } } for(; i<slimit; i++) if( old[i]) _______________________________________________ checkin-list mailing list checkin-list@monetdb.org https://www.monetdb.org/mailman/listinfo/checkin-list