MonetDB: jitudf - .hgignore: added autogen-generated sql/backend...

2017-06-19 Thread Stefan Manegold
Changeset: 90f9fd01aaff for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=90f9fd01aaff
Modified Files:
.hgignore
Branch: jitudf
Log Message:

.hgignore: added autogen-generated sql/backends/monet5/UDF/capi/cheader.text.h


diffs (11 lines):

diff --git a/.hgignore b/.hgignore
--- a/.hgignore
+++ b/.hgignore
@@ -40,6 +40,7 @@ doc.lst
 install.lst
 monetdb_config.h.in
 *.pyc
+sql/backends/monet5/UDF/capi/cheader.text.h
 
 # files generated by various editors
 *.swp
___
checkin-list mailing list
checkin-list@monetdb.org
https://www.monetdb.org/mailman/listinfo/checkin-list


MonetDB: jitudf - C-API: make sure we include all required files...

2017-06-19 Thread Stefan Manegold
Changeset: 9a06cca8faa3 for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=9a06cca8faa3
Modified Files:
sql/backends/monet5/UDF/capi/Makefile.ag
Branch: jitudf
Log Message:

C-API: make sure we include all required files in source tarball
such that we can actually build from that source tarball.


diffs (12 lines):

diff --git a/sql/backends/monet5/UDF/capi/Makefile.ag 
b/sql/backends/monet5/UDF/capi/Makefile.ag
--- a/sql/backends/monet5/UDF/capi/Makefile.ag
+++ b/sql/backends/monet5/UDF/capi/Makefile.ag
@@ -23,7 +23,7 @@ MTSAFE
 lib__capi = {
MODULE
DIR = libdir/monetdb5
-   SOURCES = capi.c capi.h
+   SOURCES = capi.c capi.h cheader.h cheader.text.h
LIBS = ../../../../../monetdb5/tools/libmonetdb5 \
   ../../../../../gdk/libbat \
$(MALLOC_LIBS)
___
checkin-list mailing list
checkin-list@monetdb.org
https://www.monetdb.org/mailman/listinfo/checkin-list


MonetDB: malerrors - Patching the lower errors to comply for SQL.

2017-06-19 Thread Martin Kersten
Changeset: 579d80b75012 for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=579d80b75012
Modified Files:
sql/backends/monet5/sql_scenario.c
Branch: malerrors
Log Message:

Patching the lower errors to comply for SQL.


diffs (25 lines):

diff --git a/sql/backends/monet5/sql_scenario.c 
b/sql/backends/monet5/sql_scenario.c
--- a/sql/backends/monet5/sql_scenario.c
+++ b/sql/backends/monet5/sql_scenario.c
@@ -1240,5 +1240,21 @@ SQLCacheRemove(Client c, str nme)
 
 str
 SQLcallback(Client c, str msg){
+   if(msg &&  (strstr(msg, "MALexception") || strstr(msg,"GDKexception"))) 
{
+   // massage the error to comply with SQL
+   char *s;
+   s= strchr(msg,(int)':');
+   if (s ) 
+   s= strchr(msg,(int)':');
+   if( s){
+   char newerr[1024];
+   s++;
+   strncpy(newerr, msg, s - msg);
+   newerr[s-msg] = 0;
+   snprintf(newerr + (s-msg), 1024 -(s-msg), "SQLSTATE 
HY020 !%s",s);
+   GDKfree(msg);
+   msg = GDKstrdup(newerr);
+   }
+   }
return MALcallback(c,msg);
 }
___
checkin-list mailing list
checkin-list@monetdb.org
https://www.monetdb.org/mailman/listinfo/checkin-list


MonetDB: Jul2017 - Only look at the unsafe property when decidin...

2017-06-19 Thread Sjoerd Mullender
Changeset: 4b31e29fee1d for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=4b31e29fee1d
Modified Files:
clients/Tests/exports.stable.out
monetdb5/modules/mal/manifold.c
monetdb5/modules/mal/manifold.h
monetdb5/optimizer/opt_dataflow.c
monetdb5/optimizer/opt_multiplex.c
monetdb5/optimizer/opt_support.c
Branch: Jul2017
Log Message:

Only look at the unsafe property when deciding whether the instruction can be 
elided.


diffs (90 lines):

diff --git a/clients/Tests/exports.stable.out b/clients/Tests/exports.stable.out
--- a/clients/Tests/exports.stable.out
+++ b/clients/Tests/exports.stable.out
@@ -1274,7 +1274,7 @@ size_t MALrunningThreads(void);
 str MALstartDataflow(Client cntxt, MalBlkPtr mb, MalStkPtr stk, InstrPtr pci);
 str MANIFOLDevaluate(Client cntxt, MalBlkPtr mb, MalStkPtr stk, InstrPtr pci);
 str MANIFOLDremapMultiplex(Client cntxt, MalBlkPtr mb, MalStkPtr stk, InstrPtr 
p);
-MALfcn MANIFOLDtypecheck(Client cntxt, MalBlkPtr mb, InstrPtr pci);
+MALfcn MANIFOLDtypecheck(Client cntxt, MalBlkPtr mb, InstrPtr pci, int 
checkprops);
 str MANUALcreateOverview(Client cntxt, MalBlkPtr mb, MalStkPtr stk, InstrPtr 
pci);
 str MATHbinary_ATAN2dbl(dbl *res, const dbl *a, const dbl *b);
 str MATHbinary_ATAN2flt(flt *res, const flt *a, const flt *b);
diff --git a/monetdb5/modules/mal/manifold.c b/monetdb5/modules/mal/manifold.c
--- a/monetdb5/modules/mal/manifold.c
+++ b/monetdb5/modules/mal/manifold.c
@@ -195,7 +195,7 @@ bunins_failed:
  * to use this implementation instead of the MAL loop.
  */
 MALfcn
-MANIFOLDtypecheck(Client cntxt, MalBlkPtr mb, InstrPtr pci){
+MANIFOLDtypecheck(Client cntxt, MalBlkPtr mb, InstrPtr pci, int checkprops){
int i, k, tpe= 0;
InstrPtr q=0;
MalBlkPtr nmb;
@@ -237,7 +237,7 @@ MANIFOLDtypecheck(Client cntxt, MalBlkPt
// Localize the underlying scalar operator
typeChecker(cntxt->fdout, cntxt->nspace, nmb, q, TRUE);
if (nmb->errors || q->fcn == NULL || q->token != CMDcall ||
-   (q->blk && q->blk->unsafeProp) )
+   (checkprops && q->blk && q->blk->unsafeProp) )
fcn = NULL;
else {
fcn = q->fcn;
@@ -266,7 +266,7 @@ MANIFOLDevaluate(Client cntxt, MalBlkPtr
str msg = MAL_SUCCEED;
MALfcn fcn;
 
-   fcn= MANIFOLDtypecheck(cntxt,mb,pci);
+   fcn= MANIFOLDtypecheck(cntxt,mb,pci,0);
if( fcn == NULL)
throw(MAL, "mal.manifold", "Illegal manifold function call");
 
diff --git a/monetdb5/modules/mal/manifold.h b/monetdb5/modules/mal/manifold.h
--- a/monetdb5/modules/mal/manifold.h
+++ b/monetdb5/modules/mal/manifold.h
@@ -20,7 +20,7 @@
 
 /* #define _DEBUG_MANIFOLD_*/
 
-mal_export MALfcn MANIFOLDtypecheck(Client cntxt, MalBlkPtr mb, InstrPtr pci);
+mal_export MALfcn MANIFOLDtypecheck(Client cntxt, MalBlkPtr mb, InstrPtr pci, 
int checkprops);
 mal_export str MANIFOLDevaluate(Client cntxt, MalBlkPtr mb, MalStkPtr stk, 
InstrPtr pci);
 mal_export str MANIFOLDremapMultiplex(Client cntxt, MalBlkPtr mb, MalStkPtr 
stk, InstrPtr p);
 
diff --git a/monetdb5/optimizer/opt_dataflow.c 
b/monetdb5/optimizer/opt_dataflow.c
--- a/monetdb5/optimizer/opt_dataflow.c
+++ b/monetdb5/optimizer/opt_dataflow.c
@@ -96,7 +96,7 @@ dataflowBreakpoint(Client cntxt, MalBlkP
int j;
 
if (p->token == ENDsymbol || p->barrier || isUnsafeFunction(p) || 
-  (isMultiplex(p) && MANIFOLDtypecheck(cntxt,mb,p) == NULL) ){
+   (isMultiplex(p) && MANIFOLDtypecheck(cntxt,mb,p,0) == NULL) ){
 #ifdef DEBUG_OPT_DATAFLOW
fprintf(stderr,"#breakpoint on instruction\n");
 #endif
diff --git a/monetdb5/optimizer/opt_multiplex.c 
b/monetdb5/optimizer/opt_multiplex.c
--- a/monetdb5/optimizer/opt_multiplex.c
+++ b/monetdb5/optimizer/opt_multiplex.c
@@ -230,7 +230,7 @@ OPTmultiplexImplementation(Client cntxt,
for (i = 0; i < limit; i++) {
p = old[i];
if (msg == MAL_SUCCEED && isMultiplex(p)) { 
-   if ( MANIFOLDtypecheck(cntxt,mb,p) != NULL){
+   if ( MANIFOLDtypecheck(cntxt,mb,p,0) != NULL){
setFunctionId(p, manifoldRef);
p->typechk = TYPE_UNKNOWN;
pushInstruction(mb, p);
diff --git a/monetdb5/optimizer/opt_support.c b/monetdb5/optimizer/opt_support.c
--- a/monetdb5/optimizer/opt_support.c
+++ b/monetdb5/optimizer/opt_support.c
@@ -453,7 +453,7 @@ mayhaveSideEffects(Client cntxt, MalBlkP
return TRUE;
if (getModuleId(p) != malRef || getFunctionId(p) != multiplexRef) 
return hasSideEffects(mb, p, strict);
-   if (MANIFOLDtypecheck(cntxt,mb,p) == NULL)
+   if (MANIFOLDtypecheck(cntxt,mb,p,1) == NULL)
return TRUE;
return FALSE;
 }
___
checkin-list mailing list

MonetDB: Jul2017 - Save the unsafe property in the correct place.

2017-06-19 Thread Sjoerd Mullender
Changeset: a196a8002c2f for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=a196a8002c2f
Modified Files:
clients/Tests/MAL-signatures.stable.out
clients/Tests/MAL-signatures.stable.out.int128
monetdb5/mal/mal_parser.c
monetdb5/optimizer/Tests/inline06.stable.out
Branch: Jul2017
Log Message:

Save the unsafe property in the correct place.


diffs (truncated from 575 to 300 lines):

diff --git a/clients/Tests/MAL-signatures.stable.out 
b/clients/Tests/MAL-signatures.stable.out
--- a/clients/Tests/MAL-signatures.stable.out
+++ b/clients/Tests/MAL-signatures.stable.out
@@ -456,13 +456,13 @@ Ready.
 [ "aggr",  "variancep","command aggr.variancep(b:bat[:lng], 
g:bat[:oid], e:bat[:any_1]):bat[:dbl] ",   "AGGRvariancep3_dbl;",  "Grouped 
tail variance (population/biased) on lng"  ]
 [ "aggr",  "variancep","command aggr.variancep(b:bat[:sht], 
g:bat[:oid], e:bat[:any_1]):bat[:dbl] ",   "AGGRvariancep3_dbl;",  "Grouped 
tail variance (population/biased) on sht"  ]
 [ "aggr",  "variancep","command aggr.variancep(b:bat[:any_2]):dbl ",   
"ALGvariancep;","Gives the variance of all tail values" ]
-[ "alarm", "ctime","command alarm.ctime():str ",   "ALARMctime;",  
"Return the current time as a C-time string."   ]
+[ "alarm", "ctime","unsafe command alarm.ctime():str ",
"ALARMctime;",  "Return the current time as a C-time string."   ]
 [ "alarm", "epilogue", "command alarm.epilogue():void ",   
"ALARMepilogue;",   "Finalize alarm module."]
-[ "alarm", "epoch","command alarm.epoch():int ",   "ALARMepoch;",  
"Return the current time as UNIX epoch."]
+[ "alarm", "epoch","unsafe command alarm.epoch():int ",
"ALARMepoch;",  "Return the current time as UNIX epoch."]
 [ "alarm", "prelude",  "command alarm.prelude():void ",
"ALARMprelude;","Initialize alarm module."  ]
-[ "alarm", "sleep","command alarm.sleep(secs:int):void ",  
"ALARMsleep;",  "Sleep a few seconds"   ]
-[ "alarm", "time", "command alarm.time():int ","ALARMtime;",   "Return 
time in milliseconds."  ]
-[ "alarm", "usec", "command alarm.usec():lng ","ALARMusec;",   "Return 
time in microseconds."  ]
+[ "alarm", "sleep","unsafe command alarm.sleep(secs:int):void ",   
"ALARMsleep;",  "Sleep a few seconds"   ]
+[ "alarm", "time", "unsafe command alarm.time():int ", "ALARMtime;",   
"Return time in milliseconds."  ]
+[ "alarm", "usec", "unsafe command alarm.usec():lng ", "ALARMusec;",   
"Return time in microseconds."  ]
 [ "algebra",   "antijoin", "function algebra.antijoin(l:bat[:any_1], 
r:bat[:any_1], sl:bat[:oid], sr:bat[:oid], nil_matches:bit, estimate:lng) 
(X_0:bat[:oid], X_1:bat[:oid]);",   "", ""  ]
 [ "algebra",   "bandjoin", "command algebra.bandjoin(l:bat[:any_1], 
r:bat[:any_1], sl:bat[:oid], sr:bat[:oid], c1:any_1, c2:any_1, li:bit, hi:bit, 
estimate:lng) (X_0:bat[:oid], X_1:bat[:oid]) ", "ALGbandjoin;", "Band join: 
values in l and r match if r - c1 <[=] l <[=] r + c2"   ]
 [ "algebra",   "copy", "command algebra.copy(b:bat[:any_1]):bat[:any_1] ", 
"ALGcopy;", "Returns physical copy of a BAT."   ]
@@ -6204,9 +6204,9 @@ Ready.
 [ "blob",  "toblob",   "command blob.toblob(v:str):blob ", 
"BLOBtoblob;",  "store a string as a blob." ]
 [ "blob",  "tostring", "command blob.tostring(v:blob):str ",   
"BLOBfromblob;","get the bytes from blob as a string, till\n\tthe first 
0 byte or the end of the blob"  ]
 [ "blob",  "tostring", "command blob.tostring(v:blob, index:int):str 
","BLOBfromidx;", "get the bytes from blob as a string,\n\t starting at 
byte 'index' till the first\n\t0 byte or the end of the blob."]
-[ "bstream",   "create",   "command bstream.create(s:streams, 
bufsize:int):bstream ",  "bstream_create_wrapwrap;", "create a buffered 
stream"  ]
-[ "bstream",   "destroy",  "command bstream.destroy(s:bstream):void ", 
"bstream_destroy_wrapwrap;","destroy bstream"   ]
-[ "bstream",   "read", "command bstream.read(s:bstream, size:int):int ",   
"bstream_read_wrapwrap;",   "read at least size bytes into the buffer of s" 
]
+[ "bstream",   "create",   "unsafe command bstream.create(s:streams, 
bufsize:int):bstream ",   "bstream_create_wrapwrap;", "create a 
buffered stream"  ]
+[ "bstream",   "destroy",  "unsafe command bstream.destroy(s:bstream):void 
",  "bstream_destroy_wrapwrap;","destroy bstream"   ]
+[ "bstream",   "read", "unsafe command bstream.read(s:bstream, size:int):int 
","bstream_read_wrapwrap;",   "read at least size bytes into the 
buffer of s" ]
 [ "calc",  "!=",   "pattern calc.!=(l:json, r:json):bit ", "CMDvarNE;",
"Return V1 != V2"   ]
 [ "calc",  "!=",   "pattern calc.!=(l:uuid, 

MonetDB: Jul2017 - Some approvals.

2017-06-19 Thread Sjoerd Mullender
Changeset: 0174461527bd for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=0174461527bd
Modified Files:
sql/test/BugTracker-2010/Tests/count-and-not.Bug-2663.stable.out
sql/test/BugTracker-2010/Tests/limit_in_prepare.Bug-2552.stable.out

sql/test/BugTracker-2010/Tests/not-in-union-except-union.Bug-2577.stable.out
sql/test/leaks/Tests/check1.stable.out
sql/test/leaks/Tests/check1.stable.out.int128
sql/test/leaks/Tests/check2.stable.out
sql/test/leaks/Tests/check2.stable.out.int128
sql/test/leaks/Tests/check3.stable.out
sql/test/leaks/Tests/check3.stable.out.int128
sql/test/leaks/Tests/check4.stable.out
sql/test/leaks/Tests/check4.stable.out.int128
sql/test/leaks/Tests/check5.stable.out
sql/test/leaks/Tests/check5.stable.out.int128
Branch: Jul2017
Log Message:

Some approvals.


diffs (291 lines):

diff --git a/sql/test/BugTracker-2010/Tests/count-and-not.Bug-2663.stable.out 
b/sql/test/BugTracker-2010/Tests/count-and-not.Bug-2663.stable.out
--- a/sql/test/BugTracker-2010/Tests/count-and-not.Bug-2663.stable.out
+++ b/sql/test/BugTracker-2010/Tests/count-and-not.Bug-2663.stable.out
@@ -29,7 +29,7 @@ Ready.
 #  FROM tables
 # GROUP BY id) as i
 # WHERE NOT (1 < i.cnt);
-% .L45 # table_name
+% .L46 # table_name
 % res # name
 % boolean # type
 % 5 # length
@@ -39,7 +39,7 @@ Ready.
 #  FROM tables
 # GROUP BY id) as i
 # WHERE NOT (i.cnt > 1);
-% .L45 # table_name
+% .L46 # table_name
 % res # name
 % boolean # type
 % 5 # length
@@ -49,7 +49,7 @@ Ready.
 #  FROM tables
 # GROUP BY id) as i
 # WHERE NOT (1 < i.cnt);
-% .L44 # table_name
+% .L45 # table_name
 % res # name
 % boolean # type
 % 5 # length
@@ -59,7 +59,7 @@ Ready.
 #  FROM tables
 # GROUP BY id) as i
 # WHERE 1 >= i.cnt;
-% .L45 # table_name
+% .L46 # table_name
 % res # name
 % boolean # type
 % 5 # length
@@ -69,7 +69,7 @@ Ready.
 #  FROM tables
 # GROUP BY id) as i
 # WHERE i.cnt <= 1;
-% .L45 # table_name
+% .L46 # table_name
 % res # name
 % boolean # type
 % 5 # length
@@ -79,7 +79,7 @@ Ready.
 #  FROM tables
 # GROUP BY id) as i
 # WHERE 1 < i.cnt;
-% .L45 # table_name
+% .L46 # table_name
 % res # name
 % boolean # type
 % 5 # length
diff --git 
a/sql/test/BugTracker-2010/Tests/limit_in_prepare.Bug-2552.stable.out 
b/sql/test/BugTracker-2010/Tests/limit_in_prepare.Bug-2552.stable.out
--- a/sql/test/BugTracker-2010/Tests/limit_in_prepare.Bug-2552.stable.out
+++ b/sql/test/BugTracker-2010/Tests/limit_in_prepare.Bug-2552.stable.out
@@ -108,7 +108,7 @@ Ready.
 % sys.tbls,sys.tbls,   sys.tbls,   sys.tbls,   sys.tbls,   
sys.tbls,   sys.tbls,   sys.tbls # table_name
 % name,schema_id,  query,  type,   system, commit_action,  
readonly,   temporary # name
 % varchar, int,varchar,smallint,   boolean,
smallint,   boolean,smallint # type
-% 12,  4,  379,1,  5,  1,  5,  1 # length
+% 12,  4,  169,1,  5,  1,  5,  1 # length
 [ "schemas",   2000,   NULL,   0,  true,   0,  false,  0   ]
 [ "types", 2000,   NULL,   0,  true,   0,  false,  0   ]
 [ "functions", 2000,   NULL,   0,  true,   0,  false,  0   ]
diff --git 
a/sql/test/BugTracker-2010/Tests/not-in-union-except-union.Bug-2577.stable.out 
b/sql/test/BugTracker-2010/Tests/not-in-union-except-union.Bug-2577.stable.out
--- 
a/sql/test/BugTracker-2010/Tests/not-in-union-except-union.Bug-2577.stable.out
+++ 
b/sql/test/BugTracker-2010/Tests/not-in-union-except-union.Bug-2577.stable.out
@@ -46,7 +46,7 @@ Ready.
 #  union
 #  select kvk from kvk_extra_nieuw
 #);
-% sys.L20 # table_name
+% sys.L23 # table_name
 % kvk # name
 % bigint # type
 % 1 # length
diff --git a/sql/test/leaks/Tests/check1.stable.out 
b/sql/test/leaks/Tests/check1.stable.out
--- a/sql/test/leaks/Tests/check1.stable.out
+++ b/sql/test/leaks/Tests/check1.stable.out
@@ -217,7 +217,7 @@ Ready.
 [ "sht",   3   ]
 [ "sht",   6   ]
 [ "sht",   7   ]
-[ "sht",   8   ]
+[ "sht",   10  ]
 [ "sht",   10  ]
 [ "sht",   15  ]
 [ "sht",   60  ]
@@ -284,7 +284,7 @@ Ready.
 [ "str",   5   ]
 [ "str",   6   ]
 [ "str",   7   ]
-[ "str",   8   ]
+[ "str",   10  ]
 [ "str",   10  ]
 [ "str",   15  ]
 [ "str",   17  ]
diff --git a/sql/test/leaks/Tests/check1.stable.out.int128 
b/sql/test/leaks/Tests/check1.stable.out.int128
--- a/sql/test/leaks/Tests/check1.stable.out.int128
+++ b/sql/test/leaks/Tests/check1.stable.out.int128
@@ -217,7 +217,7 @@ Ready.
 [ "sht",   3   ]
 [ "sht",   6   ]
 [ "sht",   7   ]
-[ "sht",   8   ]
+[ "sht",   10  ]
 [ "sht",   10  ]
 [ "sht",   15  ]
 [ 

MonetDB: malerrors - Minor fixes

2017-06-19 Thread Martin Kersten
Changeset: 900ad3391e18 for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=900ad3391e18
Modified Files:
monetdb5/mal/mal_instruction.c
sql/backends/monet5/sql_gencode.c
sql/backends/monet5/sql_gencode.h
sql/server/rel_optimizer.c
Branch: malerrors
Log Message:

Minor fixes


diffs (53 lines):

diff --git a/monetdb5/mal/mal_instruction.c b/monetdb5/mal/mal_instruction.c
--- a/monetdb5/mal/mal_instruction.c
+++ b/monetdb5/mal/mal_instruction.c
@@ -929,7 +929,7 @@ trimMalVariables(MalBlkPtr mb, MalStkPtr
InstrPtr q;
 
/* reset the use bit for all non-signature arguments */
-   for (i = 1; i < mb->vtop; i++) 
+   for (i = 0; i < mb->vtop; i++) 
clrVarUsed(mb,i);
/* the return variable is also 'used' */
//i = findVariable(mb, getFunctionId(mb->stmt[0]));
diff --git a/sql/backends/monet5/sql_gencode.c 
b/sql/backends/monet5/sql_gencode.c
--- a/sql/backends/monet5/sql_gencode.c
+++ b/sql/backends/monet5/sql_gencode.c
@@ -1031,15 +1031,6 @@ backend_create_subaggr(backend *be, sql_
 }
 
 void
-_rel_print(mvc *sql, sql_rel *rel) 
-{
-   list *refs = sa_list(sql->sa);
-   rel_print_refs(sql, GDKstdout, rel, 0, refs, 1);
-   rel_print_(sql, GDKstdout, rel, 0, refs, 1);
-   mnstr_printf(GDKstdout, "\n");
-}
-
-void
 rel_print(mvc *sql, sql_rel *rel, int depth) 
 {
list *refs = sa_list(sql->sa);
diff --git a/sql/backends/monet5/sql_gencode.h 
b/sql/backends/monet5/sql_gencode.h
--- a/sql/backends/monet5/sql_gencode.h
+++ b/sql/backends/monet5/sql_gencode.h
@@ -30,7 +30,6 @@ extern int backend_create_subaggr(backen
 sql5_export int monet5_create_relational_function(mvc *m, const char *mod, 
const char *name, sql_rel *rel, stmt *call, list *rel_ops, int inline_func);
 
 extern void rel_print(mvc *sql, sql_rel *rel, int depth);
-extern void _rel_print(mvc *sql, sql_rel *rel);
 
 extern int constantAtom(backend *be, MalBlkPtr mb, atom *a);
 extern InstrPtr table_func_create_result(MalBlkPtr mb, InstrPtr q, sql_func 
*f, list *restypes);
diff --git a/sql/server/rel_optimizer.c b/sql/server/rel_optimizer.c
--- a/sql/server/rel_optimizer.c
+++ b/sql/server/rel_optimizer.c
@@ -8299,7 +8299,6 @@ exps_from_rel( list *exps, sql_rel *rel 
 }
 
 
-extern void _rel_print(mvc *sql, sql_rel *rel);
 
 static sql_rel *
 rel_apply(mvc *sql, sql_rel *l, sql_rel *r, list *exps, int flag)
___
checkin-list mailing list
checkin-list@monetdb.org
https://www.monetdb.org/mailman/listinfo/checkin-list


MonetDB: jitudf - Compilation fixes.

2017-06-19 Thread Mark Raasveldt
Changeset: 8db98a7ce945 for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=8db98a7ce945
Modified Files:
sql/backends/monet5/UDF/capi/capi.c
Branch: jitudf
Log Message:

Compilation fixes.


diffs (76 lines):

diff --git a/sql/backends/monet5/UDF/capi/capi.c 
b/sql/backends/monet5/UDF/capi/capi.c
--- a/sql/backends/monet5/UDF/capi/capi.c
+++ b/sql/backends/monet5/UDF/capi/capi.c
@@ -426,6 +426,7 @@ static str CUDFeval(Client cntxt, MalBlk
 
size_t index = 0;
int bat_type = 0;
+   const char* tpe = NULL;
 
(void)cntxt;
 
@@ -732,11 +733,11 @@ static str CUDFeval(Client cntxt, MalBlk
bat_type = !isaBatType(getArgType(mb, pci, i))
   ? getArgType(mb, 
pci, i)
   : 
getBatType(getArgType(mb, pci, i));
-   const char *tpe = GetTypeName(bat_type);
+   tpe = GetTypeName(bat_type);
assert(tpe);
if (tpe) {
snprintf(buf, sizeof(buf),
-"%s%s %s = 
*((%s%s*)__inputs[%zu]);\n", struct_prefix,
+"\t%s%s %s = 
*((%s%s*)__inputs[%zu]);\n", struct_prefix,
 tpe, args[i], struct_prefix, 
tpe,
 i - (pci->retc + ARG_OFFSET));
ATTEMPT_TO_WRITE_TO_FILE(f, buf);
@@ -745,11 +746,11 @@ static str CUDFeval(Client cntxt, MalBlk
if (non_grouped_aggregate) {
// manually add "aggr_group" for non-grouped aggregates
bat_type = TYPE_oid;
-   const char *tpe = GetTypeName(bat_type);
+   tpe = GetTypeName(bat_type);
assert(tpe);
if (tpe) {
snprintf(buf, sizeof(buf),
-"%s%s %s = 
*((%s%s*)__inputs[%zu]);\n", struct_prefix,
+"\t%s%s %s = 
*((%s%s*)__inputs[%zu]);\n", struct_prefix,
 tpe, "aggr_group", 
struct_prefix, tpe, input_count);
ATTEMPT_TO_WRITE_TO_FILE(f, buf);
}
@@ -757,11 +758,11 @@ static str CUDFeval(Client cntxt, MalBlk
// output types
for (i = 0; i < (size_t)pci->retc; i++) {
bat_type = getBatType(getArgType(mb, pci, i));
-   const char *tpe = GetTypeName(bat_type);
+   tpe = GetTypeName(bat_type);
assert(tpe);
if (tpe) {
snprintf(buf, sizeof(buf),
-"%s%s* %s = 
((%s%s*)__outputs[%zu]);\n", struct_prefix,
+"\t%s%s* %s = 
((%s%s*)__outputs[%zu]);\n", struct_prefix,
 tpe, output_names[i], 
struct_prefix, tpe, i);
ATTEMPT_TO_WRITE_TO_FILE(f, buf);
}
@@ -1087,8 +1088,8 @@ static str CUDFeval(Client cntxt, MalBlk
argnode = argnode ? argnode->next : NULL;
}
 
+   index = input_count;
if (non_grouped_aggregate) {
-   index = input_count;
GENERATE_BAT_INPUT_BASE(oid);
bat_data->count = input_size;
bat_data->data =
@@ -1224,10 +1225,11 @@ static str CUDFeval(Client cntxt, MalBlk
 
// create the output bats from the returned results
for (i = 0; i < (size_t)pci->retc; i++) {
-   bat_type = getBatType(getArgType(mb, pci, i));
size_t count;
void *data;
BAT *b;
+   bat_type = getBatType(getArgType(mb, pci, i));
+   
if (!outputs[i]) {
msg = createException(MAL, "cudf.eval", "No data 
returned.");
goto wrapup;
___
checkin-list mailing list
checkin-list@monetdb.org
https://www.monetdb.org/mailman/listinfo/checkin-list


MonetDB: malerrors - Another batch of SQLSTATE approvals and min...

2017-06-19 Thread Martin Kersten
Changeset: dabbdbdbd2ea for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=dabbdbdbd2ea
Modified Files:
clients/Tests/exports.stable.out
geom/BugTracker/Tests/X_crash.SF-1971632.stable.err
geom/BugTracker/Tests/copy_into_crash.SF-1975402.stable.err
geom/sql/functions/Tests/ST_AsEWKT.stable.out
geom/sql/functions/Tests/ST_AsText.stable.out
geom/sql/functions/Tests/ST_Boundary.stable.out
geom/sql/functions/Tests/ST_Contains.stable.out
geom/sql/functions/Tests/ST_CoordDim.stable.out
geom/sql/functions/Tests/ST_Dimension.stable.out
geom/sql/functions/Tests/ST_GeomFromText.stable.err
geom/sql/functions/Tests/ST_GeomFromText.stable.out
geom/sql/functions/Tests/ST_GeometryN.stable.out
geom/sql/functions/Tests/ST_GeometryType.stable.out
geom/sql/functions/Tests/ST_IsClosed.stable.out
geom/sql/functions/Tests/ST_IsEmpty.stable.out
geom/sql/functions/Tests/ST_IsRing.stable.out
geom/sql/functions/Tests/ST_IsSimple.stable.out
geom/sql/functions/Tests/ST_IsValid.stable.out
geom/sql/functions/Tests/ST_LineFromText.stable.err
geom/sql/functions/Tests/ST_LineFromText.stable.out
geom/sql/functions/Tests/ST_MLineFromText.stable.err
geom/sql/functions/Tests/ST_MLineFromText.stable.out
geom/sql/functions/Tests/ST_MPointFromText.stable.err
geom/sql/functions/Tests/ST_MPointFromText.stable.out
geom/sql/functions/Tests/ST_MPolygonFromText.stable.err
geom/sql/functions/Tests/ST_MPolygonFromText.stable.out
geom/sql/functions/Tests/ST_MakeBox2D.stable.err
geom/sql/functions/Tests/ST_MakeBox2D.stable.out
geom/sql/functions/Tests/ST_MakePoint.stable.err
geom/sql/functions/Tests/ST_MakePoint.stable.out
geom/sql/functions/Tests/ST_NPoints.stable.out
geom/sql/functions/Tests/ST_NRings.stable.out
geom/sql/functions/Tests/ST_NumGeometries.stable.out
geom/sql/functions/Tests/ST_NumPoints.stable.err
geom/sql/functions/Tests/ST_NumPoints.stable.out
geom/sql/functions/Tests/ST_PointFromText.stable.err
geom/sql/functions/Tests/ST_PointFromText.stable.out
geom/sql/functions/Tests/ST_PolygonFromText.stable.err
geom/sql/functions/Tests/ST_PolygonFromText.stable.out
geom/sql/functions/Tests/XYZ.stable.err
geom/sql/functions/Tests/XYZ.stable.out
geom/sql/functions/Tests/XYZMinMax.stable.out
monetdb5/extras/mal_optimizer_template/Tests/opt_sql_append.stable.err
monetdb5/mal/mal_instruction.c
monetdb5/optimizer/opt_pipes.c
sql/backends/monet5/generator/Tests/crash.Bug-3609.stable.err
sql/backends/monet5/generator/Tests/generator01.stable.err
sql/backends/monet5/generator/Tests/generator04.stable.err
sql/backends/monet5/generator/generator.c
sql/backends/monet5/sql.c
sql/backends/monet5/sql_cast_impl_down_from_flt.h
sql/backends/monet5/sql_cast_impl_up_to_flt.h
sql/backends/monet5/sql_execute.c
sql/backends/monet5/sql_fround_impl.h
sql/backends/monet5/sql_round_impl.h
sql/backends/monet5/sql_scenario.c
sql/backends/monet5/vaults/bam/Tests/bam_lib.stable.err
sql/backends/monet5/vaults/bam/Tests/mergetable.stable.err
sql/backends/monet5/vaults/bam/Tests/verify_load.stable.err
sql/backends/monet5/wlr.c
sql/benchmarks/nobench/Tests/nobench.stable.err
sql/benchmarks/nobench/Tests/nobench.stable.out

sql/test/BugDay_2005-11-09_2.9.3/Tests/grant_public.SF-1114580.stable.err

sql/test/BugDay_2005-11-09_2.9.3/Tests/history_table_escape.SF-1072089.stable.err
sql/test/BugTracker-2009/Tests/copy_multiple_files.SF-2902320.stable.err
sql/test/BugTracker-2009/Tests/drop-sequence-crash.SF-2854195.stable.err
sql/test/BugTracker-2009/Tests/rollback_bug.stable.err

sql/test/BugTracker-2009/Tests/use_order_column_first.SF-2686008.stable.err

sql/test/BugTracker-2010/Tests/ORDER_BY_over_UNION_EXCEPT_INTERSECT.Bug-2606.stable.err
sql/test/BugTracker-2010/Tests/error-truncated.Bug-2615.stable.err
sql/test/BugTracker-2011/Tests/crash_on_alias.Bug-2798.stable.err

sql/test/BugTracker-2011/Tests/user_create_temp_table.Bug-2916.stable.err

sql/test/BugTracker-2012/Tests/name_resolution_in_proc.Bug-3074.stable.err
sql/test/BugTracker-2013/Tests/env_errors.Bug-3370.stable.err
sql/test/BugTracker-2014/Tests/number_4_4.Bug-3543.stable.err

sql/test/BugTracker-2015/Tests/backslash_predecing_separator.Bug-3775.stable.err
sql/test/BugTracker-2015/Tests/readonly.Bug-3709.stable.err
sql/test/BugTracker-2015/Tests/with-columns-mismatch.Bug-3697.stable.err
sql/test/BugTracker-2016/Tests/merge-table-edit.Bug-6084.stable.err

MonetDB: Jul2017 - Approve output.

2017-06-19 Thread Sjoerd Mullender
Changeset: db333f6b860d for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=db333f6b860d
Modified Files:
sql/backends/monet5/UDF/pyapi3/Tests/pyapi3_25.stable.out
Branch: Jul2017
Log Message:

Approve output.


diffs (34 lines):

diff --git a/sql/backends/monet5/UDF/pyapi3/Tests/pyapi3_25.stable.out 
b/sql/backends/monet5/UDF/pyapi3/Tests/pyapi3_25.stable.out
--- a/sql/backends/monet5/UDF/pyapi3/Tests/pyapi3_25.stable.out
+++ b/sql/backends/monet5/UDF/pyapi3/Tests/pyapi3_25.stable.out
@@ -115,11 +115,11 @@ Ready.
 % sys.mytable # table_name
 % i # name
 % int # type
-% 5 # length
-[ 1]
-[ 2]
-[ 3]
-[ 4]
+% 2 # length
+[ 10   ]
+[ 20   ]
+[ 30   ]
+[ 40   ]
 #CREATE TABLE pyapi25medians(mean DOUBLE);
 #CREATE FUNCTION pyapi25randomtable() returns TABLE(d DOUBLE) LANGUAGE PYTHON
 #{
@@ -140,13 +140,6 @@ Ready.
 % double # type
 % 24 # length
 [ 1]
-[ 1]
-[ 1]
-[ 1]
-[ 1]
-[ 1]
-[ 1]
-[ 1]
 #SELECT pyapi25checker(mean) FROM pyapi25medians;
 % sys.L2 # table_name
 % L2 # name
___
checkin-list mailing list
checkin-list@monetdb.org
https://www.monetdb.org/mailman/listinfo/checkin-list


MonetDB: Jul2017 - Approve output.

2017-06-19 Thread Sjoerd Mullender
Changeset: 4e7d54c9a9c4 for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=4e7d54c9a9c4
Modified Files:
sql/backends/monet5/Tests/pyapi25.stable.out
Branch: Jul2017
Log Message:

Approve output.
I consider it a fairly serious bug in the Dec2016 branch that the
output there depends on the number of threads.


diffs (34 lines):

diff --git a/sql/backends/monet5/Tests/pyapi25.stable.out 
b/sql/backends/monet5/Tests/pyapi25.stable.out
--- a/sql/backends/monet5/Tests/pyapi25.stable.out
+++ b/sql/backends/monet5/Tests/pyapi25.stable.out
@@ -150,11 +150,11 @@ Great success!
 % sys.mytable # table_name
 % i # name
 % int # type
-% 5 # length
-[ 1]
-[ 2]
-[ 3]
-[ 4]
+% 2 # length
+[ 10   ]
+[ 20   ]
+[ 30   ]
+[ 40   ]
 #CREATE TABLE pyapi25medians(mean DOUBLE);
 #CREATE FUNCTION pyapi25randomtable() returns TABLE(d DOUBLE) LANGUAGE PYTHON
 #{
@@ -175,13 +175,6 @@ Great success!
 % double # type
 % 24 # length
 [ 1]
-[ 1]
-[ 1]
-[ 1]
-[ 1]
-[ 1]
-[ 1]
-[ 1]
 #SELECT pyapi25checker(mean) FROM pyapi25medians;
 % sys.L2 # table_name
 % L2 # name
___
checkin-list mailing list
checkin-list@monetdb.org
https://www.monetdb.org/mailman/listinfo/checkin-list