Changeset: 9883d716b3d4 for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=9883d716b3d4
Modified Files:
        MonetDB4/tests/BugsViaSourgeforce/Tests/ID.853867.timeout
        clients/src/mapiclient/ReadlineTools.mx
        clients/src/mapiclient/mclient.mx
        sql/src/backends/monet5/sql_scenario.mx
        sql/src/test/BugTracker-2010/Tests/error-truncated.Bug-2615.timeout
Branch: default
Log Message:

merge


diffs (truncated from 7480 to 300 lines):

diff -r 194837e195b5 -r 9883d716b3d4 
MonetDB4/tests/BugsViaSourgeforce/Tests/ID.853867.timeout
--- a/MonetDB4/tests/BugsViaSourgeforce/Tests/ID.853867.timeout Wed Sep 01 
09:19:49 2010 +0200
+++ /dev/null   Thu Jan 01 00:00:00 1970 +0000
@@ -1,1 +0,0 @@
-0.3
diff -r 194837e195b5 -r 9883d716b3d4 MonetDB5/ChangeLog-Archive
--- a/MonetDB5/ChangeLog-Archive        Wed Sep 01 09:19:49 2010 +0200
+++ b/MonetDB5/ChangeLog-Archive        Wed Sep 01 09:50:16 2010 +0200
@@ -7,7 +7,7 @@
 
 * Fri Aug 20 2010 Sjoerd Mullender <[email protected]> - 5.20.5-20100823
 - A bug was fixed where on 32 bit systems (or 64 bit systems using 32 bit
-  OIDs), values where sometimes written as 32 bits but read as 64 bits.
+  OIDs), values were sometimes written as 32 bits but read as 64 bits.
   This fixes bugs 2644 and 2654.
 
 * Thu Aug 19 2010 Sjoerd Mullender <[email protected]> - 5.20.5-20100823
diff -r 194837e195b5 -r 9883d716b3d4 MonetDB5/ChangeLog.Jun2010
--- a/MonetDB5/ChangeLog.Jun2010        Wed Sep 01 09:19:49 2010 +0200
+++ b/MonetDB5/ChangeLog.Jun2010        Wed Sep 01 09:50:16 2010 +0200
@@ -1,3 +1,8 @@
 # ChangeLog file for MonetDB5
 # This file is updated with Maddlog
 
+* Mon Aug 30 2010 Sjoerd Mullender <[email protected]>
+- When attempting to insert incorrect UTF-8 sequences in a COPY INTO
+  statement, the error message was truncated.  This is now fixed.
+  Bug 2575.
+
diff -r 194837e195b5 -r 9883d716b3d4 MonetDB5/MonetDB-server.spec
--- a/MonetDB5/MonetDB-server.spec      Wed Sep 01 09:19:49 2010 +0200
+++ b/MonetDB5/MonetDB-server.spec      Wed Sep 01 09:50:16 2010 +0200
@@ -226,7 +226,7 @@
 
 * Fri Aug 20 2010 Sjoerd Mullender <[email protected]> - 5.20.5-20100823
 - A bug was fixed where on 32 bit systems (or 64 bit systems using 32 bit
-  OIDs), values where sometimes written as 32 bits but read as 64 bits.
+  OIDs), values were sometimes written as 32 bits but read as 64 bits.
   This fixes bugs 2644 and 2654.
 
 * Thu Aug 19 2010 Sjoerd Mullender <[email protected]> - 5.20.5-20100823
diff -r 194837e195b5 -r 9883d716b3d4 MonetDB5/debian/changelog
--- a/MonetDB5/debian/changelog Wed Sep 01 09:19:49 2010 +0200
+++ b/MonetDB5/debian/changelog Wed Sep 01 09:50:16 2010 +0200
@@ -20,7 +20,7 @@
 monetdb5-server (5.20.5-20100823) unstable; urgency=low
 
   * A bug was fixed where on 32 bit systems (or 64 bit systems using 32 bit
-    OIDs), values where sometimes written as 32 bits but read as 64 bits.
+    OIDs), values were sometimes written as 32 bits but read as 64 bits.
     This fixes bugs 2644 and 2654.
 
  -- Sjoerd Mullender <[email protected]>  Fri, 20 Aug 2010 10:13:12 +0200
diff -r 194837e195b5 -r 9883d716b3d4 MonetDB5/src/mal/mal_scenario.mx
--- a/MonetDB5/src/mal/mal_scenario.mx  Wed Sep 01 09:19:49 2010 +0200
+++ b/MonetDB5/src/mal/mal_scenario.mx  Wed Sep 01 09:50:16 2010 +0200
@@ -623,7 +623,7 @@
        if (setjmp( c->exception_buf) < 0) 
                c->mode = FINISHING;
 #ifdef HAVE_TIMES
-               times(&t0);
+       times(&t0);
 #endif
        while (c->mode > FINISHING || msg != MAL_SUCCEED) {
                if (msg != MAL_SUCCEED){
diff -r 194837e195b5 -r 9883d716b3d4 MonetDB5/src/modules/mal/tablet_sql.mx
--- a/MonetDB5/src/modules/mal/tablet_sql.mx    Wed Sep 01 09:19:49 2010 +0200
+++ b/MonetDB5/src/modules/mal/tablet_sql.mx    Wed Sep 01 09:50:16 2010 +0200
@@ -166,12 +166,16 @@
                char *val;
                val = *s ? GDKstrdup(s) : GDKstrdup("");
                if ( *err == NULL){
-                       snprintf(buf, BUFSIZ, "value '%.*s%s' from line "  
BUNFMT
-                                        " field %d not inserted, expecting 
type %s\n",
-                                        BUFSIZ - 200, val,
-                                        strlen(val) > (size_t) BUFSIZ - 200 ? 
"..." : "",
-                                        BATcount(fmt->c[0])+1,
-                                        col, fmt->type);
+                       if (snprintf(buf, BUFSIZ, "value '%.*s%s' from line " 
BUNFMT
+                                                " field %d not inserted, 
expecting type %s\n",
+                                                BUFSIZ - 200, val,
+                                                strlen(val) > (size_t) BUFSIZ 
- 200 ? "..." : "",
+                                                BATcount(fmt->c[0])+1,
+                                                col, fmt->type) < 0)
+                               snprintf(buf, BUFSIZ, "value from line " BUNFMT
+                                                " field %d not inserted, 
expecting type %s\n",
+                                                BATcount(fmt->c[0])+1,
+                                                col, fmt->type);
                        *err= GDKstrdup(buf);
                }
                GDKfree(val);
diff -r 194837e195b5 -r 9883d716b3d4 MonetDB5/src/optimizer/opt_mitosis.mx
--- a/MonetDB5/src/optimizer/opt_mitosis.mx     Wed Sep 01 09:19:49 2010 +0200
+++ b/MonetDB5/src/optimizer/opt_mitosis.mx     Wed Sep 01 09:50:16 2010 +0200
@@ -59,6 +59,7 @@
 #include "opt_prelude.h"
 #include "opt_support.h"
 
+#define MAXSLICES 256          /* to be refined */
 @:exportOptimizer(mitosis)@
 #define OPTDEBUGmitosis  if ( optDebug & ((lng)1 <<DEBUG_OPT_MITOSIS) )
 #endif
@@ -147,8 +148,8 @@
                        pieces = (int) (rowcnt /r+1);
                if (pieces < GDKnr_threads )
                        pieces = GDKnr_threads;
-               if (pieces > 256)
-                       pieces = 256; /* cut off potential plan explosion */
+               if (pieces > MAXSLICES)
+                       pieces = MAXSLICES; /* cut off potential plan explosion 
*/
 
                if ( (size_t) rowcnt < (size_t) pieces || pieces <=1)
                        return 0;
diff -r 194837e195b5 -r 9883d716b3d4 MonetDB5/src/optimizer/opt_tarantula.mx
--- a/MonetDB5/src/optimizer/opt_tarantula.mx   Wed Sep 01 09:19:49 2010 +0200
+++ b/MonetDB5/src/optimizer/opt_tarantula.mx   Wed Sep 01 09:50:16 2010 +0200
@@ -192,13 +192,14 @@
     int inuse;
 } Peer;
 
-opt_export int TARgetPeer(str uri);
-
+#include "opt_mitosis.h"
 #define MINLEGSIZE 5   /* number of MAL instructions to consider for a leg */
-#define MAXSITES 2048   /* should become dynamic at some point */
+#define MAXSHARE 64            /* number of input output arguments to consider 
*/
+#define MAXSITES MAXSLICES   /* should become dynamic at some point */
 Peer peers[MAXSITES];    /* registry of peer servers */
 int TARnrpeers=0;
 bte tarantulaLocal=0;
+opt_export int TARgetPeer(str uri);
 
 @:exportOptimizer(tarantula)@
 
@@ -214,6 +215,7 @@
 #include <mapilib/Mapi.h>
 #include "remote.h"
 #include "mal_sabaoth.h"
+
 @-
 The algorithm consists of several steps. The first one
 replaces the original query and creates the leg functions.
@@ -385,13 +387,13 @@
        return MAL_SUCCEED;
 }
 @-
-The TARmakeleg walks through the MAL block and extracts the dependent 
structure for
+The TARmakeLeg walks through the MAL block and extracts the dependent 
structure for
 execution. Note that information van be recomputed in all legs. Possibly doing 
duplicate work.
 Keep track of the variables that will be used outside the leg. They have to be 
exported.
 Likewise, look for variables that are produced by other legs and will become 
input parameters.
 @c
 static MalBlkPtr 
-TARmakeleg(Client cntxt, MalBlkPtr mb, InstrPtr *old, int pc, int idx, int 
*input, int *output, InstrPtr *list)
+TARmakeLeg(Client cntxt, MalBlkPtr mb, InstrPtr *old, int pc, int idx, int 
leg, int input[MAXSLICES][MAXSHARE], int output[MAXSLICES][MAXSHARE], InstrPtr 
*list)
 {
        MalBlkPtr tm = NULL;
        InstrPtr p = NULL, sig;
@@ -421,14 +423,14 @@
 
        OPTDEBUGtarantula{
                mnstr_printf(cntxt->fdout,"#input ");
-               for(i=0; input[i]; i++)
-                       mnstr_printf(cntxt->fdout,"%d, ", input[i]);
+               for(i=0; input[leg][i]; i++)
+                       mnstr_printf(cntxt->fdout,"%d, ", input[leg][i]);
                mnstr_printf(cntxt->fdout,"\n#output ");
-               for(i=0; output[i]; i++)
-                       mnstr_printf(cntxt->fdout,"%d, ", output[i]);
+               for(i=0; output[leg][i]; i++)
+                       mnstr_printf(cntxt->fdout,"%d, ", output[leg][i]);
                mnstr_printf(cntxt->fdout,"\n");
        }
-       alias= (int*) GDKzalloc(mb->vtop * sizeof(int));
+       alias= (int*) GDKzalloc(2 * mb->vtop * sizeof(int));
 
        snprintf(buf,BUFSIZ,"%s_%d_%d", getFunctionId(getInstrPtr(mb,0)), 
getArg(old[pc],0), idx-old[pc]->retc);
        putName(buf,strlen(buf));
@@ -439,18 +441,18 @@
        sig= getInstrPtr(tm,0);
        setVarType(tm,getArg(sig,0), getArgType(mb,old[pc],idx));
        setVarUDFtype(tm,getArg(sig,0));
-       alias[output[0]] = getArg(sig,0);
+       alias[output[leg][0]] = getArg(sig,0);
 
        /* add the return variables */
-       for ( i = 1; output[i]>0; i++){
-               alias[output[i]] = cloneVariable(tm,mb,output[i]);
-               sig = pushReturn(tm, sig, alias[output[i]]);
+       for ( i = 1; output[leg][i]>0; i++){
+               alias[output[leg][i]] = cloneVariable(tm,mb,output[leg][i]);
+               sig = pushReturn(tm, sig, alias[output[leg][i]]);
                setVarUDFtype(tm,getArg(sig,i));
        }
        /* add the arguments from the query template */
-       for ( i = 0; input[i]> 0; i++){
-               alias[input[i]] = cloneVariable(tm,mb,input[i]);
-               sig = pushArgument(tm, sig, alias[input[i]]);
+       for ( i = 0; input[leg][i]> 0; i++){
+               alias[input[leg][i]] = cloneVariable(tm,mb,input[leg][i]);
+               sig = pushArgument(tm, sig, alias[input[leg][i]]);
        }
 
        /* include the necessary functions */
@@ -472,8 +474,8 @@
        p->argc= 0;
        for ( i = 0; i < sig->retc; i++)
                p = pushReturn(tm,p, getArg(sig,i));
-       for ( i = 0; output[i]>0; i++)
-               p = pushArgument(tm,p, alias[output[i]]);
+       for ( i = 0; output[leg][i]>0; i++)
+               p = pushArgument(tm,p, alias[output[leg][i]]);
        pushEndInstruction(tm);
        clrDeclarations(tm);
        chkProgram(cntxt->nspace,tm);
@@ -582,35 +584,33 @@
 assembled using a pack and returned to the caller.
 @c
 static void
-TARmakeExecution(Client cntxt, MalBlkPtr mb, InstrPtr *old, int pc, MalBlkPtr 
leg)
+TARmakeStub(Client cntxt, MalBlkPtr mb, InstrPtr *old, int pc, int idx, int 
leg, int input[MAXSLICES][MAXSHARE], int output[MAXSLICES][MAXSHARE])
 {
        Symbol s;
        MalBlkPtr tm;
        char fcn[BUFSIZ];
-       InstrPtr lsig,sig, r, q;
+       InstrPtr sig, r, q;
        int conn,j,l;
        int arg[1024];
 
        /* generate stubb code for the remote execution */
-       snprintf(fcn,BUFSIZ,"rmt_%s_%d", getFunctionId(getInstrPtr(mb,0)), 
getArg(old[pc],0));
+       snprintf(fcn,BUFSIZ,"rmt_%s_%d_%d", getFunctionId(getInstrPtr(mb,0)), 
getArg(old[pc],0),leg);
        s= newFunction(tarantulaRef, putName(fcn,strlen(fcn)), FUNCTIONsymbol);
        insertSymbol(findModule(cntxt->nspace,tarantulaRef),s);
        tm= s->def;
        sig = getInstrPtr(tm,0);
 
        /* add the return values */
-       lsig= getInstrPtr(leg,0);
-       setVarType(tm, getArg(sig,0), getVarType(leg,getArg(lsig,0)));
-       for ( j=1;j < lsig->retc; j++)
-               sig= pushReturn(tm, sig, cloneVariable(tm, leg, 
getArg(lsig,j)));
+       setVarType(tm, getArg(sig,0), getVarType(mb,getArg(old[pc],idx)));
+       setVarUDFtype(tm, getArg(sig,0));
+       for ( j=1; output[leg][j]; j++)
+               sig= pushReturn(tm, sig, cloneVariable(tm, mb, output[leg][j]));
 
        /* get the input arguments */
        sig = pushArgument(tm,sig,newVariable(tm,GDKstrdup("node"),TYPE_int));
-       sig = pushArgument(tm,sig,newVariable(tm,GDKstrdup("fcn"),TYPE_str));
        /* copy the query arguments */
-       for ( j=lsig->retc; j < lsig->argc; j++)
-               sig= pushArgument(tm, sig, cloneVariable(tm, leg, 
getArg(lsig,j)));
-
+       for ( j=0; input[leg][j]; j++)
+               sig= pushArgument(tm, sig, cloneVariable(tm, mb, 
input[leg][j]));
 
        /* conn := tarantula.connect(node); */
        q = newStmt(tm, tarantulaRef,connectRef);
@@ -620,7 +620,7 @@
        /* get addition arguments needed in a leg */
        /* k:= remote.put(conn,kvar) */
        for (j= 0; j < sig->argc; j++)
-       if ( j != sig->retc && j != sig->retc+1 ){
+       if ( j != sig->retc ){
                q= newFcnCall(tm,remoteRef,putRef);
                setVarType(tm, getArg(q,0), TYPE_str);
                setVarUDFtype(tm, getArg(q,0));
@@ -630,15 +630,16 @@
        }
 
        /* (k1,...kn):= remote.exec(conn,tarantula,qry,version....) */
+       snprintf(fcn,BUFSIZ,"%s_%d_%d", getFunctionId(getInstrPtr(mb,0)), 
getArg(old[pc],0),leg);
        q= newFcnCall(tm,remoteRef,execRef);
        q->retc=  q->argc= 0;
        for (j=0; j < sig->retc; j++)
                q = pushReturn(tm,q,arg[j]);
        q= pushArgument(tm,q,conn);
        q= pushStr(tm,q,tarantulaRef);
-       q= pushArgument(tm,q,getArg(sig,sig->retc+1));
+       q= pushStr(tm,q,putName(fcn,strlen(fcn)));
        /* deal with all arguments ! */
-       for (j=sig->retc+2; j < sig->argc; j++)
+       for (j=sig->retc+1; j < sig->argc; j++)
                q = pushArgument(tm,q,arg[j]);
 
 
@@ -682,38 +683,56 @@
 @-
 The legs of the tarantula can be executed in parallel.
 Watch out, the arguments should occupy the head of the stack.
+Moreover, all legs may share variables.
 @c
 static void
-TARmakeRun(Client cntxt, MalBlkPtr mb, InstrPtr *old, int pc, int nodes, int 
legs, int *input, int *output)
+TARmakeRun(Client cntxt, MalBlkPtr mb, InstrPtr *old, int pc, int nodes, int 
legs, int input[MAXSLICES][MAXSHARE], int output[MAXSLICES][MAXSHARE])
 {
        Symbol s;
        MalBlkPtr tm;
_______________________________________________
Checkin-list mailing list
[email protected]
http://mail.monetdb.org/mailman/listinfo/checkin-list

Reply via email to