Changeset: c893d2406b30 for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=c893d2406b30
Modified Files:
        monetdb5/scheduler/Tests/mutation00.mal
        monetdb5/scheduler/Tests/mutation01.mal
        monetdb5/scheduler/Tests/query00.mal
        monetdb5/scheduler/run_mutation.c
Branch: mutation
Log Message:

Check the program befor execution
A modified plan should always be checked to ensure
all administration is set correctly.


diffs (71 lines):

diff --git a/monetdb5/scheduler/Tests/mutation00.mal 
b/monetdb5/scheduler/Tests/mutation00.mal
--- a/monetdb5/scheduler/Tests/mutation00.mal
+++ b/monetdb5/scheduler/Tests/mutation00.mal
@@ -3,7 +3,7 @@
 # The mutation scheduler picks a plan from a specific pool
 # possibly after performing introspection and plan mutation
 
-function initialize():bat[:oid,:lng];
+function initialize{unsafe}():bat[:oid,:lng];
        b:= bat.new(:oid,:lng);
 
        INT_MAX := 2147483647;
@@ -32,6 +32,7 @@ barrier z:= language.dataflow();
        s1 := algebra.select(b,1:lng,99:lng);
        s2 := algebra.select(b,1:lng,999:lng);
        s3 := algebra.select(b,1:lng,9999:lng);
+       language.pass(b);
 exit z;
        t1:= alarm.usec();
        t2 := t1-t0;
diff --git a/monetdb5/scheduler/Tests/mutation01.mal 
b/monetdb5/scheduler/Tests/mutation01.mal
--- a/monetdb5/scheduler/Tests/mutation01.mal
+++ b/monetdb5/scheduler/Tests/mutation01.mal
@@ -3,7 +3,7 @@
 # The mutation scheduler picks a plan from a specific pool
 # possibly after performing introspection and plan mutation
 
-function initialize():bat[:oid,:lng];
+function initialize{unsafe}():bat[:oid,:lng];
        b:= bat.new(:oid,:lng);
 
        INT_MAX := 2147483647;
diff --git a/monetdb5/scheduler/Tests/query00.mal 
b/monetdb5/scheduler/Tests/query00.mal
--- a/monetdb5/scheduler/Tests/query00.mal
+++ b/monetdb5/scheduler/Tests/query00.mal
@@ -1,7 +1,7 @@
 # example framework for a mutation based execution stack
 # illustrate how it would appear after an optimizer call.
 
-function initialize():bat[:oid,:lng];
+function initialize{unsafe}():bat[:oid,:lng];
        b:= bat.new(:oid,:lng);
 
        INT_MAX := 2147483647;
diff --git a/monetdb5/scheduler/run_mutation.c 
b/monetdb5/scheduler/run_mutation.c
--- a/monetdb5/scheduler/run_mutation.c
+++ b/monetdb5/scheduler/run_mutation.c
@@ -228,9 +228,9 @@ RUNmutationInternal(Client cntxt, MalStk
        }
        /* At this point we have a target instruction to be replaced */
        /* safe the previous version in the history list */
-       stop = src->stop;
-       vtop = src->vtop;
        if ( mutationCandidate(src,  p = getInstrPtr(src, target)) ){
+               stop = src->stop;
+               vtop = src->vtop;
 
                /* add the mutation to the collection */
                /* prepare a new mutation record */
@@ -264,8 +264,11 @@ RUNmutationInternal(Client cntxt, MalStk
                                stk->stk[i].val.lval = 0;
                }
                src->calls = 0;
+               chkProgram(cntxt->fdout,cntxt->nspace,src);
                DEBUG_MUTATION
                        printFunction(cntxt->fdout, src,0,LIST_MAL_ALL);
+               if ( src->errors)
+                       throw(MAL,"run_mutation","Internal error");
        } 
        /* if necessary expand the stack and performance table */
        
_______________________________________________
checkin-list mailing list
[email protected]
http://mail.monetdb.org/mailman/listinfo/checkin-list

Reply via email to