Changeset: 5d42e2174851 for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=5d42e2174851
Modified Files:
        monetdb5/mal/mal_interpreter.mx
        monetdb5/modules/mal/Makefile.ag
        monetdb5/modules/mal/tablet.c
        monetdb5/modules/mal/tablet.h
        monetdb5/modules/mal/tablet.mx
        monetdb5/modules/mal/tablet_sql.c
Branch: default
Log Message:

Merge with Aug2011 branch.


diffs (truncated from 3628 to 300 lines):

diff --git a/common/stream/stream.c b/common/stream/stream.c
--- a/common/stream/stream.c
+++ b/common/stream/stream.c
@@ -2434,10 +2434,9 @@ bs_read(stream *ss, void *buf, size_t el
                short blksize = 0;
 
                if (s->nr) {
-                       /* We read the closing block but hadn't returned that 
yet.
-                          Return it now, and note that we did by setting s->nr 
to
-                          0.
-                        */
+                       /* We read the closing block but hadn't
+                        * returned that yet. Return it now, and note
+                        * that we did by setting s->nr to 0. */
                        assert(s->nr == 1);
                        s->nr = 0;
                        return 0;
@@ -2446,7 +2445,7 @@ bs_read(stream *ss, void *buf, size_t el
                assert(s->nr == 0);
 
                /* There is nothing more to read in the current block,
-                  so read the count for the next block */
+                * so read the count for the next block */
                if (!mnstr_readSht(s->s, &blksize) || blksize < 0) {
                        ss->errnr = MNSTR_READ_ERROR;
                        return -1;
@@ -2465,8 +2464,8 @@ bs_read(stream *ss, void *buf, size_t el
        /* Fill the caller's buffer. */
        cnt = 0;                /* count how much we put into the buffer */
        while (todo > 0) {
-               /* there is more data waiting in the current block,
-                  so read it */
+               /* there is more data waiting in the current block, so
+                * read it */
                n = todo < s->itotal ? todo : s->itotal;
                while (n > 0) {
                        ssize_t m = s->s->read(s->s, buf, 1, n);
@@ -2499,8 +2498,8 @@ bs_read(stream *ss, void *buf, size_t el
                        short blksize = 0;
 
                        /* The current block has been completely read,
-                          so read the count for the next block, only if the
-                          previous was not the last one */
+                        * so read the count for the next block, only
+                        * if the previous was not the last one */
                        if (s->nr) {
                                break;
                        } else if (!mnstr_readSht(s->s, &blksize) || blksize < 
0) {
@@ -2520,9 +2519,9 @@ bs_read(stream *ss, void *buf, size_t el
                }
        }
        /* if we got an empty block with the end-of-sequence marker
-          set (low-order bit) we must only return an empty read once, so
-          we must squash the flag that we still have to return an empty
-          read */
+        * set (low-order bit) we must only return an empty read once,
+        * so we must squash the flag that we still have to return an
+        * empty read */
        if (todo > 0 && cnt == 0)
                s->nr = 0;
        return (ssize_t) (cnt / elmsize);
diff --git a/monetdb5/mal/Tests/tst273.mal b/monetdb5/mal/Tests/tst273.mal
--- a/monetdb5/mal/Tests/tst273.mal
+++ b/monetdb5/mal/Tests/tst273.mal
@@ -1,5 +1,6 @@
 # the multiplex code blocks.
 
+r:= mmath.srand(0);
 t0:= alarm.usec();
 b:= bat.new(:oid,:lng);
 barrier (go,i):= language.newRange(0:lng);
diff --git a/monetdb5/mal/Tests/tst273.stable.out 
b/monetdb5/mal/Tests/tst273.stable.out
--- a/monetdb5/mal/Tests/tst273.stable.out
+++ b/monetdb5/mal/Tests/tst273.stable.out
@@ -49,6 +49,7 @@ stdout of test 'tst273` in directory 'ma
 #
 function user.main():void;
 # the multiplex code blocks. 
+    r := mmath.srand(0);
     t0 := alarm.usec();
     b := bat.new(:oid,:lng);
 barrier (go,i) := language.newRange(0:lng);
diff --git a/monetdb5/mal/Tests/tst274.mal b/monetdb5/mal/Tests/tst274.mal
--- a/monetdb5/mal/Tests/tst274.mal
+++ b/monetdb5/mal/Tests/tst274.mal
@@ -1,6 +1,7 @@
 # the multiplex code blocks.
 #watch out, the random generator on SUN has a limited range.
 
+r:= mmath.srand(0);
 t0:= alarm.usec();
 b:= bat.new(:oid,:lng);
 barrier (go,i):= language.newRange(0:lng);
diff --git a/monetdb5/mal/Tests/tst274.stable.out 
b/monetdb5/mal/Tests/tst274.stable.out
--- a/monetdb5/mal/Tests/tst274.stable.out
+++ b/monetdb5/mal/Tests/tst274.stable.out
@@ -18,6 +18,7 @@ stdout of test 'tst274` in directory 'ma
 function user.main():void;
 # the multiplex code blocks. 
 #watch out, the random generator on SUN has a limited range. 
+    r := mmath.srand(0);
     t0 := alarm.usec();
     b := bat.new(:oid,:lng);
 barrier (go,i) := language.newRange(0:lng);
diff --git a/monetdb5/mal/Tests/tst274.stable.out.oid64 
b/monetdb5/mal/Tests/tst274.stable.out.oid64
--- a/monetdb5/mal/Tests/tst274.stable.out.oid64
+++ b/monetdb5/mal/Tests/tst274.stable.out.oid64
@@ -52,6 +52,7 @@ stdout of test 'tst274` in directory 'ma
 function user.main():void;
 # the multiplex code blocks. 
 #watch out, the random generator on SUN has a limited range. 
+    r := mmath.srand(0);
     t0 := alarm.usec();
     b := bat.new(:oid,:lng);
 barrier (go,i) := language.newRange(0:lng);
diff --git a/monetdb5/mal/Tests/tst903.mal b/monetdb5/mal/Tests/tst903.mal
--- a/monetdb5/mal/Tests/tst903.mal
+++ b/monetdb5/mal/Tests/tst903.mal
@@ -10,6 +10,7 @@ dbgmsk_keep := calc.xor(INT_MAX,dbgmsk_u
 dbgmsk_set := calc.and(dbgmsk_restore,dbgmsk_keep);
 mdb.setDebug(dbgmsk_set);
 
+r:= mmath.srand(0);
 barrier (go,i):= language.newRange(0:lng);
        k:= mmath.rand();
        l:= calc.lng(k);
diff --git a/monetdb5/mal/Tests/tst903.stable.out 
b/monetdb5/mal/Tests/tst903.stable.out
--- a/monetdb5/mal/Tests/tst903.stable.out
+++ b/monetdb5/mal/Tests/tst903.stable.out
@@ -138,6 +138,7 @@ function user.main():void;
     dbgmsk_keep := calc.xor(INT_MAX,dbgmsk_unset);
     dbgmsk_set := calc.and(dbgmsk_restore,dbgmsk_keep);
     mdb.setDebug(dbgmsk_set);
+    r := mmath.srand(0);
 barrier (go,i) := language.newRange(0:lng);
     k := mmath.rand();
     l := calc.lng(k);
@@ -245,14 +246,14 @@ exit (go,i);
     cnt := aggr.count(z9);
     mdb.setDebug(dbgmsk_set);
     t0 := alarm.usec();
-    X_99 := bat.new(nil:oid,nil:lng);
-barrier (X_103,X_104,X_105) := bat.newIterator(b);
-    X_107 := algebra.find(c,X_104);
-    X_109 := calc.+(X_105,X_107);
-    bat.insert(X_99,X_104,X_109);
-    redo (X_103,X_104,X_105) := bat.hasMoreElements(b);
-exit (X_103,X_104,X_105);
-    x:bat[:oid,:lng]  := X_99;
+    X_101 := bat.new(nil:oid,nil:lng);
+barrier (X_105,X_106,X_107) := bat.newIterator(b);
+    X_109 := algebra.find(c,X_106);
+    X_111 := calc.+(X_107,X_109);
+    bat.insert(X_101,X_106,X_111);
+    redo (X_105,X_106,X_107) := bat.hasMoreElements(b);
+exit (X_105,X_106,X_107);
+    x:bat[:oid,:lng]  := X_101;
     t1 := alarm.usec();
     mdb.setDebug(dbgmsk_restore);
     d0 := calc.-(t1,t0);
diff --git a/monetdb5/mal/Tests/tst911.mal b/monetdb5/mal/Tests/tst911.mal
--- a/monetdb5/mal/Tests/tst911.mal
+++ b/monetdb5/mal/Tests/tst911.mal
@@ -40,6 +40,7 @@ dbgmsk_keep := calc.xor(INT_MAX,dbgmsk_u
 dbgmsk_set := calc.and(dbgmsk_restore,dbgmsk_keep);
 mdb.setDebug(dbgmsk_set);
 
+r:= mmath.srand(0);
 barrier (go,i):= language.newRange(0:lng);
        k:= mmath.rand();
        l:= calc.lng(k);
diff --git a/monetdb5/mal/Tests/tst911.stable.out 
b/monetdb5/mal/Tests/tst911.stable.out
--- a/monetdb5/mal/Tests/tst911.stable.out
+++ b/monetdb5/mal/Tests/tst911.stable.out
@@ -96,6 +96,7 @@ function user.main():void;
     dbgmsk_keep := calc.xor(INT_MAX,dbgmsk_unset);
     dbgmsk_set := calc.and(dbgmsk_restore,dbgmsk_keep);
     mdb.setDebug(dbgmsk_set);
+    r := mmath.srand(0);
 barrier (go,i) := language.newRange(0:lng);
     k := mmath.rand();
     l := calc.lng(k);
diff --git a/monetdb5/mal/Tests/tst912.mal b/monetdb5/mal/Tests/tst912.mal
--- a/monetdb5/mal/Tests/tst912.mal
+++ b/monetdb5/mal/Tests/tst912.mal
@@ -59,6 +59,7 @@ dbgmsk_keep := calc.xor(INT_MAX,dbgmsk_u
 dbgmsk_set := calc.and(dbgmsk_restore,dbgmsk_keep);
 mdb.setDebug(dbgmsk_set);
 
+r:= mmath.srand(0);
 barrier (go,i):= language.newRange(0:lng);
        k:= mmath.rand();
        l:= calc.lng(k);
diff --git a/monetdb5/mal/Tests/tst912.stable.out 
b/monetdb5/mal/Tests/tst912.stable.out
--- a/monetdb5/mal/Tests/tst912.stable.out
+++ b/monetdb5/mal/Tests/tst912.stable.out
@@ -122,6 +122,7 @@ function user.main():void;
     dbgmsk_keep := calc.xor(INT_MAX,dbgmsk_unset);
     dbgmsk_set := calc.and(dbgmsk_restore,dbgmsk_keep);
     mdb.setDebug(dbgmsk_set);
+    r := mmath.srand(0);
 barrier (go,i) := language.newRange(0:lng);
     k := mmath.rand();
     l := calc.lng(k);
diff --git a/monetdb5/mal/Tests/venks.mal b/monetdb5/mal/Tests/venks.mal
--- a/monetdb5/mal/Tests/venks.mal
+++ b/monetdb5/mal/Tests/venks.mal
@@ -12,6 +12,7 @@ dbgmsk_keep := calc.xor(INT_MAX,dbgmsk_u
 dbgmsk_set := calc.and(dbgmsk_restore,dbgmsk_keep);
 mdb.setDebug(dbgmsk_set);
 
+r:= mmath.srand(0);
 barrier (go,i):= language.newRange(0:lng);
        k:= mmath.rand();
        l:= calc.int(k);
diff --git a/monetdb5/mal/Tests/venks.stable.out 
b/monetdb5/mal/Tests/venks.stable.out
--- a/monetdb5/mal/Tests/venks.stable.out
+++ b/monetdb5/mal/Tests/venks.stable.out
@@ -87,6 +87,7 @@ function user.main():void;
     dbgmsk_keep := calc.xor(INT_MAX,dbgmsk_unset);
     dbgmsk_set := calc.and(dbgmsk_restore,dbgmsk_keep);
     mdb.setDebug(dbgmsk_set);
+    r := mmath.srand(0:int);
 barrier (go,i) := language.newRange(0:lng);
     k := mmath.rand();
     l := calc.int(k);
diff --git a/monetdb5/mal/mal_interpreter.mx b/monetdb5/mal/mal_interpreter.mx
--- a/monetdb5/mal/mal_interpreter.mx
+++ b/monetdb5/mal/mal_interpreter.mx
@@ -1621,10 +1621,11 @@ safeguardStack(Client cntxt, MalBlkPtr m
                stkpc= mb->stop;
                continue;
        }
-@
- * @-
+@c
+/*
  * After the expression has been evaluated we should check for a
  * possible change in the control flow.
+ */
 @= MALflowofcontrol
        switch (pci->barrier) {
        case BARRIERsymbol:
@@ -1761,7 +1762,8 @@ safeguardStack(Client cntxt, MalBlkPtr m
                stkpc++;
        }
 
-@
+@c
+/*
  * @+ Assignment command
  * The assignment statement copies values around on the stack frame,
  * including multiple assignments.
@@ -1774,7 +1776,7 @@ safeguardStack(Client cntxt, MalBlkPtr m
  * The before after calls should be reconsidered here, because
  * their. They seem superflous and the way they are used will
  * cause errors in multi-assignment statements.
- * @-
+ */
 @= assignStmt
 {
        @:safeTarget(@1)@
@@ -1790,8 +1792,8 @@ safeguardStack(Client cntxt, MalBlkPtr m
        @:exceptionHndlr(@1, @2, @3)@
        @:timingHndlr(@1)@
 }
-@
- * @-
+@c
+/*
  * @node MAL API, Exception Handling, The MAL Interpreter, The MAL Interpreter
  *
  * @+ MAL API
@@ -1827,6 +1829,7 @@ safeguardStack(Client cntxt, MalBlkPtr m
  *
  * Before we execute an instruction the variables to be garbage collected
  * are identified. In the post-execution phase they are removed.
+ */
 @= safeTarget
 #ifdef STACKTRACE
        printf("safeTarget %d\n", garbageControl(pci));
@@ -1930,8 +1933,6 @@ safeguardStack(Client cntxt, MalBlkPtr m
                        }
                }
        }
-@
- * @-
 @= commandcall
 {
        @:safeTarget(@1)@
@@ -2050,8 +2051,6 @@ safeguardStack(Client cntxt, MalBlkPtr m
        @:exceptionHndlr(@1,@2,@3)@
        @:timingHndlr(@1,@2)@
 }
-@
- * @-
 @= patterncall
        if (pci->fcn == NULL) {
                ret = createScriptException(mb, stkpc, MAL, NULL,
@@ -2063,13 +2062,12 @@ safeguardStack(Client cntxt, MalBlkPtr m
_______________________________________________
Checkin-list mailing list
[email protected]
http://mail.monetdb.org/mailman/listinfo/checkin-list

Reply via email to