MonetDB: Dec2016 - merged

2017-06-29 Thread Niels Nes
Changeset: fa01244b6822 for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=fa01244b6822
Added Files:
sql/test/BugTracker-2017/Tests/crash-dce.Bug-6330.stable.out.int128

sql/test/BugTracker-2017/Tests/crash-select_after_MAL_error.Bug-6332.stable.out.int128
sql/test/BugTracker-2017/Tests/default-insert-update.Bug-6249.stable.err
sql/test/BugTracker-2017/Tests/default-insert-update.Bug-6249.stable.out
Modified Files:
sql/server/rel_dump.c
sql/test/BugTracker-2017/Tests/crash-dce.Bug-6330.stable.out

sql/test/BugTracker-2017/Tests/crash-select_after_MAL_error.Bug-6332.stable.out
sql/test/pg_regress/Tests/alter_table.stable.err
sql/test/pg_regress/Tests/alter_table.stable.out
sql/test/pg_regress/Tests/insert.stable.err
Branch: Dec2016
Log Message:

merged


diffs (truncated from 575 to 300 lines):

diff --git a/sql/server/rel_dump.c b/sql/server/rel_dump.c
--- a/sql/server/rel_dump.c
+++ b/sql/server/rel_dump.c
@@ -602,15 +602,17 @@ skipIdent( char *r, int *pos)
 static void
 skipIdentOrSymbol( char *r, int *pos)
 {
-   if (r[*pos] == '"') 
-   return skipIdent(r, pos);
-   while(r[*pos] && (isalnum(r[*pos]) || 
- r[*pos] == '_' || r[*pos] == '%' ||
- r[*pos] == '<' || r[*pos] == '>' || 
- r[*pos] == '/' || r[*pos] == '*' || 
- r[*pos] == '-' || r[*pos] == '+' || 
- r[*pos] == '~' || r[*pos] == '^' ))
-   (*pos)++;
+   if (r[*pos] == '"') {
+   skipIdent(r, pos);
+   } else {
+   while(r[*pos] && (isalnum(r[*pos]) ||
+ r[*pos] == '_' || r[*pos] == '%' ||
+ r[*pos] == '<' || r[*pos] == '>' ||
+ r[*pos] == '/' || r[*pos] == '*' ||
+ r[*pos] == '-' || r[*pos] == '+' ||
+ r[*pos] == '~' || r[*pos] == '^' ))
+   (*pos)++;
+   }
 }
 
 static int
diff --git a/sql/test/BugTracker-2017/Tests/crash-dce.Bug-6330.stable.out 
b/sql/test/BugTracker-2017/Tests/crash-dce.Bug-6330.stable.out
--- a/sql/test/BugTracker-2017/Tests/crash-dce.Bug-6330.stable.out
+++ b/sql/test/BugTracker-2017/Tests/crash-dce.Bug-6330.stable.out
@@ -8,7 +8,7 @@ stdout of test 'crash-dce.Bug-6330` in d
 # MonetDB 5 server v11.25.24
 # This is an unreleased version
 # Serving database 'mTests_sql_test_BugTracker-2017', using 8 threads
-# Compiled for x86_64-unknown-linux-gnu/64bit with 128bit integers
+# Compiled for x86_64-unknown-linux-gnu/64bit
 # Found 15.588 GiB available main-memory.
 # Copyright (c) 1993-July 2008 CWI.
 # Copyright (c) August 2008-2017 MonetDB B.V., all rights reserved
@@ -69,14 +69,14 @@ Ready.
 #SELECT 45 - - CASE + + 70 WHEN COUNT ( * ) + SUM ( DISTINCT 91 ) + MIN ( 
DISTINCT 41 ) / 65 THEN + 98 END * + - 0 - - COUNT ( * ) AS col0;
 % .L7 # table_name
 % col0 # name
-% hugeint # type
-% 40 # length
+% bigint # type
+% 20 # length
 [ NULL ]
 #SELECT 45 - CASE + + 70 WHEN COUNT ( * ) + SUM ( DISTINCT 91 ) + MIN ( 
DISTINCT 41 ) / 65 THEN + 98 END * + - 0 - - COUNT ( * ) AS col0;
 % .L7 # table_name
 % col0 # name
-% hugeint # type
-% 40 # length
+% bigeint # type
+% 20 # length
 [ NULL ]
 
 # 13:53:46 >  
diff --git 
a/sql/test/BugTracker-2017/Tests/crash-dce.Bug-6330.stable.out.int128 
b/sql/test/BugTracker-2017/Tests/crash-dce.Bug-6330.stable.out.int128
new file mode 100644
--- /dev/null
+++ b/sql/test/BugTracker-2017/Tests/crash-dce.Bug-6330.stable.out.int128
@@ -0,0 +1,85 @@
+stdout of test 'crash-dce.Bug-6330` in directory 'sql/test/BugTracker-2017` 
itself:
+
+
+# 13:53:44 >  
+# 13:53:44 >  "mserver5" "--debug=10" "--set" "gdk_nr_threads=0" "--set" 
"mapi_open=true" "--set" "mapi_port=30094" "--set" 
"mapi_usock=/var/tmp/mtest-30656/.s.monetdb.30094" "--set" "monet_prompt=" 
"--forcemito" 
"--dbpath=/export/scratch2/dinther/INSTALL/var/MonetDB/mTests_sql_test_BugTracker-2017"
 "--set" "embedded_r=yes" "--set" "embedded_py=true"
+# 13:53:44 >  
+
+# MonetDB 5 server v11.25.24
+# This is an unreleased version
+# Serving database 'mTests_sql_test_BugTracker-2017', using 8 threads
+# Compiled for x86_64-unknown-linux-gnu/64bit with 128bit integers
+# Found 15.588 GiB available main-memory.
+# Copyright (c) 1993-July 2008 CWI.
+# Copyright (c) August 2008-2017 MonetDB B.V., all rights reserved
+# Visit http://www.monetdb.org/ for further information
+# Listening for connection requests on mapi:monetdb://toulouse.da.cwi.nl:30094/
+# Listening for UNIX domain connection requests on 
mapi:monetdb:///var/tmp/mtest-30656/.s.monetdb.30094
+# MonetDB/GIS module loaded
+# MonetDB/SQL module loaded
+# MonetDB/Python module loaded
+# MonetDB/R   module loaded
+
+Ready.
+# SQL catalog created, loading sql scripts once
+# loading sql script: 09_like.sql
+# loading sql script: 

MonetDB: Dec2016 - grow the message buffer when a large number o...

2017-06-29 Thread Niels Nes
Changeset: c25bdb00be23 for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=c25bdb00be23
Modified Files:
sql/backends/monet5/sql_execute.c
sql/backends/monet5/sql_gencode.c
Branch: Dec2016
Log Message:

grow the message buffer when a large number of arguments is needed


diffs (31 lines):

diff --git a/sql/backends/monet5/sql_execute.c 
b/sql/backends/monet5/sql_execute.c
--- a/sql/backends/monet5/sql_execute.c
+++ b/sql/backends/monet5/sql_execute.c
@@ -841,13 +841,9 @@ RAstatement2(Client cntxt, MalBlkPtr mb,
}
refs = sa_list(m->sa);
rel = rel_read(m, *expr, , refs);
-   if (!rel)
+   if (!rel || monet5_create_relational_function(m, *mod, *nme, rel, 
stmt_list(m->sa, ops), 0) < 0)
throw(SQL, "sql.register", "Cannot register %s", buf);
-   if (rel) {
-   monet5_create_relational_function(m, *mod, *nme, rel, 
stmt_list(m->sa, ops), 0);
-   rel_destroy(rel);
-   }
+   rel_destroy(rel);
sqlcleanup(m, 0);
return msg;
 }
-
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
@@ -658,6 +658,8 @@ static int
sql_subtype *t = tail_type(op);
const char *nme = 
(op->op3)?op->op3->op4.aval->data.val.sval:op->cname;
 
+   if ((nr + 100) > len)
+   buf = GDKrealloc(buf, len*=2);
nr += snprintf(buf+nr, len-nr, "%s %s(%u,%u)%c", nme, 
t->type->sqlname, t->digits, t->scale, n->next?',':' ');
}
s = buf;
___
checkin-list mailing list
checkin-list@monetdb.org
https://www.monetdb.org/mailman/listinfo/checkin-list


MonetDB: stratified_sampling - Approve exports.

2017-06-29 Thread Mark Raasveldt
Changeset: da686b4181c1 for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=da686b4181c1
Modified Files:
clients/Tests/MAL-signatures.stable.out
clients/Tests/MAL-signatures.stable.out.int128
clients/Tests/exports.stable.out
Branch: stratified_sampling
Log Message:

Approve exports.


diffs (73 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
@@ -8270,8 +8270,10 @@ Ready.
 [ "sabaoth",   "marchScenario","command 
sabaoth.marchScenario(lang:str):void ","SABmarchScenario;",
"Publishes the given language as available for this server" ]
 [ "sabaoth",   "prelude",  "command sabaoth.prelude():void ",  
"SABprelude;",  "Initialise the sabaoth module" ]
 [ "sabaoth",   "retreatScenario",  "command 
sabaoth.retreatScenario(lang:str):void ",  "SABretreatScenario;",  
"Unpublishes the given language as available for this server"   ]
-[ "sample","subuniform",   "command sample.subuniform(b:bat[:any], 
s:lng):bat[:oid] ", "SAMPLEuniform;",   "Returns the oids of a uniform 
sample of size s"]
-[ "sample","subuniform",   "command sample.subuniform(b:bat[:any], 
p:dbl):bat[:oid] ", "SAMPLEuniform_dbl;",   "Returns the oids of a uniform 
sample of size = (p x count(b)), where 0 <= p <= 1.0"]
+[ "sample","subuniform",   "command sample.subuniform(b:bat[:any], 
s:lng):bat[:oid] ", "SAMPLEuniform;",   "Returns the oids of a uniform 
sample (without replacement) of size s"  ]
+[ "sample","subuniform",   "command sample.subuniform(b:bat[:any], 
p:dbl):bat[:oid] ", "SAMPLEuniform_dbl;",   "Returns the oids of a uniform 
sample (without replacement) of size = (p x count(b)), where 0 <= p <= 1.0" 
 ]
+[ "sample","subweighted",  "command sample.subweighted(b:bat[:any], s:lng, 
w:bat[:any]):bat[:oid] ",   "SAMPLEweighted;",  "Returns the oids of a 
weighted sample (without replacement) of size s" ]
+[ "sample","subweighted",  "command sample.subweighted(b:bat[:any], p:dbl, 
w:bat[:any]):bat[:oid] ",   "SAMPLEweighted_dbl;",  "Returns the oids of a 
weighted sample (without replacement) of size = (p x count(b)), where 0 <= p <= 
1.0" ]
 [ "shp",   "attach",   "pattern shp.attach(filename:str):void ",   
"SHPattach;",   "Register an ESRI Shapefile in the vault catalog"   ]
 [ "shp",   "import",   "pattern shp.import(fileid:int):void ", 
"SHPimport;",   "Import an ESRI Shapefile with given id into the vault" ]
 [ "shp",   "import",   "pattern shp.import(fileid:int, po:wkb):void ", 
"SHPpartialimport;","Partially import an ESRI Shapefile with given id into 
the vault"   ]
diff --git a/clients/Tests/MAL-signatures.stable.out.int128 
b/clients/Tests/MAL-signatures.stable.out.int128
--- a/clients/Tests/MAL-signatures.stable.out.int128
+++ b/clients/Tests/MAL-signatures.stable.out.int128
@@ -10632,8 +10632,10 @@ Ready.
 [ "sabaoth",   "marchScenario","command 
sabaoth.marchScenario(lang:str):void ","SABmarchScenario;",
"Publishes the given language as available for this server" ]
 [ "sabaoth",   "prelude",  "command sabaoth.prelude():void ",  
"SABprelude;",  "Initialise the sabaoth module" ]
 [ "sabaoth",   "retreatScenario",  "command 
sabaoth.retreatScenario(lang:str):void ",  "SABretreatScenario;",  
"Unpublishes the given language as available for this server"   ]
-[ "sample","subuniform",   "command sample.subuniform(b:bat[:any], 
s:lng):bat[:oid] ", "SAMPLEuniform;",   "Returns the oids of a uniform 
sample of size s"]
-[ "sample","subuniform",   "command sample.subuniform(b:bat[:any], 
p:dbl):bat[:oid] ", "SAMPLEuniform_dbl;",   "Returns the oids of a uniform 
sample of size = (p x count(b)), where 0 <= p <= 1.0"]
+[ "sample","subuniform",   "command sample.subuniform(b:bat[:any], 
s:lng):bat[:oid] ", "SAMPLEuniform;",   "Returns the oids of a uniform 
sample (without replacement) of size s"  ]
+[ "sample","subuniform",   "command sample.subuniform(b:bat[:any], 
p:dbl):bat[:oid] ", "SAMPLEuniform_dbl;",   "Returns the oids of a uniform 
sample (without replacement) of size = (p x count(b)), where 0 <= p <= 1.0" 
 ]
+[ "sample","subweighted",  "command sample.subweighted(b:bat[:any], s:lng, 
w:bat[:any]):bat[:oid] ",   "SAMPLEweighted;",  "Returns the oids of a 
weighted sample (without replacement) of size s" ]
+[ "sample","subweighted",  "command sample.subweighted(b:bat[:any], p:dbl, 
w:bat[:any]):bat[:oid] ",   "SAMPLEweighted_dbl;",  "Returns the oids of a 
weighted sample (without replacement) of size = (p x count(b)), where 0 <= p <= 
1.0" ]
 [ "shp",   "attach",   "pattern shp.attach(filename:str):void ",   
"SHPattach;",   "Register an ESRI Shapefile 

MonetDB: Jul2017 - Exclude test push_subslice.Bug-6322 when it d...

2017-06-29 Thread Martin van Dinther
Changeset: 0592a67375ad for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=0592a67375ad
Modified Files:
sql/test/BugTracker-2017/Tests/All
Branch: Jul2017
Log Message:

Exclude test push_subslice.Bug-6322 when it does not HAVE_GEOM
 as the test query depends on sys.spatial_ref_sys (which is created in 
40_geom.sql)


diffs (12 lines):

diff --git a/sql/test/BugTracker-2017/Tests/All 
b/sql/test/BugTracker-2017/Tests/All
--- a/sql/test/BugTracker-2017/Tests/All
+++ b/sql/test/BugTracker-2017/Tests/All
@@ -53,7 +53,7 @@ not_plus.Bug-6294
 distinct_minus_count_distinct.Bug-6296
 all_minus_count_star.Bug-6297
 simplify_math.Bug-6324
-push_subslice.Bug-6322
+HAVE_GEOM?push_subslice.Bug-6322
 create_table_as-missing_not_null.Bug-6329
 crash-dce.Bug-6330
 delete_from_merge_table.Bug-3743
___
checkin-list mailing list
checkin-list@monetdb.org
https://www.monetdb.org/mailman/listinfo/checkin-list


MonetDB: Jul2017 - Approve some more test outputs after merge

2017-06-29 Thread Martin van Dinther
Changeset: aa903735f71d for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=aa903735f71d
Modified Files:

sql/test/BugTracker-2010/Tests/ORDER_BY_over_UNION_EXCEPT_INTERSECT.Bug-2606.stable.out
sql/test/BugTracker/Tests/jdbc_no_debug.SF-1739356.stable.out
sql/test/leaks/Tests/check1.stable.out.int128
Branch: Jul2017
Log Message:

Approve some more test outputs after merge


diffs (truncated from 345 to 300 lines):

diff --git 
a/sql/test/BugTracker-2010/Tests/ORDER_BY_over_UNION_EXCEPT_INTERSECT.Bug-2606.stable.out
 
b/sql/test/BugTracker-2010/Tests/ORDER_BY_over_UNION_EXCEPT_INTERSECT.Bug-2606.stable.out
--- 
a/sql/test/BugTracker-2010/Tests/ORDER_BY_over_UNION_EXCEPT_INTERSECT.Bug-2606.stable.out
+++ 
b/sql/test/BugTracker-2010/Tests/ORDER_BY_over_UNION_EXCEPT_INTERSECT.Bug-2606.stable.out
@@ -61,24 +61,25 @@ Ready.
 % .plan # table_name
 % rel # name
 % clob # type
-% 49 # length
+% 51 # length
 project (
 | distinct union (
 | | project (
 | | | group by (
-| | | | table(sys.t2606a) [ "t2606a"."a" ] COUNT 
-| | | ) [ "t2606a"."a" ]
-| | ) [ "t2606a"."a" ] [ "t2606a"."a" ],
-| | | ) [ t2606a.a ] [ t2606a.a ]
-| | ) [ t2606a.a as L5.a ],
-| | | | table(sys.t2606b) [ "t2606b"."a" ] COUNT 
-| | | ) [ "t2606b"."a" ]
-| | ) [ "t2606b"."a" ] [ "t2606b"."a" ]
-| ) [ "t2606a"."a" as "L11"."a" ]
+| | | | project (
+| | | | | table(sys.t2606a) [ "t2606a"."a" ] COUNT 
+| | | | ) [ "t2606a"."a" ]
+| | | ) [ "t2606a"."a" ] [ "t2606a"."a" ]
+| | ) [ "t2606a"."a" as "L5"."a" ],
+| | project (
+| | | group by (
+| | | | project (
+| | | | | table(sys.t2606b) [ "t2606b"."a" ] COUNT 
+| | | | ) [ "t2606b"."a" ]
+| | | ) [ "t2606b"."a" ] [ "t2606b"."a" ]
+| | ) [ "t2606b"."a" as "L6"."a" ]
+| ) [ "L5"."a" as "L11"."a" ]
 ) [ "L11"."a" ] [ "L11"."a" ASC ]
-| | | ) [ t2606b.a ] [ t2606b.a ]
-| | ) [ t2606b.a as L6.a ]
-| ) [ L5.a as L11.a ]
 #select * from t2606a   union   select * from t2606b   order by a;
 % .L11 # table_name
 % a # name
@@ -97,24 +98,25 @@ project (
 % .plan # table_name
 % rel # name
 % clob # type
-% 49 # length
+% 51 # length
 project (
 | distinct union (
 | | project (
 | | | group by (
-| | | | table(sys.t2606a) [ "t2606a"."a" ] COUNT 
-| | | ) [ "t2606a"."a" ]
-| | ) [ "t2606a"."a" ] [ "t2606a"."a" ],
-| | | ) [ t2606a.a ] [ t2606a.a ]
-| | ) [ t2606a.a as L5.a ],
-| | | | table(sys.t2606b) [ "t2606b"."a" ] COUNT 
-| | | ) [ "t2606b"."a" ]
-| | ) [ "t2606b"."a" ] [ "t2606b"."a" ]
-| ) [ "t2606a"."a" as "L11"."a" ]
+| | | | project (
+| | | | | table(sys.t2606a) [ "t2606a"."a" ] COUNT 
+| | | | ) [ "t2606a"."a" ]
+| | | ) [ "t2606a"."a" ] [ "t2606a"."a" ]
+| | ) [ "t2606a"."a" as "L5"."a" ],
+| | project (
+| | | group by (
+| | | | project (
+| | | | | table(sys.t2606b) [ "t2606b"."a" ] COUNT 
+| | | | ) [ "t2606b"."a" ]
+| | | ) [ "t2606b"."a" ] [ "t2606b"."a" ]
+| | ) [ "t2606b"."a" as "L6"."a" ]
+| ) [ "L5"."a" as "L11"."a" ]
 ) [ "L11"."a" ] [ "L11"."a" ASC ]
-| | | ) [ t2606b.a ] [ t2606b.a ]
-| | ) [ t2606b.a as L6.a ]
-| ) [ L5.a as L11.a ]
 #( select * from t2606a   union   select * from t2606b ) order by a;
 % .L11 # table_name
 % a # name
@@ -133,24 +135,25 @@ project (
 % .plan # table_name
 % rel # name
 % clob # type
-% 49 # length
+% 51 # length
 project (
 | distinct union (
 | | project (
 | | | group by (
-| | | | table(sys.t2606a) [ "t2606a"."a" ] COUNT 
-| | | ) [ "t2606a"."a" ]
-| | ) [ "t2606a"."a" ] [ "t2606a"."a" ],
-| | | ) [ t2606a.a ] [ t2606a.a ]
-| | ) [ t2606a.a as L5.a ],
-| | | | table(sys.t2606b) [ "t2606b"."a" ] COUNT 
-| | | ) [ "t2606b"."a" ]
-| | ) [ "t2606b"."a" ] [ "t2606b"."a" ]
-| ) [ "t2606a"."a" as "L11"."a" ]
+| | | | project (
+| | | | | table(sys.t2606a) [ "t2606a"."a" ] COUNT 
+| | | | ) [ "t2606a"."a" ]
+| | | ) [ "t2606a"."a" ] [ "t2606a"."a" ]
+| | ) [ "t2606a"."a" as "L5"."a" ],
+| | project (
+| | | group by (
+| | | | project (
+| | | | | table(sys.t2606b) [ "t2606b"."a" ] COUNT 
+| | | | ) [ "t2606b"."a" ]
+| | | ) [ "t2606b"."a" ] [ "t2606b"."a" ]
+| | ) [ "t2606b"."a" as "L6"."a" ]
+| ) [ "L5"."a" as "L11"."a" ]
 ) [ "L11"."a" ] [ "L11"."a" ASC ]
-| | | ) [ t2606b.a ] [ t2606b.a ]
-| | ) [ t2606b.a as L6.a ]
-| ) [ L5.a as L11.a ]
 #( select * from t2606a ) union ( select * from t2606b ) order by a;
 % .L11 # table_name
 % a # name
@@ -174,11 +177,11 @@ project (
 | distinct except (
 | | project (
 | | | table(sys.t2606a) [ "t2606a"."a" ] COUNT 
-| | ) [ "t2606a"."a" ],
+| | ) [ "t2606a"."a" as "L5"."a" ],
 | | project (
 | | | table(sys.t2606b) [ "t2606b"."a" ] COUNT 
-| | ) [ "t2606b"."a" ]
-| ) [ "t2606a"."a" as "L11"."a" ]
+| | ) [ "t2606b"."a" as "L6"."a" ]
+| ) [ "L5"."a" as "L11"."a" ]
 ) [ "L11"."a" ] [ "L11"."a" ASC ]
 #select * from t2606a   except   select * from t2606b   order by a;
 % sys.L11 # table_name
@@ -197,11 +200,11 @@ project (
 | distinct except (
 | | project (
 | | | table(sys.t2606a) [ "t2606a"."a" ] COUNT 
-| | ) [ "t2606a"."a" ],
+| | ) [ "t2606a"."a" as "L5"."a" ],
 | | 

MonetDB: stratified_sampling - Fix compilation issues.

2017-06-29 Thread Mark Raasveldt
Changeset: f2d7422ecbfe for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=f2d7422ecbfe
Modified Files:
common/utils/mtwist.h
gdk/gdk_sample.c
Branch: stratified_sampling
Log Message:

Fix compilation issues.


diffs (65 lines):

diff --git a/common/utils/mtwist.h b/common/utils/mtwist.h
--- a/common/utils/mtwist.h
+++ b/common/utils/mtwist.h
@@ -31,6 +31,17 @@
 #ifndef _SEEN_MTWIST_H
 #define _SEEN_MTWIST_H 1
 
+#ifdef NATIVE_WIN32
+#if !defined(LIBMUTILS) && !defined(LIBGDK) && !defined(LIBMEROUTIL)
+#define mtwist_export extern __declspec(dllimport)
+#else
+#define mtwist_export extern __declspec(dllexport)
+#endif
+#else
+#define mtwist_export extern
+#endif
+
+
 #define MTWIST_N 624
 #define MTWIST_M 397
 
@@ -53,15 +64,15 @@ struct mtwist_s {
 typedef struct mtwist_s mtwist;
 
 /* constructor */
-mtwist* mtwist_new(void);
+mtwist_export mtwist* mtwist_new(void);
 
 /* destructor */
-void mtwist_free(mtwist* mt);
+mtwist_export void mtwist_free(mtwist* mt);
 
 /* methods */
-void mtwist_seed(mtwist* mt, unsigned int seed);
-unsigned int mtwist_u32rand(mtwist* mt);
-double mtwist_drand(mtwist* mt);
-int mtwist_uniform_int(mtwist* mt, int a, int b);
+mtwist_export void mtwist_seed(mtwist* mt, unsigned int seed);
+mtwist_export unsigned int mtwist_u32rand(mtwist* mt);
+mtwist_export double mtwist_drand(mtwist* mt);
+mtwist_export int mtwist_uniform_int(mtwist* mt, int a, int b);
 
 #endif
diff --git a/gdk/gdk_sample.c b/gdk/gdk_sample.c
--- a/gdk/gdk_sample.c
+++ b/gdk/gdk_sample.c
@@ -23,16 +23,13 @@
  * values that should be omitted from the sample.
  */
 
-#include 
-
 #include "monetdb_config.h"
 #include "gdk.h"
 #include "gdk_private.h"
 
-#include "mtwist.h"
+#include 
 
-#undef BATsample
-
+#include "mtwist.h"
 
 //TODO share these with gkd_firstn.c
 #define siftup(OPER, START, SWAP)  \
___
checkin-list mailing list
checkin-list@monetdb.org
https://www.monetdb.org/mailman/listinfo/checkin-list


MonetDB: Jul2017 - Merge with Dec2016 branch

2017-06-29 Thread Martin van Dinther
Changeset: e580dd9c971a for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=e580dd9c971a
Added Files:
sql/test/BugTracker-2017/Tests/crash-dce.Bug-6330.stable.out.int128

sql/test/BugTracker-2017/Tests/crash-select_after_MAL_error.Bug-6332.stable.out.int128
sql/test/BugTracker-2017/Tests/default-insert-update.Bug-6249.stable.err
sql/test/BugTracker-2017/Tests/default-insert-update.Bug-6249.stable.out
Modified Files:
sql/server/rel_dump.c
sql/storage/store.c
sql/test/BugTracker-2009/Tests/copy_multiple_files.SF-2902320.stable.out

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

sql/test/BugTracker-2010/Tests/LIMIT_OFFSET_big-endian.Bug-2622.stable.out

sql/test/BugTracker-2010/Tests/ORDER_BY_over_UNION_EXCEPT_INTERSECT.Bug-2606.stable.out
sql/test/BugTracker-2011/Tests/crash_on_alias.Bug-2798.stable.out
sql/test/BugTracker-2011/Tests/crash_on_alias.Bug-2798.stable.out.int128
sql/test/BugTracker-2013/Tests/rangejoin_optimizer.Bug-3411.stable.out
sql/test/BugTracker-2015/Tests/crash.Bug-3736.stable.out
sql/test/BugTracker-2015/Tests/large_join.Bug-3809.stable.out

sql/test/BugTracker-2015/Tests/quantile_function_resolution.Bug-3773.stable.out
sql/test/BugTracker-2015/Tests/schema_view.Bug-3708.stable.out

sql/test/BugTracker-2016/Tests/memory-consumption-query-PLAN-25joins.Bug-3972.stable.out
sql/test/BugTracker-2016/Tests/merge_project.Bug-3955.stable.out
sql/test/BugTracker-2017/Tests/crash-dce.Bug-6330.stable.out

sql/test/BugTracker-2017/Tests/crash-select_after_MAL_error.Bug-6332.stable.out
sql/test/BugTracker/Tests/jdbc_no_debug.SF-1739356.stable.out
sql/test/Tests/order_by_complex_exp.stable.out
sql/test/leaks/Tests/check1.stable.out.int128
sql/test/mergetables/Tests/part-elim.stable.out
sql/test/pg_regress/Tests/alter_table.stable.err
sql/test/pg_regress/Tests/alter_table.stable.out
sql/test/pg_regress/Tests/insert.stable.err
Branch: Jul2017
Log Message:

Merge with Dec2016 branch


diffs (truncated from 2558 to 300 lines):

diff --git a/sql/server/rel_dump.c b/sql/server/rel_dump.c
--- a/sql/server/rel_dump.c
+++ b/sql/server/rel_dump.c
@@ -157,8 +157,8 @@ exp_print(mvc *sql, stream *fout, sql_ex
}   break;
case e_column: 
if (e->l)
-   mnstr_printf(fout, "%s.", (char*)e->l);
-   mnstr_printf(fout, "%s", (char*)e->r);
+   mnstr_printf(fout, "\"%s\".", (char*)e->l);
+   mnstr_printf(fout, "\"%s\"", (char*)e->r);
if (e->rname && e->name && e->l && e->r &&
strcmp(e->rname, e->l) == 0 &&
strcmp(e->name, e->r) == 0) 
@@ -224,8 +224,8 @@ exp_print(mvc *sql, stream *fout, sql_ex
if (e->name && alias) {
mnstr_printf(fout, " as ");
if (e->rname)
-   mnstr_printf(fout, "%s.", e->rname);
-   mnstr_printf(fout, "%s", e->name);
+   mnstr_printf(fout, "\"%s\".", e->rname);
+   mnstr_printf(fout, "\"%s\"", e->name);
}
if (comma)
mnstr_printf(fout, ", ");
@@ -588,20 +588,31 @@ skipWS( char *r, int *pos)
 static void
 skipIdent( char *r, int *pos)
 {
-   while(r[*pos] && (isalnum(r[*pos]) || r[*pos] == '_' || r[*pos] == '%'))
+   if (r[*pos] == '"') {
(*pos)++;
+   while(r[*pos] && r[*pos] != '"')
+   (*pos)++;
+   (*pos)++;
+   } else {
+   while(r[*pos] && (isalnum(r[*pos]) || r[*pos] == '_' || r[*pos] 
== '%'))
+   (*pos)++;
+   }
 }
 
 static void
 skipIdentOrSymbol( char *r, int *pos)
 {
-   while(r[*pos] && (isalnum(r[*pos]) || 
- r[*pos] == '_' || r[*pos] == '%' ||
- r[*pos] == '<' || r[*pos] == '>' || 
- r[*pos] == '/' || r[*pos] == '*' || 
- r[*pos] == '-' || r[*pos] == '+' || 
- r[*pos] == '~' || r[*pos] == '^' ))
-   (*pos)++;
+   if (r[*pos] == '"') {
+   skipIdent(r, pos);
+   } else {
+   while(r[*pos] && (isalnum(r[*pos]) ||
+ r[*pos] == '_' || r[*pos] == '%' ||
+ r[*pos] == '<' || r[*pos] == '>' ||
+ r[*pos] == '/' || r[*pos] == '*' ||
+ r[*pos] == '-' || r[*pos] == '+' ||
+ r[*pos] == '~' || r[*pos] == '^' ))
+   (*pos)++;
+   }
 }
 
 static int
@@ -720,30 +731,32 @@ static sql_exp*
 exp_read(mvc *sql, sql_rel *lrel, sql_rel *rrel, list *pexps, char *r, int 
*pos, int grp) 
 {
int 

MonetDB: stratified_sampling - Revert parser change.

2017-06-29 Thread Mark Raasveldt
Changeset: b2b9d5737695 for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=b2b9d5737695
Modified Files:
sql/server/sql_parser.y
Branch: stratified_sampling
Log Message:

Revert parser change.


diffs (59 lines):

diff --git a/sql/server/sql_parser.y b/sql/server/sql_parser.y
--- a/sql/server/sql_parser.y
+++ b/sql/server/sql_parser.y
@@ -4669,25 +4669,45 @@ literal:
  sql_find_subtype(, "boolean", 0, 0 );
  $$ = _newAtomNode( atom_bool(SA, , TRUE)); }
  | sqlDBL
-   {
-   sql_subtype *t= sql_bind_localtype("dbl");
+   { char *s = strip_extra_zeros(sa_strdup(SA, $1));
+ char *dot = strchr(s, '.');
+ int digits = _strlen(s) - 1;
+ int scale = digits - (int) (dot-s);
+ sql_subtype t;
+
+ if (digits <= 0)
+   digits = 1;
+ if (digits <= MAX_DEC_DIGITS) {
+   double val = strtod($1,NULL);
+#ifdef HAVE_HGE
+   hge value = decimal_from_str(s, NULL);
+#else
+   lng value = decimal_from_str(s, NULL);
+#endif
+
+   if (*s == '+' || *s == '-')
+   digits --;
+   sql_find_subtype(, "decimal", digits, scale );
+   $$ = _newAtomNode( atom_dec(SA, , value, val));
+  } else {
+   char *p = $1;
double val;
-   char *p = $1;
-   
+
errno = 0;
val = strtod($1,);
-   if(errno) {
-   char *msg = sql_message("\b22003!double value 
could not be parsed (%s)", $1);
-   
+   if (p == $1 || val == dbl_nil || (errno == ERANGE && 
(val < -1 || val > 1))) {
+   char *msg = sql_message("\b22003!double value 
too large or not a number (%s)", $1);
+
yyerror(m, msg);
_DELETE(msg);
$$ = NULL;
YYABORT;
}
-   
-   $$ = _newAtomNode( atom_float(SA, t, val));
+   sql_find_subtype(, "double", 51, 0 );
+   $$ = _newAtomNode(atom_float(SA, , val));
+  }
}
- ;
+;
 
 interval_expression:
INTERVAL opt_sign string interval_qualifier { 
___
checkin-list mailing list
checkin-list@monetdb.org
https://www.monetdb.org/mailman/listinfo/checkin-list


MonetDB: stratified_sampling - Add testcase.

2017-06-29 Thread Mark Raasveldt
Changeset: 0307b09d883d for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=0307b09d883d
Added Files:
sql/backends/monet5/Tests/sample06.sql
sql/backends/monet5/Tests/sample06.stable.err
sql/backends/monet5/Tests/sample06.stable.out
Modified Files:
sql/backends/monet5/Tests/All
Branch: stratified_sampling
Log Message:

Add testcase.


diffs (146 lines):

diff --git a/sql/backends/monet5/Tests/All b/sql/backends/monet5/Tests/All
--- a/sql/backends/monet5/Tests/All
+++ b/sql/backends/monet5/Tests/All
@@ -6,6 +6,7 @@ sample02
 sample03
 sample04
 HAVE_LIBPY?sample05
+sample06
 
 HAVE_LIBR_WIN32?rapi00
 HAVE_LIBR_WIN32?rapi01
diff --git a/sql/backends/monet5/Tests/sample06.sql 
b/sql/backends/monet5/Tests/sample06.sql
new file mode 100644
--- /dev/null
+++ b/sql/backends/monet5/Tests/sample06.sql
@@ -0,0 +1,10 @@
+# aggregate as weights
+
+START TRANSACTION;
+
+CREATE TABLE vals(w DOUBLE, value INTEGER);
+INSERT INTO vals VALUES (1, 100), (0, 50);
+
+SELECT * FROM vals SAMPLE 0.5 USING WEIGHTS SUM(w);
+
+ROLLBACK;
diff --git a/sql/backends/monet5/Tests/sample06.stable.err 
b/sql/backends/monet5/Tests/sample06.stable.err
new file mode 100644
--- /dev/null
+++ b/sql/backends/monet5/Tests/sample06.stable.err
@@ -0,0 +1,38 @@
+stderr of test 'sample06` in directory 'sql/backends/monet5` itself:
+
+
+# 13:34:43 >  
+# 13:34:43 >  "mserver5" "--debug=10" "--set" "gdk_nr_threads=0" "--set" 
"mapi_open=true" "--set" "mapi_port=37944" "--set" 
"mapi_usock=/var/tmp/mtest-72078/.s.monetdb.37944" "--set" "monet_prompt=" 
"--forcemito" "--dbpath=/Users/myth/opt/var/MonetDB/mTests_sql_backends_monet5" 
"--set" "embedded_py=true"
+# 13:34:43 >  
+
+# builtin opt  gdk_dbpath = /Users/myth/opt/var/monetdb5/dbfarm/demo
+# builtin opt  gdk_debug = 0
+# builtin opt  gdk_vmtrim = no
+# builtin opt  monet_prompt = >
+# builtin opt  monet_daemon = no
+# builtin opt  mapi_port = 5
+# builtin opt  mapi_open = false
+# builtin opt  mapi_autosense = false
+# builtin opt  sql_optimizer = default_pipe
+# builtin opt  sql_debug = 0
+# cmdline opt  gdk_nr_threads = 0
+# cmdline opt  mapi_open = true
+# cmdline opt  mapi_port = 37944
+# cmdline opt  mapi_usock = /var/tmp/mtest-72078/.s.monetdb.37944
+# cmdline opt  monet_prompt = 
+# cmdline opt  gdk_dbpath = 
/Users/myth/opt/var/MonetDB/mTests_sql_backends_monet5
+# cmdline opt  embedded_py = true
+# cmdline opt  gdk_debug = 536870922
+
+# 13:34:43 >  
+# 13:34:43 >  "mclient" "-lsql" "-ftest" "-Eutf-8" "-i" "-e" 
"--host=/var/tmp/mtest-72078" "--port=37944"
+# 13:34:43 >  
+
+MAPI  = (monetdb) /var/tmp/mtest-72078/.s.monetdb.37944
+QUERY = SELECT * FROM vals SAMPLE 0.5 USING WEIGHTS SUM(w);
+ERROR = !Weights could not be resolved correctly.
+
+# 13:34:43 >  
+# 13:34:43 >  "Done."
+# 13:34:43 >  
+
diff --git a/sql/backends/monet5/Tests/sample06.stable.out 
b/sql/backends/monet5/Tests/sample06.stable.out
new file mode 100644
--- /dev/null
+++ b/sql/backends/monet5/Tests/sample06.stable.out
@@ -0,0 +1,72 @@
+stdout of test 'sample06` in directory 'sql/backends/monet5` itself:
+
+
+# 13:34:43 >  
+# 13:34:43 >  "mserver5" "--debug=10" "--set" "gdk_nr_threads=0" "--set" 
"mapi_open=true" "--set" "mapi_port=37944" "--set" 
"mapi_usock=/var/tmp/mtest-72078/.s.monetdb.37944" "--set" "monet_prompt=" 
"--forcemito" "--dbpath=/Users/myth/opt/var/MonetDB/mTests_sql_backends_monet5" 
"--set" "embedded_py=true"
+# 13:34:43 >  
+
+# MonetDB 5 server v11.28.0
+# This is an unreleased version
+# Serving database 'mTests_sql_backends_monet5', using 4 threads
+# Compiled for x86_64-apple-darwin15.6.0/64bit with 128bit integers
+# Found 8.000 GiB available main-memory.
+# Copyright (c) 1993-July 2008 CWI.
+# Copyright (c) August 2008-2017 MonetDB B.V., all rights reserved
+# Visit https://www.monetdb.org/ for further information
+# Listening for connection requests on 
mapi:monetdb://dhcp-21.eduroam.cwi.nl:37944/
+# Listening for UNIX domain connection requests on 
mapi:monetdb:///var/tmp/mtest-72078/.s.monetdb.37944
+# MonetDB/SQL module loaded
+# MonetDB/Python2 module loaded
+
+Ready.
+# SQL catalog created, loading sql scripts once
+# loading sql script: 09_like.sql
+# loading sql script: 10_math.sql
+# loading sql script: 11_times.sql
+# loading sql script: 12_url.sql
+# loading sql script: 13_date.sql
+# loading sql script: 14_inet.sql
+# loading sql script: 15_querylog.sql
+# loading sql script: 16_tracelog.sql
+# loading sql script: 17_temporal.sql
+# loading sql script: 18_index.sql
+# loading sql script: 20_vacuum.sql
+# loading sql script: 21_dependency_functions.sql
+# loading sql script: 22_clients.sql
+# loading sql script: 23_skyserver.sql
+# loading sql script: 25_debug.sql
+# loading sql script: 26_sysmon.sql
+# loading sql script: 27_rejects.sql
+# loading sql script: 39_analytics.sql
+# loading sql script: 39_analytics_hge.sql
+# loading sql script: 40_json.sql
+# loading sql script: 40_json_hge.sql
+# loading sql script: 

MonetDB: stratified_sampling - Merge with default.

2017-06-29 Thread Mark Raasveldt
Changeset: 004835f67db3 for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=004835f67db3
Added Files:
sql/test/BugTracker-2017/Tests/default-insert-update.Bug-6249.sql
Removed Files:
sql/test/pg_regress/Tests/oid.stable.out.oid32
sql/test/pg_regress/Tests/without_oid.stable.out.oid32
Modified Files:
sql/server/rel_dump.c
sql/server/rel_optimizer.c
sql/server/rel_updates.c
sql/server/sql_parser.y
sql/test/BugTracker-2017/Tests/All

sql/test/BugTracker-2017/Tests/crash-select_after_MAL_error.Bug-6332.stable.out
sql/test/testdb-upgrade-chain/Tests/upgrade.stable.out.int128
sql/test/testdb-upgrade/Tests/upgrade.stable.out.int128
Branch: stratified_sampling
Log Message:

Merge with default.


diffs (truncated from 19763 to 300 lines):

diff --git a/sql/server/rel_dump.c b/sql/server/rel_dump.c
--- a/sql/server/rel_dump.c
+++ b/sql/server/rel_dump.c
@@ -1182,7 +1182,9 @@ rel_read(mvc *sql, char *r, int *pos, li
 
gexps = read_exps(sql, nrel, NULL, NULL, r, pos, '[', 0);
skipWS(r, pos);
-   exps = read_exps(sql, nrel, NULL, NULL, r, pos, '[', 1);
+   exps = read_exps(sql, nrel, NULL, gexps, r, pos, '[', 1);
+   if (!exps)
+   return NULL;
 
rel = rel_groupby(sql, nrel, gexps);
rel->exps = exps;
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
@@ -2461,7 +2461,8 @@ static sql_exp *
 math_unsafe_fixup( mvc *sql, sql_exp *e, sql_exp *cond, int lr )
 {
list *args = e->l;
-   if (args->h->next)
+
+   if (args && args->h && args->h->next)
return math_unsafe_fixup_binop(sql, e, args->h->data, 
args->h->next->data, cond, lr);
else
return math_unsafe_fixup_unop(sql, e, args->h->data, cond, lr);
diff --git a/sql/server/rel_updates.c b/sql/server/rel_updates.c
--- a/sql/server/rel_updates.c
+++ b/sql/server/rel_updates.c
@@ -23,6 +23,12 @@ insert_value(mvc *sql, sql_column *c, sq
 {
if (s->token == SQL_NULL) {
return exp_atom(sql->sa, atom_general(sql->sa, >type, NULL));
+   } else if (s->token == SQL_DEFAULT) {
+   if (c->def) {
+   return rel_parse_val(sql, sa_message(sql->sa, "select 
CAST(%s AS %s);", c->def, c->type.type->sqlname), sql->emode);
+   } else {
+   return sql_error(sql, 02, "INSERT INTO: column '%s' has 
no valid default value", c->base.name);
+   }
} else {
int is_last = 0;
exp_kind ek = {type_value, card_value, FALSE};
@@ -971,11 +977,19 @@ update_table(mvc *sql, dlist *qname, dli
int status = sql->session->status;
exp_kind ek = {type_value, 
(single)?card_column:card_relation, FALSE};
 
-   if (single) 
+   if(single && a->token == SQL_DEFAULT) {
+   char *colname = 
assignment->h->next->data.sval;
+   sql_column *col = mvc_bind_column(sql, 
t, colname);
+   if (col->def) {
+   v = rel_parse_val(sql, 
sa_message(sql->sa, "select CAST(%s AS %s);", col->def, 
col->type.type->sqlname), sql->emode);
+   } else {
+   return sql_error(sql, 02, 
"UPDATE: column '%s' has no valid default value", col->base.name);
+   }
+   } else if (single) {
v = rel_value_exp(sql, _val, a, 
sql_sel, ek);
-   else
+   } else {
rel_val = rel_subquery(sql, NULL, a, 
ek, APPLY_JOIN);
-
+   }
if (!v) {
sql->errstr[0] = 0;
sql->session->status = status;
diff --git a/sql/server/sql_parser.y b/sql/server/sql_parser.y
--- a/sql/server/sql_parser.y
+++ b/sql/server/sql_parser.y
@@ -2893,6 +2893,7 @@ simple_atom:
 
 insert_atom:
 simple_atom
+ |  DEFAULT{ $$ = _symbol_create(SQL_DEFAULT, NULL ); }
  ;
 
 value:
@@ -2913,7 +2914,12 @@ assignment_commalist:
  ;
 
 assignment:
-   column '=' search_condition
+   column '=' DEFAULT
+   { dlist *l = L();
+ append_symbol(l, _symbol_create(SQL_DEFAULT, NULL ) );
+ append_string(l, $1);
+ $$ = _symbol_create_list( SQL_ASSIGN, l); }
+ |  column '=' search_condition
{ dlist *l = L();
  append_symbol(l, $3 );
  append_string(l, $1);
diff --git 

MonetDB: Dec2016 - Adding .stable.out.int128 versions to resolve...

2017-06-29 Thread Martin van Dinther
Changeset: dd652ee71da7 for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=dd652ee71da7
Added Files:
sql/test/BugTracker-2017/Tests/crash-dce.Bug-6330.stable.out.int128

sql/test/BugTracker-2017/Tests/crash-select_after_MAL_error.Bug-6332.stable.out.int128
Modified Files:
sql/test/BugTracker-2017/Tests/crash-dce.Bug-6330.stable.out

sql/test/BugTracker-2017/Tests/crash-select_after_MAL_error.Bug-6332.stable.out
Branch: Dec2016
Log Message:

Adding .stable.out.int128 versions to resolve testweb errors


diffs (234 lines):

diff --git a/sql/test/BugTracker-2017/Tests/crash-dce.Bug-6330.stable.out 
b/sql/test/BugTracker-2017/Tests/crash-dce.Bug-6330.stable.out
--- a/sql/test/BugTracker-2017/Tests/crash-dce.Bug-6330.stable.out
+++ b/sql/test/BugTracker-2017/Tests/crash-dce.Bug-6330.stable.out
@@ -8,7 +8,7 @@ stdout of test 'crash-dce.Bug-6330` in d
 # MonetDB 5 server v11.25.24
 # This is an unreleased version
 # Serving database 'mTests_sql_test_BugTracker-2017', using 8 threads
-# Compiled for x86_64-unknown-linux-gnu/64bit with 128bit integers
+# Compiled for x86_64-unknown-linux-gnu/64bit
 # Found 15.588 GiB available main-memory.
 # Copyright (c) 1993-July 2008 CWI.
 # Copyright (c) August 2008-2017 MonetDB B.V., all rights reserved
@@ -69,14 +69,14 @@ Ready.
 #SELECT 45 - - CASE + + 70 WHEN COUNT ( * ) + SUM ( DISTINCT 91 ) + MIN ( 
DISTINCT 41 ) / 65 THEN + 98 END * + - 0 - - COUNT ( * ) AS col0;
 % .L7 # table_name
 % col0 # name
-% hugeint # type
-% 40 # length
+% bigint # type
+% 20 # length
 [ NULL ]
 #SELECT 45 - CASE + + 70 WHEN COUNT ( * ) + SUM ( DISTINCT 91 ) + MIN ( 
DISTINCT 41 ) / 65 THEN + 98 END * + - 0 - - COUNT ( * ) AS col0;
 % .L7 # table_name
 % col0 # name
-% hugeint # type
-% 40 # length
+% bigeint # type
+% 20 # length
 [ NULL ]
 
 # 13:53:46 >  
diff --git 
a/sql/test/BugTracker-2017/Tests/crash-dce.Bug-6330.stable.out.int128 
b/sql/test/BugTracker-2017/Tests/crash-dce.Bug-6330.stable.out.int128
new file mode 100644
--- /dev/null
+++ b/sql/test/BugTracker-2017/Tests/crash-dce.Bug-6330.stable.out.int128
@@ -0,0 +1,85 @@
+stdout of test 'crash-dce.Bug-6330` in directory 'sql/test/BugTracker-2017` 
itself:
+
+
+# 13:53:44 >  
+# 13:53:44 >  "mserver5" "--debug=10" "--set" "gdk_nr_threads=0" "--set" 
"mapi_open=true" "--set" "mapi_port=30094" "--set" 
"mapi_usock=/var/tmp/mtest-30656/.s.monetdb.30094" "--set" "monet_prompt=" 
"--forcemito" 
"--dbpath=/export/scratch2/dinther/INSTALL/var/MonetDB/mTests_sql_test_BugTracker-2017"
 "--set" "embedded_r=yes" "--set" "embedded_py=true"
+# 13:53:44 >  
+
+# MonetDB 5 server v11.25.24
+# This is an unreleased version
+# Serving database 'mTests_sql_test_BugTracker-2017', using 8 threads
+# Compiled for x86_64-unknown-linux-gnu/64bit with 128bit integers
+# Found 15.588 GiB available main-memory.
+# Copyright (c) 1993-July 2008 CWI.
+# Copyright (c) August 2008-2017 MonetDB B.V., all rights reserved
+# Visit http://www.monetdb.org/ for further information
+# Listening for connection requests on mapi:monetdb://toulouse.da.cwi.nl:30094/
+# Listening for UNIX domain connection requests on 
mapi:monetdb:///var/tmp/mtest-30656/.s.monetdb.30094
+# MonetDB/GIS module loaded
+# MonetDB/SQL module loaded
+# MonetDB/Python module loaded
+# MonetDB/R   module loaded
+
+Ready.
+# SQL catalog created, loading sql scripts once
+# loading sql script: 09_like.sql
+# loading sql script: 10_math.sql
+# loading sql script: 11_times.sql
+# loading sql script: 12_url.sql
+# loading sql script: 13_date.sql
+# loading sql script: 14_inet.sql
+# loading sql script: 15_querylog.sql
+# loading sql script: 16_tracelog.sql
+# loading sql script: 17_temporal.sql
+# loading sql script: 18_index.sql
+# loading sql script: 20_vacuum.sql
+# loading sql script: 21_dependency_functions.sql
+# loading sql script: 22_clients.sql
+# loading sql script: 23_skyserver.sql
+# loading sql script: 25_debug.sql
+# loading sql script: 26_sysmon.sql
+# loading sql script: 27_rejects.sql
+# loading sql script: 39_analytics.sql
+# loading sql script: 39_analytics_hge.sql
+# loading sql script: 40_geom.sql
+# loading sql script: 40_json.sql
+# loading sql script: 40_json_hge.sql
+# loading sql script: 41_md5sum.sql
+# loading sql script: 45_uuid.sql
+# loading sql script: 46_gsl.sql
+# loading sql script: 46_profiler.sql
+# loading sql script: 51_sys_schema_extension.sql
+# loading sql script: 72_fits.sql
+# loading sql script: 74_netcdf.sql
+# loading sql script: 75_lidar.sql
+# loading sql script: 75_shp.sql
+# loading sql script: 75_storagemodel.sql
+# loading sql script: 80_statistics.sql
+# loading sql script: 80_udf.sql
+# loading sql script: 80_udf_hge.sql
+# loading sql script: 85_bam.sql
+# loading sql script: 90_generator.sql
+# loading sql script: 90_generator_hge.sql
+# loading sql script: 99_system.sql
+
+# 13:53:45 >  
+# 13:53:45 >  "mclient" "-lsql" "-ftest" "-Eutf-8" "-i" "-e" 
"--host=/var/tmp/mtest-30656" "--port=30094"
+# 

MonetDB: Dec2016 - Resolve compilation error on Windows and Sol-...

2017-06-29 Thread Martin van Dinther
Changeset: c1af2fbd1dc8 for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=c1af2fbd1dc8
Modified Files:
sql/server/rel_dump.c
Branch: Dec2016
Log Message:

Resolve compilation error on Windows and Sol-Solaris
.\..\..\..\sql\server\rel_dump.c(606): error #118: a void function may not 
return a value
return skipIdent(r, pos);


diffs (30 lines):

diff --git a/sql/server/rel_dump.c b/sql/server/rel_dump.c
--- a/sql/server/rel_dump.c
+++ b/sql/server/rel_dump.c
@@ -602,15 +602,17 @@ skipIdent( char *r, int *pos)
 static void
 skipIdentOrSymbol( char *r, int *pos)
 {
-   if (r[*pos] == '"') 
-   return skipIdent(r, pos);
-   while(r[*pos] && (isalnum(r[*pos]) || 
- r[*pos] == '_' || r[*pos] == '%' ||
- r[*pos] == '<' || r[*pos] == '>' || 
- r[*pos] == '/' || r[*pos] == '*' || 
- r[*pos] == '-' || r[*pos] == '+' || 
- r[*pos] == '~' || r[*pos] == '^' ))
-   (*pos)++;
+   if (r[*pos] == '"') {
+   skipIdent(r, pos);
+   } else {
+   while(r[*pos] && (isalnum(r[*pos]) ||
+ r[*pos] == '_' || r[*pos] == '%' ||
+ r[*pos] == '<' || r[*pos] == '>' ||
+ r[*pos] == '/' || r[*pos] == '*' ||
+ r[*pos] == '-' || r[*pos] == '+' ||
+ r[*pos] == '~' || r[*pos] == '^' ))
+   (*pos)++;
+   }
 }
 
 static int
___
checkin-list mailing list
checkin-list@monetdb.org
https://www.monetdb.org/mailman/listinfo/checkin-list


MonetDB: Dec2016 - Approve output after changeset 64096:24d1f738...

2017-06-29 Thread Martin van Dinther
Changeset: ef7a32cc6f0f for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=ef7a32cc6f0f
Modified Files:
sql/test/pg_regress/Tests/alter_table.stable.err
sql/test/pg_regress/Tests/alter_table.stable.out
sql/test/pg_regress/Tests/insert.stable.err
Branch: Dec2016
Log Message:

Approve output after changeset 64096:24d1f738cf7c


diffs (163 lines):

diff --git a/sql/test/pg_regress/Tests/alter_table.stable.err 
b/sql/test/pg_regress/Tests/alter_table.stable.err
--- a/sql/test/pg_regress/Tests/alter_table.stable.err
+++ b/sql/test/pg_regress/Tests/alter_table.stable.err
@@ -333,31 +333,31 @@ QUERY = insert into atacc1 values (10, 1
 ERROR = !INSERT INTO: number of values doesn't match number of columns of 
table 'atacc1'
 MAPI  = (monetdb) /var/tmp/mtest-22572/.s.monetdb.35667
 QUERY = insert into atacc1 values (default, 11, 12, 13);
-ERROR = !syntax error, unexpected DEFAULT in: "insert into atacc1 values 
(default"
+ERROR = !INSERT INTO: number of values doesn't match number of columns of 
table 'atacc1'
 MAPI  = (monetdb) /var/tmp/mtest-22572/.s.monetdb.35667
 QUERY = insert into atacc1 (a) values (10);
 ERROR = !INSERT INTO: no such column 'atacc1.a'
 MAPI  = (monetdb) /var/tmp/mtest-22572/.s.monetdb.35667
 QUERY = insert into atacc1 (a) values (default);
-ERROR = !syntax error, unexpected DEFAULT in: "insert into atacc1 (a) values 
(default"
+ERROR = !INSERT INTO: no such column 'atacc1.a'
 MAPI  = (monetdb) /var/tmp/mtest-22572/.s.monetdb.35667
 QUERY = insert into atacc1 (a,b,c,d) values (10,11,12,13);
 ERROR = !INSERT INTO: no such column 'atacc1.a'
 MAPI  = (monetdb) /var/tmp/mtest-22572/.s.monetdb.35667
 QUERY = insert into atacc1 (a,b,c,d) values (default,11,12,13);
-ERROR = !syntax error, unexpected DEFAULT in: "insert into atacc1 (a,b,c,d) 
values (default"
+ERROR = !INSERT INTO: no such column 'atacc1.a'
 MAPI  = (monetdb) /var/tmp/mtest-22572/.s.monetdb.35667
 QUERY = insert into atacc1 ("pg.dropped.1") values (10);
 ERROR = !INSERT INTO: no such column 'atacc1.pg.dropped.1'
 MAPI  = (monetdb) /var/tmp/mtest-22572/.s.monetdb.35667
 QUERY = insert into atacc1 ("pg.dropped.1") values (default);
-ERROR = !syntax error, unexpected DEFAULT in: "insert into atacc1 
("pg.dropped.1") values (default"
+ERROR = !INSERT INTO: no such column 'atacc1.pg.dropped.1'
 MAPI  = (monetdb) /var/tmp/mtest-22572/.s.monetdb.35667
 QUERY = insert into atacc1 ("pg.dropped.1",b,c,d) values 
(10,11,12,13);
 ERROR = !INSERT INTO: no such column 'atacc1.pg.dropped.1'
 MAPI  = (monetdb) /var/tmp/mtest-22572/.s.monetdb.35667
 QUERY = insert into atacc1 ("pg.dropped.1",b,c,d) values 
(default,11,12,13);
-ERROR = !syntax error, unexpected DEFAULT in: "insert into atacc1 
("pg.dropped.1",b,c,d) values (default"
+ERROR = !INSERT INTO: no such column 'atacc1.pg.dropped.1'
 MAPI  = (monetdb) /var/tmp/mtest-22572/.s.monetdb.35667
 QUERY = delete from atacc1 where a = 3;
 ERROR = !SELECT: identifier 'a' unknown
@@ -606,21 +606,12 @@ MAPI  = (monetdb) /var/tmp/mtest-22572/.
 QUERY = alter table foo alter f1 TYPE varchar(10);
 ERROR = !syntax error, unexpected TYPE, expecting DROP or SET in: "alter table 
foo alter f1 type"
 MAPI  = (monetdb) /var/tmp/mtest-22572/.s.monetdb.35667
-QUERY = insert into anothertab (atcol1, atcol2) values (default, true);
-ERROR = !syntax error, unexpected DEFAULT in: "insert into anothertab (atcol1, 
atcol2) values (default"
-MAPI  = (monetdb) /var/tmp/mtest-22572/.s.monetdb.35667
-QUERY = insert into anothertab (atcol1, atcol2) values (default, false);
-ERROR = !syntax error, unexpected DEFAULT in: "insert into anothertab (atcol1, 
atcol2) values (default"
-MAPI  = (monetdb) /var/tmp/mtest-22572/.s.monetdb.35667
 QUERY = alter table anothertab alter column atcol1 type boolean; -- fails
 ERROR = !syntax error, unexpected TYPE, expecting DROP or SET in: "alter table 
anothertab alter column atcol1 type"
 MAPI  = (monetdb) /var/tmp/mtest-22572/.s.monetdb.35667
 QUERY = alter table anothertab alter column atcol1 type integer;
 ERROR = !syntax error, unexpected TYPE, expecting DROP or SET in: "alter table 
anothertab alter column atcol1 type"
 MAPI  = (monetdb) /var/tmp/mtest-22572/.s.monetdb.35667
-QUERY = insert into anothertab (atcol1, atcol2) values (default, null);
-ERROR = !syntax error, unexpected DEFAULT in: "insert into anothertab (atcol1, 
atcol2) values (default"
-MAPI  = (monetdb) /var/tmp/mtest-22572/.s.monetdb.35667
 QUERY = alter table anothertab alter column atcol2 type text
   using case when atcol2 is true then 'IT WAS TRUE' 
  when atcol2 is false then 'IT WAS FALSE'
diff --git a/sql/test/pg_regress/Tests/alter_table.stable.out 
b/sql/test/pg_regress/Tests/alter_table.stable.out
--- a/sql/test/pg_regress/Tests/alter_table.stable.out
+++