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: default - Merge with Mar2018 branch.

2018-05-09 Thread Sjoerd Mullender
Changeset: c906d3f37a64 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=c906d3f37a64
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
Modified Files:
configure.ag
sql/test/BugTracker-2018/Tests/All
Branch: default
Log Message:

Merge with Mar2018 branch.


diffs (216 lines):

diff --git a/configure.ag b/configure.ag
--- a/configure.ag
+++ b/configure.ag
@@ -2972,14 +2972,6 @@ typedef __uint128_t uhge;
 @%:@ define __declspec(x)
 @%:@endif
 
-/* work around problem compiling batxml.c with clang
- * clang 3.5.0 claims to be GnuC 4.3, but doesn't accept
- * __attribute__((alloc_size(N))), as libml2 2.9.2 expects
- */
-@%:@if defined(__GNUC__) && defined(__clang__)
-@%:@define LIBXML_ATTR_ALLOC_SIZE(x)
-@%:@endif
-
 /* These are required to make MonetDB's source tree CRAN-compliant */
 @%:@ifdef HAVE_EMBEDDED_R
 @%:@include "tools/embedded/undef.h"
diff --git a/sql/test/BugTracker-2018/Tests/All 
b/sql/test/BugTracker-2018/Tests/All
--- a/sql/test/BugTracker-2018/Tests/All
+++ b/sql/test/BugTracker-2018/Tests/All
@@ -59,3 +59,4 @@ sqlitelogictest-count-coalesce-nullif.Bu
 sqlitelogictest-case-not-in-count.Bug-6587
 sqlitelogictest-complex-expression.Bug-6589
 sqlitelogictest-complex-case-not-in.Bug-6594
+multiple-count.Bug-6599
diff --git a/sql/test/BugTracker-2018/Tests/multiple-count.Bug-6599.sql 
b/sql/test/BugTracker-2018/Tests/multiple-count.Bug-6599.sql
new file mode 100644
--- /dev/null
+++ b/sql/test/BugTracker-2018/Tests/multiple-count.Bug-6599.sql
@@ -0,0 +1,24 @@
+start transaction;
+
+CREATE TABLE "sys"."unitTestDontDelete" (
+"A"VARCHAR(255),
+"B"BIGINT,
+"C"DOUBLE,
+"D"TIMESTAMP
+);
+INSERT INTO "sys"."unitTestDontDelete" VALUES (NULL, NULL, NULL, NULL);
+INSERT INTO "sys"."unitTestDontDelete" VALUES ('Cat1', 0, 0.5, '2013-06-10 
11:10:10.00');
+INSERT INTO "sys"."unitTestDontDelete" VALUES ('Cat2', 1, 1.5, '2013-06-11 
12:11:11.00');
+INSERT INTO "sys"."unitTestDontDelete" VALUES ('Cat1', 2, 2.5, '2013-06-12 
13:12:12.00');
+INSERT INTO "sys"."unitTestDontDelete" VALUES ('Cat2', 3, 3.5, '2013-06-13 
14:13:13.00');
+INSERT INTO "sys"."unitTestDontDelete" VALUES ('Cat1', 4, 4.5, '2013-06-14 
15:14:14.00');
+INSERT INTO "sys"."unitTestDontDelete" VALUES ('Cat2', 5, 5.5, '2013-06-15 
16:15:15.00');
+INSERT INTO "sys"."unitTestDontDelete" VALUES ('Cat1', 6, 6.5, '2013-06-16 
17:16:16.00');
+INSERT INTO "sys"."unitTestDontDelete" VALUES ('Cat2', 7, 7.5, '2013-06-17 
18:17:17.00');
+INSERT INTO "sys"."unitTestDontDelete" VALUES ('Cat1', 8, 8.5, '2013-06-18 
19:18:18.00');
+
+select count(*) as "c3_recordcount" from "unitTestDontDelete" as "t2" where 
"t2"."A" = 'Nope';
+
+select count(*) as "c3_recordcount", count(distinct "t2"."B") as 
"c7_b__unique_count_"  from "unitTestDontDelete" as "t2" where "t2"."A" = 
'Nope';
+
+rollback;
diff --git a/sql/test/BugTracker-2018/Tests/multiple-count.Bug-6599.stable.err 
b/sql/test/BugTracker-2018/Tests/multiple-count.Bug-6599.stable.err
new file mode 100644
--- /dev/null
+++ b/sql/test/BugTracker-2018/Tests/multiple-count.Bug-6599.stable.err
@@ -0,0 +1,37 @@
+stderr of test 'multiple-count.Bug-6599` in directory 
'sql/test/BugTracker-2018` itself:
+
+
+# 15:27:37 >  
+# 15:27:37 >  "mserver5" "--debug=10" "--set" "gdk_nr_threads=0" "--set" 
"mapi_open=true" "--set" "mapi_port=32594" "--set" 
"mapi_usock=/var/tmp/mtest-4889/.s.monetdb.32594" "--set" "monet_prompt=" 
"--forcemito" 
"--dbpath=/ufs/sjoerd/@Monet-stable/var/MonetDB/mTests_sql_test_BugTracker-2018"
 "--set" "embedded_r=yes" "--set" "embedded_py=true" "--set" "embedded_c=true"
+# 15:27:37 >  
+
+# builtin opt  gdk_dbpath = /ufs/sjoerd/@Monet-stable/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 = 32594
+# cmdline opt  mapi_usock = /var/tmp/mtest-4889/.s.monetdb.32594
+# cmdline opt  monet_prompt = 
+# cmdline opt  gdk_dbpath = 
/ufs/sjoerd/@Monet-stable/var/MonetDB/mTests_sql_test_BugTracker-2018
+# cmdline opt  embedded_r = yes
+# cmdline opt  embedded_py = true
+# cmdline opt  embedded_c = true
+# cmdline opt  gdk_debug = 553648138
+
+# 15:27:37 >  
+# 15:27:37 >  "mclient" "-lsql" "-ftest" "-tnone" "-Eutf-8" "-i" "-e" 
"--host=/var/tmp/mtest-4889" "--port=32594"
+# 15:27:37 >  
+
+
+# 15:27:38 >  
+# 15:27:38 >  "Done."
+# 15:27:38 >  
+
diff --git 

MonetDB: Mar2018 - Don't define LIBXML_ATTR_ALLOC_SIZE.

2018-05-09 Thread Sjoerd Mullender
Changeset: dbfe360e556f for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=dbfe360e556f
Modified Files:
configure.ag
Branch: Mar2018
Log Message:

Don't define LIBXML_ATTR_ALLOC_SIZE.
When it is defined, we get into uncompilable code in xmlversion.h on
MacOS.


diffs (18 lines):

diff --git a/configure.ag b/configure.ag
--- a/configure.ag
+++ b/configure.ag
@@ -2972,14 +2972,6 @@ typedef __uint128_t uhge;
 @%:@ define __declspec(x)
 @%:@endif
 
-/* work around problem compiling batxml.c with clang
- * clang 3.5.0 claims to be GnuC 4.3, but doesn't accept
- * __attribute__((alloc_size(N))), as libml2 2.9.2 expects
- */
-@%:@if defined(__GNUC__) && defined(__clang__)
-@%:@define LIBXML_ATTR_ALLOC_SIZE(x)
-@%:@endif
-
 /* These are required to make MonetDB's source tree CRAN-compliant */
 @%:@ifdef HAVE_EMBEDDED_R
 @%:@include "tools/embedded/undef.h"
___
checkin-list mailing list
checkin-list@monetdb.org
https://www.monetdb.org/mailman/listinfo/checkin-list


MonetDB: Mar2018 - Test for bug 6599.

2018-05-09 Thread Sjoerd Mullender
Changeset: 5e821c5bed12 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=5e821c5bed12
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
Modified Files:
sql/test/BugTracker-2018/Tests/All
Branch: Mar2018
Log Message:

Test for bug 6599.


diffs (198 lines):

diff --git a/sql/test/BugTracker-2018/Tests/All 
b/sql/test/BugTracker-2018/Tests/All
--- a/sql/test/BugTracker-2018/Tests/All
+++ b/sql/test/BugTracker-2018/Tests/All
@@ -55,3 +55,4 @@ concat-str-int.Bug-6583
 nested-merge-tables.Bug-6585
 sqlitelogictest-complex-expression.Bug-6589
 sqlitelogictest-complex-case-not-in.Bug-6594
+multiple-count.Bug-6599
diff --git a/sql/test/BugTracker-2018/Tests/multiple-count.Bug-6599.sql 
b/sql/test/BugTracker-2018/Tests/multiple-count.Bug-6599.sql
new file mode 100644
--- /dev/null
+++ b/sql/test/BugTracker-2018/Tests/multiple-count.Bug-6599.sql
@@ -0,0 +1,24 @@
+start transaction;
+
+CREATE TABLE "sys"."unitTestDontDelete" (
+"A"VARCHAR(255),
+"B"BIGINT,
+"C"DOUBLE,
+"D"TIMESTAMP
+);
+INSERT INTO "sys"."unitTestDontDelete" VALUES (NULL, NULL, NULL, NULL);
+INSERT INTO "sys"."unitTestDontDelete" VALUES ('Cat1', 0, 0.5, '2013-06-10 
11:10:10.00');
+INSERT INTO "sys"."unitTestDontDelete" VALUES ('Cat2', 1, 1.5, '2013-06-11 
12:11:11.00');
+INSERT INTO "sys"."unitTestDontDelete" VALUES ('Cat1', 2, 2.5, '2013-06-12 
13:12:12.00');
+INSERT INTO "sys"."unitTestDontDelete" VALUES ('Cat2', 3, 3.5, '2013-06-13 
14:13:13.00');
+INSERT INTO "sys"."unitTestDontDelete" VALUES ('Cat1', 4, 4.5, '2013-06-14 
15:14:14.00');
+INSERT INTO "sys"."unitTestDontDelete" VALUES ('Cat2', 5, 5.5, '2013-06-15 
16:15:15.00');
+INSERT INTO "sys"."unitTestDontDelete" VALUES ('Cat1', 6, 6.5, '2013-06-16 
17:16:16.00');
+INSERT INTO "sys"."unitTestDontDelete" VALUES ('Cat2', 7, 7.5, '2013-06-17 
18:17:17.00');
+INSERT INTO "sys"."unitTestDontDelete" VALUES ('Cat1', 8, 8.5, '2013-06-18 
19:18:18.00');
+
+select count(*) as "c3_recordcount" from "unitTestDontDelete" as "t2" where 
"t2"."A" = 'Nope';
+
+select count(*) as "c3_recordcount", count(distinct "t2"."B") as 
"c7_b__unique_count_"  from "unitTestDontDelete" as "t2" where "t2"."A" = 
'Nope';
+
+rollback;
diff --git a/sql/test/BugTracker-2018/Tests/multiple-count.Bug-6599.stable.err 
b/sql/test/BugTracker-2018/Tests/multiple-count.Bug-6599.stable.err
new file mode 100644
--- /dev/null
+++ b/sql/test/BugTracker-2018/Tests/multiple-count.Bug-6599.stable.err
@@ -0,0 +1,37 @@
+stderr of test 'multiple-count.Bug-6599` in directory 
'sql/test/BugTracker-2018` itself:
+
+
+# 15:27:37 >  
+# 15:27:37 >  "mserver5" "--debug=10" "--set" "gdk_nr_threads=0" "--set" 
"mapi_open=true" "--set" "mapi_port=32594" "--set" 
"mapi_usock=/var/tmp/mtest-4889/.s.monetdb.32594" "--set" "monet_prompt=" 
"--forcemito" 
"--dbpath=/ufs/sjoerd/@Monet-stable/var/MonetDB/mTests_sql_test_BugTracker-2018"
 "--set" "embedded_r=yes" "--set" "embedded_py=true" "--set" "embedded_c=true"
+# 15:27:37 >  
+
+# builtin opt  gdk_dbpath = /ufs/sjoerd/@Monet-stable/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 = 32594
+# cmdline opt  mapi_usock = /var/tmp/mtest-4889/.s.monetdb.32594
+# cmdline opt  monet_prompt = 
+# cmdline opt  gdk_dbpath = 
/ufs/sjoerd/@Monet-stable/var/MonetDB/mTests_sql_test_BugTracker-2018
+# cmdline opt  embedded_r = yes
+# cmdline opt  embedded_py = true
+# cmdline opt  embedded_c = true
+# cmdline opt  gdk_debug = 553648138
+
+# 15:27:37 >  
+# 15:27:37 >  "mclient" "-lsql" "-ftest" "-tnone" "-Eutf-8" "-i" "-e" 
"--host=/var/tmp/mtest-4889" "--port=32594"
+# 15:27:37 >  
+
+
+# 15:27:38 >  
+# 15:27:38 >  "Done."
+# 15:27:38 >  
+
diff --git a/sql/test/BugTracker-2018/Tests/multiple-count.Bug-6599.stable.out 
b/sql/test/BugTracker-2018/Tests/multiple-count.Bug-6599.stable.out
new file mode 100644
--- /dev/null
+++ b/sql/test/BugTracker-2018/Tests/multiple-count.Bug-6599.stable.out
@@ -0,0 +1,114 @@
+stdout of test 'multiple-count.Bug-6599` in directory 
'sql/test/BugTracker-2018` itself:
+
+
+# 15:27:37 >  
+# 15:27:37 >  "mserver5" "--debug=10" "--set" "gdk_nr_threads=0" "--set" 
"mapi_open=true" "--set" "mapi_port=32594" "--set" 
"mapi_usock=/var/tmp/mtest-4889/.s.monetdb.32594" "--set" "monet_prompt=" 
"--forcemito" 
"--dbpath=/ufs/sjoerd/@Monet-stable/var/MonetDB/mTests_sql_test_BugTracker-2018"
 

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 - 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: default - Merge with Mar2018 branch.

2018-05-09 Thread Sjoerd Mullender
Changeset: 8b90f7e2c4b7 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=8b90f7e2c4b7
Added Files:
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/Tests/All
Branch: default
Log Message:

Merge with Mar2018 branch.


diffs (truncated from 908 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 ], [
LINUX_DIST=Debian:`cat /etc/debian_version | 
head -n1`],
[LINUX_DIST=`uname -s`:`uname -r | sed 
's|^\([[0-9\.]]*\)\([[^0-9\.]].*\)$|\1|'`])
-   LINUX_DIST=`echo "$LINUX_DIST" | sed 's|:||'`
+   

MonetDB: Mar2018 - More fully use M4sh for configure.

2018-05-09 Thread Sjoerd Mullender
Changeset: 1d5ddfd0db0e for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=1d5ddfd0db0e
Modified Files:
configure.ag
Branch: Mar2018
Log Message:

More fully use M4sh for configure.
Amazingly, echo and eval are both non-portable, so avoid if possible;
use AS_IF and such constructs instead of bare shell commands to have
better control over balancing parentheses.


diffs (truncated from 637 to 300 lines):

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 ], [
LINUX_DIST=Debian:`cat /etc/debian_version | 
head -n1`],
[LINUX_DIST=`uname -s`:`uname -r | sed 
's|^\([[0-9\.]]*\)\([[^0-9\.]].*\)$|\1|'`])
-   LINUX_DIST=`echo "$LINUX_DIST" | sed 's|:||'`
+   LINUX_DIST=`AS_ECHO(["$LINUX_DIST"]) | sed 's|:||'`
AC_MSG_RESULT([$LINUX_DIST])])
 AC_SUBST([LINUX_DIST])
 
@@ -561,11 +561,11 @@ AC_DEFUN([MCHECK_ADD_FLAG], [
return 0;
}
]])],
-   [eval ${cache_var}=yes],
-   [eval ${cache_var}=no])
+   [AS_VAR_SET([$cache_var], [yes])],
+   [AS_VAR_SET([$cache_var], [no])])
CFLAGS="${SAVE_FLAGS}"
])
-   eval "test \"x\$${cache_var}\" = xyes && X_CFLAGS=\"${X_CFLAGS} $1\""
+   AS_VAR_IF([$cache_var], [yes], [X_CFLAGS="${X_CFLAGS} $1"])
 ])
 
 # Set compiler switches.
@@ -845,7 +845,7 @@ AS_CASE([x$enable_debug.$enable_optimize
enable_optimize=no
],
[x*.*no], [
-   enable_debug=`echo $enable_debug | sed 's:^def_::'`
+   enable_debug=`AS_ECHO(["$enable_debug"]) | sed 's:^def_::'`
enable_optimize=no
],
[x*.*yes], [
@@ -858,14 +858,14 @@ AS_CASE([x$enable_debug.$enable_optimize
[x*],
[AC_MSG_WARN([unhandled configuration 
$enable_debug.$enable_optimize, please file a bug on bugs.monetdb.org])])
 # make defaults real for flags which don't conflict with anything
-enable_assert=`echo $enable_assert | sed 's:^def_::'`
+enable_assert=`AS_ECHO(["$enable_assert"]) | sed 's:^def_::'`
 
 AC_MSG_CHECKING([for --enable-debug])
 AS_VAR_IF([enable_debug], [yes], [
origCFLAGS=$CFLAGS
# remove "-Ox" as some compilers don't like "-g -Ox" combinations

MonetDB: Mar2018 - Add lzma to test copy-from-compressed

2018-05-09 Thread Joeri van Ruth
Changeset: 791bbd901541 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=791bbd901541
Added Files:
sql/test/Tests/copy-from-compressed.csv.xz
Modified Files:
sql/test/Tests/copy-from-compressed.sql.in
sql/test/Tests/copy-from-compressed.stable.out
Branch: Mar2018
Log Message:

Add lzma to test copy-from-compressed


diffs (44 lines):

diff --git a/sql/test/Tests/copy-from-compressed.csv.xz 
b/sql/test/Tests/copy-from-compressed.csv.xz
new file mode 100644
index 
e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..49031f645dbcfb2a8af5bae86d1786205c0684fb
GIT binary patch
literal 64
zc%1udUKJ6=z`*kC+7>q^21Q001_lO!^ATql8Q62Gauanbs<;?dcr+QUd1N=4fl+~D
Ux8%*;^4mVwG6K~xutY`y0F5^j(*OVf

diff --git a/sql/test/Tests/copy-from-compressed.sql.in 
b/sql/test/Tests/copy-from-compressed.sql.in
--- a/sql/test/Tests/copy-from-compressed.sql.in
+++ b/sql/test/Tests/copy-from-compressed.sql.in
@@ -16,6 +16,10 @@ copy into compression_schemes
 from '$QTSTSRCDIR/copy-from-compressed.csv.bz2'
 using delimiters ',', '\n';
 
+copy into compression_schemes
+from '$QTSTSRCDIR/copy-from-compressed.csv.xz'
+using delimiters ',', '\n';
+
 
 select * from compression_schemes order by extension;
 
diff --git a/sql/test/Tests/copy-from-compressed.stable.out 
b/sql/test/Tests/copy-from-compressed.stable.out
--- a/sql/test/Tests/copy-from-compressed.stable.out
+++ b/sql/test/Tests/copy-from-compressed.stable.out
@@ -77,6 +77,10 @@ Ready.
 #from 
'/Users/joeri/monets/copyfromxz/src/sql/test/Tests/copy-from-compressed.csv.bz2'
 #using delimiters ',', '\n';
 [ 1]
+#copy into compression_schemes
+#from 
'/Users/joeri/monets/copyfromxz/src/sql/test/Tests/copy-from-compressed.csv.xz'
+#using delimiters ',', '\n';
+[ 1]
 #select * from compression_schemes order by extension;
 % sys.compression_schemes, sys.compression_schemes # table_name
 % name,extension # name
@@ -85,6 +89,7 @@ Ready.
 [ "no compression","-" ]
 [ "bzip2", "bz2"   ]
 [ "gzip",  "gz"]
+[ "lzma",  "xz"]
 #drop table compression_schemes;
 
 # 10:04:20 >  
___
checkin-list mailing list
checkin-list@monetdb.org
https://www.monetdb.org/mailman/listinfo/checkin-list


MonetDB: Mar2018 - Fix lzma rewind in open_xzstream

2018-05-09 Thread Joeri van Ruth
Changeset: 3285a008f907 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=3285a008f907
Modified Files:
common/stream/stream.c
Branch: Mar2018
Log Message:

Fix lzma rewind in open_xzstream

When no UTF-8 BOM is found, we have to reset the decoder state
when rewinding the stream.


diffs (23 lines):

diff --git a/common/stream/stream.c b/common/stream/stream.c
--- a/common/stream/stream.c
+++ b/common/stream/stream.c
@@ -1629,7 +1629,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;
___
checkin-list mailing list
checkin-list@monetdb.org
https://www.monetdb.org/mailman/listinfo/checkin-list


MonetDB: Mar2018 - Add test for loading compressed data

2018-05-09 Thread Joeri van Ruth
Changeset: 20fd18109415 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=20fd18109415
Added Files:
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.sql.in
sql/test/Tests/copy-from-compressed.stable.err
sql/test/Tests/copy-from-compressed.stable.out
Modified Files:
sql/test/Tests/All
Branch: Mar2018
Log Message:

Add test for loading compressed data


diffs (198 lines):

diff --git a/sql/test/Tests/All b/sql/test/Tests/All
--- a/sql/test/Tests/All
+++ b/sql/test/Tests/All
@@ -117,6 +117,7 @@ str-trim
 alastair_udf_mergetable_bug
 
 copy-into-fwf
+copy-from-compressed
 
 truncate-statements
 truncate-statements-extra
diff --git a/sql/test/Tests/copy-from-compressed.csv.bz2 
b/sql/test/Tests/copy-from-compressed.csv.bz2
new file mode 100644
index 
e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..6aff78f89e1ed0331928496ade26fcf72826f7f0
GIT binary patch
literal 52
zc${;J%CIzaj8qGboa+3Qmw|!lW&?u&1B(EIfP#a70)rtB!)3RuEKUpY?wv|=G(5Z(
I{%UIg0A4)~vj6}9

diff --git a/sql/test/Tests/copy-from-compressed.csv.gz 
b/sql/test/Tests/copy-from-compressed.csv.gz
new file mode 100644
index 
e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..ec5f9562b5a480a2fc1894398f8b8f35418c8b9b
GIT binary patch
literal 53
zc$|~(=HNK7;!_k8b8>z`rEXeLey(nEer`cgYH@LDie7SY8H4xwQ#uzs*FR!n*!0O|
JGY10$0{|u46f*z-

diff --git a/sql/test/Tests/copy-from-compressed.csv.raw 
b/sql/test/Tests/copy-from-compressed.csv.raw
new file mode 100644
--- /dev/null
+++ b/sql/test/Tests/copy-from-compressed.csv.raw
@@ -0,0 +1,1 @@
+no compression,-
diff --git a/sql/test/Tests/copy-from-compressed.sql.in 
b/sql/test/Tests/copy-from-compressed.sql.in
new file mode 100644
--- /dev/null
+++ b/sql/test/Tests/copy-from-compressed.sql.in
@@ -0,0 +1,22 @@
+create table compression_schemes (
+   name varchar(20),
+   extension varchar(5)
+);
+
+
+copy into compression_schemes
+from '$QTSTSRCDIR/copy-from-compressed.csv.raw'
+using delimiters ',', '\n';
+
+copy into compression_schemes
+from '$QTSTSRCDIR/copy-from-compressed.csv.gz'
+using delimiters ',', '\n';
+
+copy into compression_schemes
+from '$QTSTSRCDIR/copy-from-compressed.csv.bz2'
+using delimiters ',', '\n';
+
+
+select * from compression_schemes order by extension;
+
+drop table compression_schemes;
diff --git a/sql/test/Tests/copy-from-compressed.stable.err 
b/sql/test/Tests/copy-from-compressed.stable.err
new file mode 100644
--- /dev/null
+++ b/sql/test/Tests/copy-from-compressed.stable.err
@@ -0,0 +1,35 @@
+stderr of test 'copy-from-compressed` in directory 'sql/test` itself:
+
+
+# 10:04:19 >  
+# 10:04:19 >  "mserver5" "--debug=10" "--set" "gdk_nr_threads=0" "--set" 
"mapi_open=true" "--set" "mapi_port=31496" "--set" 
"mapi_usock=/var/tmp/mtest-46965/.s.monetdb.31496" "--set" "monet_prompt=" 
"--forcemito" 
"--dbpath=/Users/joeri/monets/copyfromxz/var/MonetDB/mTests_sql_test" "--set" 
"embedded_c=true"
+# 10:04:19 >  
+
+# builtin opt  gdk_dbpath = 
/Users/joeri/monets/copyfromxz/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 = 31496
+# cmdline opt  mapi_usock = /var/tmp/mtest-46965/.s.monetdb.31496
+# cmdline opt  monet_prompt = 
+# cmdline opt  gdk_dbpath = 
/Users/joeri/monets/copyfromxz/var/MonetDB/mTests_sql_test
+# cmdline opt  embedded_c = true
+# cmdline opt  gdk_debug = 553648138
+
+# 10:04:19 >  
+# 10:04:19 >  "mclient" "-lsql" "-ftest" "-tnone" "-Eutf-8" "-i" "-e" 
"--host=/var/tmp/mtest-46965" "--port=31496"
+# 10:04:19 >  
+
+
+# 10:04:20 >  
+# 10:04:20 >  "Done."
+# 10:04:20 >  
+
diff --git a/sql/test/Tests/copy-from-compressed.stable.out 
b/sql/test/Tests/copy-from-compressed.stable.out
new file mode 100644
--- /dev/null
+++ b/sql/test/Tests/copy-from-compressed.stable.out
@@ -0,0 +1,93 @@
+stdout of test 'copy-from-compressed` in directory 'sql/test` itself:
+
+
+# 10:04:19 >  
+# 10:04:19 >  "mserver5" "--debug=10" "--set" "gdk_nr_threads=0" "--set" 
"mapi_open=true" "--set" "mapi_port=31496" "--set" 
"mapi_usock=/var/tmp/mtest-46965/.s.monetdb.31496" "--set" "monet_prompt=" 
"--forcemito" 
"--dbpath=/Users/joeri/monets/copyfromxz/var/MonetDB/mTests_sql_test" "--set" 
"embedded_c=true"
+# 10:04:19 >  
+
+# MonetDB 5 server v11.29.4
+# This is an unreleased version
+# Serving database 'mTests_sql_test', using 8 threads
+# Compiled for x86_64-apple-darwin17.5.0/64bit with 128bit integers
+# Found 16.000 GiB available main-memory.
+# Copyright (c) 1993 - July 2008 CWI.
+# Copyright (c) August 2008 - 2018 MonetDB B.V., all 

MonetDB: Mar2018 - Properly fix bug 6598.

2018-05-09 Thread Sjoerd Mullender
Changeset: d9a1bee0ff29 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=d9a1bee0ff29
Modified Files:
configure.ag
Branch: Mar2018
Log Message:

Properly fix bug 6598.


diffs (41 lines):

diff --git a/configure.ag b/configure.ag
--- a/configure.ag
+++ b/configure.ag
@@ -1189,7 +1189,9 @@ AS_VAR_IF([have_python3], [no],
 have_python3_libdir=no
 PYTHON3_LIBDIR=""
 # and no interpreter
-PYTHON3=false],
+PYTHON3=false
+# and no Python 3 integration
+enable_py3integration=no],
[have_python3_libdir=auto
 
 AC_ARG_WITH([python3-libdir],
@@ -1936,6 +1938,16 @@ AM_CONDITIONAL([HAVE_LIBPY], [test x"$ha
 
 # Python 3 UDFs
 have_libpy3=no
+AS_VAR_IF([enable_py3integration], [no], [],
+   [AS_CASE([`"$PYTHON3" -V 2>&1`],
+   ["Python 3."[[1234]]"."*],
+   [AS_VAR_IF([enable_py3integration], [auto],
+   [have_libpy3=no
+why_not_libpy3="(Python >= 3.5 required)"
+enable_py3integration=no
+why_not_py3integration="(Python >= 3.5 required)"],
+   [AC_MSG_ERROR([Python >= 3.5 is required for Python3 
integration support])])])])
+
 if test "x$enable_py3integration" != xno; then
case "$enable_py3integration" in
yes|auto)
@@ -1968,9 +1980,6 @@ if test "x$enable_py3integration" != xno
 
PYTHON_CMD=$PYTHON3
 
-   AS_CASE([`"$PYTHON_CMD" -V 2>&1`],
-   ["Python 3."[[1234]]"."*], [AC_MSG_ERROR([Python >= 3.5 is 
required for Python3 integration support])])
-
NUMPYVER=`$PYTHON_CMD -c "import numpy; 
print(int(numpy.__version__.split('.').__getitem__(1)) >= 7)" 2> /dev/null`
# check numpyconfig.h because autoconf tests includes by compiling a 
small C program, and other numpy headers do not compile without Python.h
AC_CHECK_HEADER(
___
checkin-list mailing list
checkin-list@monetdb.org
https://www.monetdb.org/mailman/listinfo/checkin-list


MonetDB: Mar2018 - Add check for Python 3.5 version in Python 3 ...

2018-05-09 Thread Pedro Ferreira
Changeset: 3103947f85fa for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=3103947f85fa
Modified Files:
configure.ag
Branch: Mar2018
Log Message:

Add check for Python 3.5 version in Python 3 UDFs. This fixes bug 6598


diffs (13 lines):

diff --git a/configure.ag b/configure.ag
--- a/configure.ag
+++ b/configure.ag
@@ -1968,6 +1968,9 @@ if test "x$enable_py3integration" != xno
 
PYTHON_CMD=$PYTHON3
 
+   AS_CASE([`"$PYTHON_CMD" -V 2>&1`],
+   ["Python 3."[[1234]]"."*], [AC_MSG_ERROR([Python >= 3.5 is 
required for Python3 integration support])])
+
NUMPYVER=`$PYTHON_CMD -c "import numpy; 
print(int(numpy.__version__.split('.').__getitem__(1)) >= 7)" 2> /dev/null`
# check numpyconfig.h because autoconf tests includes by compiling a 
small C program, and other numpy headers do not compile without Python.h
AC_CHECK_HEADER(
___
checkin-list mailing list
checkin-list@monetdb.org
https://www.monetdb.org/mailman/listinfo/checkin-list


MonetDB: config_rss - Correct 32 bits test output.

2018-05-09 Thread Aris Koning
Changeset: c4c994023e53 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=c4c994023e53
Modified Files:
sql/test/configurable_rss/Tests/no_cap_rss_32.stable.err
sql/test/configurable_rss/Tests/no_cap_rss_32.stable.out
sql/test/configurable_rss/Tests/no_cap_rss_64.stable.err
sql/test/configurable_rss/Tests/no_cap_rss_64.stable.out
Branch: config_rss
Log Message:

Correct 32 bits test output.


diffs (70 lines):

diff --git a/sql/test/configurable_rss/Tests/no_cap_rss_32.stable.err 
b/sql/test/configurable_rss/Tests/no_cap_rss_32.stable.err
--- a/sql/test/configurable_rss/Tests/no_cap_rss_32.stable.err
+++ b/sql/test/configurable_rss/Tests/no_cap_rss_32.stable.err
@@ -1,4 +1,4 @@
-stderr of test 'no_cap_rss_64` in directory 'sql/test/configurable_rss` itself:
+stderr of test 'no_cap_rss_32` in directory 'sql/test/configurable_rss` itself:
 
 
 # 16:57:25 >  
diff --git a/sql/test/configurable_rss/Tests/no_cap_rss_32.stable.out 
b/sql/test/configurable_rss/Tests/no_cap_rss_32.stable.out
--- a/sql/test/configurable_rss/Tests/no_cap_rss_32.stable.out
+++ b/sql/test/configurable_rss/Tests/no_cap_rss_32.stable.out
@@ -1,8 +1,8 @@
-stdout of test 'no_cap_rss_64` in directory 'sql/test/configurable_rss` itself:
+stdout of test 'no_cap_rss_32` in directory 'sql/test/configurable_rss` itself:
 
 
 # 13:48:01 >  
-# 13:48:01 >  "C:\Python27\python.exe" "no_cap_rss_64.py" "no_cap_rss_64"
+# 13:48:01 >  "C:\Python27\python.exe" "no_cap_rss_32.py" "no_cap_rss_32"
 # 13:48:01 >  
 
 #create function getrss() 
@@ -21,9 +21,9 @@ stdout of test 'no_cap_rss_64` in direct
 #set size = (select count(*) from test);
 #end while;
 #end;
-#select getrss() > 25000 as resident_set_size_is_bigger_then_25kbytes, 
quantile(c/a, 0.8) * 0 from test;
+#select getrss() > 3 as resident_set_size_is_bigger_then_30kbytes, 
quantile(c/a, 0.8) * 0 from test;
 % .L2, sys.L6 # table_name
-% resident_set_size_is_bigger_then_25000_kb,   L6 # name
+% resident_set_size_is_bigger_then_3_kb,   L6 # name
 % boolean, double # type
 % 5,   24 # length
 [ true,0   ]
diff --git a/sql/test/configurable_rss/Tests/no_cap_rss_64.stable.err 
b/sql/test/configurable_rss/Tests/no_cap_rss_64.stable.err
--- a/sql/test/configurable_rss/Tests/no_cap_rss_64.stable.err
+++ b/sql/test/configurable_rss/Tests/no_cap_rss_64.stable.err
@@ -1,4 +1,4 @@
-stderr of test 'no_cap_rss_64` in directory 'sql/test/configurable_rss` itself:
+stderr of test 'no_cap_rss_32` in directory 'sql/test/configurable_rss` itself:
 
 
 # 16:57:25 >  
diff --git a/sql/test/configurable_rss/Tests/no_cap_rss_64.stable.out 
b/sql/test/configurable_rss/Tests/no_cap_rss_64.stable.out
--- a/sql/test/configurable_rss/Tests/no_cap_rss_64.stable.out
+++ b/sql/test/configurable_rss/Tests/no_cap_rss_64.stable.out
@@ -1,8 +1,8 @@
-stdout of test 'no_cap_rss_64` in directory 'sql/test/configurable_rss` itself:
+stdout of test 'no_cap_rss_32` in directory 'sql/test/configurable_rss` itself:
 
 
 # 13:48:01 >  
-# 13:48:01 >  "C:\Python27\python.exe" "no_cap_rss_64.py" "no_cap_rss_64"
+# 13:48:01 >  "C:\Python27\python.exe" "no_cap_rss_32.py" "no_cap_rss_32"
 # 13:48:01 >  
 
 #create function getrss() 
@@ -21,9 +21,9 @@ stdout of test 'no_cap_rss_64` in direct
 #set size = (select count(*) from test);
 #end while;
 #end;
-#select getrss() > 25000 as resident_set_size_is_bigger_then_25kbytes, 
quantile(c/a, 0.8) * 0 from test;
+#select getrss() > 3 as resident_set_size_is_bigger_then_30kbytes, 
quantile(c/a, 0.8) * 0 from test;
 % .L2, sys.L6 # table_name
-% resident_set_size_is_bigger_then_25000_kb,   L6 # name
+% resident_set_size_is_bigger_then_3_kb,   L6 # name
 % boolean, double # type
 % 5,   24 # length
 [ true,0   ]
___
checkin-list mailing list
checkin-list@monetdb.org
https://www.monetdb.org/mailman/listinfo/checkin-list