Changeset: b03f7786dfbc for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=b03f7786dfbc
Modified Files:
monetdb5/extras/dvf/dvf.c
Branch: DVframework
Log Message:
Leaving a clean MAL plan after the run-time rewrites so that compile-time plan
reuse is possible.
diffs (59 lines):
diff --git a/monetdb5/extras/dvf/dvf.c b/monetdb5/extras/dvf/dvf.c
--- a/monetdb5/extras/dvf/dvf.c
+++ b/monetdb5/extras/dvf/dvf.c
@@ -123,6 +123,8 @@ str plan_modifier(Client cntxt, MalBlkPt
copy_old = mb;
mb = copy_mb;
+ copy_old = copy_old; /* to escape 'unused' parameter error. */
+
old = mb->stmt;
limit= mb->stop;
slimit = mb->ssize;
@@ -242,7 +244,7 @@ str plan_modifier(Client cntxt, MalBlkPt
/* s = s; */
/* comment out in the old for reusing the old */
- copy_old->stmt[i]->token = REMsymbol;
+// copy_old->stmt[i]->token = REMsymbol;
}
else
@@ -253,11 +255,11 @@ str plan_modifier(Client cntxt, MalBlkPt
if (p->token == ENDsymbol) break;
/* comment out in the old for reusing the old */
- if(i > startpc)
- {
-/* old[i]->token = REMsymbol; */
- copy_old->stmt[i]->token = REMsymbol;
- }
+// if(i > startpc)
+// {
+// /* old[i]->token = REMsymbol; */
+// copy_old->stmt[i]->token = REMsymbol;
+// }
}
}
/* We would like to retain everything from the ENDsymbol
@@ -386,8 +388,8 @@ str plan_modifier(Client cntxt, MalBlkPt
throw(MAL, "dvf.plan_modifier", "From the recursive call: %s",
msg);
}
-/* chkProgram(cntxt->fdout, cntxt->nspace, copy_old); */
-/* printFunction(cntxt->fdout, copy_old, 0, LIST_MAL_EXPLAIN); */
+ /*chkProgram(cntxt->fdout, cntxt->nspace, copy_old);
+ printFunction(cntxt->fdout, copy_old, 0, LIST_MAL_EXPLAIN);*/
/* any remaining MAL instruction records are removed */
for(i = 0; i<slimit; i++)
@@ -409,6 +411,9 @@ str plan_modifier(Client cntxt, MalBlkPt
freeStack(stk_new);
}
+ /* make the plan_modifier call a return symbol, so that the MAL plan
execution always ends after it. Then you can have a healthy plan in query cache
for this query. */
+ pci->barrier = RETURNsymbol;
+
finish:
/* for statistics we print if/how many patches have been made */
DEBUGoptimizers
_______________________________________________
checkin-list mailing list
[email protected]
http://mail.monetdb.org/mailman/listinfo/checkin-list