MonetDB: Jul2017 - Updated library versions.

2017-10-11 Thread Panagiotis Koutsourakis
Changeset: a08f06c8b9d5 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=a08f06c8b9d5
Modified Files:
libversions
Branch: Jul2017
Log Message:

Updated library versions.


diffs (21 lines):

diff --git a/libversions b/libversions
--- a/libversions
+++ b/libversions
@@ -36,13 +36,13 @@
 
 # version of the GDK library (subdirectory gdk; also includes
 # common/options and common/utils)
-GDK_VERSION=15:2:0
+GDK_VERSION=15:3:0
 
 # version of the MAPI library (subdirectory clients/mapilib)
-MAPI_VERSION=9:1:0
+MAPI_VERSION=9:2:0
 
 # version of the MONETDB5 library (subdirectory monetdb5, not including extras)
-MONETDB5_VERSION=23:2:0
+MONETDB5_VERSION=23:3:0
 
 # version of the STREAM library (subdirectory common/stream)
-STREAM_VERSION=10:1:2
+STREAM_VERSION=10:2:2
___
checkin-list mailing list
checkin-list@monetdb.org
https://www.monetdb.org/mailman/listinfo/checkin-list


MonetDB: Jul2017 - Post release build.

2017-10-11 Thread Panagiotis Koutsourakis
Changeset: 81c40585ce60 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=81c40585ce60
Modified Files:
MonetDB.spec
NT/monetdb_config.h.in
NT/rules.msc
clients/mapilib/mapi.rc
clients/odbc/driver/driver.rc
clients/odbc/winsetup/setup.rc
configure.ag
gdk/libbat.rc
monetdb5/tools/libmonetdb5.rc
vertoo.data
Branch: Jul2017
Log Message:

Post release build.


diffs (229 lines):

diff --git a/MonetDB.spec b/MonetDB.spec
--- a/MonetDB.spec
+++ b/MonetDB.spec
@@ -1,5 +1,5 @@
 %define name MonetDB
-%define version 11.27.7
+%define version 11.27.8
 %{!?buildno: %global buildno %(date +%Y%m%d)}
 
 # groups of related archs
diff --git a/NT/monetdb_config.h.in b/NT/monetdb_config.h.in
--- a/NT/monetdb_config.h.in
+++ b/NT/monetdb_config.h.in
@@ -753,7 +753,7 @@
 #define MONETDB5_PASSWDHASH_TOKEN SHA512
 
 /* Release name or "unreleased" */
-#define MONETDB_RELEASE "Jul2017-SP2"
+#define MONETDB_RELEASE "unreleased"
 
 /* Define if you do not want assertions */
 /* #undef NDEBUG */
@@ -762,7 +762,7 @@
 #define PACKAGE "MonetDB"
 
 /* Define to the version of this package. */
-#define PACKAGE_VERSION "11.27.7"
+#define PACKAGE_VERSION "11.27.8"
 
 /* Define to the address where bug reports for this package should be sent. */
 #define PACKAGE_BUGREPORT "https://bugs.monetdb.org/;
diff --git a/NT/rules.msc b/NT/rules.msc
--- a/NT/rules.msc
+++ b/NT/rules.msc
@@ -6,7 +6,7 @@
 #
 # Copyright 1997 - July 2008 CWI, August 2008 - 2017 MonetDB B.V.
 
-VERSION=11.27.7
+VERSION=11.27.8
 #   ^^
 # Maintained via vertoo. Please don't modify by hand!
 # Contact monetdb-develop...@lists.sourceforge.net for details and/or 
assistance.
diff --git a/clients/mapilib/mapi.rc b/clients/mapilib/mapi.rc
--- a/clients/mapilib/mapi.rc
+++ b/clients/mapilib/mapi.rc
@@ -3,8 +3,8 @@
 LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
 
 1 VERSIONINFO
-  FILEVERSION 11,27,7,1
-  PRODUCTVERSION 11,27,7,1
+  FILEVERSION 11,27,8,1
+  PRODUCTVERSION 11,27,8,1
   FILEFLAGSMASK 0x3fL
   FILEFLAGS 0
   FILEOS VOS_NT_WINDOWS32
@@ -18,7 +18,7 @@ BEGIN
   VALUE "Comments", "\0"
   VALUE "CompanyName", "MonetDB B.V.\0"
   VALUE "FileDescription", "MonetDB Application Interface DLL\0"
-  VALUE "FileVersion", "11.27.7\0"
+  VALUE "FileVersion", "11.27.8\0"
   //
   // Maintained via vertoo. Please don't modify by hand!
   // Contact monetdb-develop...@lists.sourceforge.net for details and/or 
assistance.
@@ -28,7 +28,7 @@ BEGIN
   VALUE "OriginalFilename", "Mapi.dll\0"
   VALUE "PrivateBuild", "\0"
   VALUE "ProductName", "MonetDB Client Libraries\0"
-  VALUE "ProductVersion", "11.27.7\0"
+  VALUE "ProductVersion", "11.27.8\0"
   //   
   // Maintained via vertoo. Please don't modify by hand!
   // Contact monetdb-develop...@lists.sourceforge.net for details and/or 
assistance.
diff --git a/clients/odbc/driver/driver.rc b/clients/odbc/driver/driver.rc
--- a/clients/odbc/driver/driver.rc
+++ b/clients/odbc/driver/driver.rc
@@ -3,8 +3,8 @@
 LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
 
 1 VERSIONINFO
-  FILEVERSION 11,27,7,1
-  PRODUCTVERSION 11,27,7,1
+  FILEVERSION 11,27,8,1
+  PRODUCTVERSION 11,27,8,1
   FILEFLAGSMASK 0x3fL
   FILEFLAGS 0
   FILEOS VOS_NT_WINDOWS32
@@ -18,7 +18,7 @@ BEGIN
   VALUE "Comments", "\0"
   VALUE "CompanyName", "MonetDB B.V.\0"
   VALUE "FileDescription", "MonetDB ODBC Driver DLL\0"
-  VALUE "FileVersion", "11.27.7\0"
+  VALUE "FileVersion", "11.27.8\0"
   //
   // Maintained via vertoo. Please don't modify by hand!
   // Contact monetdb-develop...@lists.sourceforge.net for details and/or 
assistance.
@@ -28,7 +28,7 @@ BEGIN
   VALUE "OriginalFilename", "libMonetODBC.dll\0"
   VALUE "PrivateBuild", "\0"
   VALUE "ProductName", "MonetDB SQL Server\0"
-  VALUE "ProductVersion", "11.27.7\0"
+  VALUE "ProductVersion", "11.27.8\0"
   //   
   // Maintained via vertoo. Please don't modify by hand!
   // Contact monetdb-develop...@lists.sourceforge.net for details and/or 
assistance.
diff --git a/clients/odbc/winsetup/setup.rc b/clients/odbc/winsetup/setup.rc
--- a/clients/odbc/winsetup/setup.rc
+++ b/clients/odbc/winsetup/setup.rc
@@ -62,8 +62,8 @@ END
 //
 
 VS_VERSION_INFO VERSIONINFO
- FILEVERSION 11,27,7,1
- PRODUCTVERSION 11,27,7,1
+ FILEVERSION 11,27,8,1
+ PRODUCTVERSION 11,27,8,1
  FILEFLAGSMASK 0x3fL
 #ifdef _DEBUG
  FILEFLAGS 0x1L
@@ -80,12 +80,12 @@ BEGIN
 BEGIN
 VALUE "CompanyName", "MonetDB B.V."
 VALUE "FileDescription", "MonetDB ODBC Setup DLL"
-VALUE "FileVersion", "11.27.7"
+VALUE "FileVersion", "11.27.8"
 VALUE "InternalName", "libMonetODBCs.dll"
 VALUE "LegalCopyright", "Copyright © MonetDB B.V. 2008-2017"

MonetDB: default - Merge with Jul2017

2017-09-28 Thread Panagiotis Koutsourakis
Changeset: c2e8e80037e7 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=c2e8e80037e7
Added Files:
sql/test/BugTracker-2017/Tests/corr_coersion.Bug-6287.sql
sql/test/BugTracker-2017/Tests/corr_coersion.Bug-6287.stable.err
sql/test/BugTracker-2017/Tests/corr_coersion.Bug-6287.stable.out

sql/test/BugTracker-2017/Tests/sqlitelogictest-aggregation-distinct.Bug-6411.sql

sql/test/BugTracker-2017/Tests/sqlitelogictest-having-with-in.Bug-6410.sql

sql/test/BugTracker-2017/Tests/sqlitelogictest-having-with-in.Bug-6410.stable.err

sql/test/BugTracker-2017/Tests/sqlitelogictest-having-with-in.Bug-6410.stable.out

sql/test/BugTracker-2017/Tests/sqlitelogictest-having-with-not-in.Bug-6409.sql

sql/test/BugTracker-2017/Tests/sqlitelogictest-having-with-not-in.Bug-6409.stable.err

sql/test/BugTracker-2017/Tests/sqlitelogictest-having-with-not-in.Bug-6409.stable.out
Modified Files:
monetdb5/modules/atoms/json.c
sql/backends/monet5/rel_bin.c
sql/backends/monet5/sql.c
sql/server/rel_select.c
sql/storage/store.c
sql/test/BugTracker-2017/Tests/All
Branch: default
Log Message:

Merge with Jul2017


diffs (truncated from 550 to 300 lines):

diff --git a/monetdb5/modules/atoms/json.c b/monetdb5/modules/atoms/json.c
--- a/monetdb5/modules/atoms/json.c
+++ b/monetdb5/modules/atoms/json.c
@@ -43,6 +43,7 @@
char *msg;  
\
if (jt) {   
\
msg = jt->error;
\
+   jt->error = NULL;   
\
JSONfree(jt);   
\
} else {
\
msg = createException(MAL, "json.new",  
\
diff --git a/sql/backends/monet5/rel_bin.c b/sql/backends/monet5/rel_bin.c
--- a/sql/backends/monet5/rel_bin.c
+++ b/sql/backends/monet5/rel_bin.c
@@ -561,6 +561,8 @@ exp_bin(backend *be, sql_exp *e, stmt *l
fprintf(stderr, "could not find %s.%s\n", (char*)e->l, 
(char*)e->r);
print_stmtlist(sql->sa, left);
print_stmtlist(sql->sa, right);
+   assert(s);
+   return NULL;
}
 }  break;
case e_cmp: {
diff --git a/sql/backends/monet5/sql.c b/sql/backends/monet5/sql.c
--- a/sql/backends/monet5/sql.c
+++ b/sql/backends/monet5/sql.c
@@ -1113,8 +1113,10 @@ mvc_grow_wrap(Client cntxt, MalBlkPtr mb
cnt = BATcount(ins);
BBPunfix(ins->batCacheid);
}
-   if (BATcount(tid))
-   v = *Tloc(tid, BATcount(tid)-1)+1;
+   if (BATcount(tid)) {
+   (void)BATmax(tid, );
+   v++;
+   }
for(;cnt>0; cnt--, v++) {
if (BUNappend(tid, , FALSE) != GDK_SUCCEED) {
BBPunfix(Tid);
diff --git a/sql/server/rel_select.c b/sql/server/rel_select.c
--- a/sql/server/rel_select.c
+++ b/sql/server/rel_select.c
@@ -33,10 +33,6 @@ rel_setsubquery(sql_rel*r)
 {
if (rel_is_ref(r))
return;
-   if (r->l && !is_base(r->op))
-   rel_setsubquery(r->l);
-   if (r->r && is_join(r->op))
-   rel_setsubquery(r->r);
set_subquery(r);
 }
 
@@ -1782,7 +1778,6 @@ rel_compare(mvc *sql, sql_rel *rel, symb
rel = r;
}
} else if (r) {
-   rel_setsubquery(r);
rs = rel_lastexp(sql, r);
if (r->card > CARD_ATOM) {
/* if single value (independed of relations), 
rewrite */
@@ -2027,7 +2022,6 @@ rel_logical_value_exp(mvc *sql, sql_rel 
if (!rel_find_exp(l, ls))
rel_project_add_exp(sql, l, ls);
}
-   rel_setsubquery(r);
rs = rel_lastexp(sql, r);
if (r->card > CARD_ATOM) {
sql_subaggr *zero_or_one = 
sql_bind_aggr(sql->sa, sql->session->schema, "zero_or_one", exp_subtype(rs));
@@ -2447,7 +2441,7 @@ rel_logical_exp(mvc *sql, sql_rel *rel, 
symbol *lo = NULL;
dnode *n = 

MonetDB: acticloud - Merge with Jul2017

2017-10-02 Thread Panagiotis Koutsourakis
Changeset: 62a80d1eae07 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=62a80d1eae07
Added Files:
sql/backends/monet5/UDF/pyapi3/Tests/pyapi3_00.sql.src
sql/backends/monet5/UDF/pyapi3/Tests/pyapi3_01.sql.src
sql/backends/monet5/UDF/pyapi3/Tests/pyapi3_02.sql.src
sql/backends/monet5/UDF/pyapi3/Tests/pyapi3_03.sql.src
sql/backends/monet5/UDF/pyapi3/Tests/pyapi3_04.sql.src
sql/backends/monet5/UDF/pyapi3/Tests/pyapi3_05.sql.src
sql/backends/monet5/UDF/pyapi3/Tests/pyapi3_06.sql.src
sql/backends/monet5/UDF/pyapi3/Tests/pyapi3_07.sql.src
sql/backends/monet5/UDF/pyapi3/Tests/pyapi3_09.sql.src
sql/backends/monet5/UDF/pyapi3/Tests/pyapi3_10.sql.src
sql/backends/monet5/UDF/pyapi3/Tests/pyapi3_11.sql.src
sql/backends/monet5/UDF/pyapi3/Tests/pyapi3_12.sql.src
sql/backends/monet5/UDF/pyapi3/Tests/pyapi3_13.sql.src
sql/backends/monet5/UDF/pyapi3/Tests/pyapi3_15.sql.src
sql/backends/monet5/UDF/pyapi3/Tests/pyapi3_16.sql.src
sql/backends/monet5/UDF/pyapi3/Tests/pyapi3_17.sql.src
sql/backends/monet5/UDF/pyapi3/Tests/pyapi3_18.sql.src
sql/backends/monet5/UDF/pyapi3/Tests/pyapi3_19.sql.src
sql/backends/monet5/UDF/pyapi3/Tests/pyapi3_20.sql.src
sql/backends/monet5/UDF/pyapi3/Tests/pyapi3_21.sql.src
sql/backends/monet5/UDF/pyapi3/Tests/pyapi3_23.sql.src
sql/backends/monet5/UDF/pyapi3/Tests/pyapi3_24.sql.src
sql/backends/monet5/UDF/pyapi3/Tests/pyapi3_25.sql.src
sql/backends/monet5/UDF/pyapi3/Tests/pyapi3_26.sql.src
sql/backends/monet5/UDF/pyapi3/Tests/pyapi3_27.sql.src
sql/backends/monet5/UDF/pyapi3/Tests/pyapi3_28.sql.src
sql/backends/monet5/UDF/pyapi3/Tests/pyapi3_29.sql.src
sql/backends/monet5/UDF/pyapi3/Tests/pyapi3_30.sql.src
sql/backends/monet5/UDF/pyapi3/Tests/pyapi3_31.sql.src
sql/backends/monet5/UDF/pyapi3/Tests/pyapi3_32.sql.src
sql/backends/monet5/UDF/pyapi3/Tests/pyloader3_01.sql.src
sql/backends/monet5/UDF/pyapi3/Tests/pyloader3_02.sql.src
sql/backends/monet5/UDF/pyapi3/Tests/pyloader3_05.sql.src

sql/jdbc/tests/Tests/Bug_Connect_as_voc_getMetaData_Failure_Bug_6388.SQL.bat

sql/jdbc/tests/Tests/Bug_Connect_as_voc_getMetaData_Failure_Bug_6388.SQL.sh

sql/jdbc/tests/Tests/Bug_Connect_as_voc_getMetaData_Failure_Bug_6388.stable.err

sql/jdbc/tests/Tests/Bug_Connect_as_voc_getMetaData_Failure_Bug_6388.stable.out
sql/jdbc/tests/Tests/Bug_PrepStmtSetString_6382.SQL.bat
sql/jdbc/tests/Tests/Bug_PrepStmtSetString_6382.SQL.sh
sql/jdbc/tests/Tests/Bug_PrepStmtSetString_6382.stable.err
sql/jdbc/tests/Tests/Bug_PrepStmtSetString_6382.stable.out

sql/test/BugTracker-2017/Tests/aggr_udf_with_more_than_2params.Bug-6385.sql

sql/test/BugTracker-2017/Tests/aggr_udf_with_more_than_2params.Bug-6385.stable.err

sql/test/BugTracker-2017/Tests/aggr_udf_with_more_than_2params.Bug-6385.stable.out
sql/test/BugTracker-2017/Tests/caching_stats_bug.6374.sql
sql/test/BugTracker-2017/Tests/caching_stats_bug.6374.stable.err
sql/test/BugTracker-2017/Tests/caching_stats_bug.6374.stable.out
sql/test/BugTracker-2017/Tests/case.Bug-6386.sql
sql/test/BugTracker-2017/Tests/case.Bug-6386.stable.err
sql/test/BugTracker-2017/Tests/case.Bug-6386.stable.out
sql/test/BugTracker-2017/Tests/copy_into_crash.Bug-6404.sql
sql/test/BugTracker-2017/Tests/copy_into_crash.Bug-6404.stable.err
sql/test/BugTracker-2017/Tests/copy_into_crash.Bug-6404.stable.out
sql/test/BugTracker-2017/Tests/corr_coersion.Bug-6287.sql
sql/test/BugTracker-2017/Tests/corr_coersion.Bug-6287.stable.err
sql/test/BugTracker-2017/Tests/corr_coersion.Bug-6287.stable.out
sql/test/BugTracker-2017/Tests/exists.Bug-6392.sql
sql/test/BugTracker-2017/Tests/exists.Bug-6392.stable.err
sql/test/BugTracker-2017/Tests/exists.Bug-6392.stable.out
sql/test/BugTracker-2017/Tests/null_matches_in_outer.Bug-6398.sql
sql/test/BugTracker-2017/Tests/null_matches_in_outer.Bug-6398.stable.err
sql/test/BugTracker-2017/Tests/null_matches_in_outer.Bug-6398.stable.out
sql/test/BugTracker-2017/Tests/side-effect.Bug-6397.sql
sql/test/BugTracker-2017/Tests/side-effect.Bug-6397.stable.err
sql/test/BugTracker-2017/Tests/side-effect.Bug-6397.stable.out

sql/test/BugTracker-2017/Tests/sqlitelogictest-aggregation-distinct.Bug-6411.sql

sql/test/BugTracker-2017/Tests/sqlitelogictest-having-with-in.Bug-6410.sql

sql/test/BugTracker-2017/Tests/sqlitelogictest-having-with-in.Bug-6410.stable.err

sql/test/BugTracker-2017/Tests/sqlitelogictest-having-with-in.Bug-6410.stable.out

sql/test/BugTracker-2017/Tests/sqlitelogictest-having-with-not-in.Bug-6409.sql
   

MonetDB: data-vaults - Merge with default

2017-08-28 Thread Panagiotis Koutsourakis
Changeset: 06ebbb77a047 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=06ebbb77a047
Added Files:
monetdb5/modules/mal/Tests/remote13.malC
sql/backends/monet5/UDF/pyapi3/Tests/pyapi3_00.sql.src
sql/backends/monet5/UDF/pyapi3/Tests/pyapi3_01.sql.src
sql/backends/monet5/UDF/pyapi3/Tests/pyapi3_02.sql.src
sql/backends/monet5/UDF/pyapi3/Tests/pyapi3_03.sql.src
sql/backends/monet5/UDF/pyapi3/Tests/pyapi3_04.sql.src
sql/backends/monet5/UDF/pyapi3/Tests/pyapi3_05.sql.src
sql/backends/monet5/UDF/pyapi3/Tests/pyapi3_06.sql.src
sql/backends/monet5/UDF/pyapi3/Tests/pyapi3_07.sql.src
sql/backends/monet5/UDF/pyapi3/Tests/pyapi3_09.sql.src
sql/backends/monet5/UDF/pyapi3/Tests/pyapi3_10.sql.src
sql/backends/monet5/UDF/pyapi3/Tests/pyapi3_11.sql.src
sql/backends/monet5/UDF/pyapi3/Tests/pyapi3_12.sql.src
sql/backends/monet5/UDF/pyapi3/Tests/pyapi3_13.sql.src
sql/backends/monet5/UDF/pyapi3/Tests/pyapi3_15.sql.src
sql/backends/monet5/UDF/pyapi3/Tests/pyapi3_16.sql.src
sql/backends/monet5/UDF/pyapi3/Tests/pyapi3_17.sql.src
sql/backends/monet5/UDF/pyapi3/Tests/pyapi3_18.sql.src
sql/backends/monet5/UDF/pyapi3/Tests/pyapi3_19.sql.src
sql/backends/monet5/UDF/pyapi3/Tests/pyapi3_20.sql.src
sql/backends/monet5/UDF/pyapi3/Tests/pyapi3_21.sql.src
sql/backends/monet5/UDF/pyapi3/Tests/pyapi3_23.sql.src
sql/backends/monet5/UDF/pyapi3/Tests/pyapi3_24.sql.src
sql/backends/monet5/UDF/pyapi3/Tests/pyapi3_25.sql.src
sql/backends/monet5/UDF/pyapi3/Tests/pyapi3_26.sql.src
sql/backends/monet5/UDF/pyapi3/Tests/pyapi3_27.sql.src
sql/backends/monet5/UDF/pyapi3/Tests/pyapi3_28.sql.src
sql/backends/monet5/UDF/pyapi3/Tests/pyapi3_29.sql.src
sql/backends/monet5/UDF/pyapi3/Tests/pyapi3_30.sql.src
sql/backends/monet5/UDF/pyapi3/Tests/pyapi3_31.sql.src
sql/backends/monet5/UDF/pyapi3/Tests/pyapi3_32.sql.src
sql/backends/monet5/UDF/pyapi3/Tests/pyloader3_01.sql.src
sql/backends/monet5/UDF/pyapi3/Tests/pyloader3_02.sql.src
sql/backends/monet5/UDF/pyapi3/Tests/pyloader3_05.sql.src

sql/jdbc/tests/Tests/Bug_Connect_as_voc_getMetaData_Failure_Bug_6388.SQL.bat

sql/jdbc/tests/Tests/Bug_Connect_as_voc_getMetaData_Failure_Bug_6388.SQL.sh

sql/jdbc/tests/Tests/Bug_Connect_as_voc_getMetaData_Failure_Bug_6388.stable.err

sql/jdbc/tests/Tests/Bug_Connect_as_voc_getMetaData_Failure_Bug_6388.stable.out

sql/test/BugTracker-2017/Tests/aggr_udf_with_more_than_2params.Bug-6385.sql

sql/test/BugTracker-2017/Tests/aggr_udf_with_more_than_2params.Bug-6385.stable.err

sql/test/BugTracker-2017/Tests/aggr_udf_with_more_than_2params.Bug-6385.stable.out
sql/test/BugTracker-2017/Tests/case.Bug-6386.sql
sql/test/BugTracker-2017/Tests/case.Bug-6386.stable.err
sql/test/BugTracker-2017/Tests/case.Bug-6386.stable.out
sql/test/BugTracker-2017/Tests/exists.Bug-6392.sql
sql/test/BugTracker-2017/Tests/exists.Bug-6392.stable.err
sql/test/BugTracker-2017/Tests/exists.Bug-6392.stable.out
sql/test/BugTracker-2017/Tests/sqllitelogistest_case.Bug-6335.sql

sql/test/BugTracker-2017/Tests/too-large-decimals.Bug-6192.stable.err.int128
sql/test/emptydb-upgrade-chain-hge/Tests/check.stable.out.int128.src
sql/test/emptydb-upgrade-chain/Tests/check.stable.out.32bit.src
sql/test/emptydb-upgrade-chain/Tests/check.stable.out.int128.src
sql/test/emptydb-upgrade-chain/Tests/check.stable.out.src
sql/test/emptydb-upgrade-hge/Tests/check.stable.out.int128.src
sql/test/emptydb-upgrade/Tests/check.stable.out.32bit.src
sql/test/emptydb-upgrade/Tests/check.stable.out.int128.src
sql/test/emptydb-upgrade/Tests/check.stable.out.src
Removed Files:
geom/sql/conformance/Tests/T3.stable.out.int128
sql/backends/monet5/UDF/pyapi3/Tests/pyapi3_00.SQL.sh
sql/backends/monet5/UDF/pyapi3/Tests/pyapi3_01.SQL.sh
sql/backends/monet5/UDF/pyapi3/Tests/pyapi3_02.SQL.sh
sql/backends/monet5/UDF/pyapi3/Tests/pyapi3_03.SQL.sh
sql/backends/monet5/UDF/pyapi3/Tests/pyapi3_04.SQL.sh
sql/backends/monet5/UDF/pyapi3/Tests/pyapi3_05.SQL.sh
sql/backends/monet5/UDF/pyapi3/Tests/pyapi3_06.SQL.sh
sql/backends/monet5/UDF/pyapi3/Tests/pyapi3_07.SQL.sh
sql/backends/monet5/UDF/pyapi3/Tests/pyapi3_09.SQL.sh
sql/backends/monet5/UDF/pyapi3/Tests/pyapi3_10.SQL.sh
sql/backends/monet5/UDF/pyapi3/Tests/pyapi3_11.SQL.sh
sql/backends/monet5/UDF/pyapi3/Tests/pyapi3_12.SQL.sh
sql/backends/monet5/UDF/pyapi3/Tests/pyapi3_13.SQL.sh
sql/backends/monet5/UDF/pyapi3/Tests/pyapi3_15.SQL.sh
sql/backends/monet5/UDF/pyapi3/Tests/pyapi3_16.SQL.sh

MonetDB: data-vaults - Merge with default

2017-08-31 Thread Panagiotis Koutsourakis
Changeset: a9cb90dab9d3 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=a9cb90dab9d3
Added Files:
sql/test/BugTracker-2017/Tests/side-effect.Bug-6397.sql
Modified Files:
gdk/gdk_bat.c
gdk/gdk_batop.c
gdk/gdk_bbp.c
gdk/gdk_firstn.c
gdk/gdk_group.c
gdk/gdk_imprints.c
gdk/gdk_join.c
gdk/gdk_logger.c
gdk/gdk_sample.c
gdk/gdk_select.c
gdk/gdk_unique.c
monetdb5/extras/rapi/rapi.c
monetdb5/modules/atoms/json.c
monetdb5/modules/kernel/aggr.c
monetdb5/modules/kernel/algebra.c
monetdb5/modules/kernel/bat5.c
monetdb5/modules/kernel/batmmath.c
monetdb5/modules/kernel/batstr.c
monetdb5/modules/kernel/group.c
monetdb5/modules/kernel/microbenchmark.c
monetdb5/modules/mal/batExtensions.c
monetdb5/modules/mal/batcalc.c
monetdb5/modules/mal/mat.c
monetdb5/modules/mal/pcre.c
monetdb5/modules/mal/sample.c
monetdb5/modules/mal/txtsim.c
sql/backends/monet5/UDF/pyapi/connection.c
sql/backends/monet5/generator/generator.c
sql/backends/monet5/sql.c
sql/backends/monet5/sql_rank.c
sql/backends/monet5/sql_result.c
sql/backends/monet5/vaults/bam/bam_lib.c
sql/storage/bat/bat_storage.c
sql/storage/bat/bat_table.c
sql/storage/bat/bat_utils.c
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/check3.stable.out
sql/test/leaks/Tests/check4.stable.out
sql/test/leaks/Tests/check5.stable.out
sql/test/leaks/Tests/select1.stable.out
sql/test/leaks/Tests/select1.stable.out.int128
sql/test/leaks/Tests/select2.stable.out
sql/test/leaks/Tests/select2.stable.out.int128
sql/test/leaks/Tests/temp1.stable.out
Branch: data-vaults
Log Message:

Merge with default


diffs (truncated from 3560 to 300 lines):

diff --git a/gdk/gdk_bat.c b/gdk/gdk_bat.c
--- a/gdk/gdk_bat.c
+++ b/gdk/gdk_bat.c
@@ -246,10 +246,10 @@ BATdense(oid hseq, oid tseq, BUN cnt)
BAT *bn;
 
bn = COLnew(hseq, TYPE_void, 0, TRANSIENT);
-   if (bn == NULL)
-   return NULL;
-   BATtseqbase(bn, tseq);
-   BATsetcount(bn, cnt);
+   if (bn != NULL) {
+   BATtseqbase(bn, tseq);
+   BATsetcount(bn, cnt);
+   }
return bn;
 }
 
@@ -1380,6 +1380,7 @@ BATsetcount(BAT *b, BUN cnt)
 {
/* head column is always VOID, and some head properties never change */
assert(b->hseqbase != oid_nil);
+   assert(cnt <= BUN_MAX);
 
b->batCount = cnt;
b->batDirtydesc = TRUE;
diff --git a/gdk/gdk_batop.c b/gdk/gdk_batop.c
--- a/gdk/gdk_batop.c
+++ b/gdk/gdk_batop.c
@@ -1306,21 +1306,17 @@ BATsort(BAT **sorted, BAT **order, BAT *
*sorted = bn;
}
if (order) {
-   on = COLnew(b->hseqbase, TYPE_void, BATcount(b), 
TRANSIENT);
+   on = BATdense(b->hseqbase, b->hseqbase, BATcount(b));
if (on == NULL)
goto error;
-   BATsetcount(on, BATcount(b));
-   BATtseqbase(on, b->hseqbase);
*order = on;
}
if (groups) {
if (BATtkey(b)) {
/* singleton groups */
-   gn = COLnew(0, TYPE_void, BATcount(b), 
TRANSIENT);
+   gn = BATdense(0, 0, BATcount(b));
if (gn == NULL)
goto error;
-   BATsetcount(gn, BATcount(b));
-   BATtseqbase(gn, 0);
} else {
/* single group */
const oid *o = 0;
@@ -1822,15 +1818,9 @@ BATcount_no_nil(BAT *b)
 static BAT *
 newdensecand(oid first, oid last)
 {
-   BAT *bn;
-
-   if ((bn = COLnew(0, TYPE_void, 0, TRANSIENT)) == NULL)
-   return NULL;
if (last < first)
first = last = 0; /* empty range */
-   BATsetcount(bn, last - first);
-   BATtseqbase(bn, first);
-   return bn;
+   return BATdense(0, first, last - first);
 }
 
 /* merge two candidate lists and produce a new one
diff --git a/gdk/gdk_bbp.c b/gdk/gdk_bbp.c
--- a/gdk/gdk_bbp.c
+++ b/gdk/gdk_bbp.c
@@ -321,9 +321,18 @@ BBPselectfarm(int role, int type, enum h
 {
int i;
 
-   assert(role >= 0 && role < 32);
(void) type;/* may use in future */
(void) hptype;  /* may use in future */
+
+   assert(role >= 0 && role < 32);
+#ifndef PERSISTENTHASH
+   if (hptype == hashheap)
+   

MonetDB: Jul2017 - Moved contents of ChangeLog.Jul2017 to MonetD...

2017-10-11 Thread Panagiotis Koutsourakis
Changeset: fce449d5af88 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=fce449d5af88
Modified Files:
MonetDB.spec
debian/changelog
Branch: Jul2017
Log Message:

Moved contents of ChangeLog.Jul2017 to MonetDB.spec, debian/changelog and 
ChangeLog-Archive.


diffs (111 lines):

diff --git a/MonetDB.spec b/MonetDB.spec
--- a/MonetDB.spec
+++ b/MonetDB.spec
@@ -132,7 +132,7 @@ Vendor: MonetDB BV <i...@monetdb.org>
 Group: Applications/Databases
 License: MPLv2.0
 URL: https://www.monetdb.org/
-Source: 
https://www.monetdb.org/downloads/sources/Jul2017-SP1/%{name}-%{version}.tar.bz2
+Source: 
https://www.monetdb.org/downloads/sources/Jul2017-SP2/%{name}-%{version}.tar.bz2
 
 # we need systemd for the _unitdir macro to exist
 # we need checkpolicy and selinux-policy-devel for the SELinux policy
@@ -1041,6 +1041,47 @@ done
 %postun -p /sbin/ldconfig
 
 %changelog
+* Wed Oct 11 2017 Panagiotis Koutsourakis <kutsu...@monetdbsolutions.com> - 
11.27.7-20171011
+- Rebuilt.
+- BZ#4017: server crashes when executing particular loopback query in
+  embedded python
+- BZ#6239: Incorrect profiling
+- BZ#6261: New handling of delta tables hurts badly reusage of bats
+- BZ#6287: should the CORR function return some numeric type that allows
+  fractions?
+- BZ#6321: Two-column aggregation on join result extremely slow.
+- BZ#6343: MERGE TABLE issue: unable to find
+- BZ#6348: Interference of procedure/table name
+- BZ#6350: Carriage return and form feed in TEXT fields are returned as
+  'r' and 'f' in jdbcclient and ResultSets
+- BZ#6352: Scope resolution problem (sqlsmith)
+- BZ#6353: implicit NULL value not propagated in distributed/remote query
+- BZ#6374: Wrong answer from merge table after content changes
+- BZ#6379: Table UDF: SEGV raised when invoking a non existing function
+- BZ#6380: unable to create new databases from clean installation
+- BZ#6381: Parser misses error messages in conditional
+- BZ#6382: Can't set JSON fields via PreparedStatement
+- BZ#6384: crash when setting a wrong listenaddr
+- BZ#6385: AGGREGATE UDFs with more than 2 parameters incorrectly
+  processed
+- BZ#6386: Unexpected error from server for query with long floats
+- BZ#6387: Performance degradation on multi column sort
+- BZ#6388: JDBC Connection via user voc produces errors when fetching
+  certain meta data information
+- BZ#6392: SELECT EXISTS (empty table) returns 'true'
+- BZ#6395: BAT leak of scalar result sets
+- BZ#6397: Isolation of generating functions not correct
+- BZ#6398: Null Matches in outer join are not supported
+- BZ#6399: UDF crashes when subquery and scalar values are passed
+  as pameters
+- BZ#6400: getCharacterStream() currently not supported
+- BZ#6404: COPY INTO crashes if table has primary key or foreign key
+  constraint
+- BZ#6409: sqllogictest crash on aggregation query with NOT IN clause
+  in HAVING clause
+- BZ#6410: Sqlitelogictest crash on aggregation query with IN clause
+- BZ#6411: Sqlitelogictest crash in aggregation query
+
 * Thu Jul 27 2017 Sjoerd Mullender <sjo...@acm.org> - 11.27.5-20170727
 - Rebuilt.
 - BZ#6375: MAL profiler truncates JSON objects larger than 8192 characters
diff --git a/debian/changelog b/debian/changelog
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,47 @@
+monetdb (11.27.7) unstable; urgency=low
+
+  * Rebuilt.
+  * BZ#4017: server crashes when executing particular loopback query in
+embedded python
+  * BZ#6239: Incorrect profiling
+  * BZ#6261: New handling of delta tables hurts badly reusage of bats
+  * BZ#6287: should the CORR function return some numeric type that allows
+fractions?
+  * BZ#6321: Two-column aggregation on join result extremely slow.
+  * BZ#6343: MERGE TABLE issue: unable to find
+  * BZ#6348: Interference of procedure/table name
+  * BZ#6350: Carriage return and form feed in TEXT fields are returned as
+'r' and 'f' in jdbcclient and ResultSets
+  * BZ#6352: Scope resolution problem (sqlsmith)
+  * BZ#6353: implicit NULL value not propagated in distributed/remote query
+  * BZ#6374: Wrong answer from merge table after content changes
+  * BZ#6379: Table UDF: SEGV raised when invoking a non existing function
+  * BZ#6380: unable to create new databases from clean installation
+  * BZ#6381: Parser misses error messages in conditional
+  * BZ#6382: Can't set JSON fields via PreparedStatement
+  * BZ#6384: crash when setting a wrong listenaddr
+  * BZ#6385: AGGREGATE UDFs with more than 2 parameters incorrectly
+processed
+  * BZ#6386: Unexpected error from server for query with long floats
+  * BZ#6387: Performance degradation on multi column sort
+  * BZ#6388: JDBC Connection via user voc produces errors when fetching
+certain meta data information
+  * BZ#6392: SELECT EXISTS (empty table) returns 'true'
+  * BZ#6395: BAT leak of scalar result sets
+  * BZ#6397: Isolation of generating functions not correct
+  * BZ#6398: Null Matches in outer join are not supported

MonetDB: data-vaults - Merge with default

2017-12-05 Thread Panagiotis Koutsourakis
Changeset: 132fb27dcffd for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=132fb27dcffd
Added Files:
sql/test/BugTracker-2017/Tests/function-resolution.Bug-6436.sql
sql/test/BugTracker-2017/Tests/function-resolution.Bug-6436.stable.err
sql/test/BugTracker-2017/Tests/function-resolution.Bug-6436.stable.out
sql/test/BugTracker-2017/Tests/generate-resolution.Bug-6471.sql
sql/test/BugTracker-2017/Tests/generate-resolution.Bug-6471.stable.err
sql/test/BugTracker-2017/Tests/generate-resolution.Bug-6471.stable.out
Modified Files:
.hgtags
MonetDB.spec
debian/changelog
gdk/ChangeLog-Archive
gdk/ChangeLog.Jul2017
libversions
monetdb5/modules/kernel/aggr.c
monetdb5/optimizer/opt_mitosis.c
sql/benchmarks/tpch/LOCKED/Tests/01-22.stable.out
sql/benchmarks/tpch/LOCKED/Tests/01-22.stable.out.int128
sql/benchmarks/tpch/LOCKED/Tests/22.stable.out.int128
sql/benchmarks/tpch/Tests/01-22.stable.out
sql/benchmarks/tpch/Tests/01-22.stable.out.int128
sql/benchmarks/tpch/Tests/22.stable.out.int128
sql/common/sql_types.c
sql/common/sql_types.h
sql/server/rel_optimizer.c
sql/server/rel_select.c

sql/test/BugDay_2005-10-06_2.9.3/Tests/variable_arg_substring.SF_942981.stable.out

sql/test/BugTracker-2010/Tests/substring_display_width.Bug-2683.stable.out
sql/test/BugTracker-2015/Tests/string_split.Bug-3564.stable.out
sql/test/BugTracker-2017/Tests/All
sql/test/BugTracker-2017/Tests/splitpart.Bug-6194.stable.out
sql/test/Tests/string.stable.out
sql/test/pg_regress/Tests/strings.stable.out
Branch: data-vaults
Log Message:

Merge with default


diffs (truncated from 2690 to 300 lines):

diff --git a/.hgtags b/.hgtags
--- a/.hgtags
+++ b/.hgtags
@@ -685,3 +685,5 @@ fce449d5af88de715fde36624815a56ef34c56bb
 3d26c58579a18157659b590899a8f73f45954ec6 Jul2017_9
 fce449d5af88de715fde36624815a56ef34c56bb Jul2017_SP2_release
 3d26c58579a18157659b590899a8f73f45954ec6 Jul2017_SP2_release
+b9276cb02ced7d98bcb27b5e6df600b2791f1fcd Jul2017_11
+b9276cb02ced7d98bcb27b5e6df600b2791f1fcd Jul2017_SP3_release
diff --git a/MonetDB.spec b/MonetDB.spec
--- a/MonetDB.spec
+++ b/MonetDB.spec
@@ -132,7 +132,7 @@ Vendor: MonetDB BV 
 Group: Applications/Databases
 License: MPLv2.0
 URL: https://www.monetdb.org/
-Source: 
https://www.monetdb.org/downloads/sources/Jul2017-SP2/%{name}-%{version}.tar.bz2
+Source: 
https://www.monetdb.org/downloads/sources/Jul2017-SP3/%{name}-%{version}.tar.bz2
 
 # we need systemd for the _unitdir macro to exist
 # we need checkpolicy and selinux-policy-devel for the SELinux policy
@@ -1046,6 +1046,48 @@ done
 %postun -p /sbin/ldconfig
 
 %changelog
+* Mon Dec 04 2017 Sjoerd Mullender  - 11.27.11-20171204
+- Rebuilt.
+- BZ#3898: Deadlock on insertion
+- BZ#6429: ROUND produces wrong data type
+- BZ#6436: Query sequence with 2x ifthenelse() and next nullif() causes
+  mserver5 Segmentation fault
+- BZ#6439: Invalid references to sys.columns.id from
+  sys.statistics.column_id
+- BZ#6442: SEGFAULT with COPY INTO BEST EFFORT and skipping input columns
+- BZ#6443: complex(?) query forgets(?) column name
+- BZ#6444: Using 'with' keyword with table returning function crashes
+  monetdb
+- BZ#6445: Sqlitelogictest crash in MySQL query
+- BZ#6446: sql_parser.y bug?
+- BZ#6448: 'insert into' with multiple rows containing subqueries crashes
+- BZ#6449: Assertion error in rel_dce_refs (sqlsmith)
+- BZ#6450: Assertion error in exp_bin (sqlsmith)
+- BZ#6451: Assertion error in sql_ref_dec (sqlsmith)
+- BZ#6453: Assertion error  in rel_rename_exps (sqlsmith)
+- BZ#6454: SQL lexical error
+- BZ#6455: Assertion error in rel_apply_rewrite (sqlsmith)
+- BZ#6456: NULL becomes 0 in outer join
+- BZ#6459: Assertion error in exp_bin (sqlsmith)
+- BZ#6462: large virtual memory spike on BLOB column select
+- BZ#6465: appending to variables sized atom bats other than str bats
+  with force flag may result in corrupted heap
+- BZ#6467: date_to_str formatter is wrong
+- BZ#6470: mitosis gets in the way of simple select
+- BZ#6471: calls to sys.generate_series should auto-convert arguments
+- BZ#6472: Assertion failure in rel_rename (Sqlsmith)
+- BZ#6477: assertion eror rel_push_project_up (sqlsmith)
+- BZ#6478: Crash with nested order by/ limit offset
+- BZ#6479: Mserver receives an assertion error on a procedure call
+- BZ#6480: Segfault in mvc_find_subexp (sqlsmith)
+
+* Sun Nov  5 2017 Sjoerd Mullender  - 11.27.11-20171204
+- gdk: Reimplemented summing of a column of floating point (flt and dbl)
+  values.  The old code could give wildly inaccurate results when adding
+  up lots and lots of values due to lack of precision.  Try SELECT sum(c)
+  FROM t; where t is 100,000,000 rows, c is of type REAL and all values
+  are equal to 1.1.  (The old 

MonetDB: exanest - Merge with Jul2017 branch after the SP3 release

2017-12-14 Thread Panagiotis Koutsourakis
Changeset: c74e1609ff7c for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=c74e1609ff7c
Added Files:
sql/backends/monet5/Tests/pyloader06.stable.out.32bit
sql/backends/monet5/Tests/pyloader07.stable.out.32bit
sql/test/BugTracker-2009/Tests/AVG_of_SQRT.SF-2757642.sql

sql/test/BugTracker-2016/Tests/min-max-uuid-column-wrong-results.Bug-3953.sql
sql/test/BugTracker-2017/Tests/check_system_schema.Bug-6437.sql
sql/test/BugTracker-2017/Tests/check_system_schema.Bug-6437.stable.err
sql/test/BugTracker-2017/Tests/check_system_schema.Bug-6437.stable.out
sql/test/BugTracker-2017/Tests/cleanup_statistics.Bug-6439.sql
sql/test/BugTracker-2017/Tests/cleanup_statistics.Bug-6439.stable.err
sql/test/BugTracker-2017/Tests/cleanup_statistics.Bug-6439.stable.out
sql/test/BugTracker-2017/Tests/crash-in-topn.Bug-6478.sql
sql/test/BugTracker-2017/Tests/crash-in-topn.Bug-6478.stable.err
sql/test/BugTracker-2017/Tests/crash-in-topn.Bug-6478.stable.out
sql/test/BugTracker-2017/Tests/date_to_str.Bug-6467.sql
sql/test/BugTracker-2017/Tests/date_to_str.Bug-6467.stable.err
sql/test/BugTracker-2017/Tests/date_to_str.Bug-6467.stable.out
sql/test/BugTracker-2017/Tests/drop_system_schema.Bug-6437.sql
sql/test/BugTracker-2017/Tests/drop_system_schema.Bug-6437.stable.err
sql/test/BugTracker-2017/Tests/drop_system_schema.Bug-6437.stable.out
sql/test/BugTracker-2017/Tests/function-resolution.Bug-6436.sql
sql/test/BugTracker-2017/Tests/function-resolution.Bug-6436.stable.err
sql/test/BugTracker-2017/Tests/function-resolution.Bug-6436.stable.out
sql/test/BugTracker-2017/Tests/generate-resolution.Bug-6471.sql
sql/test/BugTracker-2017/Tests/generate-resolution.Bug-6471.stable.err
sql/test/BugTracker-2017/Tests/generate-resolution.Bug-6471.stable.out

sql/test/BugTracker-2017/Tests/python_loader_clobbers_default_with_null.Bug-6464.sql

sql/test/BugTracker-2017/Tests/python_loader_clobbers_default_with_null.Bug-6464.stable.err

sql/test/BugTracker-2017/Tests/python_loader_clobbers_default_with_null.Bug-6464.stable.out
sql/test/BugTracker-2017/Tests/skip_problem_best_effort.Bug-6442.sql

sql/test/BugTracker-2017/Tests/skip_problem_best_effort.Bug-6442.stable.err

sql/test/BugTracker-2017/Tests/skip_problem_best_effort.Bug-6442.stable.out

sql/test/BugTracker-2017/Tests/sqlitelogictest-algebra-operators.Bug-6494.sql

sql/test/BugTracker-2017/Tests/sqlitelogictest-comparisons-between-floating-points-and-NULL.Bug-6496.sql
sql/test/BugTracker-2017/Tests/sqlitelogictest-hidden-alias.Bug-6495.sql

sql/test/BugTracker-2017/Tests/sqlitelogictest-min-distinct-empty-table.Bug-6493.sql
sql/test/BugTracker-2017/Tests/sqlitelogictest-not-between.Bug-6497.sql

sql/test/BugTracker-2017/Tests/sqlitelogictest-select-in-column.Bug-6490.sql

sql/test/BugTracker-2017/Tests/sqlitelogictest-select-in-column.Bug-6490.stable.err

sql/test/BugTracker-2017/Tests/sqlitelogictest-select-in-column.Bug-6490.stable.out
sql/test/BugTracker-2017/Tests/sqlsmith.Bug-6449.sql
sql/test/BugTracker-2017/Tests/sqlsmith.Bug-6449.stable.err
sql/test/BugTracker-2017/Tests/sqlsmith.Bug-6449.stable.out
sql/test/BugTracker-2017/Tests/sqlsmith.Bug-6477.sql
sql/test/BugTracker-2017/Tests/sqlsmith.Bug-6477.stable.err
sql/test/BugTracker-2017/Tests/sqlsmith.Bug-6477.stable.out
sql/test/BugTracker-2017/Tests/update_on_procedure.Bug-6479.sql
sql/test/BugTracker-2017/Tests/update_on_procedure.Bug-6479.stable.err
sql/test/BugTracker-2017/Tests/update_on_procedure.Bug-6479.stable.out
sql/test/Tests/fsum.sql
sql/test/Tests/fsum.stable.err
sql/test/Tests/fsum.stable.out
sql/test/Tests/fsum1.sql.src
sql/test/Tests/fsum1.stable.err.src
sql/test/Tests/fsum1.stable.out.src
sql/test/emptydb-upgrade-chain/Tests/upgrade.stable.out.32bit
sql/test/emptydb-upgrade/Tests/upgrade.stable.out.32bit
sql/test/mergetables/Tests/mergedb.Bug-6820.reqtests
sql/test/mergetables/Tests/mergedb_drop.reqtests
sql/test/mergetables/Tests/qlsmith-exist-lateral.reqtests
sql/test/mergetables/Tests/sqlsmith-apply-outer-join-or.sql
sql/test/mergetables/Tests/sqlsmith-apply-outer-join-or.stable.err
sql/test/mergetables/Tests/sqlsmith-apply-outer-join-or.stable.out
sql/test/mergetables/Tests/sqlsmith-exist-lateral.reqtests
sql/test/mergetables/Tests/sqlsmith-exist-lateral.sql
sql/test/mergetables/Tests/sqlsmith-exist-lateral.stable.err
sql/test/mergetables/Tests/sqlsmith-exist-lateral.stable.out
sql/test/mergetables/Tests/sqlsmith.Bug-6426.reqtests

MonetDB: acticloud - Merge with Jul2017 after SP3 release

2017-12-14 Thread Panagiotis Koutsourakis
Changeset: 51091dc531ea for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=51091dc531ea
Added Files:
sql/backends/monet5/Tests/pyloader06.stable.out.32bit
sql/backends/monet5/Tests/pyloader07.stable.out.32bit
sql/test/BugTracker-2009/Tests/AVG_of_SQRT.SF-2757642.sql

sql/test/BugTracker-2016/Tests/min-max-uuid-column-wrong-results.Bug-3953.sql
sql/test/BugTracker-2017/Tests/check_system_schema.Bug-6437.sql
sql/test/BugTracker-2017/Tests/check_system_schema.Bug-6437.stable.err
sql/test/BugTracker-2017/Tests/check_system_schema.Bug-6437.stable.out
sql/test/BugTracker-2017/Tests/cleanup_statistics.Bug-6439.sql
sql/test/BugTracker-2017/Tests/cleanup_statistics.Bug-6439.stable.err
sql/test/BugTracker-2017/Tests/cleanup_statistics.Bug-6439.stable.out
sql/test/BugTracker-2017/Tests/crash-in-topn.Bug-6478.sql
sql/test/BugTracker-2017/Tests/crash-in-topn.Bug-6478.stable.err
sql/test/BugTracker-2017/Tests/crash-in-topn.Bug-6478.stable.out
sql/test/BugTracker-2017/Tests/date_to_str.Bug-6467.sql
sql/test/BugTracker-2017/Tests/date_to_str.Bug-6467.stable.err
sql/test/BugTracker-2017/Tests/date_to_str.Bug-6467.stable.out
sql/test/BugTracker-2017/Tests/drop_system_schema.Bug-6437.sql
sql/test/BugTracker-2017/Tests/drop_system_schema.Bug-6437.stable.err
sql/test/BugTracker-2017/Tests/drop_system_schema.Bug-6437.stable.out
sql/test/BugTracker-2017/Tests/function-resolution.Bug-6436.sql
sql/test/BugTracker-2017/Tests/function-resolution.Bug-6436.stable.err
sql/test/BugTracker-2017/Tests/function-resolution.Bug-6436.stable.out
sql/test/BugTracker-2017/Tests/generate-resolution.Bug-6471.sql
sql/test/BugTracker-2017/Tests/generate-resolution.Bug-6471.stable.err
sql/test/BugTracker-2017/Tests/generate-resolution.Bug-6471.stable.out

sql/test/BugTracker-2017/Tests/python_loader_clobbers_default_with_null.Bug-6464.sql

sql/test/BugTracker-2017/Tests/python_loader_clobbers_default_with_null.Bug-6464.stable.err

sql/test/BugTracker-2017/Tests/python_loader_clobbers_default_with_null.Bug-6464.stable.out
sql/test/BugTracker-2017/Tests/skip_problem_best_effort.Bug-6442.sql

sql/test/BugTracker-2017/Tests/skip_problem_best_effort.Bug-6442.stable.err

sql/test/BugTracker-2017/Tests/skip_problem_best_effort.Bug-6442.stable.out

sql/test/BugTracker-2017/Tests/sqlitelogictest-algebra-operators.Bug-6494.sql

sql/test/BugTracker-2017/Tests/sqlitelogictest-comparisons-between-floating-points-and-NULL.Bug-6496.sql
sql/test/BugTracker-2017/Tests/sqlitelogictest-hidden-alias.Bug-6495.sql

sql/test/BugTracker-2017/Tests/sqlitelogictest-min-distinct-empty-table.Bug-6493.sql
sql/test/BugTracker-2017/Tests/sqlitelogictest-not-between.Bug-6497.sql

sql/test/BugTracker-2017/Tests/sqlitelogictest-select-in-column.Bug-6490.sql

sql/test/BugTracker-2017/Tests/sqlitelogictest-select-in-column.Bug-6490.stable.err

sql/test/BugTracker-2017/Tests/sqlitelogictest-select-in-column.Bug-6490.stable.out
sql/test/BugTracker-2017/Tests/sqlsmith.Bug-6449.sql
sql/test/BugTracker-2017/Tests/sqlsmith.Bug-6449.stable.err
sql/test/BugTracker-2017/Tests/sqlsmith.Bug-6449.stable.out
sql/test/BugTracker-2017/Tests/sqlsmith.Bug-6477.sql
sql/test/BugTracker-2017/Tests/sqlsmith.Bug-6477.stable.err
sql/test/BugTracker-2017/Tests/sqlsmith.Bug-6477.stable.out
sql/test/BugTracker-2017/Tests/update_on_procedure.Bug-6479.sql
sql/test/BugTracker-2017/Tests/update_on_procedure.Bug-6479.stable.err
sql/test/BugTracker-2017/Tests/update_on_procedure.Bug-6479.stable.out
sql/test/Tests/fsum.sql
sql/test/Tests/fsum.stable.err
sql/test/Tests/fsum.stable.out
sql/test/Tests/fsum1.sql.src
sql/test/Tests/fsum1.stable.err.src
sql/test/Tests/fsum1.stable.out.src
sql/test/emptydb-upgrade-chain/Tests/upgrade.stable.out.32bit
sql/test/emptydb-upgrade/Tests/upgrade.stable.out.32bit
sql/test/mergetables/Tests/mergedb.Bug-6820.reqtests
sql/test/mergetables/Tests/mergedb_drop.reqtests
sql/test/mergetables/Tests/qlsmith-exist-lateral.reqtests
sql/test/mergetables/Tests/sqlsmith-apply-outer-join-or.sql
sql/test/mergetables/Tests/sqlsmith-apply-outer-join-or.stable.err
sql/test/mergetables/Tests/sqlsmith-apply-outer-join-or.stable.out
sql/test/mergetables/Tests/sqlsmith-exist-lateral.reqtests
sql/test/mergetables/Tests/sqlsmith-exist-lateral.sql
sql/test/mergetables/Tests/sqlsmith-exist-lateral.stable.err
sql/test/mergetables/Tests/sqlsmith-exist-lateral.stable.out
sql/test/mergetables/Tests/sqlsmith.Bug-6426.reqtests

MonetDB: data-vaults - Merge with default

2017-12-20 Thread Panagiotis Koutsourakis
Changeset: f0977b96b4f2 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=f0977b96b4f2
Added Files:
sql/test/BugTracker-2017/Tests/createorreplace-system-func.Bug-6499.sql

sql/test/BugTracker-2017/Tests/createorreplace-system-func.Bug-6499.stable.err

sql/test/BugTracker-2017/Tests/createorreplace-system-func.Bug-6499.stable.out
sql/test/BugTracker-2017/Tests/select-in-returns-null.Bug-6491.sql

sql/test/BugTracker-2017/Tests/select-in-returns-null.Bug-6491.stable.err

sql/test/BugTracker-2017/Tests/select-in-returns-null.Bug-6491.stable.out

sql/test/BugTracker-2017/Tests/sqlitelogictest-algebra-operators.Bug-6494.sql

sql/test/BugTracker-2017/Tests/sqlitelogictest-algebra-operators.Bug-6494.stable.err

sql/test/BugTracker-2017/Tests/sqlitelogictest-algebra-operators.Bug-6494.stable.out

sql/test/BugTracker-2017/Tests/sqlitelogictest-comparisons-between-floating-points-and-NULL.Bug-6496.sql

sql/test/BugTracker-2017/Tests/sqlitelogictest-comparisons-between-floating-points-and-NULL.Bug-6496.stable.err

sql/test/BugTracker-2017/Tests/sqlitelogictest-comparisons-between-floating-points-and-NULL.Bug-6496.stable.out
sql/test/BugTracker-2017/Tests/sqlitelogictest-hidden-alias.Bug-6495.sql

sql/test/BugTracker-2017/Tests/sqlitelogictest-hidden-alias.Bug-6495.stable.err

sql/test/BugTracker-2017/Tests/sqlitelogictest-hidden-alias.Bug-6495.stable.out

sql/test/BugTracker-2017/Tests/sqlitelogictest-min-distinct-empty-table.Bug-6493.sql

sql/test/BugTracker-2017/Tests/sqlitelogictest-min-distinct-empty-table.Bug-6493.stable.err

sql/test/BugTracker-2017/Tests/sqlitelogictest-min-distinct-empty-table.Bug-6493.stable.out
sql/test/BugTracker-2017/Tests/sqlitelogictest-not-between.Bug-6497.sql

sql/test/BugTracker-2017/Tests/sqlitelogictest-not-between.Bug-6497.stable.err

sql/test/BugTracker-2017/Tests/sqlitelogictest-not-between.Bug-6497.stable.out

sql/test/BugTracker-2017/Tests/sqlitelogictest-select-in-column.Bug-6490.sql

sql/test/BugTracker-2017/Tests/sqlitelogictest-select-in-column.Bug-6490.stable.err

sql/test/BugTracker-2017/Tests/sqlitelogictest-select-in-column.Bug-6490.stable.out
sql/test/BugTracker-2017/Tests/union_all_null.Bug-6487.sql
sql/test/BugTracker-2017/Tests/union_all_null.Bug-6487.stable.err
sql/test/BugTracker-2017/Tests/union_all_null.Bug-6487.stable.out
sql/test/mergetables/Tests/sqlsmith.Bug-6480.sql
sql/test/mergetables/Tests/sqlsmith.Bug-6480.stable.err
sql/test/mergetables/Tests/sqlsmith.Bug-6480.stable.out
Removed Files:
common/utils/math_private.h
common/utils/s_nextafterf.c
Modified Files:
NT/monetdb_config.h.in
clients/Tests/exports.stable.out
clients/mapiclient/ReadlineTools.c
clients/mapiclient/ReadlineTools.h
clients/mapiclient/Tests/mclient--help.stable.err
clients/mapiclient/Tests/mclient--help.stable.err.Windows
clients/mapiclient/dotmonetdb.c
clients/mapiclient/dump.c
clients/mapiclient/eventparser.h
clients/mapiclient/mclient.c
clients/mapiclient/mnc.c
clients/mapiclient/msqldump.c
clients/mapiclient/stethoscope.c
clients/mapiclient/tachograph.c
clients/mapiclient/tomograph.c
clients/mapilib/mapi.c
clients/odbc/driver/ODBCConvert.c
clients/odbc/driver/ODBCGlobal.h
clients/odbc/driver/ODBCUtil.c
clients/odbc/driver/SQLConnect.c
clients/odbc/setup/drvcfg.c
clients/odbc/setup/drvcfg.h
clients/odbc/winsetup/install.c
clients/odbc/winsetup/setup.c
common/options/getopt.c
common/options/getopt1.c
common/options/monet_options.c
common/stream/stream.c
common/utils/Makefile.ag
common/utils/msabaoth.c
common/utils/mutils.c
common/utils/mutils.h
common/utils/muuid.c
common/utils/prompt.c
configure.ag
gdk/gdk.h
gdk/gdk_atoms.c
gdk/gdk_bbp.c
gdk/gdk_calc.c
gdk/gdk_calc_private.h
gdk/gdk_hash.c
gdk/gdk_heap.c
gdk/gdk_imprints.c
gdk/gdk_interprocess.c
gdk/gdk_join.c
gdk/gdk_logger.c
gdk/gdk_orderidx.c
gdk/gdk_posix.c
gdk/gdk_posix.h
gdk/gdk_search.c
gdk/gdk_select.c
gdk/gdk_storage.c
gdk/gdk_system.c
gdk/gdk_system.h
gdk/gdk_utils.h
geom/lib/libgeom.c
geom/lib/libgeom.h
geom/monetdb5/geom.h
geom/monetdb5/geom_upgrade.c
monetdb5/mal/mal.c
monetdb5/mal/mal.h
monetdb5/mal/mal_sabaoth.c
monetdb5/mal/mal_sabaoth.h
monetdb5/mal/mal_session.c
monetdb5/modules/atoms/batxml.c
monetdb5/modules/atoms/inet.c
   

MonetDB: data-vaults - Merge with default

2017-11-20 Thread Panagiotis Koutsourakis
/merovingian.c
tools/merovingian/daemon/multiplex-funnel.c
tools/mserver/mserver5.c
Branch: data-vaults
Log Message:

Merge with default


diffs (truncated from 57312 to 300 lines):

diff --git a/NT/mkgeomwxs.py b/NT/mkgeomwxs.py
--- a/NT/mkgeomwxs.py
+++ b/NT/mkgeomwxs.py
@@ -52,7 +52,16 @@ def main():
 print(r'  INSTALLDIR')
 print(r'')
 print(r'')
-print(r'  ' % (vs, arch))
+if vs == '17':
+msvc = r'C:\Program Files (x86)\Microsoft Visual 
Studio\2017\Community\VC\Redist\MSVC'
+d = sorted(os.listdir(msvc))[-1]
+msm = '_CRT_%s.msm' % arch
+for f in sorted(os.listdir(os.path.join(msvc, d, 'MergeModules'))):
+if msm in f:
+fn = f
+print(r'  ' % (msvc, d, fn))
+else:
+print(r'  ' % (vs, arch))
 print(r'  ' % folder)
 print(r'')
 print(r'  ')
diff --git a/NT/mkodbcwxs.py b/NT/mkodbcwxs.py
--- a/NT/mkodbcwxs.py
+++ b/NT/mkodbcwxs.py
@@ -51,7 +51,16 @@ def main():
 print(r'')
 print(r'')
 print(r'')
-print(r'  ' % (vs, arch))
+if vs == '17':
+msvc = r'C:\Program Files (x86)\Microsoft Visual 
Studio\2017\Community\VC\Redist\MSVC'
+d = sorted(os.listdir(msvc))[-1]
+msm = '_CRT_%s.msm' % arch
+for f in sorted(os.listdir(os.path.join(msvc, d, 'MergeModules'))):
+if msm in f:
+fn = f
+print(r'  ' % (msvc, d, fn))
+else:
+print(r'  ' % (vs, arch))
 print(r'  ' % folder)
 print(r'')
 print(r'  ')
diff --git a/NT/mksqlwxs.py b/NT/mksqlwxs.py
--- a/NT/mksqlwxs.py
+++ b/NT/mksqlwxs.py
@@ -52,7 +52,16 @@ def main():
 print(r'')
 print(r'')
 print(r'')
-print(r'  ' % (vs, arch))
+if vs == '17':
+msvc = r'C:\Program Files (x86)\Microsoft Visual 
Studio\2017\Community\VC\Redist\MSVC'
+d = sorted(os.listdir(msvc))[-1]
+msm = '_CRT_%s.msm' % arch
+for f in sorted(os.listdir(os.path.join(msvc, d, 'MergeModules'))):
+if msm in f:
+fn = f
+print(r'  ' % (msvc, d, fn))
+else:
+print(r'  ' % (vs, arch))
 print(r'  ' % folder)
 print(r'')
 print(r'  ')
diff --git a/NT/monetdb_config.h.in b/NT/monetdb_config.h.in
--- a/NT/monetdb_config.h.in
+++ b/NT/monetdb_config.h.in
@@ -33,12 +33,6 @@
 #define _CRT_SECURE_NO_DEPRECATE 1
 #endif
 
-/* include Intel's mathimf.h early, before any other include files
- * might try to include math.h */
-#ifdef __INTEL_COMPILER
-#include 
-#endif
-
 #include 
 
 #if defined(_DEBUG) && defined(_CRTDBG_MAP_ALLOC)
@@ -235,11 +229,6 @@
 /* Define to 1 if you have the  header file. */
 #define HAVE_IO_H 1
 
-/* Define to 1 if you have the `isinf' function. */
-#if !defined(_MSC_VER) || _MSC_VER > 1600
-#define HAVE_ISINF 1
-#endif
-
 /* Define to 1 if you have the  header file. */
 /* #undef HAVE_KVM_H */
 
@@ -367,7 +356,7 @@
 /* #undef HAVE_NL_LANGINFO */
 
 /* Define to 1 if you have the `nextafterf' function. */
-#if !defined(_MSC_VER) || _MSC_VER > 1600
+#if defined(__INTEL_COMPILER) || !defined(_MSC_VER) || _MSC_VER > 1600
 #define HAVE_NEXTAFTERF 1
 #endif
 
@@ -428,7 +417,7 @@
 /* #undef HAVE_RESTRICT */
 
 /* Define to 1 if you have the `round' function. */
-#if !defined(_MSC_VER) || _MSC_VER > 1600
+#if defined(__INTEL_COMPILER) || !defined(_MSC_VER) || _MSC_VER > 1600
 #define HAVE_ROUND 1
 #endif
 
diff --git a/clients/ChangeLog b/clients/ChangeLog
--- a/clients/ChangeLog
+++ b/clients/ChangeLog
@@ -1,6 +1,13 @@
 # ChangeLog file for clients
 # This file is updated with Maddlog
 
+* Thu Nov 16 2017 Sjoerd Mullender <sjo...@acm.org>
+- The functions in the mapi library that require 64 bit integers now
+  use the standard type int64_t instead of the non-standard mapi_int64.
+  This requires a compilation environment that has the stdint.h include
+  file (standardized in C99).  Compilation of the library also requires
+  the inttypes.h include file (also standardized in C99).
+
 * Mon Jul 17 2017 Panagiotis Koutsourakis <kutsu...@monetdbsolutions.com>
 - Add a new pretty printing option to stethoscope
   Running stethoscope with the flag -j will produce not pretty printed
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
@@ -8478,6 +8478,8 @@ Ready.
 [ "sql",   "transaction_release",  "pattern 
sql.transaction_release(chain:int, name:str):void ",   
"SQLtransaction_release;",  "A transaction statement (type can be 
commit,release,rollback or start)"]
 [ "sql",   "transaction_rollback", "pattern 
sql.transaction_rollback(chain:int, name:str):void ",  
"S

MonetDB: data-vaults - Approve Test output

2017-11-20 Thread Panagiotis Koutsourakis
Changeset: e4216d41036c for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=e4216d41036c
Modified Files:
sql/backends/monet5/vaults/lidar/Tests/lidar-directory.sql.in
sql/backends/monet5/vaults/lidar/Tests/lidar-directory.stable.out
sql/backends/monet5/vaults/lidar/Tests/lidar-single-file.sql.in
sql/backends/monet5/vaults/lidar/Tests/lidar-single-file.stable.out
Branch: data-vaults
Log Message:

Approve Test output


diffs (108 lines):

diff --git a/sql/backends/monet5/vaults/lidar/Tests/lidar-directory.sql.in 
b/sql/backends/monet5/vaults/lidar/Tests/lidar-directory.sql.in
--- a/sql/backends/monet5/vaults/lidar/Tests/lidar-directory.sql.in
+++ b/sql/backends/monet5/vaults/lidar/Tests/lidar-directory.sql.in
@@ -1,6 +1,6 @@
 call lidarattach('$TSTDATAPATH/lidar/directory_loading/', 'tbl1', 
'XYZainrcpedM');
-select column_id, type, width, "sample", count, "unique", nils, minval, 
maxval, sorted, revsorted from sys.statistics;
-select * from vault_journal;
+select type, width, "sample", count, "unique", nils, minval, maxval, sorted, 
revsorted from sys.statistics;
+select table_name, vault_reader_id, vault_type, version from vault_journal;
 call lidarload('tbl1');
 select * from tbl1;
 select count(*) from tbl1;
diff --git a/sql/backends/monet5/vaults/lidar/Tests/lidar-directory.stable.out 
b/sql/backends/monet5/vaults/lidar/Tests/lidar-directory.stable.out
--- a/sql/backends/monet5/vaults/lidar/Tests/lidar-directory.stable.out
+++ b/sql/backends/monet5/vaults/lidar/Tests/lidar-directory.stable.out
@@ -24,24 +24,24 @@ Ready.
 # 16:54:25 >  "mclient" "-lsql" "-ftest" "-Eutf-8" "-i" "-e" 
"--host=/var/tmp/mtest-10899" "--port=34483"
 # 16:54:25 >  
 
-#select column_id, type, width, "sample", count, "unique", nils, minval, 
maxval, sorted, revsorted from sys.statistics;
-% sys.statistics,  sys.statistics, sys.statistics, sys.statistics, 
sys.statistics, sys.statistics, sys.statistics, sys.statistics, sys.statistics, 
sys.statistics, sys.statistics # table_name
-% column_id,   type,   width,  sample, count,  unique, nils,   minval, maxval, 
sorted, revsorted # name
-% int, clob,   int,bigint, bigint, bigint, bigint, clob,   clob,   
boolean,boolean # type
-% 4,   12, 1,  1,  1,  1,  1,  13, 13, 5,  
5 # length
-[ 8414,"decimal(8,2)", 8,  0,  0,  0,  0,  
"635616.31","638864.60",false,  false   ]
-[ 8415,"decimal(8,2)", 8,  0,  0,  0,  0,  
"848977.79","853362.37",false,  false   ]
-[ 8416,"decimal(5,2)", 5,  0,  0,  0,  0,  
"407.35",   "536.84",   false,  false   ]
-[ 8428,"decimal(8,2)", 8,  0,  0,  0,  0,  
"635616.31","638864.60",false,  false   ]
-[ 8429,"decimal(8,2)", 8,  0,  0,  0,  0,  
"848977.79","853362.37",false,  false   ]
-[ 8430,"decimal(5,2)", 5,  0,  0,  0,  0,  
"407.35",   "536.84",   false,  false   ]
-#select * from vault_journal;
-% sys.vault_journal,   sys.vault_journal,  sys.vault_journal,  
sys.vault_journal,  sys.vault_journal # table_name
-% table_id,table_name, vault_reader_id,vault_type, version 
# name
-% int, varchar,int,varchar,varchar # type
-% 4,   4,  1,  5,  5 # length
-[ 8413,"tbl0", 1,  "lidar","1.8.0" ]
-[ 8427,"tbl1", 1,  "lidar","1.8.0" ]
+#select type, width, "sample", count, "unique", nils, minval, maxval, sorted, 
revsorted from sys.statistics;
+% sys.statistics,  sys.statistics, sys.statistics, sys.statistics, 
sys.statistics, sys.statistics, sys.statistics, sys.statistics, sys.statistics, 
sys.statistics # table_name
+% type,width,  sample, count,  unique, nils,   minval, maxval, sorted, 
revsorted # name
+% clob,int,bigint, bigint, bigint, bigint, clob,   clob,   
boolean,boolean # type
+% 12,  1,  1,  1,  1,  1,  13, 13, 5,  5 # 
length
+[ "decimal(8,2)",  8,  0,  0,  0,  0,  
"635616.31","638864.60",false,  false   ]
+[ "decimal(8,2)",  8,  0,  0,  0,  0,  
"848977.79","853362.37",false,  false   ]
+[ "decimal(5,2)",  5,  0,  0,  0,  0,  "407.35",   
"536.84",   false,  false   ]
+[ "decimal(8,2)",  8,  0,  0,  0,  0,  
"635616.31","638864.60",false,  false   ]
+[ "decimal(8,2)",  8,  0,  0,  0,  0,  
"848977.79","853362.37",false,  false   ]
+[ "decimal(5,2)",  5,  0,  0,  0,  0,  "407.35",   
"536.84",   false,  false   ]
+#select table_name, vault_reader_id, 

MonetDB: data-vaults - Add missing file and new condition

2017-11-03 Thread Panagiotis Koutsourakis
Changeset: 4a003b505442 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=4a003b505442
Added Files:
sql/backends/monet5/vaults/lidar/Tests/lidar-directory.sql.in
Modified Files:
sql/backends/monet5/vaults/lidar/Tests/All
Branch: data-vaults
Log Message:

Add missing file and new condition

Do not try to run the tests if we don't have the lidar vault


diffs (19 lines):

diff --git a/sql/backends/monet5/vaults/lidar/Tests/All 
b/sql/backends/monet5/vaults/lidar/Tests/All
--- a/sql/backends/monet5/vaults/lidar/Tests/All
+++ b/sql/backends/monet5/vaults/lidar/Tests/All
@@ -1,2 +1,2 @@
-HAVE_DATA_PATH?lidar-single-file
-HAVE_DATA_PATH?lidar-directory
+HAVE_LIDAR_DATA_PATH?lidar-single-file
+HAVE_LIDAR_DATA_PATH?lidar-directory
diff --git a/sql/backends/monet5/vaults/lidar/Tests/lidar-directory.sql.in 
b/sql/backends/monet5/vaults/lidar/Tests/lidar-directory.sql.in
new file mode 100644
--- /dev/null
+++ b/sql/backends/monet5/vaults/lidar/Tests/lidar-directory.sql.in
@@ -0,0 +1,6 @@
+call lidarattach('$TSTDATAPATH/lidar/directory_loading/', 'tbl1', 
'XYZainrcpedM');
+select column_id, type, width, "sample", count, "unique", nils, minval, 
maxval, sorted, revsorted from sys.statistics;
+select * from vault_journal;
+call lidarload('tbl1');
+select * from tbl1;
+select count(*) from tbl1;
___
checkin-list mailing list
checkin-list@monetdb.org
https://www.monetdb.org/mailman/listinfo/checkin-list


MonetDB: data-vaults - Merge with default

2017-11-08 Thread Panagiotis Koutsourakis
Changeset: 79b522cb05a2 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=79b522cb05a2
Added Files:
sql/test/BugTracker-2009/Tests/AVG_of_SQRT.SF-2757642.sql

sql/test/BugTracker-2016/Tests/min-max-uuid-column-wrong-results.Bug-3953.sql

sql/test/BugTracker-2017/Tests/sqlitelogictest-cast-decimal.Bug-6445.stable.err

sql/test/BugTracker-2017/Tests/sqlitelogictest-cast-decimal.Bug-6445.stable.out
sql/test/BugTracker-2017/Tests/sqlsmith.Bug-6449.sql
sql/test/BugTracker-2017/Tests/sqlsmith.Bug-6449.stable.err
sql/test/BugTracker-2017/Tests/sqlsmith.Bug-6449.stable.out
sql/test/Tests/fsum.sql
sql/test/Tests/fsum.stable.err
sql/test/Tests/fsum.stable.out
sql/test/Tests/fsum1.sql.src
sql/test/Tests/fsum1.stable.err.src
sql/test/Tests/fsum1.stable.out.src
sql/test/mergetables/Tests/sqlsmith.Bug-6451.sql
sql/test/mergetables/Tests/sqlsmith.Bug-6451.stable.err
sql/test/mergetables/Tests/sqlsmith.Bug-6451.stable.out
sql/test/mergetables/Tests/sqlsmith.Bug-6453.sql
sql/test/mergetables/Tests/sqlsmith.Bug-6453.stable.err
sql/test/mergetables/Tests/sqlsmith.Bug-6453.stable.out
sql/test/mergetables/Tests/sqlsmith.Bug-6455.sql
sql/test/mergetables/Tests/sqlsmith.Bug-6455.stable.err
sql/test/mergetables/Tests/sqlsmith.Bug-6455.stable.out
Removed Files:
sql/test/BugTracker-2009/Tests/AVG_of_SQRT.SF-2757642.SQL.py
sql/test/BugTracker-2011/Tests/and-power.Bug-3013.stable.out.int128
sql/test/BugTracker-2016/Tests/data-uuid.csv.bz2

sql/test/BugTracker-2016/Tests/min-max-uuid-column-wrong-results.Bug-3953.sql.in
Modified Files:
MonetDB.spec
NT/monetdb_config.h.in
buildtools/selinux/monetdb.te
clients/Tests/exports.stable.out
configure.ag
gdk/ChangeLog
gdk/ChangeLog.Jul2017
gdk/gdk.h
gdk/gdk_aggr.c
gdk/gdk_align.c
gdk/gdk_atoms.c
gdk/gdk_atoms.h
gdk/gdk_bat.c
gdk/gdk_batop.c
gdk/gdk_bbp.c
gdk/gdk_calc.c
gdk/gdk_calc_compare.h
gdk/gdk_calc_private.h
gdk/gdk_firstn.c
gdk/gdk_group.c
gdk/gdk_hash.c
gdk/gdk_imprints.c
gdk/gdk_join.c
gdk/gdk_logger.c
gdk/gdk_logger.h
gdk/gdk_orderidx.c
gdk/gdk_project.c
gdk/gdk_qsort.c
gdk/gdk_search.c
gdk/gdk_select.c
gdk/gdk_ssort.c
gdk/gdk_unique.c
gdk/gdk_utils.c
gdk/gdk_value.c
geom/monetdb5/geom.c
geom/monetdb5/geom.h
monetdb5/extras/rapi/converters.c.h
monetdb5/mal/mal_atom.c
monetdb5/mal/mal_authorize.c
monetdb5/mal/mal_builder.c
monetdb5/mal/mal_debugger.c
monetdb5/mal/mal_function.c
monetdb5/mal/mal_instruction.c
monetdb5/mal/mal_interpreter.c
monetdb5/mal/mal_parser.c
monetdb5/modules/atoms/color.c
monetdb5/modules/atoms/color.h
monetdb5/modules/atoms/json.c
monetdb5/modules/atoms/mtime.c
monetdb5/modules/atoms/str.c
monetdb5/modules/kernel/algebra.c
monetdb5/modules/kernel/batcolor.c
monetdb5/modules/kernel/batmmath.c
monetdb5/modules/kernel/microbenchmark.c
monetdb5/modules/kernel/mmath.c
monetdb5/modules/kernel/mmath.h
monetdb5/modules/mal/batcalc.c
monetdb5/modules/mal/calc.c
monetdb5/modules/mal/clients.c
monetdb5/modules/mal/iterator.c
monetdb5/modules/mal/language.c
monetdb5/modules/mal/mal_io.c
monetdb5/modules/mal/mkey.c
monetdb5/modules/mal/pcre.c
monetdb5/modules/mal/remote.c
monetdb5/modules/mal/tablet.c
monetdb5/optimizer/opt_mergetable.c
monetdb5/optimizer/opt_multiplex.c
monetdb5/optimizer/opt_remap.c
sql/ChangeLog
sql/backends/monet5/LSST/lsst.c
sql/backends/monet5/UDF/cudf/udf_impl.h
sql/backends/monet5/UDF/pyapi/conversion.c
sql/backends/monet5/UDF/pyapi/convert_loops.h
sql/backends/monet5/UDF/pyapi/emit.c
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_int.h
sql/backends/monet5/sql_cast_impl_up_to_flt.h
sql/backends/monet5/sql_cat.c
sql/backends/monet5/sql_fround.c
sql/backends/monet5/sql_fround_impl.h
sql/backends/monet5/sql_gencode.c
sql/backends/monet5/sql_result.c
sql/backends/monet5/sql_round.c
sql/backends/monet5/sql_round_impl.h
sql/backends/monet5/sql_scenario.c
sql/backends/monet5/sql_user.c
sql/backends/monet5/vaults/bam/bam_lib.c
sql/backends/monet5/vaults/fits/fits.c
sql/backends/monet5/vaults/lidar/lidar.c
  

MonetDB: data-vaults - Merge with default after jitudf

2017-12-08 Thread Panagiotis Koutsourakis
Changeset: b5de27cbe35b for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=b5de27cbe35b
Added Files:
sql/backends/monet5/Tests/pyloader06.stable.out.32bit
sql/backends/monet5/Tests/pyloader07.stable.out.32bit
sql/backends/monet5/UDF/capi/50_capi.mal
sql/backends/monet5/UDF/capi/Makefile.ag
sql/backends/monet5/UDF/capi/Tests/All
sql/backends/monet5/UDF/capi/Tests/capi00.sql
sql/backends/monet5/UDF/capi/Tests/capi00.stable.err
sql/backends/monet5/UDF/capi/Tests/capi00.stable.out
sql/backends/monet5/UDF/capi/Tests/capi01.sql
sql/backends/monet5/UDF/capi/Tests/capi01.stable.err
sql/backends/monet5/UDF/capi/Tests/capi01.stable.out
sql/backends/monet5/UDF/capi/Tests/capi02.sql
sql/backends/monet5/UDF/capi/Tests/capi02.stable.err
sql/backends/monet5/UDF/capi/Tests/capi02.stable.out
sql/backends/monet5/UDF/capi/Tests/capi03.sql
sql/backends/monet5/UDF/capi/Tests/capi03.stable.err
sql/backends/monet5/UDF/capi/Tests/capi03.stable.out
sql/backends/monet5/UDF/capi/Tests/capi04.sql
sql/backends/monet5/UDF/capi/Tests/capi04.stable.err
sql/backends/monet5/UDF/capi/Tests/capi04.stable.out
sql/backends/monet5/UDF/capi/Tests/capi05.sql
sql/backends/monet5/UDF/capi/Tests/capi05.stable.err
sql/backends/monet5/UDF/capi/Tests/capi05.stable.out
sql/backends/monet5/UDF/capi/Tests/capi06.sql
sql/backends/monet5/UDF/capi/Tests/capi06.stable.err
sql/backends/monet5/UDF/capi/Tests/capi06.stable.out
sql/backends/monet5/UDF/capi/Tests/capi07.sql
sql/backends/monet5/UDF/capi/Tests/capi07.stable.err
sql/backends/monet5/UDF/capi/Tests/capi07.stable.out
sql/backends/monet5/UDF/capi/Tests/capi08.sql
sql/backends/monet5/UDF/capi/Tests/capi08.stable.err
sql/backends/monet5/UDF/capi/Tests/capi08.stable.out
sql/backends/monet5/UDF/capi/Tests/capi09.sql
sql/backends/monet5/UDF/capi/Tests/capi09.stable.err
sql/backends/monet5/UDF/capi/Tests/capi09.stable.out
sql/backends/monet5/UDF/capi/Tests/capi10.sql
sql/backends/monet5/UDF/capi/Tests/capi10.stable.err
sql/backends/monet5/UDF/capi/Tests/capi10.stable.out
sql/backends/monet5/UDF/capi/Tests/capi11.sql
sql/backends/monet5/UDF/capi/Tests/capi11.stable.err
sql/backends/monet5/UDF/capi/Tests/capi11.stable.out
sql/backends/monet5/UDF/capi/Tests/capi12.sql
sql/backends/monet5/UDF/capi/Tests/capi12.stable.err
sql/backends/monet5/UDF/capi/Tests/capi12.stable.out
sql/backends/monet5/UDF/capi/Tests/capi13.sql
sql/backends/monet5/UDF/capi/Tests/capi13.stable.err
sql/backends/monet5/UDF/capi/Tests/capi13.stable.out
sql/backends/monet5/UDF/capi/capi.c
sql/backends/monet5/UDF/capi/capi.h
sql/backends/monet5/UDF/capi/capi.mal
sql/backends/monet5/UDF/capi/cheader.h
sql/backends/monet5/UDF/udf/80_udf.mal
sql/backends/monet5/UDF/udf/80_udf.sql
sql/backends/monet5/UDF/udf/80_udf_hge.mal
sql/backends/monet5/UDF/udf/80_udf_hge.sql
sql/backends/monet5/UDF/udf/Makefile.ag
sql/backends/monet5/UDF/udf/README
sql/backends/monet5/UDF/udf/Tests/All
sql/backends/monet5/UDF/udf/Tests/udf-fuse.sql
sql/backends/monet5/UDF/udf/Tests/udf-fuse.stable.err
sql/backends/monet5/UDF/udf/Tests/udf-fuse.stable.out
sql/backends/monet5/UDF/udf/Tests/udf-reverse.sql
sql/backends/monet5/UDF/udf/Tests/udf-reverse.stable.err
sql/backends/monet5/UDF/udf/Tests/udf-reverse.stable.out
sql/backends/monet5/UDF/udf/udf.c
sql/backends/monet5/UDF/udf/udf.h
sql/backends/monet5/UDF/udf/udf.mal
sql/backends/monet5/UDF/udf/udf_hge.mal
sql/backends/monet5/UDF/udf/udf_impl.h
sql/test/BugTracker-2017/Tests/groupby_assertion.Bug-6338.stable.err
sql/test/BugTracker-2017/Tests/groupby_assertion.Bug-6338.stable.out
sql/test/BugTracker-2017/Tests/parsererror.Bug-6381.stable.err
sql/test/BugTracker-2017/Tests/parsererror.Bug-6381.stable.out
Removed Files:
sql/backends/monet5/UDF/cudf/80_udf.mal
sql/backends/monet5/UDF/cudf/80_udf.sql
sql/backends/monet5/UDF/cudf/80_udf_hge.mal
sql/backends/monet5/UDF/cudf/80_udf_hge.sql
sql/backends/monet5/UDF/cudf/Makefile.ag
sql/backends/monet5/UDF/cudf/README
sql/backends/monet5/UDF/cudf/Tests/All
sql/backends/monet5/UDF/cudf/Tests/udf-fuse.sql
sql/backends/monet5/UDF/cudf/Tests/udf-fuse.stable.err
sql/backends/monet5/UDF/cudf/Tests/udf-fuse.stable.out
sql/backends/monet5/UDF/cudf/Tests/udf-reverse.sql
sql/backends/monet5/UDF/cudf/Tests/udf-reverse.stable.err
sql/backends/monet5/UDF/cudf/Tests/udf-reverse.stable.out

MonetDB: data-vaults - Merge with default

2017-12-01 Thread Panagiotis Koutsourakis
Changeset: b37e90414f7e for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=b37e90414f7e
Added Files:
sql/test/BugTracker-2017/Tests/cleanup_statistics.Bug-6439.sql
sql/test/BugTracker-2017/Tests/cleanup_statistics.Bug-6439.stable.err
sql/test/BugTracker-2017/Tests/cleanup_statistics.Bug-6439.stable.out
sql/test/BugTracker-2017/Tests/crash-in-topn.Bug-6478.sql
sql/test/BugTracker-2017/Tests/crash-in-topn.Bug-6478.stable.err
sql/test/BugTracker-2017/Tests/crash-in-topn.Bug-6478.stable.out
sql/test/BugTracker-2017/Tests/sqlsmith.Bug-6477.sql
sql/test/BugTracker-2017/Tests/sqlsmith.Bug-6477.stable.err
sql/test/BugTracker-2017/Tests/sqlsmith.Bug-6477.stable.out
sql/test/BugTracker-2017/Tests/update_on_procedure.Bug-6479.sql
sql/test/BugTracker-2017/Tests/update_on_procedure.Bug-6479.stable.err
sql/test/BugTracker-2017/Tests/update_on_procedure.Bug-6479.stable.out
sql/test/emptydb-upgrade-chain/Tests/upgrade.stable.out.32bit
sql/test/emptydb-upgrade/Tests/upgrade.stable.out.32bit
sql/test/mergetables/Tests/sqlsmith.Bug-6472.sql
sql/test/mergetables/Tests/sqlsmith.Bug-6472.stable.err
sql/test/mergetables/Tests/sqlsmith.Bug-6472.stable.out
sql/test/pg_regress/Tests/numeric.stable.out.FreeBSD.int128
sql/test/testdb-upgrade-chain/Tests/upgrade.stable.out.32bit
sql/test/testdb-upgrade/Tests/upgrade.stable.out.32bit
Removed Files:
sql/test/pg_regress/Tests/float8.stable.err.Windows
Modified Files:
.hgignore
NT/monetdb_config.h.in
clients/Tests/MAL-signatures.stable.out
clients/Tests/MAL-signatures.stable.out.int128
clients/Tests/exports.stable.out
clients/mapiclient/dotmonetdb.c
clients/mapiclient/dump.c
clients/mapiclient/mclient.c
clients/mapiclient/mhelp.c
clients/mapiclient/mhelp.h
clients/mapiclient/msqldump.h
clients/mapilib/mapi.c
clients/mapilib/mapi.h
clients/odbc/driver/ODBCConvert.c
clients/odbc/driver/SQLBrowseConnect.c
clients/odbc/driver/SQLConnect.c
clients/odbc/driver/SQLFetch.c
clients/odbc/setup/drvcfg.c
clients/odbc/winsetup/install.c
common/stream/ChangeLog
common/stream/stream.c
common/stream/stream.h
common/utils/mcrypt.c
common/utils/msabaoth.c
common/utils/mutils.c
configure.ag
gdk/gdk.h
gdk/gdk_align.c
gdk/gdk_atoms.c
gdk/gdk_atoms.h
gdk/gdk_bat.c
gdk/gdk_batop.c
gdk/gdk_bbp.c
gdk/gdk_firstn.c
gdk/gdk_group.c
gdk/gdk_hash.c
gdk/gdk_hash.h
gdk/gdk_heap.c
gdk/gdk_imprints.c
gdk/gdk_logger.c
gdk/gdk_orderidx.c
gdk/gdk_posix.h
gdk/gdk_private.h
gdk/gdk_project.c
gdk/gdk_storage.c
gdk/gdk_unique.c
gdk/gdk_utils.c
monetdb5/mal/mal_atom.c
monetdb5/mal/mal_client.c
monetdb5/mal/mal_import.c
monetdb5/mal/mal_instruction.c
monetdb5/mal/mal_interpreter.c
monetdb5/mal/mal_readline.c
monetdb5/mal/mal_resource.h
monetdb5/mal/mal_session.c
monetdb5/modules/atoms/inet.c
monetdb5/modules/atoms/mtime.c
monetdb5/modules/atoms/url.c
monetdb5/modules/kernel/alarm.c
monetdb5/modules/kernel/bat5.c
monetdb5/modules/kernel/status.c
monetdb5/modules/mal/bbp.c
monetdb5/modules/mal/calc.c
monetdb5/modules/mal/clients.c
monetdb5/modules/mal/inspect.c
monetdb5/modules/mal/language.c
monetdb5/modules/mal/mal_io.c
monetdb5/modules/mal/mal_mapi.c
monetdb5/modules/mal/mdb.c
monetdb5/modules/mal/orderidx.c
monetdb5/modules/mal/pcre.c
monetdb5/modules/mal/profiler.mal
monetdb5/modules/mal/remote.c
monetdb5/modules/mal/remote.h
monetdb5/modules/mal/sabaoth.c
monetdb5/modules/mal/tablet.c
monetdb5/modules/mal/txtsim.h
monetdb5/modules/mal/wlc.c
monetdb5/optimizer/opt_support.c
sql/backends/monet5/UDF/pyapi/convert_loops.h
sql/backends/monet5/rel_bin.c
sql/backends/monet5/sql.c
sql/backends/monet5/sql_execute.c
sql/backends/monet5/sql_gencode.c
sql/backends/monet5/sql_result.c
sql/backends/monet5/sql_result.h
sql/backends/monet5/sql_scenario.c
sql/backends/monet5/sql_statement.c
sql/backends/monet5/sql_upgrades.c
sql/backends/monet5/sql_user.c
sql/backends/monet5/vaults/bam/Tests/query2.1.stable.out
sql/backends/monet5/vaults/bam/Tests/query2.10.stable.out
sql/backends/monet5/vaults/bam/Tests/query2.2.stable.out
sql/backends/monet5/vaults/bam/Tests/query2.2.stable.out.int128

MonetDB: data-vaults - Fix clang compilation error

2017-10-31 Thread Panagiotis Koutsourakis
Changeset: 4c2923d02dd2 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=4c2923d02dd2
Modified Files:
sql/backends/monet5/vaults/gadget/gadget.c
Branch: data-vaults
Log Message:

Fix clang compilation error

The break inside the loop should not be unconditional


diffs (14 lines):

diff --git a/sql/backends/monet5/vaults/gadget/gadget.c 
b/sql/backends/monet5/vaults/gadget/gadget.c
--- a/sql/backends/monet5/vaults/gadget/gadget.c
+++ b/sql/backends/monet5/vaults/gadget/gadget.c
@@ -629,7 +629,9 @@ str gadgetListDirPat(Client cntxt, MalBl
 fclose(stream);
 snprintf(stmt, BUFSIZ, ATTACHDIR, fname);
 msg = SQLstatementIntern(cntxt, , "gadget.listofdirpat", TRUE, FALSE, 
NULL);
-break;
+if (msg != MAL_SUCCEED) {
+   break;
+}
   }
 
   return msg;
___
checkin-list mailing list
checkin-list@monetdb.org
https://www.monetdb.org/mailman/listinfo/checkin-list


MonetDB: remote_auth - Handle replica remote tables

2018-05-08 Thread Panagiotis Koutsourakis
Changeset: 724dfdb0523e for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=724dfdb0523e
Modified Files:
sql/server/rel_distribute.c
Branch: remote_auth
Log Message:

Handle replica remote tables


diffs (18 lines):

diff --git a/sql/server/rel_distribute.c b/sql/server/rel_distribute.c
--- a/sql/server/rel_distribute.c
+++ b/sql/server/rel_distribute.c
@@ -87,10 +87,11 @@ rewrite_replica( mvc *sql, sql_rel *rel,
 
/* set_remote() */
if (remote_prop && p && isRemote(p)) {
-   char *uri = p->query;
-   prop *p = r->p = prop_create(sql->sa, PROP_REMOTE, r->p); 
+   //TODO handle allocation failure
+   char *local_name = sa_strconcat(sql->sa, sa_strconcat(sql->sa, 
p->s->base.name, "."), p->base.name);
+   prop *p = r->p = prop_create(sql->sa, PROP_REMOTE, r->p);
 
-   p->value = uri;
+   p->value = local_name;
}
return r;
 }
___
checkin-list mailing list
checkin-list@monetdb.org
https://www.monetdb.org/mailman/listinfo/checkin-list


MonetDB: remote_auth - Remove useless property

2018-05-08 Thread Panagiotis Koutsourakis
Changeset: 7ea4e6efee26 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=7ea4e6efee26
Modified Files:
sql/server/rel_prop.h
Branch: remote_auth
Log Message:

Remove useless property


diffs (11 lines):

diff --git a/sql/server/rel_prop.h b/sql/server/rel_prop.h
--- a/sql/server/rel_prop.h
+++ b/sql/server/rel_prop.h
@@ -23,7 +23,6 @@ typedef struct prop {
 #define PROP_HASHCOL   4   /* could use hash idx */
 #define PROP_FETCH 5   /* fetchjoin */
 #define PROP_REMOTE 6  /* uri for remote execution */
-#define PROP_REMOTE27  /* schema and name of local table */
 #define PROP_USED  10  /* number of times exp is used */
 
 extern prop * prop_create( sql_allocator *sa, int kind, prop *pre );
___
checkin-list mailing list
checkin-list@monetdb.org
https://www.monetdb.org/mailman/listinfo/checkin-list


MonetDB: remote_auth - Change single to double quotes in python ...

2018-05-08 Thread Panagiotis Koutsourakis
Changeset: 714eb73754a8 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=714eb73754a8
Modified Files:
sql/test/remote/Tests/ssbm.SQL.py
Branch: remote_auth
Log Message:

Change single to double quotes in python test


diffs (17 lines):

diff --git a/sql/test/remote/Tests/ssbm.SQL.py 
b/sql/test/remote/Tests/ssbm.SQL.py
--- a/sql/test/remote/Tests/ssbm.SQL.py
+++ b/sql/test/remote/Tests/ssbm.SQL.py
@@ -176,11 +176,11 @@ c.execute(mtable)
 rptable = 'create replica table %s %s' % (repltable, replicatedtabledef)
 c.execute(rptable)
 for workerrec in workers:
-rtable = 'create remote table %s%s %s on \'%s\'' % (shardtable, 
workerrec['tpf'], shardedtabledef, workerrec['mapi'])
+rtable = "create remote table %s%s %s on '%s'" % (shardtable, 
workerrec['tpf'], shardedtabledef, workerrec['mapi'])
 atable = 'alter table %s add table %s%s' % (shardtable, shardtable, 
workerrec['tpf'])
 c.execute(rtable)
 c.execute(atable)
-rtable = 'create remote table %s%s %s on \'%s\'' % (repltable, 
workerrec['tpf'], replicatedtabledef, workerrec['mapi'])
+rtable = "create remote table %s%s %s on '%s'" % (repltable, 
workerrec['tpf'], replicatedtabledef, workerrec['mapi'])
 atable = 'alter table %s add table %s%s' % (repltable, repltable, 
workerrec['tpf'])
 c.execute(rtable)
 c.execute(atable)
___
checkin-list mailing list
checkin-list@monetdb.org
https://www.monetdb.org/mailman/listinfo/checkin-list


MonetDB: remote_auth - Merge with default

2018-05-09 Thread Panagiotis Koutsourakis
Changeset: f0358608072b for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=f0358608072b
Added Files:
sql/test/emptydb-upgrade-chain-hge/Tests/upgrade.reqtests
sql/test/emptydb-upgrade-chain/Tests/upgrade.reqtests
sql/test/emptydb-upgrade-hge/Tests/upgrade.reqtests
sql/test/emptydb-upgrade/Tests/upgrade.reqtests
Removed Files:
sql/test/emptydb-upgrade-chain-hge/Tests/upgrade.stable.out.powerpc64
Modified Files:
clients/mapiclient/dump.c
sql/backends/monet5/sql_upgrades.c
sql/scripts/21_dependency_functions.sql
sql/server/sql_mvc.c
sql/test/emptydb-upgrade-chain-hge/Tests/upgrade.stable.out.int128
sql/test/emptydb-upgrade-chain/Tests/upgrade.stable.out
sql/test/emptydb-upgrade-chain/Tests/upgrade.stable.out.32bit
sql/test/emptydb-upgrade-chain/Tests/upgrade.stable.out.int128
sql/test/emptydb-upgrade-chain/Tests/upgrade.stable.out.powerpc64.int128
sql/test/emptydb-upgrade-hge/Tests/upgrade.stable.out.int128
sql/test/emptydb-upgrade/Tests/upgrade.stable.out
sql/test/emptydb-upgrade/Tests/upgrade.stable.out.32bit
sql/test/emptydb-upgrade/Tests/upgrade.stable.out.int128
sql/test/emptydb/Tests/check.stable.out
sql/test/emptydb/Tests/check.stable.out.32bit
sql/test/emptydb/Tests/check.stable.out.int128
sql/test/testdb-upgrade-chain-hge/Tests/upgrade.stable.out.int128
sql/test/testdb-upgrade-chain/Tests/upgrade.stable.out
sql/test/testdb-upgrade-chain/Tests/upgrade.stable.out.32bit
sql/test/testdb-upgrade-chain/Tests/upgrade.stable.out.int128
sql/test/testdb-upgrade-hge/Tests/upgrade.stable.out.int128
sql/test/testdb-upgrade/Tests/upgrade.stable.out
sql/test/testdb-upgrade/Tests/upgrade.stable.out.32bit
sql/test/testdb-upgrade/Tests/upgrade.stable.out.int128
testing/Mtest.py.in
Branch: remote_auth
Log Message:

Merge with default


diffs (truncated from 969 to 300 lines):

diff --git a/clients/mapiclient/dump.c b/clients/mapiclient/dump.c
--- a/clients/mapiclient/dump.c
+++ b/clients/mapiclient/dump.c
@@ -2416,13 +2416,13 @@ get_with_comments_as_clause(Mapi mid)
", function_types AS (\n"
"   SELECT function_type_id, function_type_name, 
function_type_keyword\n"
"   FROM sys.function_types, (VALUES\n"
-   "   (1, \'FUNCTION\'), \n"
-   "   (2, \'PROCEDURE\'),\n"
-   "   (3, \'AGGREGATE\'),\n"
-   "   (4, \'FILTER FUNCTION\'),\n"
-   "   (5, \'FUNCTION\'), \n"
-   "   (6, \'FUNCTION\'), \n"
-   "   (7, \'LOADER\')) AS (id, 
function_type_keyword)\n"
+   "   (1, 'FUNCTION'), \n"
+   "   (2, 'PROCEDURE'),\n"
+   "   (3, 'AGGREGATE'),\n"
+   "   (4, 'FILTER FUNCTION'),\n"
+   "   (5, 'FUNCTION'), \n"
+   "   (6, 'FUNCTION'), \n"
+   "   (7, 'LOADER')) AS (id, function_type_keyword)\n"
"   WHERE id = function_type_id\n"
")\n"
", function_languages AS (\n"
diff --git a/sql/backends/monet5/sql_upgrades.c 
b/sql/backends/monet5/sql_upgrades.c
--- a/sql/backends/monet5/sql_upgrades.c
+++ b/sql/backends/monet5/sql_upgrades.c
@@ -1502,6 +1502,34 @@ sql_update_mar2018_samtools(Client c, mv
 #endif /* HAVE_SAMTOOLS */
 
 static str
+sql_update_mar2018_sp1(Client c, mvc *sql)
+{
+   size_t bufsize = 2048, pos = 0;
+   char *buf = GDKmalloc(bufsize), *err = NULL;
+   char *schema = stack_get_string(sql, "current_schema");
+
+   if (buf == NULL)
+   throw(SQL, "sql_update_dec2016_sp3", SQLSTATE(HY001) 
MAL_MALLOC_FAIL);
+   pos += snprintf(buf + pos, bufsize - pos,
+   "set schema \"sys\";\n"
+   "drop function 
sys.dependencies_functions_os_triggers();\n"
+   "CREATE FUNCTION dependencies_functions_on_triggers()\n"
+   "RETURNS TABLE (sch varchar(100), usr varchar(100), 
dep_type varchar(32))\n"
+   "RETURN TABLE (SELECT f.name, tri.name, 'DEP_TRIGGER' 
from functions as f, triggers as tri, dependencies as dep where dep.id = f.id 
AND dep.depend_id =tri.id AND dep.depend_type = 8);\n"
+   "insert into sys.systemfunctions (select id from 
sys.functions where name in ('dependencies_functions_on_triggers') and 
schema_id = (select id from sys.schemas where name = 'sys') and id not in 
(select function_id from sys.systemfunctions));\n"
+   "delete from systemfunctions where function_id not in 
(select id from functions);\n");
+   if (schema)
+   pos += 

MonetDB: remote_auth - Fix memory leaks found by sanitizer

2018-05-09 Thread Panagiotis Koutsourakis
Changeset: 548949530646 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=548949530646
Modified Files:
monetdb5/mal/mal_authorize.c
monetdb5/modules/mal/remote.c
Branch: remote_auth
Log Message:

Fix memory leaks found by sanitizer


diffs (52 lines):

diff --git a/monetdb5/mal/mal_authorize.c b/monetdb5/mal/mal_authorize.c
--- a/monetdb5/mal/mal_authorize.c
+++ b/monetdb5/mal/mal_authorize.c
@@ -1026,7 +1026,7 @@ AUTHgetRemoteTableCredentials(const char
tmp = BUNtail(i, p);
rethrow("getRemoteTableCredentials", tmp, AUTHdecypherValue(, 
tmp));
 
-   *password = GDKstrdup(pwhash);
+   *password = pwhash;
 
return MAL_SUCCEED;
 }
@@ -1087,6 +1087,10 @@ AUTHaddRemoteTableCredentials(const char
if (free_pw) {
free(pwhash);
}
+   else {
+   GDKfree(pwhash);
+   }
+   GDKfree(cypher);
throw(MAL, "addRemoteTableCredentials", SQLSTATE(HY001) 
MAL_MALLOC_FAIL);
}
 
@@ -1095,6 +1099,10 @@ AUTHaddRemoteTableCredentials(const char
if (free_pw) {
free(pwhash);
}
+   else {
+   GDKfree(pwhash);
+   }
+   GDKfree(cypher);
return MAL_SUCCEED;
 }
 
diff --git a/monetdb5/modules/mal/remote.c b/monetdb5/modules/mal/remote.c
--- a/monetdb5/modules/mal/remote.c
+++ b/monetdb5/modules/mal/remote.c
@@ -300,10 +300,13 @@ RMTconnectTable(Client cntxt, MalBlkPtr 
if (msg == MAL_SUCCEED) {
v = >stk[pci->argv[0]];
v->vtype = TYPE_str;
-   if((v->val.sval = GDKstrdup(ret)) == NULL)
+   if((v->val.sval = GDKstrdup(ret)) == NULL) {
+   GDKfree(ret);
throw(MAL, "remote.connect", SQLSTATE(HY001) 
MAL_MALLOC_FAIL);
+   }
}
 
+   GDKfree(ret);
return msg;
 }
 
___
checkin-list mailing list
checkin-list@monetdb.org
https://www.monetdb.org/mailman/listinfo/checkin-list


MonetDB: remote_auth - Fix the upgrade chain tests that were cra...

2018-05-09 Thread Panagiotis Koutsourakis
Changeset: 8816ed5d21e0 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=8816ed5d21e0
Modified Files:
monetdb5/mal/mal_authorize.c
Branch: remote_auth
Log Message:

Fix the upgrade chain tests that were crashing

Do not try to commit a number of BATs that have not yet been created.


diffs (59 lines):

diff --git a/monetdb5/mal/mal_authorize.c b/monetdb5/mal/mal_authorize.c
--- a/monetdb5/mal/mal_authorize.c
+++ b/monetdb5/mal/mal_authorize.c
@@ -242,8 +242,6 @@ AUTHinitTables(const char *passwd) {
BATmode(duser, PERSISTENT) != GDK_SUCCEED) {
throw(MAL, "initTables.user", GDK_EXCEPTION);
}
-   if (!isNew)
-   AUTHcommit();
} else {
duser = BATdescriptor(bid);
if (duser == NULL)
@@ -267,8 +265,6 @@ AUTHinitTables(const char *passwd) {
if (BBPrename(BBPcacheid(rt_key), "M5system_auth_rt_key") != 0 
||
BATmode(rt_key, PERSISTENT) != GDK_SUCCEED)
throw(MAL, "initTables.rt_key", GDK_EXCEPTION);
-   if (!isNew)
-   AUTHcommit();
}
else {
int dbg = GDKdebug;
@@ -293,8 +289,6 @@ AUTHinitTables(const char *passwd) {
if (BBPrename(BBPcacheid(rt_uri), "M5system_auth_rt_uri") != 0 
||
BATmode(rt_uri, PERSISTENT) != GDK_SUCCEED)
throw(MAL, "initTables.rt_uri", GDK_EXCEPTION);
-   if (!isNew)
-   AUTHcommit();
}
else {
int dbg = GDKdebug;
@@ -319,8 +313,6 @@ AUTHinitTables(const char *passwd) {
if (BBPrename(BBPcacheid(rt_remoteuser), 
"M5system_auth_rt_remoteuser") != 0 ||
BATmode(rt_remoteuser, PERSISTENT) != GDK_SUCCEED)
throw(MAL, "initTables.rt_remoteuser", GDK_EXCEPTION);
-   if (!isNew)
-   AUTHcommit();
}
else {
int dbg = GDKdebug;
@@ -345,8 +337,6 @@ AUTHinitTables(const char *passwd) {
if (BBPrename(BBPcacheid(rt_hashedpwd), 
"M5system_auth_rt_hashedpwd") != 0 ||
BATmode(rt_hashedpwd, PERSISTENT) != GDK_SUCCEED)
throw(MAL, "initTables.rt_hashedpwd", GDK_EXCEPTION);
-   if (!isNew)
-   AUTHcommit();
}
else {
int dbg = GDKdebug;
@@ -371,6 +361,10 @@ AUTHinitTables(const char *passwd) {
if (BBPrename(BBPcacheid(rt_deleted), 
"M5system_auth_rt_deleted") != 0 ||
BATmode(rt_deleted, PERSISTENT) != GDK_SUCCEED)
throw(MAL, "initTables.rt_deleted", GDK_EXCEPTION);
+   /* If the database is not new, but we just created this BAT,
+* write everything to disc. This needs to happen only after
+* the last BAT of the vault has been created.
+*/
if (!isNew)
AUTHcommit();
}
___
checkin-list mailing list
checkin-list@monetdb.org
https://www.monetdb.org/mailman/listinfo/checkin-list


MonetDB: remote_auth - Merge with default

2018-05-10 Thread Panagiotis Koutsourakis
Changeset: 207e2b432fb8 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=207e2b432fb8
Added Files:
sql/test/BugTracker-2018/Tests/multiple-count.Bug-6599.sql
sql/test/BugTracker-2018/Tests/multiple-count.Bug-6599.stable.err
sql/test/BugTracker-2018/Tests/multiple-count.Bug-6599.stable.out
sql/test/Tests/copy-from-compressed.csv.bz2
sql/test/Tests/copy-from-compressed.csv.gz
sql/test/Tests/copy-from-compressed.csv.raw
sql/test/Tests/copy-from-compressed.csv.xz
sql/test/Tests/copy-from-compressed.sql.in
sql/test/Tests/copy-from-compressed.stable.err
sql/test/Tests/copy-from-compressed.stable.out
Modified Files:
clients/mapiclient/dump.c
common/stream/stream.c
configure.ag
sql/test/BugTracker-2018/Tests/All
sql/test/Tests/All
Branch: remote_auth
Log Message:

Merge with default


diffs (truncated from 1121 to 300 lines):

diff --git a/clients/mapiclient/dump.c b/clients/mapiclient/dump.c
--- a/clients/mapiclient/dump.c
+++ b/clients/mapiclient/dump.c
@@ -1117,7 +1117,7 @@ describe_schema(Mapi mid, const char *sn
MapiHdl hdl = NULL;
char schemas[5120];
 
-   snprintf(schemas, 5120,
+   snprintf(schemas, sizeof(schemas),
"%s\n"
"SELECT s.name, a.name, c.remark "
"FROM sys.auths a, "
diff --git a/common/stream/stream.c b/common/stream/stream.c
--- a/common/stream/stream.c
+++ b/common/stream/stream.c
@@ -1630,7 +1630,18 @@ open_xzstream(const char *restrict filen
strncmp(buf, UTF8BOM, UTF8BOMLENGTH) == 0) {
s->isutf8 = 1;
} else {
-   rewind(xz->fp);
+   FILE *fp = xz->fp;
+   lzma_ret ret;
+   lzma_end(>strm);
+   ret = lzma_stream_decoder(>strm, UINT64_MAX, 
LZMA_CONCATENATED);
+   if (ret != LZMA_OK) {
+   destroy(s);
+   free(xz);
+   fclose(fp);
+   return NULL;
+   }
+   rewind(fp);
+   xz->fp = fp;
}
}
return s;
diff --git a/configure.ag b/configure.ag
--- a/configure.ag
+++ b/configure.ag
@@ -87,7 +87,7 @@ AS_VAR_IF([PKG_CONFIG], [],
 # need to be escapes with an extra \.  Configure does not support \'s
 # in path names, so there is no need to do anything special here
 # except set the variables.  The command to set them in case we do
-# need to escape the \'s is Qvar=`echo "$var" | sed 's///g'`
+# need to escape the \'s is Qvar=`AS_ECHO(["$var"]) | sed 's///g'`
 BUILD=[`pwd`]
 AC_SUBST([BUILD])
 
@@ -107,12 +107,12 @@ AS_VAR_IF([prefix], [NONE],
[Qprefix="${ac_default_prefix}"].
[Qprefix="${prefix}"])
 
-Qprefix=`echo "$Qprefix" | sed 's///g'`
+Qprefix=`AS_ECHO(["$Qprefix"]) | sed 's///g'`
 AC_SUBST([Qprefix])
 # exec_prefix is created very late, so let make do the expansion
 AS_VAR_IF([exec_prefix], [NONE],
[Qexec_prefix='${prefix}'],
-   [Qexec_prefix=`echo "$exec_prefix" | sed 's///g'`])
+   [Qexec_prefix=`AS_ECHO(["$exec_prefix"]) | sed 's///g'`])
 AC_SUBST([Qexec_prefix])
 
 # small hack to get icc -no-gcc, done here because AC_PROG_CC shouldn't
@@ -460,7 +460,7 @@ AS_CASE([$CC_version],
[*'Sun Ceres C '*|*'Sun C '*], [
# developer/sunstudioexpress and
# developer/sunstudio12u1 respectively
-   CC_ver="suncc-`echo "$CC_version" | sed -n 's/.*Sun 
Ceres C \(.*\) SunOS.*/\1/p;s/.*Sun C \(.*\) SunOS.*/\1/p'`"
+   CC_ver="suncc-`AS_ECHO(["$CC_version"]) | sed -n 
's/.*Sun Ceres C \(.*\) SunOS.*/\1/p;s/.*Sun C \(.*\) SunOS.*/\1/p'`"
CC_version="$CC_V"],
[AC_MSG_WARN([compiler not recognized:
 `$CC --version` says
@@ -499,7 +499,7 @@ AS_CASE([$host_os],
AS_IF([test -s /etc/os-release], [
# this is the new way of getting release 
information
# works for Fedora >= 17, Ubuntu >= 12.04 
(Precise Pangolin)
-   LINUX_DIST=`source /etc/os-release; echo 
${ID}:${VERSION_ID}`],
+   LINUX_DIST=`source /etc/os-release; 
AS_ECHO(["${ID}:${VERSION_ID}"])`],
[test -s /etc/fedora-release ], [
LINUX_DIST=`cat /etc/fedora-release | head -n1 \
| sed 's|^.*\(Fedora\).* release 
\([[0-9]][[^ \n]]*\)\( .*\)*$|\1:\2|'`],
@@ -529,7 +529,7 @@ AS_CASE([$host_os],
[test -s /etc/debian_version ], [

MonetDB: remote_auth - Heavily refactor the creds test to make i...

2018-05-10 Thread Panagiotis Koutsourakis
Changeset: 0e1d8ffb5727 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=0e1d8ffb5727
Modified Files:
sql/test/remote/Tests/creds.SQL.py.in
Branch: remote_auth
Log Message:

Heavily refactor the creds test to make it easier to reuse


diffs (125 lines):

diff --git a/sql/test/remote/Tests/creds.SQL.py.in 
b/sql/test/remote/Tests/creds.SQL.py.in
--- a/sql/test/remote/Tests/creds.SQL.py.in
+++ b/sql/test/remote/Tests/creds.SQL.py.in
@@ -30,6 +30,17 @@ RATINGS_TABLE_DEF = ''' (
 )
 '''
 
+# Complicated FK constraints on merge/remote tables do not work great
+# currently (May 2018)
+RATINGS_TABLE_DEF_FK = ''' (
+movie_id BIGINT,
+customer_id BIGINT,
+rating TINYINT,
+rating_date DATE
+)
+'''
+
+# Find a free network port
 def freeport():
 sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
 sock.bind(('', 0))
@@ -37,54 +48,67 @@ def freeport():
 sock.close()
 return port
 
-def worker_load(workerrec):
-
filename="$TSTDATAPATH/netflix_data/ratings_sample_{}.csv".format(workerrec['num'])
+# Create the remote tables and load the data. Note: the supervisor
+# database should be already started and should contain the movies
+# table.
+def worker_load(in_filename, workerrec, cmovies, ratings_table_def_fk):
 c = workerrec['conn']
-cmovies = "CREATE REMOTE TABLE movies {} ON '{}'".format(MOVIES_TABLE_DEF, 
supervisor_uri)
-screateq = "CREATE TABLE ratings {}".format(RATINGS_TABLE_DEF)
-load_data = "COPY INTO ratings FROM '{}' USING DELIMITERS 
',','\n'".format(filename)
+screateq = "CREATE TABLE ratings {}".format(ratings_table_def_fk)
+load_data = "COPY INTO ratings FROM '{}' USING DELIMITERS 
',','\n'".format(in_filename)
 c.execute(cmovies)
 c.execute(screateq)
 c.execute(load_data)
 
+# Setup and start workers
+def create_workers(fn_template, nworkers, cmovies, ratings_table_def_fk):
+workers = []
+for i in range(nworkers):
+workerport = freeport()
+workerdbname = 'worker_{}'.format(i)
+workerrec = {
+'num': i,
+'port': workerport,
+'dbname': workerdbname,
+'dbfarm': os.path.join(TMPDIR, workerdbname),
+'mapi': 
'mapi:monetdb://localhost:{}/{}/sys/ratings'.format(workerport, workerdbname),
+}
+workerrec['proc'] = process.server(mapiport=workerrec['port'], 
dbname=workerrec['dbname'], dbfarm=workerrec['dbfarm'], stdin=process.PIPE, 
stdout=process.PIPE)
+workerrec['conn'] = pymonetdb.connect(database=workerrec['dbname'], 
port=workerport, autocommit=True)
+filename = fn_template.format(workerrec['num'])
+t = threading.Thread(target=worker_load, args=[filename, workerrec, 
cmovies, ratings_table_def_fk])
+t.start()
+workerrec['loadthread'] = t
+workers.append(workerrec)
+
+for wrec in workers:
+wrec['loadthread'].join()
+
+return workers
+
+# Start supervisor database
 supervisorport = freeport()
 supervisorproc = process.server(mapiport=supervisorport, dbname="supervisor", 
dbfarm=os.path.join(TMPDIR, "supervisor"), stdin=process.PIPE, 
stdout=process.PIPE)
 supervisorconn = pymonetdb.connect(database='supervisor', port=supervisorport, 
autocommit=True)
 supervisor_uri = 
"mapi:monetdb://localhost:{}/supervisor".format(supervisorport)
 c = supervisorconn.cursor()
 
+# Create the movies table and load the data
 movies_filename="$TSTDATAPATH/netflix_data/movies.csv"
 movies_create = "CREATE TABLE movies {}".format(MOVIES_TABLE_DEF)
 c.execute(movies_create)
 load_movies = "COPY INTO movies FROM '{}' USING DELIMITERS 
',','\n','\"'".format(movies_filename)
 c.execute(load_movies)
 
-# Setup and start workers
-workers = []
-for i in range(NWORKERS):
-workerport = freeport()
-workerdbname = 'worker_{}'.format(i)
-workerrec = {
-'num': i,
-'port': workerport,
-'dbname': workerdbname,
-'dbfarm': os.path.join(TMPDIR, workerdbname),
-'mapi': 
'mapi:monetdb://localhost:{}/{}/sys/ratings'.format(workerport, workerdbname),
-}
-workerrec['proc'] = process.server(mapiport=workerrec['port'], 
dbname=workerrec['dbname'], dbfarm=workerrec['dbfarm'], stdin=process.PIPE, 
stdout=process.PIPE)
-workerrec['conn'] = pymonetdb.connect(database=workerrec['dbname'], 
port=workerport, autocommit=True)
-t = threading.Thread(target=worker_load, args=[workerrec])
-t.start()
-workerrec['loadthread'] = t
-workers.append(workerrec)
-
-for wrec in workers:
-wrec['loadthread'].join()
-
-
+# Declare the ratings merge table on supervisor
 mtable = "CREATE MERGE TABLE ratings {}".format(RATINGS_TABLE_DEF)
 c.execute(mtable)
 
+# Create the workers and load the ratings data
+fn_template="$TSTDATAPATH/netflix_data/ratings_sample_{}.csv"
+cmovies = "CREATE REMOTE TABLE movies {} ON '{}' WITH USER 'monetdb' PASSWORD 
'monetdb'".format(MOVIES_TABLE_DEF, supervisor_uri)
+workers = 

MonetDB: remote_auth - Add new test for credentials

2018-05-08 Thread Panagiotis Koutsourakis
Changeset: 107ee6e3bf42 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=107ee6e3bf42
Added Files:
sql/test/remote/Tests/creds.SQL.py.in
sql/test/remote/Tests/creds.stable.err
sql/test/remote/Tests/creds.stable.out
Modified Files:
sql/test/remote/Tests/All
Branch: remote_auth
Log Message:

Add new test for credentials


diffs (240 lines):

diff --git a/sql/test/remote/Tests/All b/sql/test/remote/Tests/All
--- a/sql/test/remote/Tests/All
+++ b/sql/test/remote/Tests/All
@@ -1,2 +1,3 @@
 HAVE_PYMONETDB?ssbm
+HAVE_PYMONETDB_DATA_PATH?creds
 THREADS>=2?partition_elim
diff --git a/sql/test/remote/Tests/creds.SQL.py.in 
b/sql/test/remote/Tests/creds.SQL.py.in
new file mode 100644
--- /dev/null
+++ b/sql/test/remote/Tests/creds.SQL.py.in
@@ -0,0 +1,99 @@
+from __future__ import print_function
+
+import os
+import tempfile
+import threading
+import socket
+
+import pymonetdb
+
+try:
+from MonetDBtesting import process
+except ImportError:
+import process
+
+NWORKERS = 2
+TMPDIR = tempfile.mkdtemp()
+
+MOVIES_TABLE_DEF = ''' (
+movie_id BIGINT PRIMARY KEY,
+release_year INT,
+title VARCHAR(200)
+)
+'''
+
+RATINGS_TABLE_DEF = ''' (
+movie_id BIGINT,
+customer_id BIGINT,
+rating TINYINT,
+rating_date DATE
+)
+'''
+
+def freeport():
+sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
+sock.bind(('', 0))
+port = sock.getsockname()[1]
+sock.close()
+return port
+
+def worker_load(workerrec):
+
filename="$TSTDATAPATH/netflix_data/ratings_sample_{}.csv".format(workerrec['num'])
+c = workerrec['conn']
+cmovies = "CREATE REMOTE TABLE movies {} ON '{}'".format(MOVIES_TABLE_DEF, 
supervisor_uri)
+screateq = "CREATE TABLE ratings {}".format(RATINGS_TABLE_DEF)
+load_data = "COPY INTO ratings FROM '{}' USING DELIMITERS 
',','\n'".format(filename)
+c.execute(cmovies)
+c.execute(screateq)
+c.execute(load_data)
+
+supervisorport = freeport()
+supervisorproc = process.server(mapiport=supervisorport, dbname="supervisor", 
dbfarm=os.path.join(TMPDIR, "supervisor"), stdin=process.PIPE, 
stdout=process.PIPE)
+supervisorconn = pymonetdb.connect(database='supervisor', port=supervisorport, 
autocommit=True)
+supervisor_uri = 
"mapi:monetdb://localhost:{}/supervisor".format(supervisorport)
+c = supervisorconn.cursor()
+
+movies_filename="$TSTDATAPATH/netflix_data/movies.csv"
+movies_create = "CREATE TABLE movies {}".format(MOVIES_TABLE_DEF)
+c.execute(movies_create)
+load_movies = "COPY INTO movies FROM '{}' USING DELIMITERS 
',','\n','\"'".format(movies_filename)
+c.execute(load_movies)
+
+# Setup and start workers
+workers = []
+for i in range(NWORKERS):
+workerport = freeport()
+workerdbname = 'worker_{}'.format(i)
+workerrec = {
+'num': i,
+'port': workerport,
+'dbname': workerdbname,
+'dbfarm': os.path.join(TMPDIR, workerdbname),
+'mapi': 
'mapi:monetdb://localhost:{}/{}/sys/ratings'.format(workerport, workerdbname),
+}
+workerrec['proc'] = process.server(mapiport=workerrec['port'], 
dbname=workerrec['dbname'], dbfarm=workerrec['dbfarm'], stdin=process.PIPE, 
stdout=process.PIPE)
+workerrec['conn'] = pymonetdb.connect(database=workerrec['dbname'], 
port=workerport, autocommit=True)
+t = threading.Thread(target=worker_load, args=[workerrec])
+t.start()
+workerrec['loadthread'] = t
+workers.append(workerrec)
+
+for wrec in workers:
+wrec['loadthread'].join()
+
+
+mtable = "CREATE MERGE TABLE ratings {}".format(RATINGS_TABLE_DEF)
+c.execute(mtable)
+
+for wrec in workers:
+rtable = "CREATE REMOTE TABLE ratings{} {} on '{}' WITH USER 'monetdb' 
PASSWORD 'monetdb'".format(wrec['num'], RATINGS_TABLE_DEF, wrec['mapi'])
+c.execute(rtable)
+
+atable = "ALTER TABLE ratings add table ratings{}".format(wrec['num'])
+c.execute(atable)
+
+c.execute("SELECT COUNT(*) FROM ratings0")
+print("{} rows in remote table".format(c.fetchall()[0][0]))
+
+c.execute("SELECT COUNT(*) FROM ratings")
+print("{} rows in merge table".format(c.fetchall()[0][0]))
diff --git a/sql/test/remote/Tests/creds.stable.err 
b/sql/test/remote/Tests/creds.stable.err
new file mode 100644
--- /dev/null
+++ b/sql/test/remote/Tests/creds.stable.err
@@ -0,0 +1,86 @@
+stderr of test 'creds` in directory 'sql/test/remote` itself:
+
+
+# 16:41:16 >  
+# 16:41:16 >  "mserver5" "--debug=10" "--set" "gdk_nr_threads=0" "--set" 
"mapi_open=true" "--set" "mapi_port=39959" "--set" 
"mapi_usock=/var/tmp/mtest-22488/.s.monetdb.39959" "--set" "monet_prompt=" 
"--forcemito" 
"--dbpath=/home/kutsurak/work/monet/sources/MonetDB/build/install/var/MonetDB/mTests_sql_test_remote"
 "--set" "embedded_c=true"
+# 16:41:16 >  
+
+# builtin opt  gdk_dbpath = 
/home/kutsurak/work/monet/sources/MonetDB/build/install/var/monetdb5/dbfarm/demo
+# builtin opt  gdk_debug = 0
+# builtin opt  gdk_vmtrim = no
+# builtin opt  monet_prompt = >
+# builtin opt  monet_daemon = no

MonetDB: remote_auth - Improve error message

2018-05-15 Thread Panagiotis Koutsourakis
Changeset: e61a590591bc for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=e61a590591bc
Modified Files:
monetdb5/mal/mal_authorize.c
Branch: remote_auth
Log Message:

Improve error message


diffs (12 lines):

diff --git a/monetdb5/mal/mal_authorize.c b/monetdb5/mal/mal_authorize.c
--- a/monetdb5/mal/mal_authorize.c
+++ b/monetdb5/mal/mal_authorize.c
@@ -1001,7 +1001,7 @@ AUTHgetRemoteTableCredentials(const char
 
p = lookupRemoteTableKey(local_table);
if (p == BUN_NONE) {
-   throw(MAL, "getRemoteTableCredentials", "No credentials for 
table %s found", local_table);
+   throw(MAL, "getRemoteTableCredentials", "No credentials for 
remote table %s found", local_table);
}
 
assert(rt_key);
___
checkin-list mailing list
checkin-list@monetdb.org
https://www.monetdb.org/mailman/listinfo/checkin-list


MonetDB: remote_auth - Fix msqldump to support remote table cred...

2018-05-15 Thread Panagiotis Koutsourakis
Changeset: 31b227e1acca for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=31b227e1acca
Modified Files:
clients/mapiclient/dump.c
sql/backends/monet5/sql.c
sql/backends/monet5/sql.h
sql/backends/monet5/sql.mal
sql/scripts/22_clients.sql
Branch: remote_auth
Log Message:

Fix msqldump to support remote table credentials

When dumping a database we need to output the username and the
encrypted password, as we do with database users.


diffs (135 lines):

diff --git a/clients/mapiclient/dump.c b/clients/mapiclient/dump.c
--- a/clients/mapiclient/dump.c
+++ b/clients/mapiclient/dump.c
@@ -870,8 +870,21 @@ describe_table(Mapi mid, const char *sch
 
if (dump_column_definition(mid, toConsole, schema, tname, NULL, 
foreign, hashge))
goto bailout;
-   if (type == 5)
-   mnstr_printf(toConsole, " ON '%s'", view);
+   if (type == 5) { /* remote table */
+   char *rt_user = NULL;
+   char *rt_hash = NULL;
+   snprintf(query, maxquerylen,
+"SELECT * FROM 
sys.remote_table_credentials('%s.%s')",
+schema, tname);
+   if ((hdl = mapi_query(mid, query)) == NULL || 
mapi_error(mid))
+   goto bailout;
+   cnt = 0;
+   while(mapi_fetch_row(hdl) != 0) {
+   rt_user = mapi_fetch_field(hdl, 1);
+   rt_hash = mapi_fetch_field(hdl, 2);
+   }
+   mnstr_printf(toConsole, " ON '%s' WITH USER '%s' 
ENCRYPTED PASSWORD '%s'", view, rt_user, rt_hash);
+   }
mnstr_printf(toConsole, ";\n");
comment_on(toConsole, "TABLE", schema, tname, NULL, remark);
 
diff --git a/sql/backends/monet5/sql.c b/sql/backends/monet5/sql.c
--- a/sql/backends/monet5/sql.c
+++ b/sql/backends/monet5/sql.c
@@ -37,6 +37,7 @@
 #include "clients.h"
 #include "mal_instruction.h"
 #include "mal_resource.h"
+#include "mal_authorize.h"
 
 static int
 rel_is_table(sql_rel *rel)
@@ -3579,6 +3580,57 @@ sql_sessions_wrap(Client cntxt, MalBlkPt
 }
 
 str
+sql_rt_credentials_wrap(Client cntxt, MalBlkPtr mb, MalStkPtr stk, InstrPtr 
pci)
+{
+   BAT *urib = NULL;
+   BAT *unameb = NULL;
+   BAT *hashb = NULL;
+   bat *uri = getArgReference_bat(stk, pci, 0);
+   bat *uname = getArgReference_bat(stk, pci, 1);
+   bat *hash = getArgReference_bat(stk, pci, 2);
+   str *table = getArgReference_str(stk, pci, 3);
+   str uris;
+   str unames;
+   str hashs;
+   str msg = MAL_SUCCEED;
+   (void)mb;
+   (void)cntxt;
+
+   urib = COLnew(0, TYPE_str, 0, TRANSIENT);
+   unameb = COLnew(0, TYPE_str, 0, TRANSIENT);
+   hashb = COLnew(0, TYPE_str, 0, TRANSIENT);
+
+   if (urib == NULL || unameb == NULL || hashb == NULL) {
+   msg = createException(SQL, "sql.remote_table_credentials", 
SQLSTATE(HY001) MAL_MALLOC_FAIL);
+   goto bailout;
+   }
+
+   MT_lock_set(_contextLock);
+   if ((msg = AUTHgetRemoteTableCredentials(*table, , , 
)) != MAL_SUCCEED)
+   goto bailout;
+
+   if (BUNappend(urib, uris, FALSE) != GDK_SUCCEED)
+   goto bailout;
+   if (BUNappend(unameb, unames, FALSE) != GDK_SUCCEED)
+   goto bailout;
+   if (BUNappend(hashb, hashs, FALSE) != GDK_SUCCEED)
+   goto bailout;
+   MT_lock_unset(_contextLock);
+   BBPkeepref(*uri = urib->batCacheid);
+   BBPkeepref(*uname = unameb->batCacheid);
+   BBPkeepref(*hash = hashb->batCacheid);
+
+   return MAL_SUCCEED;
+
+  bailout:
+   if (urib) BBPunfix(urib->batCacheid);
+   if (unameb) BBPunfix(unameb->batCacheid);
+   if (hashb) BBPunfix(hashb->batCacheid);
+   return msg;
+}
+
+
+str
 sql_querylog_catalog(Client cntxt, MalBlkPtr mb, MalStkPtr stk, InstrPtr pci)
 {
int i;
diff --git a/sql/backends/monet5/sql.h b/sql/backends/monet5/sql.h
--- a/sql/backends/monet5/sql.h
+++ b/sql/backends/monet5/sql.h
@@ -131,6 +131,7 @@ sql5_export str dump_cache(Client cntxt,
 sql5_export str dump_opt_stats(Client cntxt, MalBlkPtr mb, MalStkPtr stk, 
InstrPtr pci);
 sql5_export str dump_trace(Client cntxt, MalBlkPtr mb, MalStkPtr stk, InstrPtr 
pci);
 sql5_export str sql_sessions_wrap(Client cntxt, MalBlkPtr mb, MalStkPtr stk, 
InstrPtr pci);
+sql5_export str sql_rt_credentials_wrap(Client cntxt, MalBlkPtr mb, MalStkPtr 
stk, InstrPtr pci);
 sql5_export str sql_storage(Client cntxt, MalBlkPtr mb, MalStkPtr stk, 
InstrPtr pci);
 sql5_export str sql_querylog_catalog(Client cntxt, MalBlkPtr mb, MalStkPtr 
stk, InstrPtr pci);
 sql5_export str sql_querylog_calls(Client cntxt, MalBlkPtr mb, MalStkPtr stk, 
InstrPtr pci);
diff --git a/sql/backends/monet5/sql.mal 

MonetDB: default - Merge with Mar2018

2018-05-17 Thread Panagiotis Koutsourakis
Changeset: 928ee25bf49a for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=928ee25bf49a
Added Files:

sql/test/BugTracker-2018/Tests/sqlitelogictest-select-not-in-wrong.Bug-6602.stable.err

sql/test/BugTracker-2018/Tests/sqlitelogictest-select-not-in-wrong.Bug-6602.stable.out
Modified Files:
sql/backends/monet5/sql_upgrades.c

sql/test/BugTracker-2018/Tests/sqlitelogictest-complex-case-not-in.Bug-6594.stable.out

sql/test/BugTracker-2018/Tests/sqlitelogictest-not-in-wrong-results.Bug-6530.stable.out

sql/test/BugTracker-2018/Tests/sqlitelogictest-select-not-in-wrong.Bug-6602.sql
Branch: default
Log Message:

Merge with Mar2018


diffs (207 lines):

diff --git a/sql/backends/monet5/sql_upgrades.c 
b/sql/backends/monet5/sql_upgrades.c
--- a/sql/backends/monet5/sql_upgrades.c
+++ b/sql/backends/monet5/sql_upgrades.c
@@ -1509,7 +1509,7 @@ sql_update_mar2018_sp1(Client c, mvc *sq
char *schema = stack_get_string(sql, "current_schema");
 
if (buf == NULL)
-   throw(SQL, "sql_update_dec2016_sp3", SQLSTATE(HY001) 
MAL_MALLOC_FAIL);
+   throw(SQL, "sql_update_mar2018_sp1", SQLSTATE(HY001) 
MAL_MALLOC_FAIL);
pos += snprintf(buf + pos, bufsize - pos,
"set schema \"sys\";\n"
"drop function 
sys.dependencies_functions_os_triggers();\n"
diff --git 
a/sql/test/BugTracker-2018/Tests/sqlitelogictest-complex-case-not-in.Bug-6594.stable.out
 
b/sql/test/BugTracker-2018/Tests/sqlitelogictest-complex-case-not-in.Bug-6594.stable.out
--- 
a/sql/test/BugTracker-2018/Tests/sqlitelogictest-complex-case-not-in.Bug-6594.stable.out
+++ 
b/sql/test/BugTracker-2018/Tests/sqlitelogictest-complex-case-not-in.Bug-6594.stable.out
@@ -29,7 +29,7 @@ Ready.
 #ELSE NULL END ) AS BIGINT) AS col2;
 % .L14 # table_name
 % col2 # name
-% bigint # type
+% hugeint # type
 % 1 # length
 [ NULL ]
 
diff --git 
a/sql/test/BugTracker-2018/Tests/sqlitelogictest-not-in-wrong-results.Bug-6530.stable.out
 
b/sql/test/BugTracker-2018/Tests/sqlitelogictest-not-in-wrong-results.Bug-6530.stable.out
--- 
a/sql/test/BugTracker-2018/Tests/sqlitelogictest-not-in-wrong-results.Bug-6530.stable.out
+++ 
b/sql/test/BugTracker-2018/Tests/sqlitelogictest-not-in-wrong-results.Bug-6530.stable.out
@@ -28,11 +28,11 @@ Ready.
 #INSERT INTO tab0 VALUES (97,1,99), (15,81,47), (87,21,10);
 [ 3]
 #SELECT ALL - ( - COUNT ( * ) ) FROM tab0 AS cor0 WHERE col0 / ( - + col2 ) 
NOT IN ( + + col0, + col0 * + ( col1 ), + ( + - col0 ) * - 45, + CAST ( NULL AS 
INTEGER ) );
-% sys.L34 # table_name
-% L34 # name
+% sys.L31 # table_name
+% L31 # name
 % bigint # type
 % 1 # length
-[ 3]
+[ 0]
 #DROP TABLE tab0;
 
 # 19:12:39 >  
diff --git 
a/sql/test/BugTracker-2018/Tests/sqlitelogictest-select-not-in-wrong.Bug-6602.sql
 
b/sql/test/BugTracker-2018/Tests/sqlitelogictest-select-not-in-wrong.Bug-6602.sql
--- 
a/sql/test/BugTracker-2018/Tests/sqlitelogictest-select-not-in-wrong.Bug-6602.sql
+++ 
b/sql/test/BugTracker-2018/Tests/sqlitelogictest-select-not-in-wrong.Bug-6602.sql
@@ -2,3 +2,22 @@ CREATE TABLE tab2(col0 INTEGER, col1 INT
 INSERT INTO tab2 VALUES(64,77,40),(75,67,58),(46,51,23);
 SELECT * FROM tab2 WHERE + col2 NOT IN ( + - 59 + + ( 76 ), col1, + CAST ( 
NULL AS INTEGER ), col1, - 19, col1 );
 DROP TABLE tab2;
+
+CREATE TABLE CITIES(CITY varchar(50) NULL);
+INSERT INTO CITIES
+   SELECT 'Paris' UNION ALL
+   SELECT 'Montreal' UNION ALL
+   SELECT 'New York' UNION ALL
+   SELECT NULL;
+
+SELECT 'Found Montreal' WHERE 'Montreal' IN (SELECT city from CITIES);
+SELECT 'Found Sidney' WHERE 'Sidney' IN (SELECT city from CITIES);
+SELECT 'Sidney Not Found' WHERE 'Sidney' NOT IN (SELECT city from CITIES);
+SELECT 'Sidney Not Found' WHERE 'Sidney' NOT IN ('Paris','Montreal','New 
York');
+SELECT 'Sidney Not Found' WHERE 'Sidney' NOT IN ('Paris','Montreal','New 
York', NULL);
+SELECT 'Sidney Not Found' WHERE 'Sidney'<>'Paris' AND 'Sidney'<>'Montreal';
+SELECT 'Sidney Not Found' WHERE 'Sidney'<>'Paris' AND 'Sidney'<>'Montreal' AND 
'Sidney'<>null;
+
+SELECT city from CITIES WHERE city in (select city from CITIES);
+--SELECT 'Sidney Not Found' WHERE NOT EXISTS (SELECT 1/0 FROM CITIES WHERE 
CITY = 'Sidney');
+drop table CITIES;
diff --git 
a/sql/test/BugTracker-2018/Tests/sqlitelogictest-select-not-in-wrong.Bug-6602.stable.err
 
b/sql/test/BugTracker-2018/Tests/sqlitelogictest-select-not-in-wrong.Bug-6602.stable.err
new file mode 100644
--- /dev/null
+++ 
b/sql/test/BugTracker-2018/Tests/sqlitelogictest-select-not-in-wrong.Bug-6602.stable.err
@@ -0,0 +1,35 @@
+stderr of test 'sqlitelogictest-select-not-in-wrong.Bug-6602` in directory 
'sql/test/BugTracker-2018` itself:
+
+
+# 21:00:27 >  
+# 21:00:27 >  "mserver5" "--debug=10" "--set" "gdk_nr_threads=0" "--set" 
"mapi_open=true" "--set" "mapi_port=31602" "--set" 
"mapi_usock=/var/tmp/mtest-15721/.s.monetdb.31602" "--set" "monet_prompt=" 
"--forcemito" 

MonetDB: remote_auth - Merge with default

2018-05-17 Thread Panagiotis Koutsourakis
Changeset: 2d3b6c5615b2 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=2d3b6c5615b2
Added Files:

sql/test/BugTracker-2018/Tests/sqlitelogictest-select-not-in-wrong.Bug-6602.stable.err

sql/test/BugTracker-2018/Tests/sqlitelogictest-select-not-in-wrong.Bug-6602.stable.out
Modified Files:
sql/backends/monet5/sql_upgrades.c

sql/test/BugTracker-2018/Tests/sqlitelogictest-complex-case-not-in.Bug-6594.stable.out

sql/test/BugTracker-2018/Tests/sqlitelogictest-not-in-wrong-results.Bug-6530.stable.out

sql/test/BugTracker-2018/Tests/sqlitelogictest-select-not-in-wrong.Bug-6602.sql
Branch: remote_auth
Log Message:

Merge with default


diffs (207 lines):

diff --git a/sql/backends/monet5/sql_upgrades.c 
b/sql/backends/monet5/sql_upgrades.c
--- a/sql/backends/monet5/sql_upgrades.c
+++ b/sql/backends/monet5/sql_upgrades.c
@@ -1509,7 +1509,7 @@ sql_update_mar2018_sp1(Client c, mvc *sq
char *schema = stack_get_string(sql, "current_schema");
 
if (buf == NULL)
-   throw(SQL, "sql_update_dec2016_sp3", SQLSTATE(HY001) 
MAL_MALLOC_FAIL);
+   throw(SQL, "sql_update_mar2018_sp1", SQLSTATE(HY001) 
MAL_MALLOC_FAIL);
pos += snprintf(buf + pos, bufsize - pos,
"set schema \"sys\";\n"
"drop function 
sys.dependencies_functions_os_triggers();\n"
diff --git 
a/sql/test/BugTracker-2018/Tests/sqlitelogictest-complex-case-not-in.Bug-6594.stable.out
 
b/sql/test/BugTracker-2018/Tests/sqlitelogictest-complex-case-not-in.Bug-6594.stable.out
--- 
a/sql/test/BugTracker-2018/Tests/sqlitelogictest-complex-case-not-in.Bug-6594.stable.out
+++ 
b/sql/test/BugTracker-2018/Tests/sqlitelogictest-complex-case-not-in.Bug-6594.stable.out
@@ -29,7 +29,7 @@ Ready.
 #ELSE NULL END ) AS BIGINT) AS col2;
 % .L14 # table_name
 % col2 # name
-% bigint # type
+% hugeint # type
 % 1 # length
 [ NULL ]
 
diff --git 
a/sql/test/BugTracker-2018/Tests/sqlitelogictest-not-in-wrong-results.Bug-6530.stable.out
 
b/sql/test/BugTracker-2018/Tests/sqlitelogictest-not-in-wrong-results.Bug-6530.stable.out
--- 
a/sql/test/BugTracker-2018/Tests/sqlitelogictest-not-in-wrong-results.Bug-6530.stable.out
+++ 
b/sql/test/BugTracker-2018/Tests/sqlitelogictest-not-in-wrong-results.Bug-6530.stable.out
@@ -28,11 +28,11 @@ Ready.
 #INSERT INTO tab0 VALUES (97,1,99), (15,81,47), (87,21,10);
 [ 3]
 #SELECT ALL - ( - COUNT ( * ) ) FROM tab0 AS cor0 WHERE col0 / ( - + col2 ) 
NOT IN ( + + col0, + col0 * + ( col1 ), + ( + - col0 ) * - 45, + CAST ( NULL AS 
INTEGER ) );
-% sys.L34 # table_name
-% L34 # name
+% sys.L31 # table_name
+% L31 # name
 % bigint # type
 % 1 # length
-[ 3]
+[ 0]
 #DROP TABLE tab0;
 
 # 19:12:39 >  
diff --git 
a/sql/test/BugTracker-2018/Tests/sqlitelogictest-select-not-in-wrong.Bug-6602.sql
 
b/sql/test/BugTracker-2018/Tests/sqlitelogictest-select-not-in-wrong.Bug-6602.sql
--- 
a/sql/test/BugTracker-2018/Tests/sqlitelogictest-select-not-in-wrong.Bug-6602.sql
+++ 
b/sql/test/BugTracker-2018/Tests/sqlitelogictest-select-not-in-wrong.Bug-6602.sql
@@ -2,3 +2,22 @@ CREATE TABLE tab2(col0 INTEGER, col1 INT
 INSERT INTO tab2 VALUES(64,77,40),(75,67,58),(46,51,23);
 SELECT * FROM tab2 WHERE + col2 NOT IN ( + - 59 + + ( 76 ), col1, + CAST ( 
NULL AS INTEGER ), col1, - 19, col1 );
 DROP TABLE tab2;
+
+CREATE TABLE CITIES(CITY varchar(50) NULL);
+INSERT INTO CITIES
+   SELECT 'Paris' UNION ALL
+   SELECT 'Montreal' UNION ALL
+   SELECT 'New York' UNION ALL
+   SELECT NULL;
+
+SELECT 'Found Montreal' WHERE 'Montreal' IN (SELECT city from CITIES);
+SELECT 'Found Sidney' WHERE 'Sidney' IN (SELECT city from CITIES);
+SELECT 'Sidney Not Found' WHERE 'Sidney' NOT IN (SELECT city from CITIES);
+SELECT 'Sidney Not Found' WHERE 'Sidney' NOT IN ('Paris','Montreal','New 
York');
+SELECT 'Sidney Not Found' WHERE 'Sidney' NOT IN ('Paris','Montreal','New 
York', NULL);
+SELECT 'Sidney Not Found' WHERE 'Sidney'<>'Paris' AND 'Sidney'<>'Montreal';
+SELECT 'Sidney Not Found' WHERE 'Sidney'<>'Paris' AND 'Sidney'<>'Montreal' AND 
'Sidney'<>null;
+
+SELECT city from CITIES WHERE city in (select city from CITIES);
+--SELECT 'Sidney Not Found' WHERE NOT EXISTS (SELECT 1/0 FROM CITIES WHERE 
CITY = 'Sidney');
+drop table CITIES;
diff --git 
a/sql/test/BugTracker-2018/Tests/sqlitelogictest-select-not-in-wrong.Bug-6602.stable.err
 
b/sql/test/BugTracker-2018/Tests/sqlitelogictest-select-not-in-wrong.Bug-6602.stable.err
new file mode 100644
--- /dev/null
+++ 
b/sql/test/BugTracker-2018/Tests/sqlitelogictest-select-not-in-wrong.Bug-6602.stable.err
@@ -0,0 +1,35 @@
+stderr of test 'sqlitelogictest-select-not-in-wrong.Bug-6602` in directory 
'sql/test/BugTracker-2018` itself:
+
+
+# 21:00:27 >  
+# 21:00:27 >  "mserver5" "--debug=10" "--set" "gdk_nr_threads=0" "--set" 
"mapi_open=true" "--set" "mapi_port=31602" "--set" 
"mapi_usock=/var/tmp/mtest-15721/.s.monetdb.31602" "--set" "monet_prompt=" 
"--forcemito" 

MonetDB: remote_auth - Merge with default

2018-05-17 Thread Panagiotis Koutsourakis
Changeset: 742d0f2c8f8e for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=742d0f2c8f8e
Branch: remote_auth
Log Message:

Merge with default

For some reason previous merge did not go through correctly

___
checkin-list mailing list
checkin-list@monetdb.org
https://www.monetdb.org/mailman/listinfo/checkin-list


MonetDB: Mar2018 - Fix typo

2018-05-17 Thread Panagiotis Koutsourakis
Changeset: fb0bd0357e1f for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=fb0bd0357e1f
Modified Files:
sql/backends/monet5/sql_upgrades.c
Branch: Mar2018
Log Message:

Fix typo


diffs (12 lines):

diff --git a/sql/backends/monet5/sql_upgrades.c 
b/sql/backends/monet5/sql_upgrades.c
--- a/sql/backends/monet5/sql_upgrades.c
+++ b/sql/backends/monet5/sql_upgrades.c
@@ -1509,7 +1509,7 @@ sql_update_mar2018_sp1(Client c, mvc *sq
char *schema = stack_get_string(sql, "current_schema");
 
if (buf == NULL)
-   throw(SQL, "sql_update_dec2016_sp3", SQLSTATE(HY001) 
MAL_MALLOC_FAIL);
+   throw(SQL, "sql_update_mar2018_sp1", SQLSTATE(HY001) 
MAL_MALLOC_FAIL);
pos += snprintf(buf + pos, bufsize - pos,
"set schema \"sys\";\n"
"drop function 
sys.dependencies_functions_os_triggers();\n"
___
checkin-list mailing list
checkin-list@monetdb.org
https://www.monetdb.org/mailman/listinfo/checkin-list


MonetDB: remote_auth - Merge with Mar2018

2018-05-17 Thread Panagiotis Koutsourakis
Changeset: 14285c374de0 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=14285c374de0
Added Files:

sql/test/BugTracker-2018/Tests/sqlitelogictest-select-not-in-wrong.Bug-6602.stable.err

sql/test/BugTracker-2018/Tests/sqlitelogictest-select-not-in-wrong.Bug-6602.stable.out
Modified Files:
sql/backends/monet5/sql_upgrades.c

sql/test/BugTracker-2018/Tests/sqlitelogictest-complex-case-not-in.Bug-6594.stable.out

sql/test/BugTracker-2018/Tests/sqlitelogictest-not-in-wrong-results.Bug-6530.stable.out

sql/test/BugTracker-2018/Tests/sqlitelogictest-select-not-in-wrong.Bug-6602.sql
Branch: remote_auth
Log Message:

Merge with Mar2018


diffs (207 lines):

diff --git a/sql/backends/monet5/sql_upgrades.c 
b/sql/backends/monet5/sql_upgrades.c
--- a/sql/backends/monet5/sql_upgrades.c
+++ b/sql/backends/monet5/sql_upgrades.c
@@ -1509,7 +1509,7 @@ sql_update_mar2018_sp1(Client c, mvc *sq
char *schema = stack_get_string(sql, "current_schema");
 
if (buf == NULL)
-   throw(SQL, "sql_update_dec2016_sp3", SQLSTATE(HY001) 
MAL_MALLOC_FAIL);
+   throw(SQL, "sql_update_mar2018_sp1", SQLSTATE(HY001) 
MAL_MALLOC_FAIL);
pos += snprintf(buf + pos, bufsize - pos,
"set schema \"sys\";\n"
"drop function 
sys.dependencies_functions_os_triggers();\n"
diff --git 
a/sql/test/BugTracker-2018/Tests/sqlitelogictest-complex-case-not-in.Bug-6594.stable.out
 
b/sql/test/BugTracker-2018/Tests/sqlitelogictest-complex-case-not-in.Bug-6594.stable.out
--- 
a/sql/test/BugTracker-2018/Tests/sqlitelogictest-complex-case-not-in.Bug-6594.stable.out
+++ 
b/sql/test/BugTracker-2018/Tests/sqlitelogictest-complex-case-not-in.Bug-6594.stable.out
@@ -29,7 +29,7 @@ Ready.
 #ELSE NULL END ) AS BIGINT) AS col2;
 % .L14 # table_name
 % col2 # name
-% bigint # type
+% hugeint # type
 % 1 # length
 [ NULL ]
 
diff --git 
a/sql/test/BugTracker-2018/Tests/sqlitelogictest-not-in-wrong-results.Bug-6530.stable.out
 
b/sql/test/BugTracker-2018/Tests/sqlitelogictest-not-in-wrong-results.Bug-6530.stable.out
--- 
a/sql/test/BugTracker-2018/Tests/sqlitelogictest-not-in-wrong-results.Bug-6530.stable.out
+++ 
b/sql/test/BugTracker-2018/Tests/sqlitelogictest-not-in-wrong-results.Bug-6530.stable.out
@@ -28,11 +28,11 @@ Ready.
 #INSERT INTO tab0 VALUES (97,1,99), (15,81,47), (87,21,10);
 [ 3]
 #SELECT ALL - ( - COUNT ( * ) ) FROM tab0 AS cor0 WHERE col0 / ( - + col2 ) 
NOT IN ( + + col0, + col0 * + ( col1 ), + ( + - col0 ) * - 45, + CAST ( NULL AS 
INTEGER ) );
-% sys.L34 # table_name
-% L34 # name
+% sys.L31 # table_name
+% L31 # name
 % bigint # type
 % 1 # length
-[ 3]
+[ 0]
 #DROP TABLE tab0;
 
 # 19:12:39 >  
diff --git 
a/sql/test/BugTracker-2018/Tests/sqlitelogictest-select-not-in-wrong.Bug-6602.sql
 
b/sql/test/BugTracker-2018/Tests/sqlitelogictest-select-not-in-wrong.Bug-6602.sql
--- 
a/sql/test/BugTracker-2018/Tests/sqlitelogictest-select-not-in-wrong.Bug-6602.sql
+++ 
b/sql/test/BugTracker-2018/Tests/sqlitelogictest-select-not-in-wrong.Bug-6602.sql
@@ -2,3 +2,22 @@ CREATE TABLE tab2(col0 INTEGER, col1 INT
 INSERT INTO tab2 VALUES(64,77,40),(75,67,58),(46,51,23);
 SELECT * FROM tab2 WHERE + col2 NOT IN ( + - 59 + + ( 76 ), col1, + CAST ( 
NULL AS INTEGER ), col1, - 19, col1 );
 DROP TABLE tab2;
+
+CREATE TABLE CITIES(CITY varchar(50) NULL);
+INSERT INTO CITIES
+   SELECT 'Paris' UNION ALL
+   SELECT 'Montreal' UNION ALL
+   SELECT 'New York' UNION ALL
+   SELECT NULL;
+
+SELECT 'Found Montreal' WHERE 'Montreal' IN (SELECT city from CITIES);
+SELECT 'Found Sidney' WHERE 'Sidney' IN (SELECT city from CITIES);
+SELECT 'Sidney Not Found' WHERE 'Sidney' NOT IN (SELECT city from CITIES);
+SELECT 'Sidney Not Found' WHERE 'Sidney' NOT IN ('Paris','Montreal','New 
York');
+SELECT 'Sidney Not Found' WHERE 'Sidney' NOT IN ('Paris','Montreal','New 
York', NULL);
+SELECT 'Sidney Not Found' WHERE 'Sidney'<>'Paris' AND 'Sidney'<>'Montreal';
+SELECT 'Sidney Not Found' WHERE 'Sidney'<>'Paris' AND 'Sidney'<>'Montreal' AND 
'Sidney'<>null;
+
+SELECT city from CITIES WHERE city in (select city from CITIES);
+--SELECT 'Sidney Not Found' WHERE NOT EXISTS (SELECT 1/0 FROM CITIES WHERE 
CITY = 'Sidney');
+drop table CITIES;
diff --git 
a/sql/test/BugTracker-2018/Tests/sqlitelogictest-select-not-in-wrong.Bug-6602.stable.err
 
b/sql/test/BugTracker-2018/Tests/sqlitelogictest-select-not-in-wrong.Bug-6602.stable.err
new file mode 100644
--- /dev/null
+++ 
b/sql/test/BugTracker-2018/Tests/sqlitelogictest-select-not-in-wrong.Bug-6602.stable.err
@@ -0,0 +1,35 @@
+stderr of test 'sqlitelogictest-select-not-in-wrong.Bug-6602` in directory 
'sql/test/BugTracker-2018` itself:
+
+
+# 21:00:27 >  
+# 21:00:27 >  "mserver5" "--debug=10" "--set" "gdk_nr_threads=0" "--set" 
"mapi_open=true" "--set" "mapi_port=31602" "--set" 
"mapi_usock=/var/tmp/mtest-15721/.s.monetdb.31602" "--set" "monet_prompt=" 
"--forcemito" 

MonetDB: remote_auth - Fix typo

2018-05-17 Thread Panagiotis Koutsourakis
Changeset: c67066874453 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=c67066874453
Modified Files:
sql/backends/monet5/sql_upgrades.c
Branch: remote_auth
Log Message:

Fix typo


diffs (12 lines):

diff --git a/sql/backends/monet5/sql_upgrades.c 
b/sql/backends/monet5/sql_upgrades.c
--- a/sql/backends/monet5/sql_upgrades.c
+++ b/sql/backends/monet5/sql_upgrades.c
@@ -1509,7 +1509,7 @@ sql_update_mar2018_sp1(Client c, mvc *sq
char *schema = stack_get_string(sql, "current_schema");
 
if (buf == NULL)
-   throw(SQL, "sql_update_dec2016_sp3", SQLSTATE(HY001) 
MAL_MALLOC_FAIL);
+   throw(SQL, "sql_update_mar2018_sp1", SQLSTATE(HY001) 
MAL_MALLOC_FAIL);
pos += snprintf(buf + pos, bufsize - pos,
"set schema \"sys\";\n"
"drop function 
sys.dependencies_functions_os_triggers();\n"
___
checkin-list mailing list
checkin-list@monetdb.org
https://www.monetdb.org/mailman/listinfo/checkin-list


MonetDB: remote_auth - We only need username and hashed pass fro...

2018-05-16 Thread Panagiotis Koutsourakis
Changeset: b9dd097c5988 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=b9dd097c5988
Modified Files:
clients/mapiclient/dump.c
Branch: remote_auth
Log Message:

We only need username and hashed pass from remote_table_credentials


diffs (21 lines):

diff --git a/clients/mapiclient/dump.c b/clients/mapiclient/dump.c
--- a/clients/mapiclient/dump.c
+++ b/clients/mapiclient/dump.c
@@ -874,14 +874,14 @@ describe_table(Mapi mid, const char *sch
char *rt_user = NULL;
char *rt_hash = NULL;
snprintf(query, maxquerylen,
-"SELECT * FROM 
sys.remote_table_credentials('%s.%s')",
+"SELECT username, hash FROM 
sys.remote_table_credentials('%s.%s')",
 schema, tname);
if ((hdl = mapi_query(mid, query)) == NULL || 
mapi_error(mid))
goto bailout;
cnt = 0;
while(mapi_fetch_row(hdl) != 0) {
-   rt_user = mapi_fetch_field(hdl, 1);
-   rt_hash = mapi_fetch_field(hdl, 2);
+   rt_user = mapi_fetch_field(hdl, 0);
+   rt_hash = mapi_fetch_field(hdl, 1);
}
mnstr_printf(toConsole, " ON '%s' WITH USER '%s' 
ENCRYPTED PASSWORD '%s'", view, rt_user, rt_hash);
}
___
checkin-list mailing list
checkin-list@monetdb.org
https://www.monetdb.org/mailman/listinfo/checkin-list


MonetDB: remote_auth - Merge with default

2018-05-16 Thread Panagiotis Koutsourakis
Changeset: a904cdb2b00a for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=a904cdb2b00a
Removed Files:
NT/mkgeomwxs.py
Modified Files:
NT/Makefile
NT/mksqlwxs.py
buildtools/ChangeLog
clients/mapiclient/mclient.c
Branch: remote_auth
Log Message:

Merge with default


diffs (truncated from 370 to 300 lines):

diff --git a/NT/Makefile b/NT/Makefile
--- a/NT/Makefile
+++ b/NT/Makefile
@@ -26,7 +26,6 @@ install: targetdirs all
$(MAKE) /nologo /f "$(srcdir)\Makefile.msc" "prefix=$(prefix)" 
"bits=$(bits)" install
$(INSTALL) .monetdb "$(sysconfdir)"
$(PYTHON) $(NT)\mksqlwxs.py $(VERSION) "$(MAKE_INCLUDEFILE)" 
"$(prefix)" > "$(prefix)\MonetDB5-SQL-Installer.wxs"
-   $(PYTHON) $(NT)\mkgeomwxs.py $(VERSION) "$(MAKE_INCLUDEFILE)" 
"$(prefix)" > "$(prefix)\MonetDB5-Geom-Installer.wxs"
$(PYTHON) $(NT)\mkodbcwxs.py $(VERSION) "$(MAKE_INCLUDEFILE)" 
"$(prefix)" > "$(prefix)\MonetDB-ODBC-Installer.wxs"
 
 $(srcdir)\Makefile.msc: "$(srcdir)\Makefile.ag"
diff --git a/NT/mkgeomwxs.py b/NT/mkgeomwxs.py
deleted file mode 100644
--- a/NT/mkgeomwxs.py
+++ /dev/null
@@ -1,143 +0,0 @@
-from __future__ import print_function
-
-# python mkgeomwxs.py VERSION makedefs.txt PREFIX > 
PREFIX/MonetDB5-Geom-Installer.wxs
-# "c:\Program Files (x86)\WiX Toolset v3.10\bin\candle.exe" -nologo -arch 
x64/x86 PREFIX/MonetDB5-Geom-Installer.wxs
-# "c:\Program Files (x86)\WiX Toolset v3.10\bin\light.exe" -nologo -sice:ICE03 
-sice:ICE60 -sice:ICE82 -ext WixUIExtension 
PREFIX/MonetDB5-Geom-Installer.wixobj
-
-import sys, os
-
-# doesn't change
-upgradecode = {'x64': '{8E6CDFDE-39B9-43D9-97B3-2440C012845C}',
-   'x86': '{92C89C36-0E86-45E1-B3D8-0D6C91108F30}'}
-
-def comp(features, id, depth, files):
-indent = ' ' * depth
-for f in files:
-print('%s' % (indent, id))
-print('%s  ' % 
(indent, f.split('\\')[-1], f))
-print('%s' % indent)
-features.append('_%d' % id)
-id += 1
-return id
-
-def main():
-if len(sys.argv) != 4:
-print(r'Usage: mkgeomwxs.py version makedefs.txt installdir')
-return 1
-makedefs = {}
-for line in open(sys.argv[2]):
-key, val = line.strip().split('=', 1)
-makedefs[key] = val
-if makedefs['bits'] == '64':
-folder = r'ProgramFiles64Folder'
-arch = 'x64'
-else:
-folder = r'ProgramFilesFolder'
-arch = 'x86'
-vs = os.getenv('vs')# inherited from TestTools\common.bat
-features = []
-print(r'')
-print(r'http://schemas.microsoft.com/wix/2006/wi;>')
-print(r'  ' % 
(upgradecode[arch], sys.argv[1]))
-print(r'' % arch)
-print(r'')
-print(r'')
-print(r'')
-# print(r'')
-print(r'')
-print(r'  ')
-print(r'')
-print(r'')
-print(r'')
-print(r'')
-print(r'')
-print(r'  INSTALLDIR')
-print(r'')
-print(r'')
-if vs == '17':
-msvc = r'C:\Program Files (x86)\Microsoft Visual 
Studio\2017\Community\VC\Redist\MSVC'
-d = sorted(os.listdir(msvc))[-1]
-msm = '_CRT_%s.msm' % arch
-for f in sorted(os.listdir(os.path.join(msvc, d, 'MergeModules'))):
-if msm in f:
-fn = f
-print(r'  ' % (msvc, d, fn))
-else:
-print(r'  ' % (vs, arch))
-print(r'  ' % folder)
-print(r'')
-print(r'  ')
-id = 1
-print(r'')
-id = comp(features, id, 14,
-  [r'%s\bin\geos_c.dll' % makedefs['LIBGEOS']])
-print(r'')
-print(r'')
-print(r'  ')
-print(r'')
-id = comp(features, id, 18,
-  [r'lib\monetdb5\autoload\%s' % x for x in sorted(filter(lambda 
x: x.endswith('.mal') and ('geom' in x), os.listdir(os.path.join(sys.argv[3], 
'lib', 'monetdb5', 'autoload'])
-print(r'')
-print(r'')
-id = comp(features, id, 18,
-  [r'lib\monetdb5\createdb\%s' % x for x in sorted(filter(lambda 
x: x.endswith('.sql') and ('geom' in x), os.listdir(os.path.join(sys.argv[3], 
'lib', 'monetdb5', 'createdb'])
-print(r'')
-id = comp(features, id, 16,
-  [r'lib\monetdb5\%s' % x for x in sorted(filter(lambda x: 
x.endswith('.mal') and ('geom' in x), os.listdir(os.path.join(sys.argv[3], 
'lib', 'monetdb5'])
-id = comp(features, id, 16,
-  [r'lib\monetdb5\%s' % x for x in sorted(filter(lambda x: 
x.startswith('lib_') and (x.endswith('.dll') or x.endswith('.pdb')) and ('geom' 
in x), os.listdir(os.path.join(sys.argv[3], 'lib', 'monetdb5'])
-print(r'  ')
-print(r'')
-print(r'  ')
-print(r'')
-print(r'  ')
-print(r'')
-print(r'')
-for f in features:
-print(r'  ' % f)
-

MonetDB: remote_auth - Approve test output

2018-05-16 Thread Panagiotis Koutsourakis
Changeset: 7bcfbdb95cec for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=7bcfbdb95cec
Modified Files:
clients/Tests/MAL-signatures.stable.out
clients/Tests/MAL-signatures.stable.out.int128

sql/test/BugTracker-2015/Tests/msqldump-merge-and-remote-tables.Bug-3774.stable.out
sql/test/BugTracker-2015/Tests/schemadiff.Bug-3778.stable.out
Branch: remote_auth
Log Message:

Approve test output


diffs (55 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
@@ -10904,6 +10904,7 @@ Ready.
 [ "sql",   "round","command sql.round(v:lng, d:int, s:int, 
r:bte):lng ",   "lng_round_wrap;",  "round off the decimal v(d,s) to r 
digits behind the dot (if r < 0, before the dot)"]
 [ "sql",   "round","command sql.round(v:sht, d:int, s:int, 
r:bte):sht ",   "sht_round_wrap;",  "round off the decimal v(d,s) to r 
digits behind the dot (if r < 0, before the dot)"]
 [ "sql",   "row_number",   "pattern sql.row_number(b:any_1, p:bit, 
o:bit):int ",   "SQLrow_number;",   "return the row_numer-ed groups"
]
+[ "sql",   "rt_credentials",   "pattern 
sql.rt_credentials(tablename:str) (uri:bat[:str], username:bat[:str], 
hash:bat[:str]) ",   "sql_rt_credentials_wrap;", "Return the remote 
table credentials for the given table"   ]
 [ "sql",   "sessions", "pattern sql.sessions() (user:bat[:str], 
start:bat[:timestamp], stimeout:bat[:lng], lastcmd:bat[:timestamp], 
qtimeout:bat[:lng], idle:bat[:bit]) ", "sql_sessions_wrap;",   "SQL export 
table of active sessions, their timeouts and idle status"   ]
 [ "sql",   "setVariable",  "pattern sql.setVariable(mvc:int, varname:str, 
value:any_1):int ",  "setVariable;", "Set the value of a session variable"  
 ]
 [ "sql",   "shrink",   "pattern sql.shrink(sch:str, tbl:str):void ",   
"SQLshrink;",   "Consolidate the deletion table over all columns using 
shrinking"   ]
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
@@ -15117,6 +15117,7 @@ Ready.
 [ "sql",   "round","command sql.round(v:lng, d:int, s:int, 
r:bte):lng ",   "lng_round_wrap;",  "round off the decimal v(d,s) to r 
digits behind the dot (if r < 0, before the dot)"]
 [ "sql",   "round","command sql.round(v:sht, d:int, s:int, 
r:bte):sht ",   "sht_round_wrap;",  "round off the decimal v(d,s) to r 
digits behind the dot (if r < 0, before the dot)"]
 [ "sql",   "row_number",   "pattern sql.row_number(b:any_1, p:bit, 
o:bit):int ",   "SQLrow_number;",   "return the row_numer-ed groups"
]
+[ "sql",   "rt_credentials",   "pattern 
sql.rt_credentials(tablename:str) (uri:bat[:str], username:bat[:str], 
hash:bat[:str]) ",   "sql_rt_credentials_wrap;", "Return the remote 
table credentials for the given table"   ]
 [ "sql",   "sessions", "pattern sql.sessions() (user:bat[:str], 
start:bat[:timestamp], stimeout:bat[:lng], lastcmd:bat[:timestamp], 
qtimeout:bat[:lng], idle:bat[:bit]) ", "sql_sessions_wrap;",   "SQL export 
table of active sessions, their timeouts and idle status"   ]
 [ "sql",   "setVariable",  "pattern sql.setVariable(mvc:int, varname:str, 
value:any_1):int ",  "setVariable;", "Set the value of a session variable"  
 ]
 [ "sql",   "shrink",   "pattern sql.shrink(sch:str, tbl:str):void ",   
"SQLshrink;",   "Consolidate the deletion table over all columns using 
shrinking"   ]
diff --git 
a/sql/test/BugTracker-2015/Tests/msqldump-merge-and-remote-tables.Bug-3774.stable.out
 
b/sql/test/BugTracker-2015/Tests/msqldump-merge-and-remote-tables.Bug-3774.stable.out
--- 
a/sql/test/BugTracker-2015/Tests/msqldump-merge-and-remote-tables.Bug-3774.stable.out
+++ 
b/sql/test/BugTracker-2015/Tests/msqldump-merge-and-remote-tables.Bug-3774.stable.out
@@ -74,7 +74,7 @@ CREATE MERGE TABLE "sys"."mt1" (
 );
 CREATE REMOTE TABLE "sys"."rt1" (
"t" INTEGER
-) ON 'mapi:monetdb://localhost:5/test';
+) ON 'mapi:monetdb://localhost:5/test' WITH USER 'monetdb' ENCRYPTED 
PASSWORD 
'a73f1d86383446438ac64f56e15ada38b41fbb18f029d2181723aeb2acac6a831f60e5fdbd64ac2c8c70e035dd44cbbe3b45565ef2d58feb2821a2078c7fad35';
 START TRANSACTION;
 SET SCHEMA "sys";
 CREATE TABLE "sys"."t1" (
@@ -85,7 +85,7 @@ CREATE MERGE TABLE "sys"."mt1" (
 );
 CREATE REMOTE TABLE "sys"."rt1" (
"t" INTEGER
-) ON 'mapi:monetdb://localhost:5/test';
+) ON 'mapi:monetdb://localhost:5/test' WITH USER 'monetdb' ENCRYPTED 
PASSWORD 
'a73f1d86383446438ac64f56e15ada38b41fbb18f029d2181723aeb2acac6a831f60e5fdbd64ac2c8c70e035dd44cbbe3b45565ef2d58feb2821a2078c7fad35';
 ALTER TABLE "sys"."mt1" ADD 

MonetDB: remote_auth - Properly release the lock if something fails

2018-05-15 Thread Panagiotis Koutsourakis
Changeset: b2db84d7abc6 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=b2db84d7abc6
Modified Files:
sql/backends/monet5/sql.c
Branch: remote_auth
Log Message:

Properly release the lock if something fails

(Thanks Perdo)


diffs (34 lines):

diff --git a/sql/backends/monet5/sql.c b/sql/backends/monet5/sql.c
--- a/sql/backends/monet5/sql.c
+++ b/sql/backends/monet5/sql.c
@@ -3605,16 +3605,16 @@ sql_rt_credentials_wrap(Client cntxt, Ma
goto bailout;
}
 
-   MT_lock_set(_contextLock);
if ((msg = AUTHgetRemoteTableCredentials(*table, , , 
)) != MAL_SUCCEED)
goto bailout;
 
+   MT_lock_set(_contextLock);
if (BUNappend(urib, uris, FALSE) != GDK_SUCCEED)
-   goto bailout;
+   goto lbailout;
if (BUNappend(unameb, unames, FALSE) != GDK_SUCCEED)
-   goto bailout;
+   goto lbailout;
if (BUNappend(hashb, hashs, FALSE) != GDK_SUCCEED)
-   goto bailout;
+   goto lbailout;
MT_lock_unset(_contextLock);
BBPkeepref(*uri = urib->batCacheid);
BBPkeepref(*uname = unameb->batCacheid);
@@ -3622,6 +3622,9 @@ sql_rt_credentials_wrap(Client cntxt, Ma
 
return MAL_SUCCEED;
 
+  lbailout:
+   MT_lock_unset(_contextLock);
+   msg = createException(SQL, "sql.remote_table_credentials", 
SQLSTATE(HY001) MAL_MALLOC_FAIL);
   bailout:
if (urib) BBPunfix(urib->batCacheid);
if (unameb) BBPunfix(unameb->batCacheid);
___
checkin-list mailing list
checkin-list@monetdb.org
https://www.monetdb.org/mailman/listinfo/checkin-list


MonetDB: remote_auth - Merge with default

2018-05-15 Thread Panagiotis Koutsourakis
Changeset: e56350abb97f for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=e56350abb97f
Added Files:

sql/test/BugTracker-2018/Tests/remote-table-where-is-null.Bug-6601.SQL.py

sql/test/BugTracker-2018/Tests/remote-table-where-is-null.Bug-6601.stable.err

sql/test/BugTracker-2018/Tests/remote-table-where-is-null.Bug-6601.stable.out

sql/test/BugTracker-2018/Tests/sqlitelogictest-complex-case-not-in.Bug-6594.stable.err

sql/test/BugTracker-2018/Tests/sqlitelogictest-complex-case-not-in.Bug-6594.stable.out

sql/test/BugTracker-2018/Tests/sqlitelogictest-groupby-distinct-duplicate.Bug-6603.sql

sql/test/BugTracker-2018/Tests/sqlitelogictest-groupby-distinct-duplicate.Bug-6603.stable.err

sql/test/BugTracker-2018/Tests/sqlitelogictest-groupby-distinct-duplicate.Bug-6603.stable.out

sql/test/BugTracker-2018/Tests/sqlitelogictest-select-errors.Bug-6600.sql

sql/test/BugTracker-2018/Tests/sqlitelogictest-select-errors.Bug-6600.stable.err

sql/test/BugTracker-2018/Tests/sqlitelogictest-select-errors.Bug-6600.stable.out

sql/test/BugTracker-2018/Tests/sqlitelogictest-select-not-in-wrong.Bug-6602.sql

sql/test/BugTracker-2018/Tests/temp-table-performance.Bug-6577.stable.err

sql/test/BugTracker-2018/Tests/temp-table-performance.Bug-6577.stable.out
Modified Files:
clients/mapiclient/dump.c
sql/backends/monet5/rel_bin.c
sql/backends/monet5/sql.c
sql/backends/monet5/sql_cat.c
sql/backends/monet5/sql_execute.c
sql/backends/monet5/sql_gencode.c
sql/backends/monet5/sql_statement.c
sql/server/rel_exp.c
sql/server/rel_optimizer.c
sql/server/rel_optimizer.h
sql/server/rel_partition.c
sql/server/rel_select.c
sql/server/rel_updates.c
sql/server/sql_atom.c
sql/server/sql_mvc.c
sql/server/sql_mvc.h
sql/server/sql_parser.y
sql/test/BugTracker-2015/Tests/schemadiff.Bug-3778.stable.out
sql/test/BugTracker-2018/Tests/All

sql/test/BugTracker-2018/Tests/sqlitelogictest-coalesce-division-by-zero.Bug-6556.sql

sql/test/BugTracker-2018/Tests/sqlitelogictest-coalesce-division-by-zero.Bug-6556.stable.err

sql/test/BugTracker-2018/Tests/sqlitelogictest-coalesce-division-by-zero.Bug-6556.stable.out

sql/test/BugTracker-2018/Tests/sqlitelogictest-complex-case-not-in.Bug-6594.sql

sql/test/BugTracker-2018/Tests/sqlitelogictest-mal-calc-undefined.Bug-6566.stable.out
sql/test/BugTracker-2018/Tests/temp-table-performance.Bug-6577.sql
sql/test/Dependencies/Tests/Dependencies.stable.out
sql/test/Dependencies/Tests/Dependencies.stable.out.int128
sql/test/Tests/systemfunctions.stable.out
sql/test/Tests/systemfunctions.stable.out.int128
sql/test/mergetables/Tests/mergequery.stable.out
Branch: remote_auth
Log Message:

Merge with default


diffs (truncated from 2685 to 300 lines):

diff --git a/clients/mapiclient/dump.c b/clients/mapiclient/dump.c
--- a/clients/mapiclient/dump.c
+++ b/clients/mapiclient/dump.c
@@ -256,7 +256,7 @@ dump_foreign_keys(Mapi mid, const char *
  "pkt.schema_id = ps.id AND "
  "fkt.schema_id = fs.id AND "
  "fkt.system = FALSE "
-   "ORDER BY fs.name,fkt.name, "
+   "ORDER BY fs.name, fkt.name, "
  "fkk.name, nr";
}
hdl = mapi_query(mid, query);
@@ -804,7 +804,7 @@ describe_table(Mapi mid, const char *sch
 
query = malloc(maxquerylen);
snprintf(query, maxquerylen,
-"%s\n"
+"%s "
 "SELECT t.name, t.query, t.type, c.remark "
 "FROM sys.schemas s, sys._tables t LEFT OUTER JOIN comments c 
ON t.id = c.id "
 "WHERE s.name = '%s' AND "
@@ -949,8 +949,12 @@ describe_table(Mapi mid, const char *sch
if (cnt)
mnstr_printf(toConsole, ");\n");
snprintf(query, maxquerylen,
-   "%s\n"
-"SELECT i.name, c.remark FROM sys.idxs i, comments c 
WHERE i.id = c.id AND i.table_id = (SELECT id FROM sys._tables WHERE schema_id 
= (select id FROM sys.schemas WHERE name = '%s') AND name = '%s') ORDER BY 
i.name",
+   "%s "
+"SELECT i.name, c.remark "
+"FROM sys.idxs i, comments c "
+"WHERE i.id = c.id "
+  "AND i.table_id = (SELECT id FROM sys._tables WHERE 
schema_id = (select id FROM sys.schemas WHERE name = '%s') AND name = '%s') "
+"ORDER BY i.name",
 get_compat_clause(mid),
 schema, tname);
if ((hdl = mapi_query(mid, query)) 

MonetDB: remote_auth - Merge with default

2018-05-15 Thread Panagiotis Koutsourakis
Changeset: 812bd878c4ca for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=812bd878c4ca
Added Files:
sql/test/Dump/Tests/clean-again.reqtests
sql/test/Dump/Tests/clean-again.sql.src
sql/test/Dump/Tests/clean-again.stable.err
sql/test/Dump/Tests/clean-again.stable.out
sql/test/Dump/Tests/dump-again.SQL.py
sql/test/Dump/Tests/dump-again.reqtests
sql/test/Dump/Tests/dump-again.stable.err
sql/test/Dump/Tests/dump-again.stable.out
sql/test/Dump/Tests/reload-again.SQL.py
sql/test/Dump/Tests/reload-again.reqtests
sql/test/Dump/Tests/reload-again.stable.err
sql/test/Dump/Tests/reload-again.stable.out
sql/test/Dump/Tests/test-again.reqtests
sql/test/Dump/Tests/test-again.sql.src
sql/test/Dump/Tests/test-again.stable.err.src
sql/test/Dump/Tests/test-again.stable.out.src
Modified Files:
clients/mapiclient/dump.c
clients/mapiclient/msqldump.c
clients/odbc/driver/Makefile.ag
clients/odbc/driver/SQLExecute.c
configure.ag
sql/test/Dump/Tests/All
Branch: remote_auth
Log Message:

Merge with default


diffs (truncated from 1070 to 300 lines):

diff --git a/clients/mapiclient/dump.c b/clients/mapiclient/dump.c
--- a/clients/mapiclient/dump.c
+++ b/clients/mapiclient/dump.c
@@ -121,15 +121,15 @@ get_schema(Mapi mid)
 }
 
 /* return TRUE if the HUGEINT type exists */
-static int
+static bool
 has_hugeint(Mapi mid)
 {
MapiHdl hdl;
-   int ret;
+   bool ret;
static int hashge = -1;
 
if (hashge >= 0)
-   return hashge;
+   return (bool) hashge;
 
if ((hdl = mapi_query(mid,
  "SELECT id "
@@ -145,7 +145,7 @@ has_hugeint(Mapi mid)
if (mapi_error(mid))
goto bailout;
mapi_close_handle(hdl);
-   hashge = ret;
+   hashge = (int) ret;
return ret;
 
   bailout:
@@ -383,8 +383,8 @@ static int dump_column_definition(
const char *schema,
const char *tname,
const char *tid,
-   int foreign,
-   int hashge);
+   bool foreign,
+   bool hashge);
 
 static const char *geomsubtypes[] = {
NULL,   /* 0 */
@@ -399,7 +399,7 @@ static const char *geomsubtypes[] = {
 };
 
 static int
-dump_type(Mapi mid, stream *toConsole, const char *c_type, const char 
*c_type_digits, const char *c_type_scale, int hashge)
+dump_type(Mapi mid, stream *toConsole, const char *c_type, const char 
*c_type_digits, const char *c_type_scale, bool hashge)
 {
int space = 0;
 
@@ -533,7 +533,7 @@ dump_type(Mapi mid, stream *toConsole, c
 }
 
 static int
-dump_column_definition(Mapi mid, stream *toConsole, const char *schema, const 
char *tname, const char *tid, int foreign, int hashge)
+dump_column_definition(Mapi mid, stream *toConsole, const char *schema, const 
char *tname, const char *tid, bool foreign, bool hashge)
 {
MapiHdl hdl = NULL;
char *query;
@@ -782,7 +782,7 @@ describe_table(Mapi mid, const char *sch
int type = 0;
size_t maxquerylen;
char *sname = NULL;
-   int hashge;
+   bool hashge;
 
if (schema == NULL) {
if ((sname = strchr(tname, '.')) != NULL) {
@@ -1281,7 +1281,36 @@ dump_table_data(Mapi mid, const char *sc
s = mapi_fetch_field(hdl, i);
if (s == NULL)
mnstr_printf(toConsole, "NULL");
-   else if (string[i]) {
+   else if (useInserts) {
+   const char *tp = mapi_get_type(hdl, i);
+   if (strcmp(tp, "sec_interval") == 0) {
+   const char *p = strchr(s, '.');
+   if (p == NULL)
+   p = s + strlen(s);
+   mnstr_printf(toConsole, "INTERVAL 
'%.*s' SECOND", (int) (p - s), s);
+   } else if (strcmp(tp, "month_interval") == 0)
+   mnstr_printf(toConsole, "INTERVAL '%s' 
MONTH", s);
+   else if (strcmp(tp, "timestamptz") == 0)
+   mnstr_printf(toConsole, "TIMESTAMP WITH 
TIME ZONE '%s'", s);
+   else if (strcmp(tp, "timestamp") == 0)
+   mnstr_printf(toConsole, "TIMESTAMP 
'%s'", s);
+   else if (strcmp(tp, "timetz") == 0)
+   mnstr_printf(toConsole, "TIME WITH TIME 
ZONE '%s'", s);
+   else if (strcmp(tp, "time") == 0)
+   mnstr_printf(toConsole, "TIME '%s'", s);
+   else if (strcmp(tp, "date") == 0)
+  

MonetDB: default - Merge with Mar2018 branch, not changing any f...

2018-05-25 Thread Panagiotis Koutsourakis
Changeset: 07fc13e1e728 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=07fc13e1e728
Modified Files:
MonetDB.spec
NT/monetdb_config.h.in
NT/rules.msc
clients/mapilib/mapi.rc
clients/odbc/driver/driver.rc
clients/odbc/winsetup/setup.rc
configure.ag
gdk/libbat.rc
monetdb5/tools/libmonetdb5.rc
vertoo.data
Branch: default
Log Message:

Merge with Mar2018 branch, not changing any files..

___
checkin-list mailing list
checkin-list@monetdb.org
https://www.monetdb.org/mailman/listinfo/checkin-list


MonetDB: default - Merge with Mar2018 branch.

2018-05-25 Thread Panagiotis Koutsourakis
Changeset: 6d9df475fc44 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=6d9df475fc44
Modified Files:
.hgtags
MonetDB.spec
buildtools/ChangeLog-Archive
buildtools/ChangeLog.Mar2018
debian/changelog
libversions
sql/ChangeLog-Archive
sql/ChangeLog.Mar2018
Branch: default
Log Message:

Merge with Mar2018 branch.


diffs (227 lines):

diff --git a/.hgtags b/.hgtags
--- a/.hgtags
+++ b/.hgtags
@@ -695,3 +695,5 @@ 28edc063ceb6a3726af887911a3e4ac4a33c504f
 f34a57f73307a09909b3669ce5cfd9aad490f317 Mar2018_3
 28edc063ceb6a3726af887911a3e4ac4a33c504f Mar2018_release
 f34a57f73307a09909b3669ce5cfd9aad490f317 Mar2018_release
+ee3d17d6f39930280f5aa914b42b87cda09008ca Mar2018_5
+ee3d17d6f39930280f5aa914b42b87cda09008ca Mar2018_SP1_release
diff --git a/MonetDB.spec b/MonetDB.spec
--- a/MonetDB.spec
+++ b/MonetDB.spec
@@ -132,7 +132,7 @@ Vendor: MonetDB BV <i...@monetdb.org>
 Group: Applications/Databases
 License: MPLv2.0
 URL: https://www.monetdb.org/
-Source: 
https://www.monetdb.org/downloads/sources/Mar2018/%{name}-%{version}.tar.bz2
+Source: 
https://www.monetdb.org/downloads/sources/Mar2018-SP1/%{name}-%{version}.tar.bz2
 
 # we need systemd for the _unitdir macro to exist
 # we need checkpolicy and selinux-policy-devel for the SELinux policy
@@ -1034,6 +1034,59 @@ done
 %postun -p /sbin/ldconfig
 
 %changelog
+* Fri May 25 2018 Panagiotis Koutsourakis <kutsu...@monetdbsolutions.com> - 
11.29.5-20180525
+- Rebuilt.
+- BZ#6562: Sqlitelogictest crash on group by query with not in operator
+- BZ#6565: Sqlitelogictest crash on complex select query with coalesce
+  call
+- BZ#6566: Sqlitelogictest unavailable calc.- MAL operations
+- BZ#6568: Sqlitelogictest crash on complex case query
+- BZ#6569: Sqlitelogictest select query with not between cause with
+  wrong results
+- BZ#6570: Sqlitelogictest select coalesce undefined calc
+- BZ#6572: ordered index Error in optimizer garbageCollector
+- BZ#6573: Sqlitelogictest crash on complex select query with case
+  statement
+- BZ#6574: server crashed could not find ordered index while creating
+  a table
+- BZ#6575: Sqlitelogictest crash on groupby query with coalesce call
+- BZ#6576: Sqlitelogictest aritmetic expressions with negative numbers
+  handling
+- BZ#6577: creating temp table kills performance of the original query
+- BZ#6578: One two-tuple insert gives different results than two single
+  inserts
+- BZ#6579: Sqlitelogic test infinite loop while compiling SQL query
+- BZ#6581: Join condition errors.
+- BZ#6583: Fixed size string concatenation with integer results in fixed
+  size string of size 0
+- BZ#6584: SELECT FROM REMOTE TABLE WHERE IS NOT NULL produces wrong
+  result
+- BZ#6585: Nested Merge tables cause an infinite loop in rel_optimizer
+- BZ#6587: Sqlitelogictest crash on complex case statement
+- BZ#6589: Sqlitelogictest crash on complex on complex expression
+- BZ#6594: Sqlitelogictest crash on complex case statement
+- BZ#6595: Remote decimal division triggers assertion / returns wrong
+  answer
+- BZ#6598: Python 3.4 not supported (due to usage of Py_DecodeLocale)
+- BZ#6600: Sqlitelogictest queries fail to execute
+- BZ#6601: "where is null" clause on remote table causes problem with
+  next query
+- BZ#6602: Sqlitelogictest wrong results in IN query
+- BZ#6603: Sqlitelogictest: Aggregation query with distinct clause
+  produces duplicated rows
+- BZ#6605: Sqlitelogictest set queries with wrong results
+
+* Thu May 17 2018 Martin van Dinther <martin.van.dint...@monetdbsolutions.com> 
- 11.29.5-20180525
+- sql: Corrected the definition of view: sys.ids.
+
+* Tue Apr  3 2018 Sjoerd Mullender <sjo...@acm.org> - 11.29.5-20180525
+- buildtools: On Linux and Unix, try not to link to libraries multiple times: 
that
+  only causes the code (and worse, the variables in those libraries) to be
+  included multiple times.  On Windows, we do need to link to libraries
+  multiple times (once for each DLL we create if the DLL references
+  anything from the library) but that doesn't cause the linked library
+  to be loaded multiple times.
+
 * Tue Mar 27 2018 Sjoerd Mullender <sjo...@acm.org> - 11.29.3-20180327
 - Rebuilt.
 - BZ#3824: Created table not visible from ODBC
diff --git a/buildtools/ChangeLog-Archive b/buildtools/ChangeLog-Archive
--- a/buildtools/ChangeLog-Archive
+++ b/buildtools/ChangeLog-Archive
@@ -1,6 +1,14 @@
 # DO NOT EDIT THIS FILE -- MAINTAINED AUTOMATICALLY
 # This file contains past ChangeLog entries
 
+* Tue Apr  3 2018 Sjoerd Mullender <sjo...@acm.org> - 11.29.5-20180525
+- On Linux and Unix, try not to link to libraries multiple times: that
+  only causes the code (and worse, the variables in those libraries) to be
+  included multiple times.  On Windows, we do need to link to libraries
+  multiple times (once for each DLL we create if the DLL references
+  anything from the library) but that doesn't cau

MonetDB: Mar2018 - Post release build.

2018-05-25 Thread Panagiotis Koutsourakis
Changeset: a110db1c56d1 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=a110db1c56d1
Modified Files:
MonetDB.spec
NT/monetdb_config.h.in
NT/rules.msc
clients/mapilib/mapi.rc
clients/odbc/driver/driver.rc
clients/odbc/winsetup/setup.rc
configure.ag
gdk/libbat.rc
monetdb5/tools/libmonetdb5.rc
vertoo.data
Branch: Mar2018
Log Message:

Post release build.


diffs (229 lines):

diff --git a/MonetDB.spec b/MonetDB.spec
--- a/MonetDB.spec
+++ b/MonetDB.spec
@@ -1,5 +1,5 @@
 %define name MonetDB
-%define version 11.29.5
+%define version 11.29.6
 %{!?buildno: %global buildno %(date +%Y%m%d)}
 
 # groups of related archs
diff --git a/NT/monetdb_config.h.in b/NT/monetdb_config.h.in
--- a/NT/monetdb_config.h.in
+++ b/NT/monetdb_config.h.in
@@ -642,7 +642,7 @@
 #define MONETDB5_PASSWDHASH_TOKEN SHA512
 
 /* Release name or "unreleased" */
-#define MONETDB_RELEASE "Mar2018-SP1"
+#define MONETDB_RELEASE "unreleased"
 
 /* Define if you do not want assertions */
 /* #undef NDEBUG */
@@ -666,7 +666,7 @@
 #define PACKAGE_URL "https://www.monetdb.org/;
 
 /* Define to the version of this package. */
-#define PACKAGE_VERSION "11.29.5"
+#define PACKAGE_VERSION "11.29.6"
 
 /* Path separator */
 #define PATH_SEP ';'
diff --git a/NT/rules.msc b/NT/rules.msc
--- a/NT/rules.msc
+++ b/NT/rules.msc
@@ -6,7 +6,7 @@
 #
 # Copyright 1997 - July 2008 CWI, August 2008 - 2018 MonetDB B.V.
 
-VERSION=11.29.5
+VERSION=11.29.6
 #   ^^
 # Maintained via vertoo. Please don't modify by hand!
 # Contact monetdb-develop...@lists.sourceforge.net for details and/or 
assistance.
diff --git a/clients/mapilib/mapi.rc b/clients/mapilib/mapi.rc
--- a/clients/mapilib/mapi.rc
+++ b/clients/mapilib/mapi.rc
@@ -3,8 +3,8 @@
 LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
 
 1 VERSIONINFO
-  FILEVERSION 11,29,5,1
-  PRODUCTVERSION 11,29,5,1
+  FILEVERSION 11,29,6,1
+  PRODUCTVERSION 11,29,6,1
   FILEFLAGSMASK 0x3fL
   FILEFLAGS 0
   FILEOS VOS_NT_WINDOWS32
@@ -18,7 +18,7 @@ BEGIN
   VALUE "Comments", "\0"
   VALUE "CompanyName", "MonetDB B.V.\0"
   VALUE "FileDescription", "MonetDB Application Interface DLL\0"
-  VALUE "FileVersion", "11.29.5\0"
+  VALUE "FileVersion", "11.29.6\0"
   //
   // Maintained via vertoo. Please don't modify by hand!
   // Contact monetdb-develop...@lists.sourceforge.net for details and/or 
assistance.
@@ -28,7 +28,7 @@ BEGIN
   VALUE "OriginalFilename", "Mapi.dll\0"
   VALUE "PrivateBuild", "\0"
   VALUE "ProductName", "MonetDB Client Libraries\0"
-  VALUE "ProductVersion", "11.29.5\0"
+  VALUE "ProductVersion", "11.29.6\0"
   //   
   // Maintained via vertoo. Please don't modify by hand!
   // Contact monetdb-develop...@lists.sourceforge.net for details and/or 
assistance.
diff --git a/clients/odbc/driver/driver.rc b/clients/odbc/driver/driver.rc
--- a/clients/odbc/driver/driver.rc
+++ b/clients/odbc/driver/driver.rc
@@ -3,8 +3,8 @@
 LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
 
 1 VERSIONINFO
-  FILEVERSION 11,29,5,1
-  PRODUCTVERSION 11,29,5,1
+  FILEVERSION 11,29,6,1
+  PRODUCTVERSION 11,29,6,1
   FILEFLAGSMASK 0x3fL
   FILEFLAGS 0
   FILEOS VOS_NT_WINDOWS32
@@ -18,7 +18,7 @@ BEGIN
   VALUE "Comments", "\0"
   VALUE "CompanyName", "MonetDB B.V.\0"
   VALUE "FileDescription", "MonetDB ODBC Driver DLL\0"
-  VALUE "FileVersion", "11.29.5\0"
+  VALUE "FileVersion", "11.29.6\0"
   //
   // Maintained via vertoo. Please don't modify by hand!
   // Contact monetdb-develop...@lists.sourceforge.net for details and/or 
assistance.
@@ -28,7 +28,7 @@ BEGIN
   VALUE "OriginalFilename", "libMonetODBC.dll\0"
   VALUE "PrivateBuild", "\0"
   VALUE "ProductName", "MonetDB SQL Server\0"
-  VALUE "ProductVersion", "11.29.5\0"
+  VALUE "ProductVersion", "11.29.6\0"
   //   
   // Maintained via vertoo. Please don't modify by hand!
   // Contact monetdb-develop...@lists.sourceforge.net for details and/or 
assistance.
diff --git a/clients/odbc/winsetup/setup.rc b/clients/odbc/winsetup/setup.rc
--- a/clients/odbc/winsetup/setup.rc
+++ b/clients/odbc/winsetup/setup.rc
@@ -62,8 +62,8 @@ END
 //
 
 VS_VERSION_INFO VERSIONINFO
- FILEVERSION 11,29,5,1
- PRODUCTVERSION 11,29,5,1
+ FILEVERSION 11,29,6,1
+ PRODUCTVERSION 11,29,6,1
  FILEFLAGSMASK 0x3fL
 #ifdef _DEBUG
  FILEFLAGS 0x1L
@@ -80,12 +80,12 @@ BEGIN
 BEGIN
 VALUE "CompanyName", "MonetDB B.V."
 VALUE "FileDescription", "MonetDB ODBC Setup DLL"
-VALUE "FileVersion", "11.29.5"
+VALUE "FileVersion", "11.29.6"
 VALUE "InternalName", "libMonetODBCs.dll"
 VALUE "LegalCopyright", "Copyright © MonetDB B.V. 2008-2018"
 VALUE "OriginalFilename", "libMonetODBCs.dll"
 

MonetDB: Mar2018 - Moved contents of ChangeLog.Mar2018 to MonetD...

2018-05-25 Thread Panagiotis Koutsourakis
Changeset: ee3d17d6f399 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=ee3d17d6f399
Modified Files:
MonetDB.spec
buildtools/ChangeLog-Archive
buildtools/ChangeLog.Mar2018
debian/changelog
sql/ChangeLog-Archive
sql/ChangeLog.Mar2018
Branch: Mar2018
Log Message:

Moved contents of ChangeLog.Mar2018 to MonetDB.spec, debian/changelog and 
ChangeLog-Archive.


diffs (197 lines):

diff --git a/MonetDB.spec b/MonetDB.spec
--- a/MonetDB.spec
+++ b/MonetDB.spec
@@ -132,7 +132,7 @@ Vendor: MonetDB BV <i...@monetdb.org>
 Group: Applications/Databases
 License: MPLv2.0
 URL: https://www.monetdb.org/
-Source: 
https://www.monetdb.org/downloads/sources/Mar2018/%{name}-%{version}.tar.bz2
+Source: 
https://www.monetdb.org/downloads/sources/Mar2018-SP1/%{name}-%{version}.tar.bz2
 
 # we need systemd for the _unitdir macro to exist
 # we need checkpolicy and selinux-policy-devel for the SELinux policy
@@ -1036,6 +1036,59 @@ done
 %postun -p /sbin/ldconfig
 
 %changelog
+* Fri May 25 2018 Panagiotis Koutsourakis <kutsu...@monetdbsolutions.com> - 
11.29.5-20180525
+- Rebuilt.
+- BZ#6562: Sqlitelogictest crash on group by query with not in operator
+- BZ#6565: Sqlitelogictest crash on complex select query with coalesce
+  call
+- BZ#6566: Sqlitelogictest unavailable calc.- MAL operations
+- BZ#6568: Sqlitelogictest crash on complex case query
+- BZ#6569: Sqlitelogictest select query with not between cause with
+  wrong results
+- BZ#6570: Sqlitelogictest select coalesce undefined calc
+- BZ#6572: ordered index Error in optimizer garbageCollector
+- BZ#6573: Sqlitelogictest crash on complex select query with case
+  statement
+- BZ#6574: server crashed could not find ordered index while creating
+  a table
+- BZ#6575: Sqlitelogictest crash on groupby query with coalesce call
+- BZ#6576: Sqlitelogictest aritmetic expressions with negative numbers
+  handling
+- BZ#6577: creating temp table kills performance of the original query
+- BZ#6578: One two-tuple insert gives different results than two single
+  inserts
+- BZ#6579: Sqlitelogic test infinite loop while compiling SQL query
+- BZ#6581: Join condition errors.
+- BZ#6583: Fixed size string concatenation with integer results in fixed
+  size string of size 0
+- BZ#6584: SELECT FROM REMOTE TABLE WHERE IS NOT NULL produces wrong
+  result
+- BZ#6585: Nested Merge tables cause an infinite loop in rel_optimizer
+- BZ#6587: Sqlitelogictest crash on complex case statement
+- BZ#6589: Sqlitelogictest crash on complex on complex expression
+- BZ#6594: Sqlitelogictest crash on complex case statement
+- BZ#6595: Remote decimal division triggers assertion / returns wrong
+  answer
+- BZ#6598: Python 3.4 not supported (due to usage of Py_DecodeLocale)
+- BZ#6600: Sqlitelogictest queries fail to execute
+- BZ#6601: "where is null" clause on remote table causes problem with
+  next query
+- BZ#6602: Sqlitelogictest wrong results in IN query
+- BZ#6603: Sqlitelogictest: Aggregation query with distinct clause
+  produces duplicated rows
+- BZ#6605: Sqlitelogictest set queries with wrong results
+
+* Thu May 17 2018 Martin van Dinther <martin.van.dint...@monetdbsolutions.com> 
- 11.29.5-20180525
+- sql: Corrected the definition of view: sys.ids.
+
+* Tue Apr  3 2018 Sjoerd Mullender <sjo...@acm.org> - 11.29.5-20180525
+- buildtools: On Linux and Unix, try not to link to libraries multiple times: 
that
+  only causes the code (and worse, the variables in those libraries) to be
+  included multiple times.  On Windows, we do need to link to libraries
+  multiple times (once for each DLL we create if the DLL references
+  anything from the library) but that doesn't cause the linked library
+  to be loaded multiple times.
+
 * Tue Mar 27 2018 Sjoerd Mullender <sjo...@acm.org> - 11.29.3-20180327
 - Rebuilt.
 - BZ#3824: Created table not visible from ODBC
diff --git a/buildtools/ChangeLog-Archive b/buildtools/ChangeLog-Archive
--- a/buildtools/ChangeLog-Archive
+++ b/buildtools/ChangeLog-Archive
@@ -1,6 +1,14 @@
 # DO NOT EDIT THIS FILE -- MAINTAINED AUTOMATICALLY
 # This file contains past ChangeLog entries
 
+* Tue Apr  3 2018 Sjoerd Mullender <sjo...@acm.org> - 11.29.5-20180525
+- On Linux and Unix, try not to link to libraries multiple times: that
+  only causes the code (and worse, the variables in those libraries) to be
+  included multiple times.  On Windows, we do need to link to libraries
+  multiple times (once for each DLL we create if the DLL references
+  anything from the library) but that doesn't cause the linked library
+  to be loaded multiple times.
+
 * Mon Feb 12 2018 Sjoerd Mullender <sjo...@acm.org> - 11.29.1-20180315
 - Added the .pdb files needed for debug symbols to the Windows installer
   for MonetDB/SQL.
diff --git a/buildtools/ChangeLog.Mar2018 b/buildtools/ChangeLog.Mar2018
--- a/buildtools/ChangeLog.Mar2018
+++ b/buildtools/ChangeLog.Mar20

MonetDB: Mar2018 - Setting tags Mar2018_5 and Mar2018_SP1 for th...

2018-05-25 Thread Panagiotis Koutsourakis
Changeset: cf55cdb20a6f for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=cf55cdb20a6f
Modified Files:
.hgtags
Branch: Mar2018
Log Message:

Setting tags Mar2018_5 and Mar2018_SP1 for the release build.


diffs (9 lines):

diff --git a/.hgtags b/.hgtags
--- a/.hgtags
+++ b/.hgtags
@@ -695,3 +695,5 @@ 28edc063ceb6a3726af887911a3e4ac4a33c504f
 f34a57f73307a09909b3669ce5cfd9aad490f317 Mar2018_3
 28edc063ceb6a3726af887911a3e4ac4a33c504f Mar2018_release
 f34a57f73307a09909b3669ce5cfd9aad490f317 Mar2018_release
+ee3d17d6f39930280f5aa914b42b87cda09008ca Mar2018_5
+ee3d17d6f39930280f5aa914b42b87cda09008ca Mar2018_SP1_release
___
checkin-list mailing list
checkin-list@monetdb.org
https://www.monetdb.org/mailman/listinfo/checkin-list


MonetDB: default - Merge with Mar2018 branch, not changing any f...

2018-05-25 Thread Panagiotis Koutsourakis
Changeset: 88a93ca0317e for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=88a93ca0317e
Modified Files:
MonetDB.spec
NT/monetdb_config.h.in
NT/rules.msc
clients/mapilib/mapi.rc
clients/odbc/driver/driver.rc
clients/odbc/winsetup/setup.rc
configure.ag
gdk/libbat.rc
monetdb5/tools/libmonetdb5.rc
vertoo.data
Branch: default
Log Message:

Merge with Mar2018 branch, not changing any files.

___
checkin-list mailing list
checkin-list@monetdb.org
https://www.monetdb.org/mailman/listinfo/checkin-list


MonetDB: Mar2018 - Pre-release version number update.

2018-05-25 Thread Panagiotis Koutsourakis
Changeset: 11abfe294805 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=11abfe294805
Modified Files:
MonetDB.spec
NT/monetdb_config.h.in
NT/rules.msc
clients/mapilib/mapi.rc
clients/odbc/driver/driver.rc
clients/odbc/winsetup/setup.rc
configure.ag
gdk/libbat.rc
monetdb5/tools/libmonetdb5.rc
vertoo.data
Branch: Mar2018
Log Message:

Pre-release version number update.


diffs (229 lines):

diff --git a/MonetDB.spec b/MonetDB.spec
--- a/MonetDB.spec
+++ b/MonetDB.spec
@@ -1,5 +1,5 @@
 %define name MonetDB
-%define version 11.29.4
+%define version 11.29.5
 %{!?buildno: %global buildno %(date +%Y%m%d)}
 
 # groups of related archs
diff --git a/NT/monetdb_config.h.in b/NT/monetdb_config.h.in
--- a/NT/monetdb_config.h.in
+++ b/NT/monetdb_config.h.in
@@ -642,7 +642,7 @@
 #define MONETDB5_PASSWDHASH_TOKEN SHA512
 
 /* Release name or "unreleased" */
-#define MONETDB_RELEASE "unreleased"
+#define MONETDB_RELEASE "Mar2018-SP1"
 
 /* Define if you do not want assertions */
 /* #undef NDEBUG */
@@ -666,7 +666,7 @@
 #define PACKAGE_URL "https://www.monetdb.org/;
 
 /* Define to the version of this package. */
-#define PACKAGE_VERSION "11.29.4"
+#define PACKAGE_VERSION "11.29.5"
 
 /* Path separator */
 #define PATH_SEP ';'
diff --git a/NT/rules.msc b/NT/rules.msc
--- a/NT/rules.msc
+++ b/NT/rules.msc
@@ -6,7 +6,7 @@
 #
 # Copyright 1997 - July 2008 CWI, August 2008 - 2018 MonetDB B.V.
 
-VERSION=11.29.4
+VERSION=11.29.5
 #   ^^
 # Maintained via vertoo. Please don't modify by hand!
 # Contact monetdb-develop...@lists.sourceforge.net for details and/or 
assistance.
diff --git a/clients/mapilib/mapi.rc b/clients/mapilib/mapi.rc
--- a/clients/mapilib/mapi.rc
+++ b/clients/mapilib/mapi.rc
@@ -3,8 +3,8 @@
 LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
 
 1 VERSIONINFO
-  FILEVERSION 11,29,4,1
-  PRODUCTVERSION 11,29,4,1
+  FILEVERSION 11,29,5,1
+  PRODUCTVERSION 11,29,5,1
   FILEFLAGSMASK 0x3fL
   FILEFLAGS 0
   FILEOS VOS_NT_WINDOWS32
@@ -18,7 +18,7 @@ BEGIN
   VALUE "Comments", "\0"
   VALUE "CompanyName", "MonetDB B.V.\0"
   VALUE "FileDescription", "MonetDB Application Interface DLL\0"
-  VALUE "FileVersion", "11.29.4\0"
+  VALUE "FileVersion", "11.29.5\0"
   //
   // Maintained via vertoo. Please don't modify by hand!
   // Contact monetdb-develop...@lists.sourceforge.net for details and/or 
assistance.
@@ -28,7 +28,7 @@ BEGIN
   VALUE "OriginalFilename", "Mapi.dll\0"
   VALUE "PrivateBuild", "\0"
   VALUE "ProductName", "MonetDB Client Libraries\0"
-  VALUE "ProductVersion", "11.29.4\0"
+  VALUE "ProductVersion", "11.29.5\0"
   //   
   // Maintained via vertoo. Please don't modify by hand!
   // Contact monetdb-develop...@lists.sourceforge.net for details and/or 
assistance.
diff --git a/clients/odbc/driver/driver.rc b/clients/odbc/driver/driver.rc
--- a/clients/odbc/driver/driver.rc
+++ b/clients/odbc/driver/driver.rc
@@ -3,8 +3,8 @@
 LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
 
 1 VERSIONINFO
-  FILEVERSION 11,29,4,1
-  PRODUCTVERSION 11,29,4,1
+  FILEVERSION 11,29,5,1
+  PRODUCTVERSION 11,29,5,1
   FILEFLAGSMASK 0x3fL
   FILEFLAGS 0
   FILEOS VOS_NT_WINDOWS32
@@ -18,7 +18,7 @@ BEGIN
   VALUE "Comments", "\0"
   VALUE "CompanyName", "MonetDB B.V.\0"
   VALUE "FileDescription", "MonetDB ODBC Driver DLL\0"
-  VALUE "FileVersion", "11.29.4\0"
+  VALUE "FileVersion", "11.29.5\0"
   //
   // Maintained via vertoo. Please don't modify by hand!
   // Contact monetdb-develop...@lists.sourceforge.net for details and/or 
assistance.
@@ -28,7 +28,7 @@ BEGIN
   VALUE "OriginalFilename", "libMonetODBC.dll\0"
   VALUE "PrivateBuild", "\0"
   VALUE "ProductName", "MonetDB SQL Server\0"
-  VALUE "ProductVersion", "11.29.4\0"
+  VALUE "ProductVersion", "11.29.5\0"
   //   
   // Maintained via vertoo. Please don't modify by hand!
   // Contact monetdb-develop...@lists.sourceforge.net for details and/or 
assistance.
diff --git a/clients/odbc/winsetup/setup.rc b/clients/odbc/winsetup/setup.rc
--- a/clients/odbc/winsetup/setup.rc
+++ b/clients/odbc/winsetup/setup.rc
@@ -62,8 +62,8 @@ END
 //
 
 VS_VERSION_INFO VERSIONINFO
- FILEVERSION 11,29,4,1
- PRODUCTVERSION 11,29,4,1
+ FILEVERSION 11,29,5,1
+ PRODUCTVERSION 11,29,5,1
  FILEFLAGSMASK 0x3fL
 #ifdef _DEBUG
  FILEFLAGS 0x1L
@@ -80,12 +80,12 @@ BEGIN
 BEGIN
 VALUE "CompanyName", "MonetDB B.V."
 VALUE "FileDescription", "MonetDB ODBC Setup DLL"
-VALUE "FileVersion", "11.29.4"
+VALUE "FileVersion", "11.29.5"
 VALUE "InternalName", "libMonetODBCs.dll"
 VALUE "LegalCopyright", "Copyright © MonetDB B.V. 2008-2018"
 VALUE "OriginalFilename", "libMonetODBCs.dll"

MonetDB: Mar2018 - Updated library versions.

2018-05-25 Thread Panagiotis Koutsourakis
Changeset: eb2eff78c322 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=eb2eff78c322
Modified Files:
libversions
Branch: Mar2018
Log Message:

Updated library versions.


diffs (21 lines):

diff --git a/libversions b/libversions
--- a/libversions
+++ b/libversions
@@ -36,13 +36,13 @@
 
 # version of the GDK library (subdirectory gdk; also includes
 # common/options and common/utils)
-GDK_VERSION=16:1:0
+GDK_VERSION=16:2:0
 
 # version of the MAPI library (subdirectory clients/mapilib)
-MAPI_VERSION=10:0:0
+MAPI_VERSION=10:1:0
 
 # version of the MONETDB5 library (subdirectory monetdb5, not including extras)
-MONETDB5_VERSION=24:1:0
+MONETDB5_VERSION=24:2:0
 
 # version of the STREAM library (subdirectory common/stream)
-STREAM_VERSION=11:0:0
+STREAM_VERSION=11:1:0
___
checkin-list mailing list
checkin-list@monetdb.org
https://www.monetdb.org/mailman/listinfo/checkin-list


MonetDB: default - Merge with Mar2018 branch

2018-05-25 Thread Panagiotis Koutsourakis
Changeset: 2f72cb9133d4 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=2f72cb9133d4
Modified Files:
debian/fix-deb.sh
Branch: default
Log Message:

Merge with Mar2018 branch


diffs (12 lines):

diff --git a/debian/fix-deb.sh b/debian/fix-deb.sh
--- a/debian/fix-deb.sh
+++ b/debian/fix-deb.sh
@@ -65,5 +65,8 @@ wheezy)
 trusty)
 # the trusty linker produces unresolved references to openSSL functions
 sed -i '/openssl_LIBS/s/WIN32?//' clients/mapilib/Makefile.ag
+lib=$(grep openssl_LIBS clients/mapilib/Makefile.am)
+lib="${lib%% *}"
+sed -i "s/\\\$($lib)/\$(openssl_LIBS)/g" clients/mapilib/Makefile.am 
clients/mapilib/Makefile.in
 ;;
 esac
___
checkin-list mailing list
checkin-list@monetdb.org
https://www.monetdb.org/mailman/listinfo/checkin-list


MonetDB: default - Merge heads

2018-05-25 Thread Panagiotis Koutsourakis
Changeset: 8e633ed70cfa for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=8e633ed70cfa
Modified Files:
.hgtags
MonetDB.spec
NT/monetdb_config.h.in
NT/rules.msc
buildtools/ChangeLog-Archive
buildtools/ChangeLog.Mar2018
clients/mapilib/mapi.rc
clients/odbc/driver/driver.rc
clients/odbc/winsetup/setup.rc
configure.ag
debian/changelog
gdk/libbat.rc
libversions
monetdb5/tools/libmonetdb5.rc
sql/ChangeLog-Archive
sql/ChangeLog.Mar2018
vertoo.data
Branch: default
Log Message:

Merge heads


diffs (227 lines):

diff --git a/.hgtags b/.hgtags
--- a/.hgtags
+++ b/.hgtags
@@ -695,3 +695,5 @@ 28edc063ceb6a3726af887911a3e4ac4a33c504f
 f34a57f73307a09909b3669ce5cfd9aad490f317 Mar2018_3
 28edc063ceb6a3726af887911a3e4ac4a33c504f Mar2018_release
 f34a57f73307a09909b3669ce5cfd9aad490f317 Mar2018_release
+ee3d17d6f39930280f5aa914b42b87cda09008ca Mar2018_5
+ee3d17d6f39930280f5aa914b42b87cda09008ca Mar2018_SP1_release
diff --git a/MonetDB.spec b/MonetDB.spec
--- a/MonetDB.spec
+++ b/MonetDB.spec
@@ -132,7 +132,7 @@ Vendor: MonetDB BV <i...@monetdb.org>
 Group: Applications/Databases
 License: MPLv2.0
 URL: https://www.monetdb.org/
-Source: 
https://www.monetdb.org/downloads/sources/Mar2018/%{name}-%{version}.tar.bz2
+Source: 
https://www.monetdb.org/downloads/sources/Mar2018-SP1/%{name}-%{version}.tar.bz2
 
 # we need systemd for the _unitdir macro to exist
 # we need checkpolicy and selinux-policy-devel for the SELinux policy
@@ -1034,6 +1034,59 @@ done
 %postun -p /sbin/ldconfig
 
 %changelog
+* Fri May 25 2018 Panagiotis Koutsourakis <kutsu...@monetdbsolutions.com> - 
11.29.5-20180525
+- Rebuilt.
+- BZ#6562: Sqlitelogictest crash on group by query with not in operator
+- BZ#6565: Sqlitelogictest crash on complex select query with coalesce
+  call
+- BZ#6566: Sqlitelogictest unavailable calc.- MAL operations
+- BZ#6568: Sqlitelogictest crash on complex case query
+- BZ#6569: Sqlitelogictest select query with not between cause with
+  wrong results
+- BZ#6570: Sqlitelogictest select coalesce undefined calc
+- BZ#6572: ordered index Error in optimizer garbageCollector
+- BZ#6573: Sqlitelogictest crash on complex select query with case
+  statement
+- BZ#6574: server crashed could not find ordered index while creating
+  a table
+- BZ#6575: Sqlitelogictest crash on groupby query with coalesce call
+- BZ#6576: Sqlitelogictest aritmetic expressions with negative numbers
+  handling
+- BZ#6577: creating temp table kills performance of the original query
+- BZ#6578: One two-tuple insert gives different results than two single
+  inserts
+- BZ#6579: Sqlitelogic test infinite loop while compiling SQL query
+- BZ#6581: Join condition errors.
+- BZ#6583: Fixed size string concatenation with integer results in fixed
+  size string of size 0
+- BZ#6584: SELECT FROM REMOTE TABLE WHERE IS NOT NULL produces wrong
+  result
+- BZ#6585: Nested Merge tables cause an infinite loop in rel_optimizer
+- BZ#6587: Sqlitelogictest crash on complex case statement
+- BZ#6589: Sqlitelogictest crash on complex on complex expression
+- BZ#6594: Sqlitelogictest crash on complex case statement
+- BZ#6595: Remote decimal division triggers assertion / returns wrong
+  answer
+- BZ#6598: Python 3.4 not supported (due to usage of Py_DecodeLocale)
+- BZ#6600: Sqlitelogictest queries fail to execute
+- BZ#6601: "where is null" clause on remote table causes problem with
+  next query
+- BZ#6602: Sqlitelogictest wrong results in IN query
+- BZ#6603: Sqlitelogictest: Aggregation query with distinct clause
+  produces duplicated rows
+- BZ#6605: Sqlitelogictest set queries with wrong results
+
+* Thu May 17 2018 Martin van Dinther <martin.van.dint...@monetdbsolutions.com> 
- 11.29.5-20180525
+- sql: Corrected the definition of view: sys.ids.
+
+* Tue Apr  3 2018 Sjoerd Mullender <sjo...@acm.org> - 11.29.5-20180525
+- buildtools: On Linux and Unix, try not to link to libraries multiple times: 
that
+  only causes the code (and worse, the variables in those libraries) to be
+  included multiple times.  On Windows, we do need to link to libraries
+  multiple times (once for each DLL we create if the DLL references
+  anything from the library) but that doesn't cause the linked library
+  to be loaded multiple times.
+
 * Tue Mar 27 2018 Sjoerd Mullender <sjo...@acm.org> - 11.29.3-20180327
 - Rebuilt.
 - BZ#3824: Created table not visible from ODBC
diff --git a/buildtools/ChangeLog-Archive b/buildtools/ChangeLog-Archive
--- a/buildtools/ChangeLog-Archive
+++ b/buildtools/ChangeLog-Archive
@@ -1,6 +1,14 @@
 # DO NOT EDIT THIS FILE -- MAINTAINED AUTOMATICALLY
 # This file contains past ChangeLog entries
 
+* Tue Apr  3 2018 Sjoerd Mullender <sjo...@acm.org> - 11.29.5-20180525
+- On Linux and Unix, try not to link to libraries multiple times: that
+  only causes the cod

MonetDB: remote_auth - Merge with default

2018-05-25 Thread Panagiotis Koutsourakis
Changeset: f5a738b5b6e0 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=f5a738b5b6e0
Added Files:
sql/backends/monet5/UDF/capi/Tests/capi15.sql
sql/backends/monet5/UDF/capi/Tests/capi15.stable.err
sql/backends/monet5/UDF/capi/Tests/capi15.stable.out
sql/backends/monet5/UDF/capi/Tests/capi16.sql
sql/backends/monet5/UDF/capi/Tests/capi16.stable.err
sql/backends/monet5/UDF/capi/Tests/capi16.stable.out
sql/backends/monet5/UDF/capi/Tests/capi17.sql
sql/backends/monet5/UDF/capi/Tests/capi17.stable.err
sql/backends/monet5/UDF/capi/Tests/capi17.stable.out
sql/backends/monet5/UDF/capi/Tests/capi18.sql
sql/backends/monet5/UDF/capi/Tests/capi18.stable.err
sql/backends/monet5/UDF/capi/Tests/capi18.stable.out
Modified Files:
debian/fix-deb.sh
sql/backends/monet5/UDF/capi/Tests/All
sql/backends/monet5/UDF/capi/capi.c
sql/backends/monet5/UDF/capi/cheader.h
Branch: remote_auth
Log Message:

Merge with default


diffs (truncated from 1191 to 300 lines):

diff --git a/debian/fix-deb.sh b/debian/fix-deb.sh
--- a/debian/fix-deb.sh
+++ b/debian/fix-deb.sh
@@ -35,7 +35,7 @@ 1)
 esac
 
 case $SUITE in
-wheezy | precise | trusty)
+wheezy | trusty)
 # fix control file because these systems don't have liblas and a
 # too old version of libgeos
 sed -i -e 's/, libgeos-dev[^,]*//;s/, liblas-c-dev[^,]*//' \
@@ -47,7 +47,7 @@ wheezy | precise | trusty)
 esac
 
 case $SUITE in
-wheezy | jessie | precise | trusty | wily)
+wheezy | jessie | trusty | wily)
 # Xenial Xerus (and presumably newer releases) uses php-cli,
 # all others still have php5-cli and don't have php*-sockets
 sed -i 's/php-cli/php5-cli/;s/, *php-sockets//' debian/control
@@ -55,11 +55,18 @@ wheezy | jessie | precise | trusty | wil
 esac
 
 case $SUITE in
-wheezy | precise)
+wheezy)
 # numpy is too old
 sed -i -e 's/, python-dev[^,]*//;s/, python-numpy[^,]*//' \
-e '/^Package:.*monetdb-python2/,/^$/d' debian/control
 sed -i '/pyintegration=yes/s/yes/no/' debian/rules
 rm debian/monetdb-python2.install
 ;;
+trusty)
+# the trusty linker produces unresolved references to openSSL functions
+sed -i '/openssl_LIBS/s/WIN32?//' clients/mapilib/Makefile.ag
+lib=$(grep openssl_LIBS clients/mapilib/Makefile.am)
+lib="${lib%% *}"
+sed -i "s/\\\$($lib)/\$(openssl_LIBS)/g" clients/mapilib/Makefile.am 
clients/mapilib/Makefile.in
+;;
 esac
diff --git a/sql/backends/monet5/UDF/capi/Tests/All 
b/sql/backends/monet5/UDF/capi/Tests/All
--- a/sql/backends/monet5/UDF/capi/Tests/All
+++ b/sql/backends/monet5/UDF/capi/Tests/All
@@ -14,4 +14,6 @@ NOT_WIN32?capi11
 NOT_WIN32?capi12
 NOT_WIN32?capi13
 NOT_WIN32?capi14
-
+NOT_WIN32?capi15
+NOT_WIN32?capi16
+NOT_WIN32?capi17
diff --git a/sql/backends/monet5/UDF/capi/Tests/capi15.sql 
b/sql/backends/monet5/UDF/capi/Tests/capi15.sql
new file mode 100644
--- /dev/null
+++ b/sql/backends/monet5/UDF/capi/Tests/capi15.sql
@@ -0,0 +1,19 @@
+
+START TRANSACTION;
+
+CREATE FUNCTION capi16(i INTEGER, j STRING, k BLOB, l DATE, m TIMESTAMP, n 
TIME)
+RETURNS INTEGER
+LANGUAGE C {
+result->initialize(result, i.count);
+for(size_t it = 0; it < i.count; it++) {
+result->data[it] = i.data[it] * 2;
+}
+};
+
+CREATE TABLE capi16table(i INTEGER, j STRING, k BLOB, l DATE, m TIMESTAMP, n 
TIME);
+SELECT i, capi16(i, j, k, l, m, n) FROM capi16table;
+
+DROP TABLE capi16table;
+DROP FUNCTION capi16;
+
+ROLLBACK;
diff --git a/sql/backends/monet5/UDF/capi/Tests/capi15.stable.err 
b/sql/backends/monet5/UDF/capi/Tests/capi15.stable.err
new file mode 100644
--- /dev/null
+++ b/sql/backends/monet5/UDF/capi/Tests/capi15.stable.err
@@ -0,0 +1,35 @@
+stderr of test 'capi15` in directory 'sql/backends/monet5/UDF/capi` itself:
+
+
+# 14:47:44 >  
+# 14:47:44 >  "mserver5" "--debug=10" "--set" "gdk_nr_threads=0" "--set" 
"mapi_open=true" "--set" "mapi_port=32682" "--set" 
"mapi_usock=/var/tmp/mtest-72472/.s.monetdb.32682" "--set" "monet_prompt=" 
"--forcemito" 
"--dbpath=/Users/myth/opt/var/MonetDB/mTests_sql_backends_monet5_UDF_capi" 
"--set" "embedded_c=true"
+# 14:47:44 >  
+
+# 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 = 32682
+# cmdline opt  mapi_usock = /var/tmp/mtest-72472/.s.monetdb.32682
+# cmdline opt  monet_prompt = 
+# cmdline opt  gdk_dbpath = 
/Users/myth/opt/var/MonetDB/mTests_sql_backends_monet5_UDF_capi
+# cmdline opt  embedded_c = true
+# cmdline opt  gdk_debug = 553648138
+
+# 14:47:44 >  
+# 

MonetDB: remote_auth - Make the new sql function a system function

2018-05-24 Thread Panagiotis Koutsourakis
Changeset: 084f5cd70800 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=084f5cd70800
Modified Files:
sql/backends/monet5/sql_upgrades.c
Branch: remote_auth
Log Message:

Make the new sql function a system function


diffs (23 lines):

diff --git a/sql/backends/monet5/sql_upgrades.c 
b/sql/backends/monet5/sql_upgrades.c
--- a/sql/backends/monet5/sql_upgrades.c
+++ b/sql/backends/monet5/sql_upgrades.c
@@ -1550,15 +1550,17 @@ sql_update_remote_tables(Client c, mvc *
/* Create the SQL function needed to dump the remote table credentials 
*/
pos += snprintf(buf + pos, bufsize - pos, "set schema sys;\n");
pos += snprintf(buf + pos, bufsize - pos,
-   "create function sys.remote_table_credentials(tablename 
string)"
+   "create function sys.remote_table_credentials 
(tablename string)"
" returns table (\"uri\" string, \"username\" string, 
\"hash\" string)"
-   " external name sql.rt_credentials;\n");
+   " external name sql.rt_credentials;\n"
+   "insert into sys.systemfunctions (select id from 
sys.functions where name='remote_table_credentials' and id not in (select 
function_id from sys.systemfunctions));\n");
 
if (schema)
pos += snprintf(buf + pos, bufsize - pos, "set schema 
\"%s\";\n", schema);
pos += snprintf(buf + pos, bufsize - pos, "commit;\n");
 
assert(pos < bufsize);
+   printf("Running database upgrade commands:\n%s\n", buf);
err = SQLstatementIntern(c, , "create function", 1, 0, NULL);
if (err)
goto bailout;
___
checkin-list mailing list
checkin-list@monetdb.org
https://www.monetdb.org/mailman/listinfo/checkin-list


MonetDB: remote_auth - Merge with default

2018-05-24 Thread Panagiotis Koutsourakis
Changeset: 4751de1e20bb for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=4751de1e20bb
Added Files:
sql/test/BugTracker-2018/Tests/procedure-create-table.Bug-6604.sql

sql/test/BugTracker-2018/Tests/sqlitelogictest-cast-null-not-in.Bug-6605.sql

sql/test/BugTracker-2018/Tests/sqlitelogictest-cast-null-not-in.Bug-6605.stable.err

sql/test/BugTracker-2018/Tests/sqlitelogictest-cast-null-not-in.Bug-6605.stable.out

sql/test/BugTracker-2018/Tests/sqlitelogictest-groupby-coalesce-error-message.Bug-6608.sql

sql/test/BugTracker-2018/Tests/sqlitelogictest-groupby-coalesce-error-message.Bug-6608.stable.out
Modified Files:
MonetDB.spec
buildtools/selinux/monetdb.te
gdk/gdk_aggr.c
gdk/gdk_select.c
sql/ChangeLog.Mar2018
sql/backends/monet5/rel_bin.c
sql/backends/monet5/sql_upgrades.c
sql/scripts/21_dependency_views.sql
sql/server/rel_optimizer.c
sql/server/rel_psm.c
sql/server/rel_schema.c
sql/server/rel_select.c
sql/server/sql_parser.h
sql/server/sql_parser.y
sql/test/BugTracker-2014/Tests/temporary.Bug-3430.stable.err
sql/test/BugTracker-2018/Tests/All

sql/test/BugTracker-2018/Tests/sqlitelogictest-complex-case-not-in.Bug-6594.sql

sql/test/BugTracker-2018/Tests/sqlitelogictest-complex-case-not-in.Bug-6594.stable.out
sql/test/emptydb-upgrade-chain-hge/Tests/upgrade.stable.out.int128
sql/test/emptydb-upgrade-chain/Tests/upgrade.stable.out
sql/test/emptydb-upgrade-chain/Tests/upgrade.stable.out.32bit
sql/test/emptydb-upgrade-chain/Tests/upgrade.stable.out.int128
sql/test/emptydb-upgrade-chain/Tests/upgrade.stable.out.powerpc64.int128
sql/test/emptydb-upgrade-hge/Tests/upgrade.stable.out.int128
sql/test/emptydb-upgrade/Tests/upgrade.stable.out
sql/test/emptydb-upgrade/Tests/upgrade.stable.out.32bit
sql/test/emptydb-upgrade/Tests/upgrade.stable.out.int128
sql/test/emptydb/Tests/check.stable.out
sql/test/emptydb/Tests/check.stable.out.32bit
sql/test/emptydb/Tests/check.stable.out.int128
sql/test/orderidx/Tests/simpletable.sql
sql/test/orderidx/Tests/simpletable.stable.out
sql/test/orderidx/Tests/simpletable.stable.out.32bit
sql/test/orderidx/Tests/smalltable.sql
sql/test/orderidx/Tests/smalltable.stable.out
sql/test/orderidx/Tests/smalltable.stable.out.32bit
sql/test/pg_regress/Tests/vacuum.sql
sql/test/pg_regress/Tests/vacuum.stable.out
sql/test/testdb-upgrade-chain-hge/Tests/upgrade.stable.out.int128
sql/test/testdb-upgrade-chain/Tests/upgrade.stable.out
sql/test/testdb-upgrade-chain/Tests/upgrade.stable.out.32bit
sql/test/testdb-upgrade-chain/Tests/upgrade.stable.out.int128
sql/test/testdb-upgrade-hge/Tests/upgrade.stable.out.int128
sql/test/testdb-upgrade/Tests/upgrade.stable.out
sql/test/testdb-upgrade/Tests/upgrade.stable.out.32bit
sql/test/testdb-upgrade/Tests/upgrade.stable.out.int128
Branch: remote_auth
Log Message:

Merge with default


diffs (truncated from 2824 to 300 lines):

diff --git a/MonetDB.spec b/MonetDB.spec
--- a/MonetDB.spec
+++ b/MonetDB.spec
@@ -640,7 +640,6 @@ fi
 %exclude %{_libdir}/monetdb5/fits.mal
 %exclude %{_libdir}/monetdb5/autoload/*_fits.mal
 %exclude %{_libdir}/monetdb5/createdb/*_fits.sql
-%exclude %{_libdir}/monetdb5/lib_fits.so
 %endif
 %if %{?with_geos:1}%{!?with_geos:0}
 %exclude %{_libdir}/monetdb5/geom.mal
@@ -674,25 +673,16 @@ fi
 %endif
 %exclude %{_libdir}/monetdb5/autoload/??_sql*.mal
 %{_libdir}/monetdb5/autoload/*.mal
-%if %{?with_geos:1}%{!?with_geos:0}
-%exclude %{_libdir}/monetdb5/lib_geom.so
-%endif
-%if %{?with_lidar:1}%{!?with_lidar:0}
-%exclude %{_libdir}/monetdb5/lib_lidar.so
-%endif
-%if %{?with_pyintegration:1}%{!?with_pyintegration:0}
-%exclude %{_libdir}/monetdb5/lib_pyapi.so
-%endif
-%if %{?with_rintegration:1}%{!?with_rintegration:0}
-%exclude %{_libdir}/monetdb5/lib_rapi.so
-%endif
 %if %{?with_samtools:1}%{!?with_samtools:0}
 %exclude %{_libdir}/monetdb5/bam.mal
 %exclude %{_libdir}/monetdb5/autoload/*_bam.mal
-%exclude %{_libdir}/monetdb5/lib_bam.so
 %endif
-%exclude %{_libdir}/monetdb5/lib_sql.so
-%{_libdir}/monetdb5/*.so
+%{_libdir}/monetdb5/lib_capi.so
+%{_libdir}/monetdb5/lib_generator.so
+%{_libdir}/monetdb5/lib_lsst.so
+%{_libdir}/monetdb5/lib_opt_sql_append.so
+%{_libdir}/monetdb5/lib_udf.so
+%{_libdir}/monetdb5/lib_vault.so
 %doc %{_mandir}/man1/mserver5.1.gz
 %dir %{_datadir}/doc/MonetDB
 %docdir %{_datadir}/doc/MonetDB
diff --git a/buildtools/selinux/monetdb.te b/buildtools/selinux/monetdb.te
--- a/buildtools/selinux/monetdb.te
+++ b/buildtools/selinux/monetdb.te
@@ -1,7 +1,24 @@
-policy_module(monetdb, 0.2)
+policy_module(monetdb, 0.3)
 # The above line declares that this file is a SELinux policy file. Its
 # name 

MonetDB: remote_auth - Approve upgrade tests

2018-05-24 Thread Panagiotis Koutsourakis
Changeset: 35698c84743b for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=35698c84743b
Modified Files:
sql/test/emptydb-upgrade-chain-hge/Tests/upgrade.stable.out.int128
sql/test/emptydb-upgrade-chain/Tests/upgrade.stable.out
sql/test/emptydb-upgrade-chain/Tests/upgrade.stable.out.32bit
sql/test/emptydb-upgrade-chain/Tests/upgrade.stable.out.int128
sql/test/emptydb-upgrade-chain/Tests/upgrade.stable.out.powerpc64.int128
sql/test/emptydb-upgrade-hge/Tests/upgrade.stable.out.int128
sql/test/emptydb-upgrade/Tests/upgrade.stable.out.32bit
sql/test/emptydb-upgrade/Tests/upgrade.stable.out.int128
sql/test/emptydb/Tests/check.stable.out
sql/test/emptydb/Tests/check.stable.out.32bit
sql/test/emptydb/Tests/check.stable.out.int128
sql/test/testdb-upgrade-chain-hge/Tests/upgrade.stable.out.int128
sql/test/testdb-upgrade-chain/Tests/upgrade.stable.out
sql/test/testdb-upgrade-chain/Tests/upgrade.stable.out.32bit
sql/test/testdb-upgrade-chain/Tests/upgrade.stable.out.int128
sql/test/testdb-upgrade-hge/Tests/upgrade.stable.out.int128
sql/test/testdb-upgrade/Tests/upgrade.stable.out
sql/test/testdb-upgrade/Tests/upgrade.stable.out.32bit
sql/test/testdb-upgrade/Tests/upgrade.stable.out.int128
Branch: remote_auth
Log Message:

Approve upgrade tests


diffs (truncated from 436 to 300 lines):

diff --git a/sql/test/emptydb-upgrade-chain-hge/Tests/upgrade.stable.out.int128 
b/sql/test/emptydb-upgrade-chain-hge/Tests/upgrade.stable.out.int128
--- a/sql/test/emptydb-upgrade-chain-hge/Tests/upgrade.stable.out.int128
+++ b/sql/test/emptydb-upgrade-chain-hge/Tests/upgrade.stable.out.int128
@@ -45,9 +45,17 @@ insert into sys.systemfunctions (select 
 set schema "sys";
 commit;
 
-# 15:50:22 >  
-# 15:50:22 >  "mclient" "-lsql" "-ftest" "-tnone" "-Eutf-8" "-i" "-e" 
"--host=/var/tmp/mtest-17773" "--port=32731"
-# 15:50:22 >  
+Running database upgrade commands:
+set schema sys;
+create function sys.remote_table_credentials (tablename string) returns table 
("uri" string, "username" string, "hash" string) external name 
sql.rt_credentials;
+insert into sys.systemfunctions (select id from sys.functions where 
name='remote_table_credentials' and id not in (select function_id from 
sys.systemfunctions));
+set schema "sys";
+commit;
+
+
+# 15:17:55 >  
+# 15:17:55 >  "mclient" "-lsql" "-ftest" "-tnone" "-Eutf-8" "-i" "-e" 
"--host=/var/tmp/mtest-6495" "--port=30245"
+# 15:17:55 >  
 
 #select 1;
 % .L2 # table_name
diff --git a/sql/test/emptydb-upgrade-chain/Tests/upgrade.stable.out 
b/sql/test/emptydb-upgrade-chain/Tests/upgrade.stable.out
--- a/sql/test/emptydb-upgrade-chain/Tests/upgrade.stable.out
+++ b/sql/test/emptydb-upgrade-chain/Tests/upgrade.stable.out
@@ -45,6 +45,14 @@ insert into sys.systemfunctions (select 
 set schema "sys";
 commit;
 
+Running database upgrade commands:
+set schema sys;
+create function sys.remote_table_credentials (tablename string) returns table 
("uri" string, "username" string, "hash" string) external name 
sql.rt_credentials;
+insert into sys.systemfunctions (select id from sys.functions where 
name='remote_table_credentials' and id not in (select function_id from 
sys.systemfunctions));
+set schema "sys";
+commit;
+
+
 # 15:55:37 >  
 # 15:55:37 >  "mclient" "-lsql" "-ftest" "-tnone" "-Eutf-8" "-i" "-e" 
"--host=/var/tmp/mtest-12365" "--port=35877"
 # 15:55:37 >  
diff --git a/sql/test/emptydb-upgrade-chain/Tests/upgrade.stable.out.32bit 
b/sql/test/emptydb-upgrade-chain/Tests/upgrade.stable.out.32bit
--- a/sql/test/emptydb-upgrade-chain/Tests/upgrade.stable.out.32bit
+++ b/sql/test/emptydb-upgrade-chain/Tests/upgrade.stable.out.32bit
@@ -45,6 +45,14 @@ insert into sys.systemfunctions (select 
 set schema "sys";
 commit;
 
+Running database upgrade commands:
+set schema sys;
+create function sys.remote_table_credentials (tablename string) returns table 
("uri" string, "username" string, "hash" string) external name 
sql.rt_credentials;
+insert into sys.systemfunctions (select id from sys.functions where 
name='remote_table_credentials' and id not in (select function_id from 
sys.systemfunctions));
+set schema "sys";
+commit;
+
+
 # 16:02:52 >  
 # 16:02:52 >  "mclient" "-lsql" "-ftest" "-tnone" "-Eutf-8" "-i" "-e" 
"--host=/var/tmp/mtest-5391" "--port=32916"
 # 16:02:52 >  
diff --git a/sql/test/emptydb-upgrade-chain/Tests/upgrade.stable.out.int128 
b/sql/test/emptydb-upgrade-chain/Tests/upgrade.stable.out.int128
--- a/sql/test/emptydb-upgrade-chain/Tests/upgrade.stable.out.int128
+++ b/sql/test/emptydb-upgrade-chain/Tests/upgrade.stable.out.int128
@@ -5373,6 +5373,13 @@ insert into sys.systemfunctions (select 
 set schema "sys";
 commit;
 
+Running database upgrade commands:
+set schema sys;
+create function sys.remote_table_credentials (tablename string) returns table 
("uri" string, "username" string, "hash" string) external 

MonetDB: remote_auth - Add upgrade code for remote table authori...

2018-05-18 Thread Panagiotis Koutsourakis
Changeset: a1f7438227fc for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=a1f7438227fc
Modified Files:
sql/backends/monet5/sql_upgrades.c
Branch: remote_auth
Log Message:

Add upgrade code for remote table authorization

Any previously defined remote tables are going to be assigned the
credentials "monetdb"/"monetdb".


diffs (119 lines):

diff --git a/sql/backends/monet5/sql_upgrades.c 
b/sql/backends/monet5/sql_upgrades.c
--- a/sql/backends/monet5/sql_upgrades.c
+++ b/sql/backends/monet5/sql_upgrades.c
@@ -18,6 +18,9 @@
 #include 
 #include "sql_upgrades.h"
 
+#include "rel_remote.h"
+#include "mal_authorize.h"
+
 #ifdef HAVE_EMBEDDED
 #define printf(fmt,...) ((void) 0)
 #endif
@@ -1530,6 +1533,93 @@ sql_update_mar2018_sp1(Client c, mvc *sq
 }
 
 static str
+sql_update_remote_tables(Client c, mvc *sql)
+{
+   res_table *output;
+   str err = MAL_SUCCEED;
+   size_t bufsize = 1000, pos = 0;
+   char *buf;
+   char *schema;
+   BAT *tbl = NULL;
+   BAT *uri = NULL;
+
+   schema = stack_get_string(sql, "current_schema");
+   if ((buf = GDKmalloc(bufsize)) == NULL)
+   throw(SQL, "sql_update_remote_tables", SQLSTATE(HY001) 
MAL_MALLOC_FAIL);
+
+   /* Create the SQL function needed to dump the remote table credentials 
*/
+   pos += snprintf(buf + pos, bufsize - pos, "set schema sys;\n");
+   pos += snprintf(buf + pos, bufsize - pos,
+   "create function sys.remote_table_credentials(tablename 
string)"
+   " returns table (\"uri\" string, \"username\" string, 
\"hash\" string)"
+   " external name sql.rt_credentials;\n");
+
+   if (schema)
+   pos += snprintf(buf + pos, bufsize - pos, "set schema 
\"%s\";\n", schema);
+   pos += snprintf(buf + pos, bufsize - pos, "commit;\n");
+
+   assert(pos < bufsize);
+   err = SQLstatementIntern(c, , "create function", 1, 0, NULL);
+   if (err)
+   goto bailout;
+
+   pos = 0;
+   pos += snprintf(buf + pos, bufsize - pos,
+   "SELECT concat(concat(scm.name, '.'), tbl.name), 
tbl.query"
+   " FROM sys._tables AS tbl JOIN sys.schemas AS scm ON"
+   " tbl.schema_id=scm.id WHERE tbl.type=5;\n");
+
+   assert(pos < bufsize);
+
+   err = SQLstatementIntern(c, , "get remote table names", 1, 0, 
);
+   if (err)
+   goto bailout;
+
+   /* We executed the query, now process the results */
+   tbl = BATdescriptor(output->cols[0].b);
+   uri = BATdescriptor(output->cols[1].b);
+
+   if (tbl && uri) {
+   size_t cnt;
+   assert(BATcount(tbl) == BATcount(uri));
+   if ((cnt = BATcount(tbl)) > 0) {
+   BATiter tbl_it = bat_iterator(tbl);
+   BATiter uri_it = bat_iterator(uri);
+   const void *restrict nil = ATOMnilptr(tbl->ttype);
+   int (*cmp)(const void *, const void *) = 
ATOMcompare(tbl->ttype);
+   const char *v;
+   const char *u;
+   const char *remote_server_uri;
+
+   /* This is probably not correct: offsets? */
+   for (BUN i = 0; i < cnt; i++) {
+   v = BUNtail(tbl_it, i);
+   u = BUNtail(uri_it, i);
+   if (v == NULL || (*cmp)(v, nil) == 0 ||
+   u == NULL || (*cmp)(u, nil) == 0) {
+   BBPunfix(tbl->batCacheid);
+   BBPunfix(uri->batCacheid);
+   goto bailout;
+   }
+
+   /* Since the loop might fail, it might be a 
good idea
+* to update the credentials as a second step
+*/
+   remote_server_uri = mapiuri_uri((char *)u, 
sql->sa);
+   AUTHaddRemoteTableCredentials((char *)v, 
"monetdb", remote_server_uri, "monetdb", "monetdb", false);
+   }
+   }
+   BBPunfix(tbl->batCacheid);
+   BBPunfix(uri->batCacheid);
+   }
+   res_table_destroy(output);
+
+  bailout:
+   GDKfree(buf);
+   return err;
+}
+
+static str
 sql_update_default(Client c, mvc *sql)
 {
size_t bufsize = 1000, pos = 0;
@@ -1555,6 +1645,11 @@ sql_update_default(Client c, mvc *sql)
assert(pos < bufsize);
printf("Running database upgrade commands:\n%s\n", buf);
err = SQLstatementIntern(c, , "update", 1, 0, NULL);
+   if (err)
+   goto bailout;
+   err = sql_update_remote_tables(c, sql);
+
+  bailout:
GDKfree(buf);
return err; /* usually MAL_SUCCEED */
 }

MonetDB: Mar2018 - Updated library versions.

2018-05-31 Thread Panagiotis Koutsourakis
Changeset: 0d7c0ce7b3e2 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=0d7c0ce7b3e2
Modified Files:
libversions
Branch: Mar2018
Log Message:

Updated library versions.


diffs (12 lines):

diff --git a/libversions b/libversions
--- a/libversions
+++ b/libversions
@@ -42,7 +42,7 @@ GDK_VERSION=16:2:0
 MAPI_VERSION=10:1:0
 
 # version of the MONETDB5 library (subdirectory monetdb5, not including extras)
-MONETDB5_VERSION=24:2:0
+MONETDB5_VERSION=24:3:0
 
 # version of the STREAM library (subdirectory common/stream)
 STREAM_VERSION=11:1:0
___
checkin-list mailing list
checkin-list@monetdb.org
https://www.monetdb.org/mailman/listinfo/checkin-list


MonetDB: Mar2018 - Pre-release version number update.

2018-05-31 Thread Panagiotis Koutsourakis
Changeset: a6bbdc458ce2 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=a6bbdc458ce2
Modified Files:
MonetDB.spec
NT/monetdb_config.h.in
NT/rules.msc
clients/mapilib/mapi.rc
clients/odbc/driver/driver.rc
clients/odbc/winsetup/setup.rc
configure.ag
gdk/libbat.rc
monetdb5/tools/libmonetdb5.rc
vertoo.data
Branch: Mar2018
Log Message:

Pre-release version number update.


diffs (229 lines):

diff --git a/MonetDB.spec b/MonetDB.spec
--- a/MonetDB.spec
+++ b/MonetDB.spec
@@ -1,5 +1,5 @@
 %define name MonetDB
-%define version 11.29.6
+%define version 11.29.7
 %{!?buildno: %global buildno %(date +%Y%m%d)}
 
 # groups of related archs
diff --git a/NT/monetdb_config.h.in b/NT/monetdb_config.h.in
--- a/NT/monetdb_config.h.in
+++ b/NT/monetdb_config.h.in
@@ -642,7 +642,7 @@
 #define MONETDB5_PASSWDHASH_TOKEN SHA512
 
 /* Release name or "unreleased" */
-#define MONETDB_RELEASE "unreleased"
+#define MONETDB_RELEASE "Mar2018-SP1"
 
 /* Define if you do not want assertions */
 /* #undef NDEBUG */
@@ -666,7 +666,7 @@
 #define PACKAGE_URL "https://www.monetdb.org/;
 
 /* Define to the version of this package. */
-#define PACKAGE_VERSION "11.29.6"
+#define PACKAGE_VERSION "11.29.7"
 
 /* Path separator */
 #define PATH_SEP ';'
diff --git a/NT/rules.msc b/NT/rules.msc
--- a/NT/rules.msc
+++ b/NT/rules.msc
@@ -6,7 +6,7 @@
 #
 # Copyright 1997 - July 2008 CWI, August 2008 - 2018 MonetDB B.V.
 
-VERSION=11.29.6
+VERSION=11.29.7
 #   ^^
 # Maintained via vertoo. Please don't modify by hand!
 # Contact monetdb-develop...@lists.sourceforge.net for details and/or 
assistance.
diff --git a/clients/mapilib/mapi.rc b/clients/mapilib/mapi.rc
--- a/clients/mapilib/mapi.rc
+++ b/clients/mapilib/mapi.rc
@@ -3,8 +3,8 @@
 LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
 
 1 VERSIONINFO
-  FILEVERSION 11,29,6,1
-  PRODUCTVERSION 11,29,6,1
+  FILEVERSION 11,29,7,1
+  PRODUCTVERSION 11,29,7,1
   FILEFLAGSMASK 0x3fL
   FILEFLAGS 0
   FILEOS VOS_NT_WINDOWS32
@@ -18,7 +18,7 @@ BEGIN
   VALUE "Comments", "\0"
   VALUE "CompanyName", "MonetDB B.V.\0"
   VALUE "FileDescription", "MonetDB Application Interface DLL\0"
-  VALUE "FileVersion", "11.29.6\0"
+  VALUE "FileVersion", "11.29.7\0"
   //
   // Maintained via vertoo. Please don't modify by hand!
   // Contact monetdb-develop...@lists.sourceforge.net for details and/or 
assistance.
@@ -28,7 +28,7 @@ BEGIN
   VALUE "OriginalFilename", "Mapi.dll\0"
   VALUE "PrivateBuild", "\0"
   VALUE "ProductName", "MonetDB Client Libraries\0"
-  VALUE "ProductVersion", "11.29.6\0"
+  VALUE "ProductVersion", "11.29.7\0"
   //   
   // Maintained via vertoo. Please don't modify by hand!
   // Contact monetdb-develop...@lists.sourceforge.net for details and/or 
assistance.
diff --git a/clients/odbc/driver/driver.rc b/clients/odbc/driver/driver.rc
--- a/clients/odbc/driver/driver.rc
+++ b/clients/odbc/driver/driver.rc
@@ -3,8 +3,8 @@
 LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
 
 1 VERSIONINFO
-  FILEVERSION 11,29,6,1
-  PRODUCTVERSION 11,29,6,1
+  FILEVERSION 11,29,7,1
+  PRODUCTVERSION 11,29,7,1
   FILEFLAGSMASK 0x3fL
   FILEFLAGS 0
   FILEOS VOS_NT_WINDOWS32
@@ -18,7 +18,7 @@ BEGIN
   VALUE "Comments", "\0"
   VALUE "CompanyName", "MonetDB B.V.\0"
   VALUE "FileDescription", "MonetDB ODBC Driver DLL\0"
-  VALUE "FileVersion", "11.29.6\0"
+  VALUE "FileVersion", "11.29.7\0"
   //
   // Maintained via vertoo. Please don't modify by hand!
   // Contact monetdb-develop...@lists.sourceforge.net for details and/or 
assistance.
@@ -28,7 +28,7 @@ BEGIN
   VALUE "OriginalFilename", "libMonetODBC.dll\0"
   VALUE "PrivateBuild", "\0"
   VALUE "ProductName", "MonetDB SQL Server\0"
-  VALUE "ProductVersion", "11.29.6\0"
+  VALUE "ProductVersion", "11.29.7\0"
   //   
   // Maintained via vertoo. Please don't modify by hand!
   // Contact monetdb-develop...@lists.sourceforge.net for details and/or 
assistance.
diff --git a/clients/odbc/winsetup/setup.rc b/clients/odbc/winsetup/setup.rc
--- a/clients/odbc/winsetup/setup.rc
+++ b/clients/odbc/winsetup/setup.rc
@@ -62,8 +62,8 @@ END
 //
 
 VS_VERSION_INFO VERSIONINFO
- FILEVERSION 11,29,6,1
- PRODUCTVERSION 11,29,6,1
+ FILEVERSION 11,29,7,1
+ PRODUCTVERSION 11,29,7,1
  FILEFLAGSMASK 0x3fL
 #ifdef _DEBUG
  FILEFLAGS 0x1L
@@ -80,12 +80,12 @@ BEGIN
 BEGIN
 VALUE "CompanyName", "MonetDB B.V."
 VALUE "FileDescription", "MonetDB ODBC Setup DLL"
-VALUE "FileVersion", "11.29.6"
+VALUE "FileVersion", "11.29.7"
 VALUE "InternalName", "libMonetODBCs.dll"
 VALUE "LegalCopyright", "Copyright © MonetDB B.V. 2008-2018"
 VALUE "OriginalFilename", "libMonetODBCs.dll"

MonetDB: default - Merge with Mar2018 branch, not changing any f...

2018-05-31 Thread Panagiotis Koutsourakis
Changeset: 5e3514b1ffac for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=5e3514b1ffac
Modified Files:
MonetDB.spec
NT/monetdb_config.h.in
NT/rules.msc
clients/mapilib/mapi.rc
clients/odbc/driver/driver.rc
clients/odbc/winsetup/setup.rc
configure.ag
gdk/libbat.rc
monetdb5/tools/libmonetdb5.rc
vertoo.data
Branch: default
Log Message:

Merge with Mar2018 branch, not changing any files.

___
checkin-list mailing list
checkin-list@monetdb.org
https://www.monetdb.org/mailman/listinfo/checkin-list


MonetDB: Mar2018 - Moved contents of ChangeLog.Mar2018 to MonetD...

2018-05-31 Thread Panagiotis Koutsourakis
Changeset: e96bb94b4c9c for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=e96bb94b4c9c
Modified Files:
MonetDB.spec
debian/changelog
Branch: Mar2018
Log Message:

Moved contents of ChangeLog.Mar2018 to MonetDB.spec, debian/changelog and 
ChangeLog-Archive.


diffs (26 lines):

diff --git a/MonetDB.spec b/MonetDB.spec
--- a/MonetDB.spec
+++ b/MonetDB.spec
@@ -1036,6 +1036,9 @@ done
 %postun -p /sbin/ldconfig
 
 %changelog
+* Thu May 31 2018 Panagiotis Koutsourakis  - 
11.29.7-20180531
+- Rebuilt.
+
 * Fri May 25 2018 Panagiotis Koutsourakis  - 
11.29.5-20180525
 - Rebuilt.
 - BZ#6562: Sqlitelogictest crash on group by query with not in operator
diff --git a/debian/changelog b/debian/changelog
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,9 @@
+monetdb (11.29.7) unstable; urgency=low
+
+  * Rebuilt.
+
+ -- Panagiotis Koutsourakis   Thu, 31 May 2018 
10:17:56 +0200
+
 monetdb (11.29.5) unstable; urgency=low
 
   * Rebuilt.
___
checkin-list mailing list
checkin-list@monetdb.org
https://www.monetdb.org/mailman/listinfo/checkin-list


MonetDB: default - Merge with Mar2018 branch.

2018-05-31 Thread Panagiotis Koutsourakis
Changeset: dbd3be94d518 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=dbd3be94d518
Modified Files:
.hgtags
MonetDB.spec
debian/changelog
libversions
Branch: default
Log Message:

Merge with Mar2018 branch.


diffs (48 lines):

diff --git a/.hgtags b/.hgtags
--- a/.hgtags
+++ b/.hgtags
@@ -697,3 +697,6 @@ 28edc063ceb6a3726af887911a3e4ac4a33c504f
 f34a57f73307a09909b3669ce5cfd9aad490f317 Mar2018_release
 ee3d17d6f39930280f5aa914b42b87cda09008ca Mar2018_5
 ee3d17d6f39930280f5aa914b42b87cda09008ca Mar2018_SP1_release
+e96bb94b4c9c3b99e1c33d9c8b49bc3ce7f8e95b Mar2018_7
+ee3d17d6f39930280f5aa914b42b87cda09008ca Mar2018_SP1_release
+e96bb94b4c9c3b99e1c33d9c8b49bc3ce7f8e95b Mar2018_SP1_release
diff --git a/MonetDB.spec b/MonetDB.spec
--- a/MonetDB.spec
+++ b/MonetDB.spec
@@ -1033,6 +1033,9 @@ done
 %postun -p /sbin/ldconfig
 
 %changelog
+* Thu May 31 2018 Panagiotis Koutsourakis  - 
11.29.7-20180531
+- Rebuilt.
+
 * Fri May 25 2018 Panagiotis Koutsourakis  - 
11.29.5-20180525
 - Rebuilt.
 - BZ#6562: Sqlitelogictest crash on group by query with not in operator
diff --git a/debian/changelog b/debian/changelog
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,9 @@
+monetdb (11.29.7) unstable; urgency=low
+
+  * Rebuilt.
+
+ -- Panagiotis Koutsourakis   Thu, 31 May 2018 
10:17:56 +0200
+
 monetdb (11.29.5) unstable; urgency=low
 
   * Rebuilt.
diff --git a/libversions b/libversions
--- a/libversions
+++ b/libversions
@@ -42,7 +42,7 @@ GDK_VERSION=16:2:0
 MAPI_VERSION=10:1:0
 
 # version of the MONETDB5 library (subdirectory monetdb5, not including extras)
-MONETDB5_VERSION=24:2:0
+MONETDB5_VERSION=24:3:0
 
 # version of the STREAM library (subdirectory common/stream)
 STREAM_VERSION=11:1:0
___
checkin-list mailing list
checkin-list@monetdb.org
https://www.monetdb.org/mailman/listinfo/checkin-list


MonetDB: Mar2018 - Post release build.

2018-05-31 Thread Panagiotis Koutsourakis
Changeset: 5617b4e3ab72 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=5617b4e3ab72
Modified Files:
MonetDB.spec
NT/monetdb_config.h.in
NT/rules.msc
clients/mapilib/mapi.rc
clients/odbc/driver/driver.rc
clients/odbc/winsetup/setup.rc
configure.ag
gdk/libbat.rc
monetdb5/tools/libmonetdb5.rc
vertoo.data
Branch: Mar2018
Log Message:

Post release build.


diffs (229 lines):

diff --git a/MonetDB.spec b/MonetDB.spec
--- a/MonetDB.spec
+++ b/MonetDB.spec
@@ -1,5 +1,5 @@
 %define name MonetDB
-%define version 11.29.7
+%define version 11.29.8
 %{!?buildno: %global buildno %(date +%Y%m%d)}
 
 # groups of related archs
diff --git a/NT/monetdb_config.h.in b/NT/monetdb_config.h.in
--- a/NT/monetdb_config.h.in
+++ b/NT/monetdb_config.h.in
@@ -642,7 +642,7 @@
 #define MONETDB5_PASSWDHASH_TOKEN SHA512
 
 /* Release name or "unreleased" */
-#define MONETDB_RELEASE "Mar2018-SP1"
+#define MONETDB_RELEASE "unreleased"
 
 /* Define if you do not want assertions */
 /* #undef NDEBUG */
@@ -666,7 +666,7 @@
 #define PACKAGE_URL "https://www.monetdb.org/;
 
 /* Define to the version of this package. */
-#define PACKAGE_VERSION "11.29.7"
+#define PACKAGE_VERSION "11.29.8"
 
 /* Path separator */
 #define PATH_SEP ';'
diff --git a/NT/rules.msc b/NT/rules.msc
--- a/NT/rules.msc
+++ b/NT/rules.msc
@@ -6,7 +6,7 @@
 #
 # Copyright 1997 - July 2008 CWI, August 2008 - 2018 MonetDB B.V.
 
-VERSION=11.29.7
+VERSION=11.29.8
 #   ^^
 # Maintained via vertoo. Please don't modify by hand!
 # Contact monetdb-develop...@lists.sourceforge.net for details and/or 
assistance.
diff --git a/clients/mapilib/mapi.rc b/clients/mapilib/mapi.rc
--- a/clients/mapilib/mapi.rc
+++ b/clients/mapilib/mapi.rc
@@ -3,8 +3,8 @@
 LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
 
 1 VERSIONINFO
-  FILEVERSION 11,29,7,1
-  PRODUCTVERSION 11,29,7,1
+  FILEVERSION 11,29,8,1
+  PRODUCTVERSION 11,29,8,1
   FILEFLAGSMASK 0x3fL
   FILEFLAGS 0
   FILEOS VOS_NT_WINDOWS32
@@ -18,7 +18,7 @@ BEGIN
   VALUE "Comments", "\0"
   VALUE "CompanyName", "MonetDB B.V.\0"
   VALUE "FileDescription", "MonetDB Application Interface DLL\0"
-  VALUE "FileVersion", "11.29.7\0"
+  VALUE "FileVersion", "11.29.8\0"
   //
   // Maintained via vertoo. Please don't modify by hand!
   // Contact monetdb-develop...@lists.sourceforge.net for details and/or 
assistance.
@@ -28,7 +28,7 @@ BEGIN
   VALUE "OriginalFilename", "Mapi.dll\0"
   VALUE "PrivateBuild", "\0"
   VALUE "ProductName", "MonetDB Client Libraries\0"
-  VALUE "ProductVersion", "11.29.7\0"
+  VALUE "ProductVersion", "11.29.8\0"
   //   
   // Maintained via vertoo. Please don't modify by hand!
   // Contact monetdb-develop...@lists.sourceforge.net for details and/or 
assistance.
diff --git a/clients/odbc/driver/driver.rc b/clients/odbc/driver/driver.rc
--- a/clients/odbc/driver/driver.rc
+++ b/clients/odbc/driver/driver.rc
@@ -3,8 +3,8 @@
 LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
 
 1 VERSIONINFO
-  FILEVERSION 11,29,7,1
-  PRODUCTVERSION 11,29,7,1
+  FILEVERSION 11,29,8,1
+  PRODUCTVERSION 11,29,8,1
   FILEFLAGSMASK 0x3fL
   FILEFLAGS 0
   FILEOS VOS_NT_WINDOWS32
@@ -18,7 +18,7 @@ BEGIN
   VALUE "Comments", "\0"
   VALUE "CompanyName", "MonetDB B.V.\0"
   VALUE "FileDescription", "MonetDB ODBC Driver DLL\0"
-  VALUE "FileVersion", "11.29.7\0"
+  VALUE "FileVersion", "11.29.8\0"
   //
   // Maintained via vertoo. Please don't modify by hand!
   // Contact monetdb-develop...@lists.sourceforge.net for details and/or 
assistance.
@@ -28,7 +28,7 @@ BEGIN
   VALUE "OriginalFilename", "libMonetODBC.dll\0"
   VALUE "PrivateBuild", "\0"
   VALUE "ProductName", "MonetDB SQL Server\0"
-  VALUE "ProductVersion", "11.29.7\0"
+  VALUE "ProductVersion", "11.29.8\0"
   //   
   // Maintained via vertoo. Please don't modify by hand!
   // Contact monetdb-develop...@lists.sourceforge.net for details and/or 
assistance.
diff --git a/clients/odbc/winsetup/setup.rc b/clients/odbc/winsetup/setup.rc
--- a/clients/odbc/winsetup/setup.rc
+++ b/clients/odbc/winsetup/setup.rc
@@ -62,8 +62,8 @@ END
 //
 
 VS_VERSION_INFO VERSIONINFO
- FILEVERSION 11,29,7,1
- PRODUCTVERSION 11,29,7,1
+ FILEVERSION 11,29,8,1
+ PRODUCTVERSION 11,29,8,1
  FILEFLAGSMASK 0x3fL
 #ifdef _DEBUG
  FILEFLAGS 0x1L
@@ -80,12 +80,12 @@ BEGIN
 BEGIN
 VALUE "CompanyName", "MonetDB B.V."
 VALUE "FileDescription", "MonetDB ODBC Setup DLL"
-VALUE "FileVersion", "11.29.7"
+VALUE "FileVersion", "11.29.8"
 VALUE "InternalName", "libMonetODBCs.dll"
 VALUE "LegalCopyright", "Copyright © MonetDB B.V. 2008-2018"
 VALUE "OriginalFilename", "libMonetODBCs.dll"
 

MonetDB: Mar2018 - Setting tags Mar2018_7 and Mar2018_SP1 for th...

2018-05-31 Thread Panagiotis Koutsourakis
Changeset: ec9e67cd857e for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=ec9e67cd857e
Modified Files:
.hgtags
Branch: Mar2018
Log Message:

Setting tags Mar2018_7 and Mar2018_SP1 for the release build.


diffs (10 lines):

diff --git a/.hgtags b/.hgtags
--- a/.hgtags
+++ b/.hgtags
@@ -697,3 +697,6 @@ 28edc063ceb6a3726af887911a3e4ac4a33c504f
 f34a57f73307a09909b3669ce5cfd9aad490f317 Mar2018_release
 ee3d17d6f39930280f5aa914b42b87cda09008ca Mar2018_5
 ee3d17d6f39930280f5aa914b42b87cda09008ca Mar2018_SP1_release
+e96bb94b4c9c3b99e1c33d9c8b49bc3ce7f8e95b Mar2018_7
+ee3d17d6f39930280f5aa914b42b87cda09008ca Mar2018_SP1_release
+e96bb94b4c9c3b99e1c33d9c8b49bc3ce7f8e95b Mar2018_SP1_release
___
checkin-list mailing list
checkin-list@monetdb.org
https://www.monetdb.org/mailman/listinfo/checkin-list


MonetDB: default - Merge with Mar2018 branch, not changing any f...

2018-05-31 Thread Panagiotis Koutsourakis
Changeset: 139ddcc78aab for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=139ddcc78aab
Modified Files:
MonetDB.spec
NT/monetdb_config.h.in
NT/rules.msc
clients/mapilib/mapi.rc
clients/odbc/driver/driver.rc
clients/odbc/winsetup/setup.rc
configure.ag
gdk/libbat.rc
monetdb5/tools/libmonetdb5.rc
vertoo.data
Branch: default
Log Message:

Merge with Mar2018 branch, not changing any files..

___
checkin-list mailing list
checkin-list@monetdb.org
https://www.monetdb.org/mailman/listinfo/checkin-list


MonetDB: remote_auth - Handle aborted transactions correctly wrt...

2018-05-29 Thread Panagiotis Koutsourakis
Changeset: 0c91ad69feba for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=0c91ad69feba
Modified Files:
monetdb5/mal/mal_authorize.c
sql/backends/monet5/sql_gencode.c
Branch: remote_auth
Log Message:

Handle aborted transactions correctly wrt remote table creation

When `AUTHaddRemoteTableCredentials` finds an existing entry for the
table it was called for, we can safely overwrite this entry. See the
comment at the function for more details.


diffs (66 lines):

diff --git a/monetdb5/mal/mal_authorize.c b/monetdb5/mal/mal_authorize.c
--- a/monetdb5/mal/mal_authorize.c
+++ b/monetdb5/mal/mal_authorize.c
@@ -1046,8 +1046,49 @@ AUTHaddRemoteTableCredentials(const char
p = lookupRemoteTableKey(local_table);
 
if (p != BUN_NONE) {
-   /* key already in, just return */
-   return MAL_SUCCEED;
+   /* An entry with the given key is already in the vault (note: the
+* key is the string "schema.table_name", which is unique in the
+* SQL catalog, in the sense that no two tables can have the same
+* name in the same schema). This can only mean that the entry is
+* invalid (i.e. it does not correspond to a valid SQL table). To
+* see this consider the following:
+*
+* 1. The function `AUTHaddRemoteTableCredentials` is only called
+* from `rel_create_table` (also from the upgrade code, but this
+* is irrelevant for our discussion since, in this case no remote
+* table will have any credentials), i.e. when we are creating a
+* (remote) table.
+*
+* 2. If a remote table with name "schema.table_name" has been
+* defined previously (i.e there is already a SQL catalog entry
+* for it) and we try to define it again,
+* `AUTHaddRemoteTableCredentials` will *not* be called because we
+* are trying to define an already existing table, and the SQL
+* layer will not allow us to continue.
+*
+* 3. The only way to add an entry in the vault is calling this
+* function.
+*
+* Accepting (1)-(3) above means that just before
+* `AUTHaddRemoteTableCredentials` gets called with an argument
+* "schema.table_name", that table does not exist in the SQL
+* catalog.
+*
+* This means that if we call `AUTHaddRemoteTableCredentials` with
+* argument "schema.table_name" and find an entry with that key
+* already in the vault, we can safely overwrite it, because the
+* table it refers to does not exist in the SQL catalog. We can
+* also conclude that the previous entry was added in the vault as
+* part of a CREATE REMOTE TABLE call (conclusion follows from (1)
+* and (3)), that did not create a corresponding entry in the SQL
+* catalog (conclusion follows from (2)). The only (valid) way for
+* this to happen is if the CREATE REMOTE TABLE call was inside a
+* transaction that did not succeed.
+*
+* Implementation note: we first delete the entry and then add a
+* new entry with the same key.
+*/
+   AUTHdeleteRemoteTableCredentials(local_table);
}
 
if (pass == NULL) {
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
@@ -277,7 +277,6 @@ static int
MalBlkPtr curBlk = 0;
InstrPtr curInstr = 0, p, o;
Symbol backup = NULL;
-   // const char *uri = mapiuri_uri(prp->value, m->sa);
const char *local_tbl = prp->value;
node *n;
int i, q, v;
___
checkin-list mailing list
checkin-list@monetdb.org
https://www.monetdb.org/mailman/listinfo/checkin-list


MonetDB: remote_auth - We can return NULL when allocation fails

2018-05-29 Thread Panagiotis Koutsourakis
Changeset: 13a80778d3ac for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=13a80778d3ac
Modified Files:
sql/server/rel_distribute.c
Branch: remote_auth
Log Message:

We can return NULL when allocation fails


diffs (34 lines):

diff --git a/sql/server/rel_distribute.c b/sql/server/rel_distribute.c
--- a/sql/server/rel_distribute.c
+++ b/sql/server/rel_distribute.c
@@ -87,9 +87,14 @@ rewrite_replica( mvc *sql, sql_rel *rel,
 
/* set_remote() */
if (remote_prop && p && isRemote(p)) {
-   //TODO handle allocation failure
char *local_name = sa_strconcat(sql->sa, sa_strconcat(sql->sa, 
p->s->base.name, "."), p->base.name);
+   if (!local_name) {
+   return NULL;
+   }
prop *p = r->p = prop_create(sql->sa, PROP_REMOTE, r->p);
+   if (!p) {
+   return NULL;
+   }
 
p->value = local_name;
}
@@ -288,8 +293,14 @@ distribute(mvc *sql, sql_rel *rel)
if (t && isRemote(t)) {
//TODO: check for allocation failure
char *local_name = sa_strconcat(sql->sa, 
sa_strconcat(sql->sa, t->s->base.name, "."), t->base.name);
+   if (!local_name) {
+   return NULL;
+   }
 
p = rel->p = prop_create(sql->sa, PROP_REMOTE, rel->p);
+   if (!p) {
+   return NULL;
+   }
p->value = local_name;
}
break;
___
checkin-list mailing list
checkin-list@monetdb.org
https://www.monetdb.org/mailman/listinfo/checkin-list


MonetDB: remote_auth - Merge with default

2018-05-29 Thread Panagiotis Koutsourakis
Changeset: c360a431a190 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=c360a431a190
Modified Files:
MonetDB.spec
debian/monetdb5-server.install
Branch: remote_auth
Log Message:

Merge with default


diffs (30 lines):

diff --git a/MonetDB.spec b/MonetDB.spec
--- a/MonetDB.spec
+++ b/MonetDB.spec
@@ -679,7 +679,6 @@ fi
 %endif
 %{_libdir}/monetdb5/lib_capi.so
 %{_libdir}/monetdb5/lib_generator.so
-%{_libdir}/monetdb5/lib_lsst.so
 %{_libdir}/monetdb5/lib_opt_sql_append.so
 %{_libdir}/monetdb5/lib_udf.so
 %{_libdir}/monetdb5/lib_vault.so
diff --git a/debian/monetdb5-server.install b/debian/monetdb5-server.install
--- a/debian/monetdb5-server.install
+++ b/debian/monetdb5-server.install
@@ -3,7 +3,6 @@ debian/tmp/usr/lib/libmonetdb5.so.* usr/
 
 # usr/lib/monetdb5/lib_*.so EXCEPT: lib_{bam,geom,gsl,lidar,pyapi,rapi,sql}.so
 debian/tmp/usr/lib/monetdb5/lib_generator.so usr/lib/monetdb5
-debian/tmp/usr/lib/monetdb5/lib_lsst.so usr/lib/monetdb5
 debian/tmp/usr/lib/monetdb5/lib_opt_sql_append.so usr/lib/monetdb5
 debian/tmp/usr/lib/monetdb5/lib_udf.so usr/lib/monetdb5
 debian/tmp/usr/lib/monetdb5/lib_vault.so usr/lib/monetdb5
@@ -25,7 +24,6 @@ debian/tmp/usr/lib/monetdb5/u[!d]*.mal u
 debian/tmp/usr/lib/monetdb5/autoload/??_batcalc.mal usr/lib/monetdb5/autoload
 debian/tmp/usr/lib/monetdb5/autoload/??_calc.mal usr/lib/monetdb5/autoload
 debian/tmp/usr/lib/monetdb5/autoload/??_generator.mal usr/lib/monetdb5/autoload
-debian/tmp/usr/lib/monetdb5/autoload/??_lsst.mal usr/lib/monetdb5/autoload
 debian/tmp/usr/lib/monetdb5/autoload/??_opt_sql_append.mal 
usr/lib/monetdb5/autoload
 debian/tmp/usr/lib/monetdb5/autoload/??_udf.mal usr/lib/monetdb5/autoload
 debian/tmp/usr/lib/monetdb5/autoload/??_vault.mal usr/lib/monetdb5/autoload
___
checkin-list mailing list
checkin-list@monetdb.org
https://www.monetdb.org/mailman/listinfo/checkin-list


MonetDB: Mar2018 - Bug 6605 has not been fixed in Mar2018

2018-05-30 Thread Panagiotis Koutsourakis
Changeset: 437ba3315182 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=437ba3315182
Modified Files:
MonetDB.spec
debian/changelog
Branch: Mar2018
Log Message:

Bug 6605 has not been fixed in Mar2018


diffs (22 lines):

diff --git a/MonetDB.spec b/MonetDB.spec
--- a/MonetDB.spec
+++ b/MonetDB.spec
@@ -1074,7 +1074,6 @@ done
 - BZ#6602: Sqlitelogictest wrong results in IN query
 - BZ#6603: Sqlitelogictest: Aggregation query with distinct clause
   produces duplicated rows
-- BZ#6605: Sqlitelogictest set queries with wrong results
 
 * Thu May 17 2018 Martin van Dinther  
- 11.29.5-20180525
 - sql: Corrected the definition of view: sys.ids.
diff --git a/debian/changelog b/debian/changelog
--- a/debian/changelog
+++ b/debian/changelog
@@ -37,7 +37,6 @@ monetdb (11.29.5) unstable; urgency=low
   * BZ#6602: Sqlitelogictest wrong results in IN query
   * BZ#6603: Sqlitelogictest: Aggregation query with distinct clause
 produces duplicated rows
-  * BZ#6605: Sqlitelogictest set queries with wrong results
 
  -- Panagiotis Koutsourakis   Fri, 25 May 2018 
11:41:04 +0200
 
___
checkin-list mailing list
checkin-list@monetdb.org
https://www.monetdb.org/mailman/listinfo/checkin-list


MonetDB: default - Merge with Mar2018 branch

2018-05-30 Thread Panagiotis Koutsourakis
Changeset: 2715167a998d for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=2715167a998d
Modified Files:
MonetDB.spec
debian/changelog
Branch: default
Log Message:

Merge with Mar2018 branch


diffs (22 lines):

diff --git a/MonetDB.spec b/MonetDB.spec
--- a/MonetDB.spec
+++ b/MonetDB.spec
@@ -1071,7 +1071,6 @@ done
 - BZ#6602: Sqlitelogictest wrong results in IN query
 - BZ#6603: Sqlitelogictest: Aggregation query with distinct clause
   produces duplicated rows
-- BZ#6605: Sqlitelogictest set queries with wrong results
 
 * Thu May 17 2018 Martin van Dinther  
- 11.29.5-20180525
 - sql: Corrected the definition of view: sys.ids.
diff --git a/debian/changelog b/debian/changelog
--- a/debian/changelog
+++ b/debian/changelog
@@ -37,7 +37,6 @@ monetdb (11.29.5) unstable; urgency=low
   * BZ#6602: Sqlitelogictest wrong results in IN query
   * BZ#6603: Sqlitelogictest: Aggregation query with distinct clause
 produces duplicated rows
-  * BZ#6605: Sqlitelogictest set queries with wrong results
 
  -- Panagiotis Koutsourakis   Fri, 25 May 2018 
11:41:04 +0200
 
___
checkin-list mailing list
checkin-list@monetdb.org
https://www.monetdb.org/mailman/listinfo/checkin-list


MonetDB: default - Merge remote_auth into default branch

2018-05-29 Thread Panagiotis Koutsourakis
Changeset: fba25b4e2d46 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=fba25b4e2d46
Added Files:
sql/test/remote/Tests/creds.SQL.py.in
sql/test/remote/Tests/creds.stable.err
sql/test/remote/Tests/creds.stable.out
sql/test/remote/Tests/different_user.SQL.py.in
sql/test/remote/Tests/different_user.stable.err
sql/test/remote/Tests/different_user.stable.out
sql/test/remote/Tests/invalid_creds.SQL.py.in
sql/test/remote/Tests/invalid_creds.stable.err
sql/test/remote/Tests/invalid_creds.stable.out
Modified Files:
clients/Tests/MAL-signatures.stable.out
clients/Tests/MAL-signatures.stable.out.int128
clients/Tests/exports.stable.out
clients/mapiclient/dump.c
monetdb5/mal/mal_authorize.c
monetdb5/mal/mal_authorize.h
monetdb5/modules/mal/remote.c
monetdb5/modules/mal/remote.h
monetdb5/modules/mal/remote.mal
sql/backends/monet5/sql.c
sql/backends/monet5/sql.h
sql/backends/monet5/sql.mal
sql/backends/monet5/sql_gencode.c
sql/backends/monet5/sql_upgrades.c
sql/scripts/22_clients.sql
sql/server/rel_distribute.c
sql/server/rel_psm.c
sql/server/rel_schema.c
sql/server/rel_schema.h
sql/server/sql_mvc.c
sql/server/sql_parser.y
sql/server/sql_semantic.c

sql/test/BugTracker-2015/Tests/msqldump-merge-and-remote-tables.Bug-3774.stable.out
sql/test/BugTracker-2015/Tests/schemadiff.Bug-3778.stable.out
sql/test/emptydb-upgrade-chain-hge/Tests/upgrade.stable.out.int128
sql/test/emptydb-upgrade-chain/Tests/upgrade.stable.out
sql/test/emptydb-upgrade-chain/Tests/upgrade.stable.out.32bit
sql/test/emptydb-upgrade-chain/Tests/upgrade.stable.out.int128
sql/test/emptydb-upgrade-chain/Tests/upgrade.stable.out.powerpc64.int128
sql/test/emptydb-upgrade-hge/Tests/upgrade.stable.out.int128
sql/test/emptydb-upgrade/Tests/upgrade.stable.out.32bit
sql/test/emptydb-upgrade/Tests/upgrade.stable.out.int128
sql/test/emptydb/Tests/check.stable.out
sql/test/emptydb/Tests/check.stable.out.32bit
sql/test/emptydb/Tests/check.stable.out.int128
sql/test/remote/Tests/All
sql/test/remote/Tests/ssbm.SQL.py
sql/test/testdb-upgrade-chain-hge/Tests/upgrade.stable.out.int128
sql/test/testdb-upgrade-chain/Tests/upgrade.stable.out
sql/test/testdb-upgrade-chain/Tests/upgrade.stable.out.32bit
sql/test/testdb-upgrade-chain/Tests/upgrade.stable.out.int128
sql/test/testdb-upgrade-hge/Tests/upgrade.stable.out.int128
sql/test/testdb-upgrade/Tests/upgrade.stable.out
sql/test/testdb-upgrade/Tests/upgrade.stable.out.32bit
sql/test/testdb-upgrade/Tests/upgrade.stable.out.int128
Branch: default
Log Message:

Merge remote_auth into default branch


diffs (truncated from 2537 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
@@ -10760,6 +10760,7 @@ Ready.
 [ "remote","bintype",  "pattern remote.bintype():void ",   
"RMTbintype;",  "print the binary type of this mserver5"]
 [ "remote","connect",  "command remote.connect(uri:str, user:str, 
passwd:str):str ",   "RMTconnect;",  "returns a newly created connection for 
uri, using user name and password"  ]
 [ "remote","connect",  "command remote.connect(uri:str, user:str, 
passwd:str, scen:str):str ", "RMTconnectScen;",  "returns a newly created 
connection for uri, using user name, password and scenario"]
+[ "remote","connect",  "pattern remote.connect(table:str, 
schen:str):str ","RMTconnectTable;", "return a newly created connection 
for a table. username and password should be in the vault"   ]
 [ "remote","disconnect",   "command remote.disconnect(conn:str):void ",
"RMTdisconnect;",   "disconnects the connection pointed to by handle 
(received from a call to connect()"]
 [ "remote","epilogue", "command remote.epilogue():void ",  
"RMTepilogue;", "release the resources held by the remote module"   ]
 [ "remote","exec", "pattern remote.exec(conn:str, mod:str, func:str):str 
","RMTexec;", "remotely executes . and returns the 
handle to its result"   ]
@@ -10895,6 +10896,7 @@ Ready.
 [ "sql",   "round","command sql.round(v:lng, d:int, s:int, 
r:bte):lng ",   "lng_round_wrap;",  "round off the decimal v(d,s) to r 
digits behind the dot (if r < 0, before the dot)"]
 [ "sql",   "round","command sql.round(v:sht, d:int, s:int, 
r:bte):sht ",   "sht_round_wrap;",  "round off the decimal v(d,s) to r 
digits behind the dot (if r < 0, before the dot)"]
 [ "sql",   "row_number",   "pattern 

MonetDB: remote_auth - Closing remote_auth branch

2018-05-29 Thread Panagiotis Koutsourakis
Changeset: 489921341f9e for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=489921341f9e
Branch: remote_auth
Log Message:

Closing remote_auth branch

___
checkin-list mailing list
checkin-list@monetdb.org
https://www.monetdb.org/mailman/listinfo/checkin-list


MonetDB: Mar2018 - Remove bugfixes that happened on default from...

2018-05-28 Thread Panagiotis Koutsourakis
Changeset: 7ab94e24805d for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=7ab94e24805d
Modified Files:
MonetDB.spec
debian/changelog
Branch: Mar2018
Log Message:

Remove bugfixes that happened on default from changelogs


diffs (34 lines):

diff --git a/MonetDB.spec b/MonetDB.spec
--- a/MonetDB.spec
+++ b/MonetDB.spec
@@ -1051,13 +1051,11 @@ done
   statement
 - BZ#6574: server crashed could not find ordered index while creating
   a table
-- BZ#6575: Sqlitelogictest crash on groupby query with coalesce call
 - BZ#6576: Sqlitelogictest aritmetic expressions with negative numbers
   handling
 - BZ#6577: creating temp table kills performance of the original query
 - BZ#6578: One two-tuple insert gives different results than two single
   inserts
-- BZ#6579: Sqlitelogic test infinite loop while compiling SQL query
 - BZ#6581: Join condition errors.
 - BZ#6583: Fixed size string concatenation with integer results in fixed
   size string of size 0
diff --git a/debian/changelog b/debian/changelog
--- a/debian/changelog
+++ b/debian/changelog
@@ -14,13 +14,11 @@ monetdb (11.29.5) unstable; urgency=low
 statement
   * BZ#6574: server crashed could not find ordered index while creating
 a table
-  * BZ#6575: Sqlitelogictest crash on groupby query with coalesce call
   * BZ#6576: Sqlitelogictest aritmetic expressions with negative numbers
 handling
   * BZ#6577: creating temp table kills performance of the original query
   * BZ#6578: One two-tuple insert gives different results than two single
 inserts
-  * BZ#6579: Sqlitelogic test infinite loop while compiling SQL query
   * BZ#6581: Join condition errors.
   * BZ#6583: Fixed size string concatenation with integer results in fixed
 size string of size 0
___
checkin-list mailing list
checkin-list@monetdb.org
https://www.monetdb.org/mailman/listinfo/checkin-list


MonetDB: default - Merge with Mar2018

2018-05-30 Thread Panagiotis Koutsourakis
Changeset: a07cc34d9dcb for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=a07cc34d9dcb
Branch: default
Log Message:

Merge with Mar2018

___
checkin-list mailing list
checkin-list@monetdb.org
https://www.monetdb.org/mailman/listinfo/checkin-list


MonetDB: remote_auth - Merge with default

2018-05-28 Thread Panagiotis Koutsourakis
Changeset: d6e73d6b9447 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=d6e73d6b9447
Removed Files:
sql/backends/monet5/LSST/80_lsst.mal
sql/backends/monet5/LSST/Makefile.ag
sql/backends/monet5/LSST/Tests/All
sql/backends/monet5/LSST/Tests/lsst.sql.src
sql/backends/monet5/LSST/Tests/lsst.stable.err
sql/backends/monet5/LSST/Tests/lsst.stable.out
sql/backends/monet5/LSST/Tests/lsst_htmxmatch.reqtests
sql/backends/monet5/LSST/Tests/lsst_htmxmatch.sql
sql/backends/monet5/LSST/Tests/lsst_htmxmatch.stable.err
sql/backends/monet5/LSST/Tests/lsst_htmxmatch.stable.out
sql/backends/monet5/LSST/lsst.c
sql/backends/monet5/LSST/lsst.h
sql/backends/monet5/LSST/lsst.mal
sql/backends/monet5/LSST/lsst.sql
Modified Files:
.hgtags
ChangeLog
MonetDB.spec
buildtools/ChangeLog-Archive
buildtools/ChangeLog.Mar2018
clients/Tests/MAL-signatures.stable.out
clients/Tests/MAL-signatures.stable.out.int128
clients/mapiclient/Tests/mclient--help.stable.err
clients/mapiclient/Tests/mclient--help.stable.err.Windows
clients/mapiclient/mclient.c
debian/changelog
libversions
monetdb5/ChangeLog
sql/ChangeLog-Archive
sql/ChangeLog.Mar2018
sql/backends/monet5/Makefile.ag
testing/README
Branch: remote_auth
Log Message:

Merge with default


diffs (truncated from 1643 to 300 lines):

diff --git a/.hgtags b/.hgtags
--- a/.hgtags
+++ b/.hgtags
@@ -695,3 +695,5 @@ 28edc063ceb6a3726af887911a3e4ac4a33c504f
 f34a57f73307a09909b3669ce5cfd9aad490f317 Mar2018_3
 28edc063ceb6a3726af887911a3e4ac4a33c504f Mar2018_release
 f34a57f73307a09909b3669ce5cfd9aad490f317 Mar2018_release
+ee3d17d6f39930280f5aa914b42b87cda09008ca Mar2018_5
+ee3d17d6f39930280f5aa914b42b87cda09008ca Mar2018_SP1_release
diff --git a/ChangeLog b/ChangeLog
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,9 @@
 # ChangeLog file for devel
 # This file is updated with Maddlog
 
+* Fri May 25 2018 Ying Zhang <y.zh...@cwi.nl>
+- Added a '-f rowcount' option in mclient to repress printing the actual
+  data of a resultset, but only print the number of returned tuples
+
 * Tue Feb 13 2018 Pedro Ferreira <pedro.ferre...@monetdbsolutions.com>
 - Added support for lz4 compressed files on stream library
diff --git a/MonetDB.spec b/MonetDB.spec
--- a/MonetDB.spec
+++ b/MonetDB.spec
@@ -132,7 +132,7 @@ Vendor: MonetDB BV <i...@monetdb.org>
 Group: Applications/Databases
 License: MPLv2.0
 URL: https://www.monetdb.org/
-Source: 
https://www.monetdb.org/downloads/sources/Mar2018/%{name}-%{version}.tar.bz2
+Source: 
https://www.monetdb.org/downloads/sources/Mar2018-SP1/%{name}-%{version}.tar.bz2
 
 # we need systemd for the _unitdir macro to exist
 # we need checkpolicy and selinux-policy-devel for the SELinux policy
@@ -1034,6 +1034,59 @@ done
 %postun -p /sbin/ldconfig
 
 %changelog
+* Fri May 25 2018 Panagiotis Koutsourakis <kutsu...@monetdbsolutions.com> - 
11.29.5-20180525
+- Rebuilt.
+- BZ#6562: Sqlitelogictest crash on group by query with not in operator
+- BZ#6565: Sqlitelogictest crash on complex select query with coalesce
+  call
+- BZ#6566: Sqlitelogictest unavailable calc.- MAL operations
+- BZ#6568: Sqlitelogictest crash on complex case query
+- BZ#6569: Sqlitelogictest select query with not between cause with
+  wrong results
+- BZ#6570: Sqlitelogictest select coalesce undefined calc
+- BZ#6572: ordered index Error in optimizer garbageCollector
+- BZ#6573: Sqlitelogictest crash on complex select query with case
+  statement
+- BZ#6574: server crashed could not find ordered index while creating
+  a table
+- BZ#6575: Sqlitelogictest crash on groupby query with coalesce call
+- BZ#6576: Sqlitelogictest aritmetic expressions with negative numbers
+  handling
+- BZ#6577: creating temp table kills performance of the original query
+- BZ#6578: One two-tuple insert gives different results than two single
+  inserts
+- BZ#6579: Sqlitelogic test infinite loop while compiling SQL query
+- BZ#6581: Join condition errors.
+- BZ#6583: Fixed size string concatenation with integer results in fixed
+  size string of size 0
+- BZ#6584: SELECT FROM REMOTE TABLE WHERE IS NOT NULL produces wrong
+  result
+- BZ#6585: Nested Merge tables cause an infinite loop in rel_optimizer
+- BZ#6587: Sqlitelogictest crash on complex case statement
+- BZ#6589: Sqlitelogictest crash on complex on complex expression
+- BZ#6594: Sqlitelogictest crash on complex case statement
+- BZ#6595: Remote decimal division triggers assertion / returns wrong
+  answer
+- BZ#6598: Python 3.4 not supported (due to usage of Py_DecodeLocale)
+- BZ#6600: Sqlitelogictest queries fail to execute
+- BZ#6601: "where is null" clause on remote table causes problem with
+  next query
+- BZ#6602: Sqlitelogictest wrong results in IN query
+- BZ#6603: 

MonetDB: remote_auth - Name changes

2018-05-02 Thread Panagiotis Koutsourakis
Changeset: 5e6286897a83 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=5e6286897a83
Modified Files:
monetdb5/modules/mal/remote.c
monetdb5/modules/mal/remote.h
monetdb5/modules/mal/remote.mal
Branch: remote_auth
Log Message:

Name changes


diffs (40 lines):

diff --git a/monetdb5/modules/mal/remote.c b/monetdb5/modules/mal/remote.c
--- a/monetdb5/modules/mal/remote.c
+++ b/monetdb5/modules/mal/remote.c
@@ -258,7 +258,7 @@ str RMTconnect(
 }
 
 str
-RMTconnectURI(Client cntxt, MalBlkPtr mb, MalStkPtr stk, InstrPtr pci)
+RMTconnectTable(Client cntxt, MalBlkPtr mb, MalStkPtr stk, InstrPtr pci)
 {
char *local_table;
char *remoteuser;
diff --git a/monetdb5/modules/mal/remote.h b/monetdb5/modules/mal/remote.h
--- a/monetdb5/modules/mal/remote.h
+++ b/monetdb5/modules/mal/remote.h
@@ -51,7 +51,7 @@ mal_export str RMTepilogue(void *ret);
 mal_export str RMTresolve(bat *ret, str *pat);
 mal_export str RMTconnectScen( str *ret, str *ouri, str *user, str *passwd, 
str *scen);
 mal_export str RMTconnect( str *ret, str *uri, str *user, str *passwd);
-mal_export str RMTconnectURI(Client cntxt, MalBlkPtr mb, MalStkPtr stk, 
InstrPtr pci);
+mal_export str RMTconnectTable(Client cntxt, MalBlkPtr mb, MalStkPtr stk, 
InstrPtr pci);
 
 mal_export str RMTdisconnect(void *ret, str *conn);
 mal_export str RMTget(Client cntxt, MalBlkPtr mb, MalStkPtr stk, InstrPtr pci);
diff --git a/monetdb5/modules/mal/remote.mal b/monetdb5/modules/mal/remote.mal
--- a/monetdb5/modules/mal/remote.mal
+++ b/monetdb5/modules/mal/remote.mal
@@ -24,9 +24,9 @@ comment "returns a newly created connect
 command connect(uri:str, user:str, passwd:str, scen:str):str
 address RMTconnectScen
 comment "returns a newly created connection for uri, using user name, password 
and scenario";
-pattern connect(uri:str, schen:str):str
-address RMTconnectURI
-comment "return a newly created connection for uri. username and password 
should be in the vault"
+pattern connect(table:str, schen:str):str
+address RMTconnectTable
+comment "return a newly created connection for a table. username and password 
should be in the vault"
 
 command disconnect(conn:str):void
 address RMTdisconnect
___
checkin-list mailing list
checkin-list@monetdb.org
https://www.monetdb.org/mailman/listinfo/checkin-list


MonetDB: remote_auth - Fix appending and committing to the remot...

2018-05-02 Thread Panagiotis Koutsourakis
Changeset: 8778dad5cb7f for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=8778dad5cb7f
Modified Files:
monetdb5/mal/mal_authorize.c
Branch: remote_auth
Log Message:

Fix appending and committing to the remote table vault BATs


diffs (92 lines):

diff --git a/monetdb5/mal/mal_authorize.c b/monetdb5/mal/mal_authorize.c
--- a/monetdb5/mal/mal_authorize.c
+++ b/monetdb5/mal/mal_authorize.c
@@ -138,7 +138,7 @@ AUTHrequireAdminOrUser(Client cntxt, con
 static void
 AUTHcommit(void)
 {
-   bat blist[4];
+   bat blist[9];
 
blist[0] = 0;
 
@@ -148,7 +148,17 @@ AUTHcommit(void)
blist[2] = pass->batCacheid;
assert(duser);
blist[3] = duser->batCacheid;
-   TMsubcommit_list(blist, 4);
+   assert(rt_key);
+   blist[4] = rt_key->batCacheid;
+   assert(rt_uri);
+   blist[5] = rt_uri->batCacheid;
+   assert(rt_remoteuser);
+   blist[6] = rt_remoteuser->batCacheid;
+   assert(rt_hashedpwd);
+   blist[7] = rt_hashedpwd->batCacheid;
+   assert(rt_deleted);
+   blist[8] = rt_deleted->batCacheid;
+   TMsubcommit_list(blist, 9);
 }
 
 /*
@@ -261,7 +271,11 @@ AUTHinitTables(const char *passwd) {
AUTHcommit();
}
else {
+   int dbg = GDKdebug;
+   /* don't check this bat since we'll fix it below */
+   GDKdebug &= ~CHECKMASK;
rt_key = BATdescriptor(bid);
+   GDKdebug = dbg;
if (rt_key == NULL) {
throw(MAL, "initTables.rt_key", SQLSTATE(HY002) 
RUNTIME_OBJECT_MISSING);
}
@@ -283,7 +297,11 @@ AUTHinitTables(const char *passwd) {
AUTHcommit();
}
else {
+   int dbg = GDKdebug;
+   /* don't check this bat since we'll fix it below */
+   GDKdebug &= ~CHECKMASK;
rt_uri = BATdescriptor(bid);
+   GDKdebug = dbg;
if (rt_uri == NULL) {
throw(MAL, "initTables.rt_uri", SQLSTATE(HY002) 
RUNTIME_OBJECT_MISSING);
}
@@ -305,7 +323,11 @@ AUTHinitTables(const char *passwd) {
AUTHcommit();
}
else {
+   int dbg = GDKdebug;
+   /* don't check this bat since we'll fix it below */
+   GDKdebug &= ~CHECKMASK;
rt_remoteuser = BATdescriptor(bid);
+   GDKdebug = dbg;
if (rt_remoteuser == NULL) {
throw(MAL, "initTables.rt_remoteuser", SQLSTATE(HY002) 
RUNTIME_OBJECT_MISSING);
}
@@ -327,7 +349,11 @@ AUTHinitTables(const char *passwd) {
AUTHcommit();
}
else {
+   int dbg = GDKdebug;
+   /* don't check this bat since we'll fix it below */
+   GDKdebug &= ~CHECKMASK;
rt_hashedpwd = BATdescriptor(bid);
+   GDKdebug = dbg;
if (rt_hashedpwd == NULL) {
throw(MAL, "initTables.rt_hashedpwd", SQLSTATE(HY002) 
RUNTIME_OBJECT_MISSING);
}
@@ -1041,9 +1067,9 @@ AUTHaddRemoteTableCredentials(const char
rethrow("addRemoteTableCredentials", tmp, AUTHcypherValue(, 
pwhash));
 
/* Add entry */
-   bool table_entry = (BUNappend(rt_key, local_table, TRUE) == GDK_SUCCEED 
||
-   BUNappend(rt_uri, uri, TRUE) == 
GDK_SUCCEED ||
-   BUNappend(rt_remoteuser, 
remoteuser, TRUE) == GDK_SUCCEED ||
+   bool table_entry = (BUNappend(rt_key, local_table, TRUE) == GDK_SUCCEED 
&&
+   BUNappend(rt_uri, uri, TRUE) == 
GDK_SUCCEED &&
+   BUNappend(rt_remoteuser, 
remoteuser, TRUE) == GDK_SUCCEED &&
BUNappend(rt_hashedpwd, cypher, 
TRUE) == GDK_SUCCEED);
 
if (!table_entry) {
___
checkin-list mailing list
checkin-list@monetdb.org
https://www.monetdb.org/mailman/listinfo/checkin-list


MonetDB: remote_auth - Approve new output for existing tests

2018-05-02 Thread Panagiotis Koutsourakis
Changeset: d8deae162302 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=d8deae162302
Modified Files:
clients/Tests/MAL-signatures.stable.out
clients/Tests/MAL-signatures.stable.out.int128
clients/Tests/exports.stable.out
Branch: remote_auth
Log Message:

Approve new output for existing tests


diffs (47 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
@@ -10768,6 +10768,7 @@ Ready.
 [ "remote","bintype",  "pattern remote.bintype():void ",   
"RMTbintype;",  "print the binary type of this mserver5"]
 [ "remote","connect",  "command remote.connect(uri:str, user:str, 
passwd:str):str ",   "RMTconnect;",  "returns a newly created connection for 
uri, using user name and password"  ]
 [ "remote","connect",  "command remote.connect(uri:str, user:str, 
passwd:str, scen:str):str ", "RMTconnectScen;",  "returns a newly created 
connection for uri, using user name, password and scenario"]
+[ "remote","connect",  "pattern remote.connect(table:str, 
schen:str):str ","RMTconnectTable;", "return a newly created connection 
for a table. username and password should be in the vault"   ]
 [ "remote","disconnect",   "command remote.disconnect(conn:str):void ",
"RMTdisconnect;",   "disconnects the connection pointed to by handle 
(received from a call to connect()"]
 [ "remote","epilogue", "command remote.epilogue():void ",  
"RMTepilogue;", "release the resources held by the remote module"   ]
 [ "remote","exec", "pattern remote.exec(conn:str, mod:str, func:str):str 
","RMTexec;", "remotely executes . and returns the 
handle to its result"   ]
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
@@ -14979,6 +14979,7 @@ Ready.
 [ "remote","bintype",  "pattern remote.bintype():void ",   
"RMTbintype;",  "print the binary type of this mserver5"]
 [ "remote","connect",  "command remote.connect(uri:str, user:str, 
passwd:str):str ",   "RMTconnect;",  "returns a newly created connection for 
uri, using user name and password"  ]
 [ "remote","connect",  "command remote.connect(uri:str, user:str, 
passwd:str, scen:str):str ", "RMTconnectScen;",  "returns a newly created 
connection for uri, using user name, password and scenario"]
+[ "remote","connect",  "pattern remote.connect(table:str, 
schen:str):str ","RMTconnectTable;", "return a newly created connection 
for a table. username and password should be in the vault"   ]
 [ "remote","disconnect",   "command remote.disconnect(conn:str):void ",
"RMTdisconnect;",   "disconnects the connection pointed to by handle 
(received from a call to connect()"]
 [ "remote","epilogue", "command remote.epilogue():void ",  
"RMTepilogue;", "release the resources held by the remote module"   ]
 [ "remote","exec", "pattern remote.exec(conn:str, mod:str, func:str):str 
","RMTexec;", "remotely executes . and returns the 
handle to its result"   ]
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
@@ -739,11 +739,13 @@ str ALGunique1(bat *result, const bat *b
 str ALGunique2(bat *result, const bat *bid, const bat *sid);
 str ALGvariance(dbl *res, const bat *bid);
 str ALGvariancep(dbl *res, const bat *bid);
+str AUTHaddRemoteTableCredentials(const char *local_table, const char 
*localuser, const char *uri, const char *remoteuser, const char *pass, bool 
pw_encrypted);
 str AUTHaddUser(oid *ret, Client c, const char *user, const char *pass);
 str AUTHchangePassword(Client c, const char *oldpass, const char *passwd);
 str AUTHchangeUsername(Client c, const char *olduser, const char *newuser);
 str AUTHcheckCredentials(oid *ret, Client c, const char *user, const char 
*passwd, const char *challenge, const char *algo);
 str AUTHgetPasswordHash(str *ret, Client c, const char *username);
+str AUTHgetRemoteTableCredentials(const char *local_table, Client cntxt, str 
*uri, str *username, str *password);
 str AUTHgetUsername(str *ret, Client c);
 str AUTHgetUsers(BAT **ret1, BAT **ret2, Client c);
 str AUTHinitTables(const char *passwd);
@@ -1645,6 +1647,7 @@ str RMTbincopyto(Client cntxt, MalBlkPtr
 str RMTbintype(Client cntxt, MalBlkPtr mb, MalStkPtr stk, InstrPtr pci);
 str RMTconnect(str *ret, str *uri, str *user, str *passwd);
 str RMTconnectScen(str *ret, str *ouri, str *user, str *passwd, str *scen);
+str RMTconnectTable(Client cntxt, MalBlkPtr mb, MalStkPtr stk, InstrPtr pci);
 str RMTdisconnect(void *ret, str *conn);
 str 

MonetDB: remote_auth - Remove unused parameter

2018-05-02 Thread Panagiotis Koutsourakis
Changeset: 0f63ad18eebe for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=0f63ad18eebe
Modified Files:
monetdb5/mal/mal_authorize.c
monetdb5/mal/mal_authorize.h
monetdb5/modules/mal/remote.c
Branch: remote_auth
Log Message:

Remove unused parameter


diffs (53 lines):

diff --git a/monetdb5/mal/mal_authorize.c b/monetdb5/mal/mal_authorize.c
--- a/monetdb5/mal/mal_authorize.c
+++ b/monetdb5/mal/mal_authorize.c
@@ -991,15 +991,13 @@ lookupRemoteTableKey(const char *key)
 }
 
 str
-AUTHgetRemoteTableCredentials(const char *local_table, Client cntxt, str *uri, 
str *username, str *password)
+AUTHgetRemoteTableCredentials(const char *local_table, str *uri, str 
*username, str *password)
 {
BUN p;
BATiter i;
str tmp;
str pwhash;
 
-   (void)cntxt;
-
if (local_table == NULL || strNil(local_table)) {
throw(ILLARG, "getRemoteTableCredentials", "local table should 
not be nil");
}
diff --git a/monetdb5/mal/mal_authorize.h b/monetdb5/mal/mal_authorize.h
--- a/monetdb5/mal/mal_authorize.h
+++ b/monetdb5/mal/mal_authorize.h
@@ -28,8 +28,7 @@ mal_export str AUTHgetPasswordHash(str *
 mal_export str AUTHinitTables(const char *passwd);
 
 mal_export str AUTHaddRemoteTableCredentials(const char *local_table, const 
char *localuser, const char *uri, const char *remoteuser, const char *pass, 
bool pw_encrypted);
-mal_export str AUTHgetRemoteTableCredentials(const char *local_table, Client 
cntxt, str *uri, str *username, str *password);
-
+mal_export str AUTHgetRemoteTableCredentials(const char *local_table, str 
*uri, str *username, str *password);
 
 /*
  * Authorisation is based on a password.  The passwords are stored hashed
diff --git a/monetdb5/modules/mal/remote.c b/monetdb5/modules/mal/remote.c
--- a/monetdb5/modules/mal/remote.c
+++ b/monetdb5/modules/mal/remote.c
@@ -271,6 +271,7 @@ RMTconnectTable(Client cntxt, MalBlkPtr 
ValPtr v;
 
(void)mb;
+   (void)cntxt;
 
local_table = *getArgReference_str(stk, pci, 1);
scen = *getArgReference_str(stk, pci, 2);
@@ -278,7 +279,7 @@ RMTconnectTable(Client cntxt, MalBlkPtr 
throw(ILLARG, "remote.connect", ILLEGAL_ARGUMENT ": local table 
is NULL or nil");
}
 
-   rethrow("remote.connect", tmp, 
AUTHgetRemoteTableCredentials(local_table, cntxt, , , ));
+   rethrow("remote.connect", tmp, 
AUTHgetRemoteTableCredentials(local_table, , , ));
 
/* The password we just got is hashed. Add the byte \1 in front to
 * signal this fact to the mapi. */
___
checkin-list mailing list
checkin-list@monetdb.org
https://www.monetdb.org/mailman/listinfo/checkin-list


MonetDB: remote_auth - Check for allocation failures

2018-05-02 Thread Panagiotis Koutsourakis
Changeset: 3f37afd56bb5 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=3f37afd56bb5
Modified Files:
sql/server/rel_schema.c
Branch: remote_auth
Log Message:

Check for allocation failures


diffs (22 lines):

diff --git a/sql/server/rel_schema.c b/sql/server/rel_schema.c
--- a/sql/server/rel_schema.c
+++ b/sql/server/rel_schema.c
@@ -949,9 +949,17 @@ rel_create_table(mvc *sql, sql_schema *s
if (tt == tt_remote) {
char *local_user = stack_get_string(sql, 
"current_user");
char *local_table = sa_strconcat(sql->sa, 
sa_strconcat(sql->sa, sname, "."), name);
+   if (!local_table) {
+   return sql_error(sql, 02, SQLSTATE(HY001) 
"CREATE TABLE: " MAL_MALLOC_FAIL);
+   }
if (!mapiuri_valid(loc))
return sql_error(sql, 02, SQLSTATE(42000) 
"CREATE TABLE: incorrect uri '%s' for remote table '%s'", loc, name);
-   char *reg_credentials = 
AUTHaddRemoteTableCredentials(local_table, local_user, mapiuri_uri(loc, 
sql->sa), username, password, pw_encrypted);
+
+   const char *remote_uri = mapiuri_uri(loc, sql->sa);
+   if (remote_uri == NULL) {
+   return sql_error(sql, 02, SQLSTATE(HY001) 
"CREATE TABLE: " MAL_MALLOC_FAIL);
+   }
+   char *reg_credentials = 
AUTHaddRemoteTableCredentials(local_table, local_user, remote_uri, username, 
password, pw_encrypted);
if (reg_credentials != 0) {
return sql_error(sql, 02, SQLSTATE(42000) 
"CREATE TABLE: cannot register credentials for remote table '%s' in vault: %s", 
name, reg_credentials);
}
___
checkin-list mailing list
checkin-list@monetdb.org
https://www.monetdb.org/mailman/listinfo/checkin-list


MonetDB: remote_auth - Initial implementation of delete remote t...

2018-05-02 Thread Panagiotis Koutsourakis
Changeset: 983c22fa2bf9 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=983c22fa2bf9
Modified Files:
monetdb5/mal/mal_authorize.c
monetdb5/mal/mal_authorize.h
Branch: remote_auth
Log Message:

Initial implementation of delete remote table credentials function


diffs (48 lines):

diff --git a/monetdb5/mal/mal_authorize.c b/monetdb5/mal/mal_authorize.c
--- a/monetdb5/mal/mal_authorize.c
+++ b/monetdb5/mal/mal_authorize.c
@@ -1084,3 +1084,33 @@ AUTHaddRemoteTableCredentials(const char
}
return MAL_SUCCEED;
 }
+
+str
+AUTHdeleteRemoteTableCredentials(const char *local_table)
+{
+   BUN p;
+   oid id;
+
+   assert(rt_key);
+   assert(rt_uri);
+   assert(rt_remoteuser);
+   assert(rt_hashedpwd);
+
+   /* pre-condition check */
+   if (local_table == NULL || strNil(local_table))
+   throw(ILLARG, "deleteRemoteTableCredentials", "local table 
cannot be nil");
+
+   /* ensure that the username exists */
+   p = lookupRemoteTableKey(local_table);
+   if (p == BUN_NONE)
+   throw(MAL, "deleteRemoteTableCredentials", "no such table: 
'%s'", local_table);
+   id = p;
+
+   /* now, we got the oid, start removing the related tuples */
+   if (BUNappend(rt_deleted, , TRUE) != GDK_SUCCEED)
+   throw(MAL, "deleteRemoteTableCredentials", SQLSTATE(HY001) 
MAL_MALLOC_FAIL);
+
+   /* make the stuff persistent */
+   AUTHcommit();
+   return(MAL_SUCCEED);
+}
diff --git a/monetdb5/mal/mal_authorize.h b/monetdb5/mal/mal_authorize.h
--- a/monetdb5/mal/mal_authorize.h
+++ b/monetdb5/mal/mal_authorize.h
@@ -29,6 +29,7 @@ mal_export str AUTHinitTables(const char
 
 mal_export str AUTHaddRemoteTableCredentials(const char *local_table, const 
char *localuser, const char *uri, const char *remoteuser, const char *pass, 
bool pw_encrypted);
 mal_export str AUTHgetRemoteTableCredentials(const char *local_table, str 
*uri, str *username, str *password);
+mal_export str AUTHdeleteRemoteTableCredentials(const char *local_table);
 
 /*
  * Authorisation is based on a password.  The passwords are stored hashed
___
checkin-list mailing list
checkin-list@monetdb.org
https://www.monetdb.org/mailman/listinfo/checkin-list


MonetDB: remote_auth - Implementation of credentials registratio...

2018-05-01 Thread Panagiotis Koutsourakis
Changeset: d29fe1016b59 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=d29fe1016b59
Modified Files:
monetdb5/mal/mal_authorize.c
sql/server/rel_distribute.c
sql/server/rel_schema.c
Branch: remote_auth
Log Message:

Implementation of credentials registration in the vault


diffs (288 lines):

diff --git a/monetdb5/mal/mal_authorize.c b/monetdb5/mal/mal_authorize.c
--- a/monetdb5/mal/mal_authorize.c
+++ b/monetdb5/mal/mal_authorize.c
@@ -42,16 +42,16 @@
 static str AUTHdecypherValue(str *ret, const char *value);
 static str AUTHcypherValue(str *ret, const char *value);
 static str AUTHverifyPassword(const char *passwd);
+static BUN lookupRemoteTableKey(const char *key);
 
 static BAT *user = NULL;
 static BAT *pass = NULL;
 static BAT *duser = NULL;
 
 /* Remote table bats */
-static BAT *rt_uri = NULL;
-static BAT *rt_localuser = NULL;
+static BAT *rt_key = NULL;
 static BAT *rt_remoteuser = NULL;
-static BAT *rt_pass = NULL;
+static BAT *rt_hashedpwd = NULL;
 static BAT *rt_deleted = NULL;
 /* yep, the vault key is just stored in memory */
 static str vaultKey = NULL;
@@ -241,50 +241,43 @@ AUTHinitTables(const char *passwd) {
}
assert(duser);
 
-   /* Remote table authorization columns */
+   /* Remote table authorization table.
+*
+* This table holds the remote tabe authorization credentials
+* (username and hashed password). At the creation of a remote
+* table, two entries with two different keys are inserted in the
+* auth table.
+*
+* 1. local user name'|'URI, remote username, hashed remote password
+* 2. local schema'|'URI, remote username, hashed remote password
+*
+* The lookup routine will actually do two lookups: first we try
+* to match the user requesting access with the user that created
+* the table or an administrator. If that fails try to see if the
+* user requesting access has access to the local schema where the
+* remote table is defined.
+*/
/* load/create remote table URI BAT */
-   bid = BBPindex("M5system_auth_rt_uri");
+   bid = BBPindex("M5system_auth_rt_key");
if (!bid) {
-   rt_uri = COLnew(0, TYPE_str, 256, PERSISTENT);
-   if (rt_uri == NULL)
-   throw(MAL, "initTables.rt_uri", SQLSTATE(HY001) 
MAL_MALLOC_FAIL " remote table uri bat");
+   rt_key = COLnew(0, TYPE_str, 256, PERSISTENT);
+   if (rt_key == NULL)
+   throw(MAL, "initTables.rt_key", SQLSTATE(HY001) 
MAL_MALLOC_FAIL " remote table uri bat");
 
-   if (BBPrename(BBPcacheid(rt_uri), "M5system_auth_rt_uri") != 0 
||
-   BATmode(rt_uri, PERSISTENT) != GDK_SUCCEED)
-   throw(MAL, "initTables.rt_uri", GDK_EXCEPTION);
+   if (BBPrename(BBPcacheid(rt_key), "M5system_auth_rt_key") != 0 
||
+   BATmode(rt_key, PERSISTENT) != GDK_SUCCEED)
+   throw(MAL, "initTables.rt_key", GDK_EXCEPTION);
if (!isNew)
AUTHcommit();
}
else {
-   rt_uri = BATdescriptor(bid);
-   if (rt_uri == NULL) {
-   throw(MAL, "initTables.rt_uri", SQLSTATE(HY002) 
RUNTIME_OBJECT_MISSING);
+   rt_key = BATdescriptor(bid);
+   if (rt_key == NULL) {
+   throw(MAL, "initTables.rt_key", SQLSTATE(HY002) 
RUNTIME_OBJECT_MISSING);
}
isNew = 0;
}
-   assert(rt_uri);
-
-   /* load/create remote table local user name BAT */
-   bid = BBPindex("M5system_auth_rt_localuser");
-   if (!bid) {
-   rt_localuser = COLnew(0, TYPE_str, 256, PERSISTENT);
-   if (rt_localuser == NULL)
-   throw(MAL, "initTables.rt_localuser", SQLSTATE(HY001) 
MAL_MALLOC_FAIL " remote table local user bat");
-
-   if (BBPrename(BBPcacheid(rt_localuser), 
"M5system_auth_rt_localuser") != 0 ||
-   BATmode(rt_localuser, PERSISTENT) != GDK_SUCCEED)
-   throw(MAL, "initTables.rt_localuser", GDK_EXCEPTION);
-   if (!isNew)
-   AUTHcommit();
-   }
-   else {
-   rt_localuser = BATdescriptor(bid);
-   if (rt_localuser == NULL) {
-   throw(MAL, "initTables.rt_localuser", SQLSTATE(HY002) 
RUNTIME_OBJECT_MISSING);
-   }
-   isNew = 0;
-   }
-   assert(rt_localuser);
+   assert(rt_key);
 
/* load/create remote table remote user name BAT */
bid = BBPindex("M5system_auth_rt_remoteuser");
@@ -309,26 +302,26 @@ AUTHinitTables(const char *passwd) {
assert(rt_remoteuser);
 
/* load/create remote table password BAT */
-   bid = BBPindex("M5system_auth_rt_pass");
+   

MonetDB: remote_auth - Initial implementation of remote table cr...

2018-05-01 Thread Panagiotis Koutsourakis
Changeset: 528d47031e6d for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=528d47031e6d
Modified Files:
monetdb5/mal/mal_authorize.c
monetdb5/modules/mal/remote.c
Branch: remote_auth
Log Message:

Initial implementation of remote table credentials lookup from vault

It does not work right now: Lookup returns always empty strings.


diffs (170 lines):

diff --git a/monetdb5/mal/mal_authorize.c b/monetdb5/mal/mal_authorize.c
--- a/monetdb5/mal/mal_authorize.c
+++ b/monetdb5/mal/mal_authorize.c
@@ -50,6 +50,7 @@ static BAT *duser = NULL;
 
 /* Remote table bats */
 static BAT *rt_key = NULL;
+static BAT *rt_uri = NULL;
 static BAT *rt_remoteuser = NULL;
 static BAT *rt_hashedpwd = NULL;
 static BAT *rt_deleted = NULL;
@@ -244,25 +245,14 @@ AUTHinitTables(const char *passwd) {
/* Remote table authorization table.
 *
 * This table holds the remote tabe authorization credentials
-* (username and hashed password). At the creation of a remote
-* table, two entries with two different keys are inserted in the
-* auth table.
-*
-* 1. local user name'|'URI, remote username, hashed remote password
-* 2. local schema'|'URI, remote username, hashed remote password
-*
-* The lookup routine will actually do two lookups: first we try
-* to match the user requesting access with the user that created
-* the table or an administrator. If that fails try to see if the
-* user requesting access has access to the local schema where the
-* remote table is defined.
+* (uri, username and hashed password).
 */
/* load/create remote table URI BAT */
bid = BBPindex("M5system_auth_rt_key");
if (!bid) {
rt_key = COLnew(0, TYPE_str, 256, PERSISTENT);
if (rt_key == NULL)
-   throw(MAL, "initTables.rt_key", SQLSTATE(HY001) 
MAL_MALLOC_FAIL " remote table uri bat");
+   throw(MAL, "initTables.rt_key", SQLSTATE(HY001) 
MAL_MALLOC_FAIL " remote table key bat");
 
if (BBPrename(BBPcacheid(rt_key), "M5system_auth_rt_key") != 0 
||
BATmode(rt_key, PERSISTENT) != GDK_SUCCEED)
@@ -279,6 +269,28 @@ AUTHinitTables(const char *passwd) {
}
assert(rt_key);
 
+   /* load/create remote table URI BAT */
+   bid = BBPindex("M5system_auth_rt_uri");
+   if (!bid) {
+   rt_uri = COLnew(0, TYPE_str, 256, PERSISTENT);
+   if (rt_uri == NULL)
+   throw(MAL, "initTables.rt_uri", SQLSTATE(HY001) 
MAL_MALLOC_FAIL " remote table uri bat");
+
+   if (BBPrename(BBPcacheid(rt_uri), "M5system_auth_rt_uri") != 0 
||
+   BATmode(rt_uri, PERSISTENT) != GDK_SUCCEED)
+   throw(MAL, "initTables.rt_uri", GDK_EXCEPTION);
+   if (!isNew)
+   AUTHcommit();
+   }
+   else {
+   rt_uri = BATdescriptor(bid);
+   if (rt_uri == NULL) {
+   throw(MAL, "initTables.rt_uri", SQLSTATE(HY002) 
RUNTIME_OBJECT_MISSING);
+   }
+   isNew = 0;
+   }
+   assert(rt_uri);
+
/* load/create remote table remote user name BAT */
bid = BBPindex("M5system_auth_rt_remoteuser");
if (!bid) {
@@ -955,47 +967,34 @@ lookupRemoteTableKey(const char *key)
 str
 AUTHgetRemoteTableCredentials(const char *local_table, Client cntxt, str *uri, 
str *username, str *password)
 {
-   FILE *fp = fopen("/tmp/remote_table_auth.txt", "r");
-   str ltbl;
-   // str tmp;
-   char buf[BUFSIZ];
-   char *p, *q;
+   BUN p;
+   BATiter i;
+   str tmp;
+   str pwhash;
 
(void)cntxt;
-   fread(buf, 1, BUFSIZ, fp);
-
-   q = buf;
-   p = strchr(buf, ',');
-   *p = 0;
-   ltbl = GDKstrdup(q);
-
-   q = p + 1;
-   p = strchr(q, ',');
-   *p = 0;
-   *uri = GDKstrdup(q);
 
-   q = p + 1;
-   p = strchr(q, ',');
-   *p = 0;
-   *username = GDKstrdup(q);
+   if (local_table == NULL || strNil(local_table)) {
+   throw(ILLARG, "getRemoteTableCredentials", "local table should 
not be nil");
+   }
 
-   q = p + 1;
-   p = strchr(q, '\n');
-   *p = 0;
-   *password = GDKstrdup(q);
-
-   fclose(fp);
-
-   /* mem leak */
-   // rethrow("checkCredentials", tmp, AUTHrequireAdminOrUser(cntxt, 
localuser));
-   if (strcmp(local_table, ltbl)) {
-   GDKfree(ltbl);
-   abort();
-   throw(MAL, "getRemoteTableCredentials", SQLSTATE(HY001) "URIs 
do not match");
+   p = lookupRemoteTableKey(local_table);
+   if (p == BUN_NONE) {
+   throw(MAL, "getRemoteTableCredentials", "No credentials for 
table %s found", local_table);
}
 
-   GDKfree(ltbl);
-   // GDKfree(localuser);
+  

MonetDB: remote_auth - Change the authorization functions to be ...

2018-05-01 Thread Panagiotis Koutsourakis
Changeset: 78acdb6b0452 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=78acdb6b0452
Modified Files:
monetdb5/mal/mal_authorize.c
monetdb5/mal/mal_authorize.h
monetdb5/modules/mal/remote.c
sql/server/rel_schema.c
Branch: remote_auth
Log Message:

Change the authorization functions to be keyed by local table

The look up key should be the local "schema.table" string that
identifies the table we want to access.


diffs (148 lines):

diff --git a/monetdb5/mal/mal_authorize.c b/monetdb5/mal/mal_authorize.c
--- a/monetdb5/mal/mal_authorize.c
+++ b/monetdb5/mal/mal_authorize.c
@@ -942,27 +942,26 @@ AUTHverifyPassword(const char *passwd)
 }
 
 str
-AUTHgetRemoteTableCredentials(const char *uri, Client cntxt, str *username, 
str *password)
+AUTHgetRemoteTableCredentials(const char *local_table, Client cntxt, str *uri, 
str *username, str *password)
 {
FILE *fp = fopen("/tmp/remote_table_auth.txt", "r");
-   str localuser;
-   str luri;
-   str tmp;
+   str ltbl;
+   // str tmp;
char buf[BUFSIZ];
char *p, *q;
 
-   (void)uri;
+   (void)cntxt;
fread(buf, 1, BUFSIZ, fp);
 
q = buf;
p = strchr(buf, ',');
*p = 0;
-   luri = GDKstrdup(q);
+   ltbl = GDKstrdup(q);
 
q = p + 1;
p = strchr(q, ',');
*p = 0;
-   localuser = GDKstrdup(q);
+   *uri = GDKstrdup(q);
 
q = p + 1;
p = strchr(q, ',');
@@ -977,36 +976,32 @@ AUTHgetRemoteTableCredentials(const char
fclose(fp);
 
/* mem leak */
-   rethrow("checkCredentials", tmp, AUTHrequireAdminOrUser(cntxt, 
localuser));
-   if (strcmp(uri, luri)) {
-   GDKfree(luri);
-   GDKfree(localuser);
+   // rethrow("checkCredentials", tmp, AUTHrequireAdminOrUser(cntxt, 
localuser));
+   if (strcmp(local_table, ltbl)) {
+   GDKfree(ltbl);
throw(MAL, "getRemoteTableCredentials", SQLSTATE(HY001) "URIs 
do not match");
}
 
-   GDKfree(luri);
-   GDKfree(localuser);
+   GDKfree(ltbl);
+   // GDKfree(localuser);
 
return MAL_SUCCEED;
 }
 
 str
-AUTHaddRemoteTableCredentials(const char *uri, const char *localuser, const 
char *remoteuser, const char *pass, bool pw_encrypted)
+AUTHaddRemoteTableCredentials(const char *local_table, const char *localuser, 
const char *uri, const char *remoteuser, const char *pass, bool pw_encrypted)
 {
/* Work in Progress */
FILE *fp = fopen("/tmp/remote_table_auth.txt", "w");
char *password = NULL;
bool free_pw = false;
str tmp;
-   BUN p;
 
if (uri == NULL || strNil(uri))
throw(ILLARG, "addRemoteTableCredentials", "URI cannot be nil");
if (localuser == NULL || strNil(localuser))
throw(ILLARG, "addRemoteTableCredentials", "local user name 
cannot be nil");
 
-   (void)p;
-
if (pass == NULL) {
/* NOTE: Is having the client == NULL safe? */
AUTHgetPasswordHash(, NULL, localuser);
@@ -1022,7 +1017,7 @@ AUTHaddRemoteTableCredentials(const char
}
rethrow("addUser", tmp, AUTHverifyPassword(password));
 
-   fprintf(fp, "%s,%s,%s,%s\n",uri, localuser, remoteuser, password);
+   fprintf(fp, "%s,%s,%s,%s\n", local_table, uri, remoteuser, password);
fclose(fp);
 
if (free_pw) {
diff --git a/monetdb5/mal/mal_authorize.h b/monetdb5/mal/mal_authorize.h
--- a/monetdb5/mal/mal_authorize.h
+++ b/monetdb5/mal/mal_authorize.h
@@ -27,8 +27,8 @@ mal_export str AUTHgetPasswordHash(str *
 
 mal_export str AUTHinitTables(const char *passwd);
 
-mal_export str AUTHaddRemoteTableCredentials(const char *uri, const char 
*localuser, const char *remoteuser, const char *pass, bool pw_encrypted);
-mal_export str AUTHgetRemoteTableCredentials(const char *uri, Client cntxt, 
str *username, str *password);
+mal_export str AUTHaddRemoteTableCredentials(const char *local_table, const 
char *localuser, const char *uri, const char *remoteuser, const char *pass, 
bool pw_encrypted);
+mal_export str AUTHgetRemoteTableCredentials(const char *local_table, Client 
cntxt, str *uri, str *username, str *password);
 
 
 /*
diff --git a/monetdb5/modules/mal/remote.c b/monetdb5/modules/mal/remote.c
--- a/monetdb5/modules/mal/remote.c
+++ b/monetdb5/modules/mal/remote.c
@@ -260,6 +260,7 @@ str RMTconnect(
 str
 RMTconnectURI(Client cntxt, MalBlkPtr mb, MalStkPtr stk, InstrPtr pci)
 {
+   char *local_table;
char *remoteuser;
char *passwd;
char *uri;
@@ -271,13 +272,13 @@ RMTconnectURI(Client cntxt, MalBlkPtr mb
 
(void)mb;
 
-   uri = *getArgReference_str(stk, pci, 1);
+   local_table = *getArgReference_str(stk, pci, 1);
scen = *getArgReference_str(stk, pci, 2);
-   if (uri == NULL || strcmp(uri, (str)str_nil) == 0) {
-   throw(ILLARG, "remote.connect", ILLEGAL_ARGUMENT 

MonetDB: remote_auth - Change the relational property to record ...

2018-05-01 Thread Panagiotis Koutsourakis
Changeset: 7467088093a4 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=7467088093a4
Modified Files:
sql/backends/monet5/sql_gencode.c
sql/server/rel_distribute.c
Branch: remote_auth
Log Message:

Change the relational property to record table name instead of uris


diffs (58 lines):

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
@@ -277,14 +277,15 @@ static int
MalBlkPtr curBlk = 0;
InstrPtr curInstr = 0, p, o;
Symbol backup = NULL;
-   const char *uri = mapiuri_uri(prp->value, m->sa);
+   // const char *uri = mapiuri_uri(prp->value, m->sa);
+   const char *local_tbl = prp->value;
node *n;
int i, q, v;
int *lret, *rret;
char *lname;
sql_rel *r = rel;
 
-   if(uri == NULL)
+   if(local_tbl == NULL)
return -1;
 
lname = GDKstrdup(name);
@@ -356,9 +357,9 @@ static int
lret[i] = getArg(p, 0);
}
 
-   /* q := remote.connect("uri", "msql"); */
+   /* q := remote.connect("schema.table", "msql"); */
p = newStmt(curBlk, remoteRef, connectRef);
-   p = pushStr(curBlk, p, uri);
+   p = pushStr(curBlk, p, local_tbl);
p = pushStr(curBlk, p, "msql");
q = getArg(p, 0);
 
diff --git a/sql/server/rel_distribute.c b/sql/server/rel_distribute.c
--- a/sql/server/rel_distribute.c
+++ b/sql/server/rel_distribute.c
@@ -285,15 +285,13 @@ distribute(mvc *sql, sql_rel *rel)
 
/* set_remote() */
if (t && isRemote(t)) {
-   char *uri = t->query;
-   /* char *local_name = sa_strconcat(sql->sa, 
sa_strconcat(sql->sa, t->s->base.name, "."), t->base.name);
+   //char *uri = t->query;
+   char *local_name = sa_strconcat(sql->sa, 
sa_strconcat(sql->sa, t->s->base.name, "."), t->base.name);
+   p = rel->p = prop_create(sql->sa, PROP_REMOTE, rel->p);
+   p->value = local_name;
 
-* p = rel->p = prop_create(sql->sa, PROP_REMOTE2, 
rel->p);
-* p->value = local_name;
-*/
-
-   p = rel->p = prop_create(sql->sa, PROP_REMOTE, rel->p);
-   p->value = uri;
+   //p = rel->p = prop_create(sql->sa, PROP_REMOTE2, 
rel->p);
+   //p->value = local_name;
 
}
break;
___
checkin-list mailing list
checkin-list@monetdb.org
https://www.monetdb.org/mailman/listinfo/checkin-list


MonetDB: data-vaults - Merge with default

2018-04-30 Thread Panagiotis Koutsourakis
Changeset: 7aad5a32 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=7aad5a32
Added Files:
sql/test/BugTracker-2018/Tests/concat-str-int.Bug-6583.sql
sql/test/BugTracker-2018/Tests/concat-str-int.Bug-6583.stable.err
sql/test/BugTracker-2018/Tests/concat-str-int.Bug-6583.stable.out

sql/test/BugTracker-2018/Tests/multiple-insertinto-table-Bug-6578.stable.err

sql/test/BugTracker-2018/Tests/multiple-insertinto-table-Bug-6578.stable.out
sql/test/BugTracker-2018/Tests/nested-merge-tables.Bug-6585.sql
sql/test/BugTracker-2018/Tests/nested-merge-tables.Bug-6585.stable.err
sql/test/BugTracker-2018/Tests/nested-merge-tables.Bug-6585.stable.out

sql/test/BugTracker-2018/Tests/sqlitelogictest-aritmetic-expressions-handling.Bug-6576.stable.out.int128

sql/test/BugTracker-2018/Tests/sqlitelogictest-case-not-in-count.Bug-6587.sql

sql/test/BugTracker-2018/Tests/sqlitelogictest-case-not-in-count.Bug-6587.stable.err

sql/test/BugTracker-2018/Tests/sqlitelogictest-case-not-in-count.Bug-6587.stable.out

sql/test/BugTracker-2018/Tests/sqlitelogictest-coalesce-division-by-zero.Bug-6556.stable.out.int128

sql/test/BugTracker-2018/Tests/sqlitelogictest-complex-expression.Bug-6589.sql

sql/test/BugTracker-2018/Tests/sqlitelogictest-complex-expression.Bug-6589.stable.err

sql/test/BugTracker-2018/Tests/sqlitelogictest-complex-expression.Bug-6589.stable.out

sql/test/BugTracker-2018/Tests/sqlitelogictest-count-coalesce-nullif.Bug-6586.sql

sql/test/BugTracker-2018/Tests/sqlitelogictest-count-coalesce-nullif.Bug-6586.stable.err

sql/test/BugTracker-2018/Tests/sqlitelogictest-count-coalesce-nullif.Bug-6586.stable.out

sql/test/BugTracker-2018/Tests/sqlitelogictest-count-coalesce-nullif.Bug-6586.stable.out.int128

sql/test/BugTracker-2018/Tests/sqlitelogictest-not-between-wrong.Bug-6569.stable.err

sql/test/BugTracker-2018/Tests/sqlitelogictest-not-between-wrong.Bug-6569.stable.out

sql/test/BugTracker-2018/Tests/sqlitelogictest-select-nullif-case.Bug-6579.stable.err

sql/test/BugTracker-2018/Tests/sqlitelogictest-select-nullif-case.Bug-6579.stable.out

sql/test/BugTracker-2018/Tests/sqlitelogictest-select-nullif-case.Bug-6579.stable.out.int128
Removed Files:

sql/test/BugTracker-2008/Tests/auto_coersion_bug.SF-2075157.stable.out.int128
Modified Files:
NT/mkodbcwxs.py
NT/mksqlwxs.py
NT/monetdb_config.h.in
NT/rules.msc
buildtools/doc/windowsbuild.rst
clients/Tests/MAL-signatures.stable.out
clients/Tests/MAL-signatures.stable.out.int128
clients/Tests/exports.stable.out
gdk/gdk_batop.c
gdk/gdk_project.c
gdk/gdk_select.c
monetdb5/modules/kernel/Tests/select.malC
monetdb5/modules/kernel/Tests/select.stable.out
monetdb5/modules/kernel/aggr.c
monetdb5/modules/kernel/aggr.mal
monetdb5/modules/kernel/aggr.mal.sh
monetdb5/optimizer/opt_candidates.c
sql/backends/monet5/rel_bin.c
sql/backends/monet5/sql_cat.c
sql/backends/monet5/sql_result.c
sql/common/sql_types.c
sql/common/sql_types.h
sql/server/rel_dump.c
sql/server/rel_optimizer.c
sql/server/rel_schema.c
sql/server/rel_select.c

sql/test/BugDay_2005-10-06_2.9.3/Tests/UNION_JOIN_vs_plain_set_UNION-2.SF-920585.stable.out
sql/test/BugTracker-2008/Tests/auto_coersion_bug.SF-2075157.sql
sql/test/BugTracker-2008/Tests/auto_coersion_bug.SF-2075157.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-2014/Tests/manifold.Bug-3556.stable.out
sql/test/BugTracker-2015/Tests/schemadiff.Bug-3778.stable.out
sql/test/BugTracker-2018/Tests/All

sql/test/BugTracker-2018/Tests/sqlitelogictest-aritmetic-expressions-handling.Bug-6576.stable.out

sql/test/BugTracker-2018/Tests/sqlitelogictest-coalesce-division-by-zero.Bug-6556.stable.out

sql/test/BugTracker-2018/Tests/sqlitelogictest-not-between-wrong.Bug-6569.sql
sql/test/Dependencies/Tests/Dependencies.stable.out
sql/test/Dependencies/Tests/Dependencies.stable.out.int128

sql/test/FeatureRequests/Tests/foreign_key_outer_join_dead_code_elimination-explain-1join-query.stable.out

sql/test/FeatureRequests/Tests/foreign_key_outer_join_dead_code_elimination-explain-1join-view.stable.out

sql/test/FeatureRequests/Tests/foreign_key_outer_join_dead_code_elimination-explain-2join-query.stable.out

sql/test/FeatureRequests/Tests/foreign_key_outer_join_dead_code_elimination-explain-2join-view.stable.out
sql/test/Tests/coalesce.stable.out

MonetDB: remote_auth - Add a new property that will record the s...

2018-04-30 Thread Panagiotis Koutsourakis
Changeset: ecfe68ad745b for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=ecfe68ad745b
Modified Files:
sql/server/rel_distribute.c
sql/server/rel_prop.h
Branch: remote_auth
Log Message:

Add a new property that will record the schema/name of the table


diffs (31 lines):

diff --git a/sql/server/rel_distribute.c b/sql/server/rel_distribute.c
--- a/sql/server/rel_distribute.c
+++ b/sql/server/rel_distribute.c
@@ -286,9 +286,15 @@ distribute(mvc *sql, sql_rel *rel)
/* set_remote() */
if (t && isRemote(t)) {
char *uri = t->query;
+   /* char *local_name = sa_strconcat(sql->sa, 
sa_strconcat(sql->sa, t->s->base.name, "."), t->base.name);
 
-   p = rel->p = prop_create(sql->sa, PROP_REMOTE, rel->p); 
+* p = rel->p = prop_create(sql->sa, PROP_REMOTE2, 
rel->p);
+* p->value = local_name;
+*/
+
+   p = rel->p = prop_create(sql->sa, PROP_REMOTE, rel->p);
p->value = uri;
+
}
break;
}
diff --git a/sql/server/rel_prop.h b/sql/server/rel_prop.h
--- a/sql/server/rel_prop.h
+++ b/sql/server/rel_prop.h
@@ -23,6 +23,7 @@ typedef struct prop {
 #define PROP_HASHCOL   4   /* could use hash idx */
 #define PROP_FETCH 5   /* fetchjoin */
 #define PROP_REMOTE 6  /* uri for remote execution */
+#define PROP_REMOTE27  /* schema and name of local table */
 #define PROP_USED  10  /* number of times exp is used */
 
 extern prop * prop_create( sql_allocator *sa, int kind, prop *pre );
___
checkin-list mailing list
checkin-list@monetdb.org
https://www.monetdb.org/mailman/listinfo/checkin-list


MonetDB: remote_auth - Merge with default

2018-04-30 Thread Panagiotis Koutsourakis
Changeset: 4da4871b6315 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=4da4871b6315
Added Files:

sql/test/BugTracker-2018/Tests/sqlitelogictest-coalesce-division-by-zero.Bug-6556.stable.out.int128

sql/test/BugTracker-2018/Tests/sqlitelogictest-count-coalesce-nullif.Bug-6586.stable.out.int128

sql/test/BugTracker-2018/Tests/sqlitelogictest-select-nullif-case.Bug-6579.stable.out.int128
Removed Files:

sql/test/BugTracker-2008/Tests/auto_coersion_bug.SF-2075157.stable.out.int128
Modified Files:
clients/Tests/MAL-signatures.stable.out
clients/Tests/MAL-signatures.stable.out.int128
clients/Tests/exports.stable.out
monetdb5/modules/kernel/aggr.c
monetdb5/modules/kernel/aggr.mal
monetdb5/modules/kernel/aggr.mal.sh
sql/common/sql_types.c
sql/common/sql_types.h
sql/test/BugTracker-2008/Tests/auto_coersion_bug.SF-2075157.sql
sql/test/BugTracker-2008/Tests/auto_coersion_bug.SF-2075157.stable.out

sql/test/BugTracker-2018/Tests/sqlitelogictest-aritmetic-expressions-handling.Bug-6576.stable.out

sql/test/BugTracker-2018/Tests/sqlitelogictest-coalesce-division-by-zero.Bug-6556.stable.out

sql/test/BugTracker-2018/Tests/sqlitelogictest-count-coalesce-nullif.Bug-6586.stable.out

sql/test/BugTracker-2018/Tests/sqlitelogictest-select-nullif-case.Bug-6579.stable.out
sql/test/emptydb/Tests/check.stable.out
sql/test/emptydb/Tests/check.stable.out.32bit
sql/test/emptydb/Tests/check.stable.out.int128
Branch: remote_auth
Log Message:

Merge with default


diffs (truncated from 2613 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
@@ -103,8 +103,7 @@ Ready.
 [ "aggr",  "jsonaggr", "command aggr.jsonaggr(val:bat[:str]):str ",
"JSONgroupStr;","Aggregate the string values to array." ]
 [ "aggr",  "max",  "command aggr.max(b:bat[:any_1], g:bat[:oid], 
e:bat[:any_2]):bat[:any_1] ", "AGGRmax3;",""  ]
 [ "aggr",  "max",  "command aggr.max(b:bat[:any_2]):any_2 ",   
"ALGmaxany;",   "Return the highest tail value or nil." ]
-[ "aggr",  "median",   "function aggr.median(b:bat[:any_1]):any_1;",   
"", ""  ]
-[ "aggr",  "median",   "command aggr.median(b:bat[:any_1], 
g:bat[:oid], e:bat[:any_2]):bat[:any_1] ",  "AGGRmedian3;", "Grouped median 
aggregate"  ]
+[ "aggr",  "median",   "command aggr.median(b:bat[:any_1]):any_1 ",
"AGGRmedian;",  "Median aggregate"  ]
 [ "aggr",  "min",  "command aggr.min(b:bat[:any_1], g:bat[:oid], 
e:bat[:any_2]):bat[:any_1] ", "AGGRmin3;",""  ]
 [ "aggr",  "min",  "command aggr.min(b:bat[:any_2]):any_2 ",   
"ALGminany;",   "Return the lowest tail value or nil."  ]
 [ "aggr",  "prod", "command aggr.prod(b:bat[:bte], g:bat[:oid], 
e:bat[:any_1]):bat[:bte] ","AGGRprod3_bte;",   "Grouped tail 
product on bte"   ]
@@ -188,8 +187,7 @@ Ready.
 [ "aggr",  "prod", "pattern aggr.prod(b:bat[:sht], s:bat[:oid], 
nil_if_empty:bit):int ",   "CMDBATprod;",  "Calculate aggregate product of B 
with candidate list." ]
 [ "aggr",  "prod", "pattern aggr.prod(b:bat[:sht], s:bat[:oid], 
nil_if_empty:bit):lng ",   "CMDBATprod;",  "Calculate aggregate product of B 
with candidate list." ]
 [ "aggr",  "prod", "pattern aggr.prod(b:bat[:sht], s:bat[:oid], 
nil_if_empty:bit):sht ",   "CMDBATprod;",  "Calculate aggregate product of B 
with candidate list." ]
-[ "aggr",  "quantile", "function aggr.quantile(b:bat[:any_1], 
q:bat[:dbl]):any_1;","", ""  ]
-[ "aggr",  "quantile", "command aggr.quantile(b:bat[:any_1], 
g:bat[:oid], e:bat[:any_2], q:bat[:dbl]):bat[:any_1] ",   "AGGRquantile3;", 
  "Grouped quantile aggregate"]
+[ "aggr",  "quantile", "command aggr.quantile(b:bat[:any_1], 
q:bat[:dbl]):any_1 ", "AGGRquantile;","Quantile aggregate"]
 [ "aggr",  "stdev","command aggr.stdev(b:bat[:bte], g:bat[:oid], 
e:bat[:any_1]):bat[:dbl] ",   "AGGRstdev3_dbl;",  "Grouped tail 
standard deviation (sample/non-biased) on bte"]
 [ "aggr",  "stdev","command aggr.stdev(b:bat[:dbl], g:bat[:oid], 
e:bat[:any_1]):bat[:dbl] ",   "AGGRstdev3_dbl;",  "Grouped tail 
standard deviation (sample/non-biased) on dbl"]
 [ "aggr",  "stdev","command aggr.stdev(b:bat[:flt], g:bat[:oid], 
e:bat[:any_1]):bat[:dbl] ",   "AGGRstdev3_dbl;",  "Grouped tail 
standard deviation (sample/non-biased) on flt"]
@@ -260,7 +258,6 @@ Ready.
 [ "aggr",  "submax",   "command aggr.submax(b:bat[:any_1], 
g:bat[:oid], e:bat[:any_2], skip_nils:bit):bat[:any_1] ",   "AGGRsubmax_val;",  
"Grouped maximum aggregate" ]
 [ "aggr",  "submax",   "command 

MonetDB: remote_auth - Add some assertions

2018-05-03 Thread Panagiotis Koutsourakis
Changeset: c950f710bcc7 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=c950f710bcc7
Modified Files:
monetdb5/mal/mal_authorize.c
Branch: remote_auth
Log Message:

Add some assertions


diffs (37 lines):

diff --git a/monetdb5/mal/mal_authorize.c b/monetdb5/mal/mal_authorize.c
--- a/monetdb5/mal/mal_authorize.c
+++ b/monetdb5/mal/mal_authorize.c
@@ -978,6 +978,9 @@ lookupRemoteTableKey(const char *key)
BATiter cni = bat_iterator(rt_key);
BUN p = BUN_NONE;
 
+   assert(rt_key);
+   assert(rt_deleted);
+
if (BAThash(rt_key, 0) == GDK_SUCCEED) {
HASHloop_str(cni, cni.b->thash, p, key) {
oid pos = p;
@@ -1007,6 +1010,11 @@ AUTHgetRemoteTableCredentials(const char
throw(MAL, "getRemoteTableCredentials", "No credentials for 
table %s found", local_table);
}
 
+   assert(rt_key);
+   assert(rt_uri);
+   assert(rt_remoteuser);
+   assert(rt_hashedpwd);
+
assert(p != BUN_NONE);
i = bat_iterator(rt_uri);
*uri = BUNtail(i, p);
@@ -1036,6 +1044,11 @@ AUTHaddRemoteTableCredentials(const char
if (local_user == NULL || strNil(local_user))
throw(ILLARG, "addRemoteTableCredentials", "local user name 
cannot be nil");
 
+   assert(rt_key);
+   assert(rt_uri);
+   assert(rt_remoteuser);
+   assert(rt_hashedpwd);
+
p = lookupRemoteTableKey(local_table);
 
if (p != BUN_NONE) {
___
checkin-list mailing list
checkin-list@monetdb.org
https://www.monetdb.org/mailman/listinfo/checkin-list


MonetDB: remote_auth - Merge with default

2018-05-03 Thread Panagiotis Koutsourakis
Changeset: 0fd5dea30bad for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=0fd5dea30bad
Added Files:
sql/backends/monet5/UDF/capi/Tests/capi14.sql
sql/backends/monet5/UDF/capi/Tests/capi14.stable.err
sql/backends/monet5/UDF/capi/Tests/capi14.stable.out

sql/test/BugTracker-2018/Tests/sqlitelogictest-complex-case-not-in.Bug-6594.sql
sql/test/BugTracker-2018/Tests/temp-table-performance.Bug-6577.sql
Modified Files:
clients/mapiclient/dump.c
clients/mapiclient/mclient.c
clients/mapiclient/msqldump.h
clients/odbc/driver/SQLColumnPrivileges.c
clients/odbc/driver/SQLTablePrivileges.c
sql/backends/monet5/UDF/capi/Tests/All
sql/backends/monet5/UDF/capi/capi.c
sql/storage/bat/bat_logger.c
sql/test/BugTracker-2018/Tests/All
Branch: remote_auth
Log Message:

Merge with default


diffs (truncated from 848 to 300 lines):

diff --git a/clients/mapiclient/dump.c b/clients/mapiclient/dump.c
--- a/clients/mapiclient/dump.c
+++ b/clients/mapiclient/dump.c
@@ -15,6 +15,16 @@
 #include 
 #include "msqldump.h"
 
+static const char *
+get_compat_clause(Mapi mid)
+{
+   static const char *compat_clause = NULL;
+   if (!compat_clause) {
+   compat_clause = get_with_comments_as_clause(mid);
+   }
+   return compat_clause;
+}
+
 static void
 quoted_print(stream *f, const char *s, bool singleq)
 {
@@ -790,15 +800,17 @@ describe_table(Mapi mid, const char *sch
 
hashge = has_hugeint(mid);
 
-   maxquerylen = 512 + strlen(tname) + strlen(schema);
+   maxquerylen = 5120 + strlen(tname) + strlen(schema);
 
query = malloc(maxquerylen);
snprintf(query, maxquerylen,
+"%s\n"
 "SELECT t.name, t.query, t.type, c.remark "
-"FROM sys.schemas s, sys._tables t LEFT OUTER JOIN 
sys.comments c ON t.id = c.id "
+"FROM sys.schemas s, sys._tables t LEFT OUTER JOIN comments c 
ON t.id = c.id "
 "WHERE s.name = '%s' AND "
   "t.schema_id = s.id AND "
   "t.name = '%s'",
+get_compat_clause(mid),
 schema, tname);
 
if ((hdl = mapi_query(mid, query)) == NULL || mapi_error(mid))
@@ -937,7 +949,10 @@ describe_table(Mapi mid, const char *sch
if (cnt)
mnstr_printf(toConsole, ");\n");
snprintf(query, maxquerylen,
-"SELECT i.name, c.remark FROM sys.idxs i, sys.comments 
c WHERE i.id = c.id AND i.table_id = (SELECT id FROM sys._tables WHERE 
schema_id = (select id FROM sys.schemas WHERE name = '%s') AND name = '%s') 
ORDER BY i.name", schema, tname);
+   "%s\n"
+"SELECT i.name, c.remark FROM sys.idxs i, comments c 
WHERE i.id = c.id AND i.table_id = (SELECT id FROM sys._tables WHERE schema_id 
= (select id FROM sys.schemas WHERE name = '%s') AND name = '%s') ORDER BY 
i.name",
+get_compat_clause(mid),
+schema, tname);
if ((hdl = mapi_query(mid, query)) == NULL || mapi_error(mid))
goto bailout;
while (mapi_fetch_row(hdl) != 0) {
@@ -950,13 +965,16 @@ describe_table(Mapi mid, const char *sch
}
 
snprintf(query, maxquerylen,
-"SELECT col.name, com.remark FROM sys._columns col, 
sys.comments com WHERE col.id = com.id AND col.table_id = (SELECT id FROM 
sys._tables WHERE schema_id = (SELECT id FROM sys.schemas WHERE name = '%s') 
AND name = '%s') ORDER BY number", schema, tname);
+   "%s\n"
+   "SELECT col.name, com.remark FROM sys._columns col, 
comments com WHERE col.id = com.id AND col.table_id = (SELECT id FROM 
sys._tables WHERE schema_id = (SELECT id FROM sys.schemas WHERE name = '%s') 
AND name = '%s') ORDER BY number",
+   get_compat_clause(mid),
+   schema, tname);
if ((hdl = mapi_query(mid, query)) == NULL || mapi_error(mid))
goto bailout;
while (mapi_fetch_row(hdl) != 0) {
comment_on(toConsole, "COLUMN", schema, tname,
-  mapi_fetch_field(hdl, 0),
-  mapi_fetch_field(hdl, 1));
+   mapi_fetch_field(hdl, 0),
+   mapi_fetch_field(hdl, 1));
}
mapi_close_handle(hdl);
hdl = NULL;
@@ -1015,10 +1033,11 @@ describe_sequence(Mapi mid, const char *
schema = sname;
}
 
-   maxquerylen = 512 + strlen(tname) + strlen(schema);
+   maxquerylen = 5120 + strlen(tname) + strlen(schema);
 
query = malloc(maxquerylen);
snprintf(query, maxquerylen,
+   "%s\n"
"SELECT s.name, "
 "seq.name, "
 

MonetDB: default - Merge with Mar2018

2018-05-03 Thread Panagiotis Koutsourakis
Changeset: f360933fa058 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=f360933fa058
Added Files:
sql/backends/monet5/UDF/capi/Tests/capi14.sql
sql/backends/monet5/UDF/capi/Tests/capi14.stable.err
sql/backends/monet5/UDF/capi/Tests/capi14.stable.out

sql/test/BugTracker-2018/Tests/sqlitelogictest-complex-case-not-in.Bug-6594.sql
sql/test/BugTracker-2018/Tests/temp-table-performance.Bug-6577.sql
Modified Files:
clients/mapiclient/dump.c
clients/mapiclient/mclient.c
clients/mapiclient/msqldump.h
clients/odbc/driver/SQLColumnPrivileges.c
clients/odbc/driver/SQLTablePrivileges.c
sql/backends/monet5/UDF/capi/Tests/All
sql/backends/monet5/UDF/capi/capi.c
sql/storage/bat/bat_logger.c
sql/test/BugTracker-2018/Tests/All
Branch: default
Log Message:

Merge with Mar2018


diffs (truncated from 848 to 300 lines):

diff --git a/clients/mapiclient/dump.c b/clients/mapiclient/dump.c
--- a/clients/mapiclient/dump.c
+++ b/clients/mapiclient/dump.c
@@ -15,6 +15,16 @@
 #include 
 #include "msqldump.h"
 
+static const char *
+get_compat_clause(Mapi mid)
+{
+   static const char *compat_clause = NULL;
+   if (!compat_clause) {
+   compat_clause = get_with_comments_as_clause(mid);
+   }
+   return compat_clause;
+}
+
 static void
 quoted_print(stream *f, const char *s, bool singleq)
 {
@@ -790,15 +800,17 @@ describe_table(Mapi mid, const char *sch
 
hashge = has_hugeint(mid);
 
-   maxquerylen = 512 + strlen(tname) + strlen(schema);
+   maxquerylen = 5120 + strlen(tname) + strlen(schema);
 
query = malloc(maxquerylen);
snprintf(query, maxquerylen,
+"%s\n"
 "SELECT t.name, t.query, t.type, c.remark "
-"FROM sys.schemas s, sys._tables t LEFT OUTER JOIN 
sys.comments c ON t.id = c.id "
+"FROM sys.schemas s, sys._tables t LEFT OUTER JOIN comments c 
ON t.id = c.id "
 "WHERE s.name = '%s' AND "
   "t.schema_id = s.id AND "
   "t.name = '%s'",
+get_compat_clause(mid),
 schema, tname);
 
if ((hdl = mapi_query(mid, query)) == NULL || mapi_error(mid))
@@ -937,7 +949,10 @@ describe_table(Mapi mid, const char *sch
if (cnt)
mnstr_printf(toConsole, ");\n");
snprintf(query, maxquerylen,
-"SELECT i.name, c.remark FROM sys.idxs i, sys.comments 
c WHERE i.id = c.id AND i.table_id = (SELECT id FROM sys._tables WHERE 
schema_id = (select id FROM sys.schemas WHERE name = '%s') AND name = '%s') 
ORDER BY i.name", schema, tname);
+   "%s\n"
+"SELECT i.name, c.remark FROM sys.idxs i, comments c 
WHERE i.id = c.id AND i.table_id = (SELECT id FROM sys._tables WHERE schema_id 
= (select id FROM sys.schemas WHERE name = '%s') AND name = '%s') ORDER BY 
i.name",
+get_compat_clause(mid),
+schema, tname);
if ((hdl = mapi_query(mid, query)) == NULL || mapi_error(mid))
goto bailout;
while (mapi_fetch_row(hdl) != 0) {
@@ -950,13 +965,16 @@ describe_table(Mapi mid, const char *sch
}
 
snprintf(query, maxquerylen,
-"SELECT col.name, com.remark FROM sys._columns col, 
sys.comments com WHERE col.id = com.id AND col.table_id = (SELECT id FROM 
sys._tables WHERE schema_id = (SELECT id FROM sys.schemas WHERE name = '%s') 
AND name = '%s') ORDER BY number", schema, tname);
+   "%s\n"
+   "SELECT col.name, com.remark FROM sys._columns col, 
comments com WHERE col.id = com.id AND col.table_id = (SELECT id FROM 
sys._tables WHERE schema_id = (SELECT id FROM sys.schemas WHERE name = '%s') 
AND name = '%s') ORDER BY number",
+   get_compat_clause(mid),
+   schema, tname);
if ((hdl = mapi_query(mid, query)) == NULL || mapi_error(mid))
goto bailout;
while (mapi_fetch_row(hdl) != 0) {
comment_on(toConsole, "COLUMN", schema, tname,
-  mapi_fetch_field(hdl, 0),
-  mapi_fetch_field(hdl, 1));
+   mapi_fetch_field(hdl, 0),
+   mapi_fetch_field(hdl, 1));
}
mapi_close_handle(hdl);
hdl = NULL;
@@ -1015,10 +1033,11 @@ describe_sequence(Mapi mid, const char *
schema = sname;
}
 
-   maxquerylen = 512 + strlen(tname) + strlen(schema);
+   maxquerylen = 5120 + strlen(tname) + strlen(schema);
 
query = malloc(maxquerylen);
snprintf(query, maxquerylen,
+   "%s\n"
"SELECT s.name, "
 "seq.name, "
 "get_value_for(s.name,seq.name), 

MonetDB: remote_auth - Delete remote table credentials from vaul...

2018-05-03 Thread Panagiotis Koutsourakis
Changeset: 1379265be677 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=1379265be677
Modified Files:
sql/server/rel_schema.c
sql/server/sql_mvc.c
Branch: remote_auth
Log Message:

Delete remote table credentials from vault when dropping table


diffs (53 lines):

diff --git a/sql/server/rel_schema.c b/sql/server/rel_schema.c
--- a/sql/server/rel_schema.c
+++ b/sql/server/rel_schema.c
@@ -2374,6 +2374,7 @@ rel_schemas(mvc *sql, symbol *s)
 
assert(l->h->next->type == type_int);
sname = get_schema_name(sql, sname, tname);
+
ret = rel_drop(sql->sa, DDL_DROP_TABLE, sname, tname,
 l->h->next->data.i_val,
 l->h->next->next->data.i_val); 
/* if exists */
diff --git a/sql/server/sql_mvc.c b/sql/server/sql_mvc.c
--- a/sql/server/sql_mvc.c
+++ b/sql/server/sql_mvc.c
@@ -22,6 +22,8 @@
 #include "gdk_logger.h"
 #include "wlc.h"
 
+#include "mal_authorize.h"
+
 static int mvc_debug = 0;
 
 static void
@@ -1241,6 +1243,29 @@ mvc_drop_table(mvc *m, sql_schema *s, sq
if (mvc_debug)
fprintf(stderr, "#mvc_drop_table %s %s\n", s->base.name, 
t->base.name);
 
+
+   if (isRemote(t)) {
+   sql_allocator *sa = m->sa;
+   m->sa = sa_create();
+   if (!m->sa) {
+   return -1;
+   }
+   char *qualified_name = sa_strconcat(m->sa, sa_strconcat(m->sa, 
t->s->base.name, "."), t->base.name);
+   if (!qualified_name) {
+   sa_destroy(m->sa);
+   m->sa = sa;
+   return -1;
+   }
+
+   if (AUTHdeleteRemoteTableCredentials(qualified_name)) {
+   sa_destroy(m->sa);
+   m->sa = sa;
+   return -1;
+   }
+   sa_destroy(m->sa);
+   m->sa = sa;
+   }
+
return sql_trans_drop_table(m->session->tr, s, t->base.id, drop_action 
? DROP_CASCADE_START : DROP_RESTRICT);
 }
 
___
checkin-list mailing list
checkin-list@monetdb.org
https://www.monetdb.org/mailman/listinfo/checkin-list


MonetDB: remote_auth - Approve output

2018-05-03 Thread Panagiotis Koutsourakis
Changeset: 3b74ebd8d77e for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=3b74ebd8d77e
Modified Files:
clients/Tests/exports.stable.out
Branch: remote_auth
Log Message:

Approve output


diffs (14 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
@@ -744,8 +744,9 @@ str AUTHaddUser(oid *ret, Client c, cons
 str AUTHchangePassword(Client c, const char *oldpass, const char *passwd);
 str AUTHchangeUsername(Client c, const char *olduser, const char *newuser);
 str AUTHcheckCredentials(oid *ret, Client c, const char *user, const char 
*passwd, const char *challenge, const char *algo);
+str AUTHdeleteRemoteTableCredentials(const char *local_table);
 str AUTHgetPasswordHash(str *ret, Client c, const char *username);
-str AUTHgetRemoteTableCredentials(const char *local_table, Client cntxt, str 
*uri, str *username, str *password);
+str AUTHgetRemoteTableCredentials(const char *local_table, str *uri, str 
*username, str *password);
 str AUTHgetUsername(str *ret, Client c);
 str AUTHgetUsers(BAT **ret1, BAT **ret2, Client c);
 str AUTHinitTables(const char *passwd);
___
checkin-list mailing list
checkin-list@monetdb.org
https://www.monetdb.org/mailman/listinfo/checkin-list


MonetDB: exanest - Merge with Jul2017

2017-10-19 Thread Panagiotis Koutsourakis
17-SP2/%{name}-%{version}.tar.bz2
 
 # we need systemd for the _unitdir macro to exist
 # we need checkpolicy and selinux-policy-devel for the SELinux policy
 %if %{?rhel:0}%{!?rhel:1} || 0%{?rhel} >= 7
 # RHEL >= 7, and all current Fedora
 BuildRequires: systemd
-BuildRequires: checkpolicy, selinux-policy-devel, hardlink
+BuildRequires: checkpolicy
+BuildRequires: selinux-policy-devel
+BuildRequires: hardlink
 %endif
 BuildRequires: bison
 BuildRequires: bzip2-devel
@@ -1039,6 +1041,88 @@ done
 %postun -p /sbin/ldconfig
 
 %changelog
+* Wed Oct 11 2017 Panagiotis Koutsourakis <kutsu...@monetdbsolutions.com> - 
11.27.7-20171011
+- Rebuilt.
+- BZ#4017: server crashes when executing particular loopback query in
+  embedded python
+- BZ#6239: Incorrect profiling
+- BZ#6261: New handling of delta tables hurts badly reusage of bats
+- BZ#6287: should the CORR function return some numeric type that allows
+  fractions?
+- BZ#6321: Two-column aggregation on join result extremely slow.
+- BZ#6343: MERGE TABLE issue: unable to find
+- BZ#6348: Interference of procedure/table name
+- BZ#6350: Carriage return and form feed in TEXT fields are returned as
+  'r' and 'f' in jdbcclient and ResultSets
+- BZ#6352: Scope resolution problem (sqlsmith)
+- BZ#6353: implicit NULL value not propagated in distributed/remote query
+- BZ#6374: Wrong answer from merge table after content changes
+- BZ#6379: Table UDF: SEGV raised when invoking a non existing function
+- BZ#6380: unable to create new databases from clean installation
+- BZ#6381: Parser misses error messages in conditional
+- BZ#6382: Can't set JSON fields via PreparedStatement
+- BZ#6384: crash when setting a wrong listenaddr
+- BZ#6385: AGGREGATE UDFs with more than 2 parameters incorrectly
+  processed
+- BZ#6386: Unexpected error from server for query with long floats
+- BZ#6387: Performance degradation on multi column sort
+- BZ#6388: JDBC Connection via user voc produces errors when fetching
+  certain meta data information
+- BZ#6392: SELECT EXISTS (empty table) returns 'true'
+- BZ#6395: BAT leak of scalar result sets
+- BZ#6397: Isolation of generating functions not correct
+- BZ#6398: Null Matches in outer join are not supported
+- BZ#6399: UDF crashes when subquery and scalar values are passed
+  as pameters
+- BZ#6400: getCharacterStream() currently not supported
+- BZ#6404: COPY INTO crashes if table has primary key or foreign key
+  constraint
+- BZ#6409: sqllogictest crash on aggregation query with NOT IN clause
+  in HAVING clause
+- BZ#6410: Sqlitelogictest crash on aggregation query with IN clause
+- BZ#6411: Sqlitelogictest crash in aggregation query
+
+* Thu Jul 27 2017 Sjoerd Mullender <sjo...@acm.org> - 11.27.5-20170727
+- Rebuilt.
+- BZ#6375: MAL profiler truncates JSON objects larger than 8192 characters
+
+* Tue Jul 25 2017 Sjoerd Mullender <sjo...@acm.org> - 11.27.3-20170725
+- Rebuilt.
+- BZ#6325: Merge table unusable in other connections
+- BZ#6328: Transactional/multi-connection issues with merge tables
+- BZ#6336: VALUES multiple inserts error
+- BZ#6339: Mserver5 crashes on nested SELECT
+- BZ#6340: sample operator takes effect after the execution of the query,
+  expected before
+- BZ#6341: MERGE TABLE issue: Cannot register
+- BZ#6342: MERGE TABLE issue: hang
+- BZ#6344: Spurious errors and assertions (SQLsmith)
+
+* Mon Jul 24 2017 Sjoerd Mullender <sjo...@acm.org> - 11.27.3-20170725
+- buildtools: The Debian and Ubuntu installers have been fixed: there was a 
file
+  missing in the Jul2017 release.
+
+* Fri Jul 14 2017 Sjoerd Mullender <sjo...@acm.org> - 11.27.3-20170725
+- buildtools: Added a new RPM called MonetDB-selinux which provides the SELinux
+  policy required to run MonetDB under systemd, especially on Fedora 26.
+
+* Fri Jul 14 2017 Sjoerd Mullender <sjo...@acm.org> - 11.27.3-20170725
+- merovingian: monetdbd was leaking open file descriptors to the mserver5 
process
+  it started.  This has been fixed.
+
+* Fri Jul  7 2017 Sjoerd Mullender <sjo...@acm.org> - 11.27.3-20170725
+- buildtools: The Windows installers (*.msi files) are now created using the 
WiX
+  Toolset.
+- buildtools: The Windows binaries are now built using Visual Studio 2015.  
Because of
+  this, you may need to install the Visual C++ Redistributable for Visual
+  Studio 2015 before being able to run MonetDB.
+
+* Fri Jul  7 2017 Sjoerd Mullender <sjo...@acm.org> - 11.27.3-20170725
+- gdk: Many functions in GDK are now annotated with the GCC attribute
+  __warn_unused_result__ meaning that the compiler will issue a warning
+  if the result of the function (usually an indication of an error)
+  is not used.
+
 * Wed Jul 05 2017 Sjoerd Mullender <sjo...@acm.org> - 11.27.1-20170705
 - Rebuilt.
 - BZ#3465: Request: add support for CREATE VIEW with ORDER BY clause
diff --git a/NT/monetdb_config.h.in b/NT/monetdb_config.h.in
--- a/NT/monetdb_config.h.in
+++ b/NT/monetdb_config.h.in
@@ -347,9 +

MonetDB: data-vaults - Fix the linking problem in unix platforms...

2017-10-26 Thread Panagiotis Koutsourakis
Changeset: d092ca421147 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=d092ca421147
Modified Files:
sql/backends/monet5/vaults/Makefile.ag
Branch: data-vaults
Log Message:

Fix the linking problem in unix platforms other than Linux


diffs (12 lines):

diff --git a/sql/backends/monet5/vaults/Makefile.ag 
b/sql/backends/monet5/vaults/Makefile.ag
--- a/sql/backends/monet5/vaults/Makefile.ag
+++ b/sql/backends/monet5/vaults/Makefile.ag
@@ -28,8 +28,6 @@ lib__vault = {
DIR = libdir/monetdb5
SOURCES = vault.c vault.h
LIBS = ../../../../monetdb5/tools/libmonetdb5 \
-  HAVE_LIDAR?./lidar/lib_lidar \
-  HAVE_GADGET?./gadget/lib_gadget \
   ../../../../gdk/libbat $(curl_LIBS)
 }
 
___
checkin-list mailing list
checkin-list@monetdb.org
https://www.monetdb.org/mailman/listinfo/checkin-list


MonetDB: default - Add Changelog entry about --data_path option ...

2017-10-26 Thread Panagiotis Koutsourakis
Changeset: a88af28a3234 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=a88af28a3234
Modified Files:
testing/ChangeLog
Branch: default
Log Message:

Add Changelog entry about --data_path option of Mtest.py


diffs (11 lines):

diff --git a/testing/ChangeLog b/testing/ChangeLog
--- a/testing/ChangeLog
+++ b/testing/ChangeLog
@@ -1,3 +1,7 @@
 # ChangeLog file for testing
 # This file is updated with Maddlog
 
+* Thu Oct 26 2017 Panagiotis Koutsourakis <kutsu...@monetdbsolutions.com>
+- Added a --data_path option to Mtest.py that defines an external data
+  repository. See the commit message of c484932c7fd8 for more info.
+
___
checkin-list mailing list
checkin-list@monetdb.org
https://www.monetdb.org/mailman/listinfo/checkin-list


MonetDB: acticloud - Advance acticloud to Jul2017-SP2 release (M...

2017-10-27 Thread Panagiotis Koutsourakis
e dropped.
+- BZ#6438: Implement functionality to enforce the restrict option in:
+  DROP SCHEMA xyz RESTRICT;
+- BZ#6440: Faulty plan generated. Query returns more rows than expected
+  or existing in the view sys.tables.
+
+* Mon Oct 23 2017 Sjoerd Mullender <sjo...@acm.org> - 11.27.9-20171023
+- gdk: A serious bug, possibly resulting in database corruption, having to
+  do with appending data to a string BAT was fixed.
+
+* Wed Oct 11 2017 Panagiotis Koutsourakis <kutsu...@monetdbsolutions.com> - 
11.27.7-20171011
+- Rebuilt.
+- BZ#4017: server crashes when executing particular loopback query in
+  embedded python
+- BZ#6239: Incorrect profiling
+- BZ#6261: New handling of delta tables hurts badly reusage of bats
+- BZ#6287: should the CORR function return some numeric type that allows
+  fractions?
+- BZ#6321: Two-column aggregation on join result extremely slow.
+- BZ#6343: MERGE TABLE issue: unable to find
+- BZ#6348: Interference of procedure/table name
+- BZ#6350: Carriage return and form feed in TEXT fields are returned as
+  'r' and 'f' in jdbcclient and ResultSets
+- BZ#6352: Scope resolution problem (sqlsmith)
+- BZ#6353: implicit NULL value not propagated in distributed/remote query
+- BZ#6374: Wrong answer from merge table after content changes
+- BZ#6379: Table UDF: SEGV raised when invoking a non existing function
+- BZ#6380: unable to create new databases from clean installation
+- BZ#6381: Parser misses error messages in conditional
+- BZ#6382: Can't set JSON fields via PreparedStatement
+- BZ#6384: crash when setting a wrong listenaddr
+- BZ#6385: AGGREGATE UDFs with more than 2 parameters incorrectly
+  processed
+- BZ#6386: Unexpected error from server for query with long floats
+- BZ#6387: Performance degradation on multi column sort
+- BZ#6388: JDBC Connection via user voc produces errors when fetching
+  certain meta data information
+- BZ#6392: SELECT EXISTS (empty table) returns 'true'
+- BZ#6395: BAT leak of scalar result sets
+- BZ#6397: Isolation of generating functions not correct
+- BZ#6398: Null Matches in outer join are not supported
+- BZ#6399: UDF crashes when subquery and scalar values are passed
+  as pameters
+- BZ#6400: getCharacterStream() currently not supported
+- BZ#6404: COPY INTO crashes if table has primary key or foreign key
+  constraint
+- BZ#6409: sqllogictest crash on aggregation query with NOT IN clause
+  in HAVING clause
+- BZ#6410: Sqlitelogictest crash on aggregation query with IN clause
+- BZ#6411: Sqlitelogictest crash in aggregation query
+
 * Thu Jul 27 2017 Sjoerd Mullender <sjo...@acm.org> - 11.27.5-20170727
 - Rebuilt.
 - BZ#6375: MAL profiler truncates JSON objects larger than 8192 characters
diff --git a/NT/monetdb_config.h.in b/NT/monetdb_config.h.in
--- a/NT/monetdb_config.h.in
+++ b/NT/monetdb_config.h.in
@@ -762,7 +762,7 @@
 #define PACKAGE "MonetDB"
 
 /* Define to the version of this package. */
-#define PACKAGE_VERSION "11.27.6"
+#define PACKAGE_VERSION "11.27.10"
 
 /* Define to the address where bug reports for this package should be sent. */
 #define PACKAGE_BUGREPORT "https://bugs.monetdb.org/;
diff --git a/NT/rules.msc b/NT/rules.msc
--- a/NT/rules.msc
+++ b/NT/rules.msc
@@ -6,7 +6,7 @@
 #
 # Copyright 1997 - July 2008 CWI, August 2008 - 2017 MonetDB B.V.
 
-VERSION=11.27.6
+VERSION=11.27.10
 #   ^^
 # Maintained via vertoo. Please don't modify by hand!
 # Contact monetdb-develop...@lists.sourceforge.net for details and/or 
assistance.
diff --git a/buildtools/ChangeLog.Dec2016 b/buildtools/ChangeLog.Dec2016
deleted file mode 100644
--- a/buildtools/ChangeLog.Dec2016
+++ /dev/null
@@ -1,3 +0,0 @@
-# ChangeLog file for buildtools
-# This file is updated with Maddlog
-
diff --git a/clients/ChangeLog.Dec2016 b/clients/ChangeLog.Dec2016
deleted file mode 100644
--- a/clients/ChangeLog.Dec2016
+++ /dev/null
@@ -1,7 +0,0 @@
-# ChangeLog file for clients
-# This file is updated with Maddlog
-
-* Mon Jun 12 2017 Sjoerd Mullender <sjo...@acm.org>
-- A bug was fixed in the implementation of the functions SQLTables in
-  the ODBC driver where not enough memory was allocated.
-
diff --git a/clients/R/Tests/All b/clients/R/Tests/All
--- a/clients/R/Tests/All
+++ b/clients/R/Tests/All
@@ -1,8 +1,8 @@
 HAVE_LIBR?deps-install
 HAVE_LIBR?install
 HAVE_LIBR?deps-test
-HAVE_LIBR_PERL?dbi
-HAVE_LIBR?dplyr
+HAVE_LIBR?dbi
+#HAVE_LIBR?dplyr too slow
 HAVE_LIBR?dplyr-flights
 HAVE_LIBR?copy_into_fwf
 HAVE_LIBR_WIN32?dbapply
diff --git a/clients/R/Tests/copy_into_fwf.stable.out 
b/clients/R/Tests/copy_into_fwf.stable.out
--- a/clients/R/Tests/copy_into_fwf.stable.out
+++ b/clients/R/Tests/copy_into_fwf.stable.out
@@ -26,6 +26,8 @@ Ready.
 
 
   SQL  CREATE TABLE mtcars (mpg DOUBLE PRECISION, cyl DOUBLE PRECISION, disp 
DOUBLE PRECISION, hp DOUBLE PRECISION, drat DOUBLE PRECISION, wt DOUBLE 
PRECISION, qsec DOUBLE PRECISION, vs DOUBLE PRECISION, am DOUBLE PRECISION, 
gear DOUBLE PRECISION, carb DOUB

MonetDB: exanest - Advance exanest to Jul2017-SP2 (Merge with Ju...

2017-10-27 Thread Panagiotis Koutsourakis
raised in another eq_typeswitch error (sqlsmith)
+- BZ#6431: Sqlitelogictest crash in aggregation query with a long
+  having clause
+- BZ#6432: Assertion error in exp_bin (sqlsmith)
+- BZ#6433: Sqlitelogictest crash in complex SELECT query with IN operator
+- BZ#6435: Sqlitelogictest crash in simple select query
+- BZ#6437: System schemas "profiler" and "json" shouldn't be allowed to
+  be dropped.
+- BZ#6438: Implement functionality to enforce the restrict option in:
+  DROP SCHEMA xyz RESTRICT;
+- BZ#6440: Faulty plan generated. Query returns more rows than expected
+  or existing in the view sys.tables.
+
+* Mon Oct 23 2017 Sjoerd Mullender <sjo...@acm.org> - 11.27.9-20171023
+- gdk: A serious bug, possibly resulting in database corruption, having to
+  do with appending data to a string BAT was fixed.
+
 * Wed Oct 11 2017 Panagiotis Koutsourakis <kutsu...@monetdbsolutions.com> - 
11.27.7-20171011
 - Rebuilt.
 - BZ#4017: server crashes when executing particular loopback query in
diff --git a/NT/monetdb_config.h.in b/NT/monetdb_config.h.in
--- a/NT/monetdb_config.h.in
+++ b/NT/monetdb_config.h.in
@@ -762,7 +762,7 @@
 #define PACKAGE "MonetDB"
 
 /* Define to the version of this package. */
-#define PACKAGE_VERSION "11.27.8"
+#define PACKAGE_VERSION "11.27.10"
 
 /* Define to the address where bug reports for this package should be sent. */
 #define PACKAGE_BUGREPORT "https://bugs.monetdb.org/;
diff --git a/NT/rules.msc b/NT/rules.msc
--- a/NT/rules.msc
+++ b/NT/rules.msc
@@ -6,7 +6,7 @@
 #
 # Copyright 1997 - July 2008 CWI, August 2008 - 2017 MonetDB B.V.
 
-VERSION=11.27.8
+VERSION=11.27.10
 #   ^^
 # Maintained via vertoo. Please don't modify by hand!
 # Contact monetdb-develop...@lists.sourceforge.net for details and/or 
assistance.
diff --git a/clients/mapilib/mapi.rc b/clients/mapilib/mapi.rc
--- a/clients/mapilib/mapi.rc
+++ b/clients/mapilib/mapi.rc
@@ -3,8 +3,8 @@
 LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
 
 1 VERSIONINFO
-  FILEVERSION 11,27,8,1
-  PRODUCTVERSION 11,27,8,1
+  FILEVERSION 11,27,10,1
+  PRODUCTVERSION 11,27,10,1
   FILEFLAGSMASK 0x3fL
   FILEFLAGS 0
   FILEOS VOS_NT_WINDOWS32
@@ -18,7 +18,7 @@ BEGIN
   VALUE "Comments", "\0"
   VALUE "CompanyName", "MonetDB B.V.\0"
   VALUE "FileDescription", "MonetDB Application Interface DLL\0"
-  VALUE "FileVersion", "11.27.8\0"
+  VALUE "FileVersion", "11.27.10\0"
   //
   // Maintained via vertoo. Please don't modify by hand!
   // Contact monetdb-develop...@lists.sourceforge.net for details and/or 
assistance.
@@ -28,7 +28,7 @@ BEGIN
   VALUE "OriginalFilename", "Mapi.dll\0"
   VALUE "PrivateBuild", "\0"
   VALUE "ProductName", "MonetDB Client Libraries\0"
-  VALUE "ProductVersion", "11.27.8\0"
+  VALUE "ProductVersion", "11.27.10\0"
   //   
   // Maintained via vertoo. Please don't modify by hand!
   // Contact monetdb-develop...@lists.sourceforge.net for details and/or 
assistance.
diff --git a/clients/odbc/driver/driver.rc b/clients/odbc/driver/driver.rc
--- a/clients/odbc/driver/driver.rc
+++ b/clients/odbc/driver/driver.rc
@@ -3,8 +3,8 @@
 LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
 
 1 VERSIONINFO
-  FILEVERSION 11,27,8,1
-  PRODUCTVERSION 11,27,8,1
+  FILEVERSION 11,27,10,1
+  PRODUCTVERSION 11,27,10,1
   FILEFLAGSMASK 0x3fL
   FILEFLAGS 0
   FILEOS VOS_NT_WINDOWS32
@@ -18,7 +18,7 @@ BEGIN
   VALUE "Comments", "\0"
   VALUE "CompanyName", "MonetDB B.V.\0"
   VALUE "FileDescription", "MonetDB ODBC Driver DLL\0"
-  VALUE "FileVersion", "11.27.8\0"
+  VALUE "FileVersion", "11.27.10\0"
   //
   // Maintained via vertoo. Please don't modify by hand!
   // Contact monetdb-develop...@lists.sourceforge.net for details and/or 
assistance.
@@ -28,7 +28,7 @@ BEGIN
   VALUE "OriginalFilename", "libMonetODBC.dll\0"
   VALUE "PrivateBuild", "\0"
   VALUE "ProductName", "MonetDB SQL Server\0"
-  VALUE "ProductVersion", "11.27.8\0"
+  VALUE "ProductVersion", "11.27.10\0"
   //   
   // Maintained via vertoo. Please don't modify by hand!
   // Contact monetdb-develop...@lists.sourceforge.net for details and/or 
assistance.
diff --git a/clients/odbc/winsetup/setup.rc b/clients/odbc/winsetup/setup.rc
--- a/clients/odbc/winsetup/setup.rc
+++ b/clients/odbc/winsetup/setup.rc
@@ -62,8 +62,8 @@ END
 //
 
 VS_VERSION_INFO VERSIONINFO
- FILEVERSION 11,27,8,1
- PRO

MonetDB: default - Add data_path option to Mtest.py

2017-10-26 Thread Panagiotis Koutsourakis
Changeset: c484932c7fd8 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=c484932c7fd8
Modified Files:
testing/Mtest.py.in
Branch: default
Log Message:

Add data_path option to Mtest.py

Tests might need external files in order to run (eg CSV files). We would like to
keep them in a separate repository in order avoid the size explosion of the main
MonetDB repository, and so we need a way to refer to them from inside a test.

The option --data_path (or -D) in Mtest.py will perform the following actions:

1) set the HAVE_DATA_PATH conditional to true
2) set the environment variable TSTDATAPATH to the value provided that can be
referred from inside the test.


diffs (67 lines):

diff --git a/testing/Mtest.py.in b/testing/Mtest.py.in
--- a/testing/Mtest.py.in
+++ b/testing/Mtest.py.in
@@ -360,6 +360,7 @@ CONDITIONALS = {
 'HAVE_PHP' : "",
 'HAVE_PYMONETDB'   : "",
 'HAVE_RUBY': "",
+'HAVE_DATA_PATH'   : "",
 'MERCURIAL': "",
 'RELEASERUN'   : "",
 'BAD_HOSTNAME' : "",
@@ -1223,6 +1224,10 @@ def PerformDir(env, testdir, testlist, B
 if os.name == 'nt':
 os.environ['PYTHON2PATH'] += os.path.pathsep + 
_configure(os.path.join('@QXprefix@', 'lib', 'python2'))
 os.environ['PYTHON3PATH'] += os.path.pathsep + 
_configure(os.path.join('@QXprefix@', 'lib', 'python3'))
+if 'TSTDATAPATH' not in os.environ and TSTDATAPATH:
+env['TSTDATAPATH'] = TSTDATAPATH
+os.environ['TSTDATAPATH'] = TSTDATAPATH
+
 
 #STDERR.flush()
 #for v in 'RELSRCDIR':
@@ -3586,6 +3591,8 @@ def main(argv) :
  'automatically add required tests when testing individual tests'),
 ('global_timeout', 'T', 'global_timeout', '',
  'global timeout'),
+('data_path', 'D', 'data_path', '',
+ "Path to the root directory of the data files needed for 
testing"),
 ]
 
 if THISFILE == 'Mtest.py':
@@ -3715,6 +3722,9 @@ def main(argv) :
 a = opts.get('global_timeout')
 if a is not None:
 global_timeout = int(a)
+a = opts.get('data_path')
+if a is not None:
+env['TSTDATAPATH'] = a
 if THISFILE == 'Mapprove.py':
 a = opts.get('ext')
 if a is None:
@@ -3768,6 +3778,8 @@ def main(argv) :
 pass
 else:
 CONDITIONALS['HAVE_LIBPANDAS'] = '#'
+if env.get('TSTDATAPATH'):
+CONDITIONALS['HAVE_DATA_PATH'] = '#'
 if CheckExec('perl'):
 proc = process.Popen(['perl', '-e', 'use MonetDB::CLI::MapiPP'],
  stdout = process.PIPE, stderr = process.PIPE,
@@ -3870,6 +3882,8 @@ def main(argv) :
 TSTTRGBASE = env['TSTTRGBASE']
 global TSTSRCBASE
 TSTSRCBASE = env['TSTSRCBASE']
+global TSTDATAPATH
+TSTDATAPATH = env.get('TSTDATAPATH')
 
 if THISFILE == "Mapprove.py" \
and not os.path.exists(os.path.join(TSTTRGBASE, dftTSTPREF )) \
@@ -3951,6 +3965,7 @@ def main(argv) :
 if THISFILE == "Mtest.py":
 vars_ = vars_ + ['GDK_DBFARM']
 vars_ = vars_ + ['setMONETDB_MOD_PATH']
+vars_ = vars_ + ['TSTDATAPATH']
 else: # THISFILE == "Mapprove.py"
 vars_ = vars_
 for v in vars_:
___
checkin-list mailing list
checkin-list@monetdb.org
https://www.monetdb.org/mailman/listinfo/checkin-list


MonetDB: data-vaults - Merge with default

2017-10-26 Thread Panagiotis Koutsourakis
org> - 11.27.9-20171023
+- Rebuilt.
+- BZ#6207: identifier ambiguous when grouping and selecting the same
+  column twice
+- BZ#6335: Sqlitelogictest crash in complex SQL query
+- BZ#6405: Compilation error if DISABLE_PARENT_HASH not defined
+- BZ#6412: Overflow in sys.epoch
+- BZ#6413: Wrong answer for TPC-H Q17
+- BZ#6414: Using RPAD returns: could not allocate space
+- BZ#6416: Sqlitelogictest crash in aggregation query with a NOT IN clause
+- BZ#6417: Segfault encountered (sqlsmith)
+- BZ#6418: Segfault in renaming (sqlsmith)
+- BZ#6419: segfault in rel_optimizer (sqlsmith)
+- BZ#6420: Assertion error in mergetable task (sqlsmith)
+- BZ#6422: Another assertion error in rel_or (sqlsmith)
+- BZ#6423: Dereference null pointer (sqlsmith)
+- BZ#6424: Assertion error in rel_rename_expr (sqlsmith)
+- BZ#6425: Assertion error in exp_bin (sqlsmith)
+- BZ#6426: Assertion error in rel_find_exp_ (sqlsmith)
+- BZ#6427: Assertion error in eq_typeswitchloop (sqlsmith)
+- BZ#6428: Sqlitelogictest crash in aggregation query
+- BZ#6430: Assertion raised in another eq_typeswitch error (sqlsmith)
+- BZ#6431: Sqlitelogictest crash in aggregation query with a long
+  having clause
+- BZ#6432: Assertion error in exp_bin (sqlsmith)
+- BZ#6433: Sqlitelogictest crash in complex SELECT query with IN operator
+- BZ#6435: Sqlitelogictest crash in simple select query
+- BZ#6437: System schemas "profiler" and "json" shouldn't be allowed to
+  be dropped.
+- BZ#6438: Implement functionality to enforce the restrict option in:
+  DROP SCHEMA xyz RESTRICT;
+- BZ#6440: Faulty plan generated. Query returns more rows than expected
+  or existing in the view sys.tables.
+
+* Mon Oct 23 2017 Sjoerd Mullender <sjo...@acm.org> - 11.27.9-20171023
+- gdk: A serious bug, possibly resulting in database corruption, having to
+  do with appending data to a string BAT was fixed.
+
 * Wed Oct 11 2017 Panagiotis Koutsourakis <kutsu...@monetdbsolutions.com> - 
11.27.7-20171011
 - Rebuilt.
 - BZ#4017: server crashes when executing particular loopback query in
diff --git a/clients/R/Tests/All b/clients/R/Tests/All
--- a/clients/R/Tests/All
+++ b/clients/R/Tests/All
@@ -1,8 +1,8 @@
 HAVE_LIBR?deps-install
 HAVE_LIBR?install
 HAVE_LIBR?deps-test
-HAVE_LIBR_PERL?dbi
-HAVE_LIBR?dplyr
+HAVE_LIBR?dbi
+#HAVE_LIBR?dplyr too slow
 HAVE_LIBR?dplyr-flights
 HAVE_LIBR?copy_into_fwf
 HAVE_LIBR_WIN32?dbapply
diff --git a/clients/R/Tests/copy_into_fwf.stable.out 
b/clients/R/Tests/copy_into_fwf.stable.out
--- a/clients/R/Tests/copy_into_fwf.stable.out
+++ b/clients/R/Tests/copy_into_fwf.stable.out
@@ -26,6 +26,8 @@ Ready.
 
 
   SQL  CREATE TABLE mtcars (mpg DOUBLE PRECISION, cyl DOUBLE PRECISION, disp 
DOUBLE PRECISION, hp DOUBLE PRECISION, drat DOUBLE PRECISION, wt DOUBLE 
PRECISION, qsec DOUBLE PRECISION, vs DOUBLE PRECISION, am DOUBLE PRECISION, 
gear DOUBLE PRECISION, carb DOUBLE PRECISION)
+  ROWS Fetched: 0 [complete]
+   Changed: NA
 mpg cyl  disp  hp dratwt  qsec vs am gear carb
 1  21.0   6 160.0 110 3.90 2.620 16.46  0  144
 2  21.0   6 160.0 110 3.90 2.875 17.02  0  144
diff --git a/clients/R/Tests/dbi.R b/clients/R/Tests/dbi.R
--- a/clients/R/Tests/dbi.R
+++ b/clients/R/Tests/dbi.R
@@ -198,7 +198,7 @@ stopifnot(identical(1L, as.integer(dbGet
 # reserved words in data frame column names
 stopifnot(dbIsValid(conn))
 dbBegin(conn)
-dbWriteTable(conn, "evilt", data.frame(year=42, month=12, day=24, 
some.dot=12), transaction=F)
+dbWriteTable(conn, "evilt", data.frame(year=42, month=12, day=24, some.dot=12))
 stopifnot(dbExistsTable(conn, "evilt"))
 dbRollback(conn)
 
@@ -208,7 +208,7 @@ dbBegin(conn)
 data(api, package="survey")
 x <- apiclus1
 x$idkey <- seq( nrow( x ) )
-dbWriteTable( conn , 'x' , x , transaction=F)
+dbWriteTable( conn , 'x' , x )
 stopifnot(dbExistsTable(conn, "x"))
 dbRollback(conn)
 
@@ -217,7 +217,7 @@ stopifnot(!is.null(dbGetQuery(conn, "SEL
 
 #non-standard dbwritetable use
 dbBegin(conn)
-dbWriteTable(conn, "vectable", 1:1000, transaction=F)
+dbWriteTable(conn, "vectable", 1:1000)
 stopifnot(dbExistsTable(conn, "vectable"))
 dbRollback(conn)
 
diff --git a/clients/R/Tests/dbi.stable.err b/clients/R/Tests/dbi.stable.err
--- a/clients/R/Tests/dbi.stable.err
+++ b/clients/R/Tests/dbi.stable.err
@@ -33,19 +33,16 @@ stderr of test 'dbi` in directory 'clien
 Identifier(s) "Sepal.Length", "Sepal.Width", "Petal.Length", "Petal.Width", 
"Species" contain uppercase or reserved SQL characters and need(s) to be quoted 
in queries.
 Warning message:
 'MonetDBLite::isIdCurrent' is deprecated.
-Use 'dbIsValid' instead.
+Use 'use dbIsValid() instead' instead.
 See help("Deprecated") 
 Identifier(s) "Sepal.Length", "Sepal.Width", "Petal.Length", "Petal.Width", 
"Species" contain uppercase or reserve

MonetDB: data-vaults - Add directory test and approve output

2017-10-27 Thread Panagiotis Koutsourakis
Changeset: 8b80195fbd4f for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=8b80195fbd4f
Added Files:
sql/backends/monet5/vaults/lidar/Tests/lidar-directory.stable.err
sql/backends/monet5/vaults/lidar/Tests/lidar-directory.stable.out
sql/backends/monet5/vaults/lidar/Tests/lidar-single-file.stable.err
sql/backends/monet5/vaults/lidar/Tests/lidar-single-file.stable.out
Modified Files:
sql/backends/monet5/vaults/lidar/Tests/All
sql/backends/monet5/vaults/lidar/Tests/lidar-single-file.sql.in
Branch: data-vaults
Log Message:

Add directory test and approve output


diffs (truncated from 735 to 300 lines):

diff --git a/sql/backends/monet5/vaults/lidar/Tests/All 
b/sql/backends/monet5/vaults/lidar/Tests/All
--- a/sql/backends/monet5/vaults/lidar/Tests/All
+++ b/sql/backends/monet5/vaults/lidar/Tests/All
@@ -1,1 +1,2 @@
 HAVE_DATA_PATH?lidar-single-file
+HAVE_DATA_PATH?lidar-directory
diff --git a/sql/backends/monet5/vaults/lidar/Tests/lidar-directory.stable.err 
b/sql/backends/monet5/vaults/lidar/Tests/lidar-directory.stable.err
new file mode 100644
--- /dev/null
+++ b/sql/backends/monet5/vaults/lidar/Tests/lidar-directory.stable.err
@@ -0,0 +1,137 @@
+stderr of test 'lidar-directory` in directory 
'sql/backends/monet5/vaults/lidar` itself:
+
+
+# 16:54:24 >  
+# 16:54:24 >  "mserver5" "--debug=10" "--set" "gdk_nr_threads=0" "--set" 
"mapi_open=true" "--set" "mapi_port=34483" "--set" 
"mapi_usock=/var/tmp/mtest-10899/.s.monetdb.34483" "--set" "monet_prompt=" 
"--forcemito" 
"--dbpath=/home/kutsurak/work/monet/sources/MonetDB/build/install/var/MonetDB/mTests_sql_backends_monet5_vaults_lidar"
+# 16:54:24 >  
+
+# builtin opt  gdk_dbpath = 
/home/kutsurak/work/monet/sources/MonetDB/build/install/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 = 34483
+# cmdline opt  mapi_usock = /var/tmp/mtest-10899/.s.monetdb.34483
+# cmdline opt  monet_prompt = 
+# cmdline opt  gdk_dbpath = 
/home/kutsurak/work/monet/sources/MonetDB/build/install/var/MonetDB/mTests_sql_backends_monet5_vaults_lidar
+# cmdline opt  gdk_debug = 536870922
+Params: XYZainrcpedM
+Initial table name: tbl1
+file: 
/home/kutsurak/work/monet/sources/monetdb-test-data/lidar/directory_loading/lidar1.las
 2
+file: 
/home/kutsurak/work/monet/sources/monetdb-test-data/lidar/directory_loading/lidar2.las
 2
+tname: tbl1
+tablename: tbl1
+
+-
+  Header Summary
+-
+  File Name: 
/home/kutsurak/work/monet/sources/monetdb-test-data/lidar/directory_loading/lidar1.las
+  Version:1.2
+  Source ID:  0
+  Reserved:   0
+  Project ID/GUID:   '----'
+  System Identifier: ''
+  Generating Software:   'TerraScan'
+  File Creation Day/Year:0/0
+  Header Size227
+  Offset to Point Data   1994
+  Number Var. Length Records 4
+  Point Data Format  1
+  Point Data Record Length   28
+  Number of Point Records106
+  Number of Points by Return 90 12 2 2 0
+  Scale Factor X Y Z 0.01 0.01 0.01
+  Offset X Y Z   -0.00 -0.00 -0.00
+  Min X Y Z  635616.31 848977.79 407.35
+  Max X Y Z  638864.60 853362.37 536.84
+ Spatial Reference   +proj=lcc +lat_1=43 +lat_2=45.5 +lat_0=41.75 
+lon_0=-120.5 +x_0=39.984 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 
+units=ft +no_defs 
+
+-
+  VLR Summary
+-
+   User: 'liblas' - Description: 'OGR variant of OpenGIS WKT SRS'
+   ID: 2112 Length: 720
+
+   User: 'LASF_Projection' - Description: 'GeoTIFF GeoKeyDirectoryTag'
+   ID: 34735 Length: 64
+
+   User: 'LASF_Projection' - Description: 'GeoTIFF GeoAsciiParamsTag'
+   ID: 34737 Length: 47
+
+   User: 'liblas' - Description: 'OGR variant of OpenGIS WKT SRS'
+   ID: 2112 Length: 720
+
+Scale: 0.01 0.01 0.01
+Decimal type scale: 2 2 2
+Decimal type precision: 6 6 3
+decimal digits: 2 2 2
+total digits: 8 8 5
+
+-
+  Header Summary
+-
+  File Name: 
/home/kutsurak/work/monet/sources/monetdb-test-data/lidar/directory_loading/lidar2.las
+  Version:1.2
+  Source ID:  0
+  Reserved:   0
+  Project ID/GUID:   

<    1   2   3   4   5   6   7   8   9   10   >