MonetDB: Nov2019 - Improve speed of dump by significantly reduci...

2019-12-06 Thread Sjoerd Mullender
Changeset: df974fd0bc07 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=df974fd0bc07
Modified Files:
clients/mapiclient/dump.c
Branch: Nov2019
Log Message:

Improve speed of dump by significantly reducing number of function calls.
(In the normal case.)


diffs (37 lines):

diff --git a/clients/mapiclient/dump.c b/clients/mapiclient/dump.c
--- a/clients/mapiclient/dump.c
+++ b/clients/mapiclient/dump.c
@@ -127,7 +127,17 @@ squoted_print(stream *f, const char *s, 
if (mnstr_printf(f, "%c", quote) < 0)
return -1;
while (*s) {
+   size_t n = strcspn(s, "\\'\"\177"
+  "\001\002\003\004\005\006\007"
+  "\010\011\012\013\014\015\016\017"
+  "\020\021\022\023\024\025\026\027"
+  "\030\031\032\033\034\035\036\037");
+   if (n > 0 && mnstr_write(f, s, 1, n) < 0)
+   return -1;
+   s += n;
switch (*s) {
+   case '\0':
+   continue;
case '\\':
if (mnstr_write(f, "", 1, 2) < 0)
return -1;
@@ -147,13 +157,8 @@ squoted_print(stream *f, const char *s, 
return -1;
break;
default:
-   if ((0 < *s && *s < 32) || *s == '\177') {
-   if (mnstr_printf(f, "\\%03o", (uint8_t) *s) < 0)
-   return -1;
-   } else {
-   if (mnstr_write(f, s, 1, 1) < 0)
-   return -1;
-   }
+   if (mnstr_printf(f, "\\%03o", (uint8_t) *s) < 0)
+   return -1;
break;
}
s++;
___
checkin-list mailing list
checkin-list@monetdb.org
https://www.monetdb.org/mailman/listinfo/checkin-list


MonetDB: default - Add log entries for new mserver5 option and m...

2019-12-06 Thread Panagiotis Koutsourakis
Changeset: 789ec096d470 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=789ec096d470
Modified Files:
ChangeLog
Branch: default
Log Message:

Add log entries for new mserver5 option and monetdb property


diffs (15 lines):

diff --git a/ChangeLog b/ChangeLog
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,6 +1,11 @@
 # ChangeLog file for devel
 # This file is updated with Maddlog
 
+* Fri Dec  6 2019 Panagiotis Koutsourakis 
+- Added mserver5 option (--set raw_strings=true|false) and monetdb
+  database property (raw_strings=yes|no) to control interpretation
+  of strings.
+
 * Fri Nov 29 2019 Panagiotis Koutsourakis 
 - Added support for raw strings using the syntax r'' or R''. This means
   that C-like escapes will remain uninterpreted within those strings. For
___
checkin-list mailing list
checkin-list@monetdb.org
https://www.monetdb.org/mailman/listinfo/checkin-list


MonetDB: default - Add tests for new mserver5 options

2019-12-06 Thread Panagiotis Koutsourakis
Changeset: 3aec9cfc23a8 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=3aec9cfc23a8
Added Files:
sql/test/scanner/Tests/mserver_with_raw_strings.options5
sql/test/scanner/Tests/mserver_with_raw_strings.sql
sql/test/scanner/Tests/mserver_with_raw_strings.stable.err
sql/test/scanner/Tests/mserver_with_raw_strings.stable.out
sql/test/scanner/Tests/mserver_without_raw_strings.options5
sql/test/scanner/Tests/mserver_without_raw_strings.sql
sql/test/scanner/Tests/mserver_without_raw_strings.stable.err
sql/test/scanner/Tests/mserver_without_raw_strings.stable.out
Modified Files:
sql/test/scanner/Tests/All
Branch: default
Log Message:

Add tests for new mserver5 options


diffs (183 lines):

diff --git a/sql/test/scanner/Tests/All b/sql/test/scanner/Tests/All
--- a/sql/test/scanner/Tests/All
+++ b/sql/test/scanner/Tests/All
@@ -1,1 +1,3 @@
 raw_strings
+mserver_without_raw_strings
+mserver_with_raw_strings
diff --git a/sql/test/scanner/Tests/mserver_with_raw_strings.options5 
b/sql/test/scanner/Tests/mserver_with_raw_strings.options5
new file mode 100644
--- /dev/null
+++ b/sql/test/scanner/Tests/mserver_with_raw_strings.options5
@@ -0,0 +1,1 @@
+--set raw_strings=true
diff --git a/sql/test/scanner/Tests/mserver_with_raw_strings.sql 
b/sql/test/scanner/Tests/mserver_with_raw_strings.sql
new file mode 100644
--- /dev/null
+++ b/sql/test/scanner/Tests/mserver_with_raw_strings.sql
@@ -0,0 +1,1 @@
+SELECT '\"';
diff --git a/sql/test/scanner/Tests/mserver_with_raw_strings.stable.err 
b/sql/test/scanner/Tests/mserver_with_raw_strings.stable.err
new file mode 100644
--- /dev/null
+++ b/sql/test/scanner/Tests/mserver_with_raw_strings.stable.err
@@ -0,0 +1,32 @@
+stderr of test 'mserver_with_raw_strings` in directory 'sql/test/scanner` 
itself:
+
+
+# 17:10:47 >  
+# 17:10:47 >  "mserver5" "--debug=10" "--set" "gdk_nr_threads=0" "--set" 
"mapi_open=true" "--set" "mapi_port=33804" "--set" 
"mapi_usock=/var/tmp/mtest-10475/.s.monetdb.33804" "--forcemito" 
"--dbpath=/home/kutsurak/work/src/monet/worktrees/master/build/install/var/MonetDB/mTests_sql_test_scanner"
 "--set" "raw_strings=true" "--set" "embedded_c=true"
+# 17:10:47 >  
+
+# builtin opt  gdk_dbpath = 
/home/kutsurak/work/src/monet/worktrees/master/build/install/var/monetdb5/dbfarm/demo
+# builtin opt  mapi_port = 5
+# builtin opt  mapi_open = false
+# builtin opt  mapi_ipv6 = false
+# builtin opt  mapi_autosense = false
+# builtin opt  sql_optimizer = default_pipe
+# builtin opt  sql_debug = 0
+# builtin opt  raw_strings = false
+# cmdline opt  gdk_nr_threads = 0
+# cmdline opt  mapi_open = true
+# cmdline opt  mapi_port = 33804
+# cmdline opt  mapi_usock = /var/tmp/mtest-10475/.s.monetdb.33804
+# cmdline opt  gdk_dbpath = 
/home/kutsurak/work/src/monet/worktrees/master/build/install/var/MonetDB/mTests_sql_test_scanner
+# cmdline opt  raw_strings = true
+# cmdline opt  embedded_c = true
+
+# 17:10:47 >  
+# 17:10:47 >  "mclient" "-lsql" "-ftest" "-tnone" "-Eutf-8" "-i" "-e" 
"--host=/var/tmp/mtest-10475" "--port=33804"
+# 17:10:47 >  
+
+
+# 17:10:47 >  
+# 17:10:47 >  "Done."
+# 17:10:47 >  
+
diff --git a/sql/test/scanner/Tests/mserver_with_raw_strings.stable.out 
b/sql/test/scanner/Tests/mserver_with_raw_strings.stable.out
new file mode 100644
--- /dev/null
+++ b/sql/test/scanner/Tests/mserver_with_raw_strings.stable.out
@@ -0,0 +1,34 @@
+stdout of test 'mserver_with_raw_strings` in directory 'sql/test/scanner` 
itself:
+
+
+# 17:10:47 >  
+# 17:10:47 >  "mserver5" "--debug=10" "--set" "gdk_nr_threads=0" "--set" 
"mapi_open=true" "--set" "mapi_port=33804" "--set" 
"mapi_usock=/var/tmp/mtest-10475/.s.monetdb.33804" "--forcemito" 
"--dbpath=/home/kutsurak/work/src/monet/worktrees/master/build/install/var/MonetDB/mTests_sql_test_scanner"
 "--set" "raw_strings=true" "--set" "embedded_c=true"
+# 17:10:47 >  
+
+# MonetDB 5 server v11.36.0 (hg id: ece90b78f370+)
+# This is an unreleased version
+# Serving database 'mTests_sql_test_scanner', using 4 threads
+# Compiled for x86_64-pc-linux-gnu/64bit with 128bit integers
+# Found 15.488 GiB available main-memory of which we use 12.622 GiB
+# Copyright (c) 1993 - July 2008 CWI.
+# Copyright (c) August 2008 - 2019 MonetDB B.V., all rights reserved
+# Visit https://www.monetdb.org/ for further information
+# Listening for connection requests on 
mapi:monetdb://zarquon.zarniwoop.org:33804/
+# Listening for UNIX domain connection requests on 
mapi:monetdb:///var/tmp/mtest-10475/.s.monetdb.33804
+# MonetDB/SQL module loaded
+
+# 17:10:47 >  
+# 17:10:47 >  "mclient" "-lsql" "-ftest" "-tnone" "-Eutf-8" "-i" "-e" 
"--host=/var/tmp/mtest-10475" "--port=33804"
+# 17:10:47 >  
+
+#SELECT '\"';
+% . # table_name
+% single_value # name
+% char # type
+% 2 # length
+[ "\\\""   ]
+
+# 17:10:47 >  
+# 17:10:47 >  "Done."
+# 17:10:47 >  
+
diff --git a/sql/test/scanner/Tests/mserver_without_raw_strings.options5 

MonetDB: Nov2019 - Removed dead code.

2019-12-06 Thread Sjoerd Mullender
Changeset: 10bfbd5cf427 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=10bfbd5cf427
Modified Files:
clients/mapiclient/dump.c
Branch: Nov2019
Log Message:

Removed dead code.


diffs (22 lines):

diff --git a/clients/mapiclient/dump.c b/clients/mapiclient/dump.c
--- a/clients/mapiclient/dump.c
+++ b/clients/mapiclient/dump.c
@@ -1785,14 +1785,13 @@ dump_table_data(Mapi mid, const char *sc
 strcmp(tp, "url") == 0 ||
 strcmp(tp, "uuid") == 0 ||
 string[i])
-   squoted_print(toConsole, s, useInserts 
? '\'' : '"');
+   squoted_print(toConsole, s, '\'');
else
mnstr_printf(toConsole, "%s", s);
} else if (string[i]) {
-   /* write double or single-quoted
-  string with certain characters
-  escaped */
-   squoted_print(toConsole, s, useInserts ? '\'' : 
'"');
+   /* write double-quoted string with
+  certain characters escaped */
+   squoted_print(toConsole, s, '"');
} else
mnstr_printf(toConsole, "%s", s);
 
___
checkin-list mailing list
checkin-list@monetdb.org
https://www.monetdb.org/mailman/listinfo/checkin-list


MonetDB: mosaic - Remove incorrect assert.

2019-12-06 Thread Aris Koning
Changeset: 1d0a83bcfe8b for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=1d0a83bcfe8b
Modified Files:
monetdb5/modules/mosaic/mosaic_join.h
Branch: mosaic
Log Message:

Remove incorrect assert.


diffs (21 lines):

diff --git a/monetdb5/modules/mosaic/mosaic_join.h 
b/monetdb5/modules/mosaic/mosaic_join.h
--- a/monetdb5/modules/mosaic/mosaic_join.h
+++ b/monetdb5/modules/mosaic/mosaic_join.h
@@ -153,8 +153,6 @@ static str MOSjoin_COUI_##TPE(MOStask ta
}\
}\
 \
-   assert(MOSgetTag(task->blk) == MOSAIC_EOL);\
-\
return MAL_SUCCEED;\
 }
 
@@ -245,8 +243,6 @@ static str MOSjoin_COUI_##TPE(MOStask ta
break;\
}\
}\
-   \
-   assert(MOSgetTag(task->blk) == MOSAIC_EOL);\
}\
 }
 
___
checkin-list mailing list
checkin-list@monetdb.org
https://www.monetdb.org/mailman/listinfo/checkin-list


MonetDB: mosaic - Fix compiler issue's.

2019-12-06 Thread Aris Koning
Changeset: 1981c548092e for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=1981c548092e
Modified Files:
monetdb5/modules/mosaic/mosaic.c
monetdb5/modules/mosaic/mosaic_utility.h
Branch: mosaic
Log Message:

Fix compiler issue's.


diffs (67 lines):

diff --git a/monetdb5/modules/mosaic/mosaic.c b/monetdb5/modules/mosaic/mosaic.c
--- a/monetdb5/modules/mosaic/mosaic.c
+++ b/monetdb5/modules/mosaic/mosaic.c
@@ -361,22 +361,22 @@ MOSestimate_AND_MOSoptimizerCost_DEF(hge
 
 static
 str MOSestimate(MOStask task, BAT* estimates, size_t* compressed_size) {
-   str msg;
switch(ATOMbasetype(task->type)){
-   case TYPE_bte: msg = MOSestimate_bte(task, estimates, compressed_size); 
break;
-   case TYPE_sht: msg = MOSestimate_sht(task, estimates, compressed_size); 
break;
-   case TYPE_int: msg = MOSestimate_int(task, estimates, compressed_size); 
break;
-   case TYPE_lng: msg = MOSestimate_lng(task, estimates, compressed_size); 
break;
-   case TYPE_flt: msg = MOSestimate_flt(task, estimates, compressed_size); 
break;
-   case TYPE_dbl: msg = MOSestimate_dbl(task, estimates, compressed_size); 
break;
+   case TYPE_bte: return MOSestimate_bte(task, estimates, compressed_size);
+   case TYPE_sht: return MOSestimate_sht(task, estimates, compressed_size);
+   case TYPE_int: return MOSestimate_int(task, estimates, compressed_size);
+   case TYPE_lng: return MOSestimate_lng(task, estimates, compressed_size);
+   case TYPE_flt: return MOSestimate_flt(task, estimates, compressed_size);
+   case TYPE_dbl: return MOSestimate_dbl(task, estimates, compressed_size);
 #ifdef HAVE_HGE
-   case TYPE_hge: msg = MOSestimate_hge(task, estimates, compressed_size); 
break;
+   case TYPE_hge: return MOSestimate_hge(task, estimates, compressed_size);
 #endif
-   default: // Unknown block type. Should not happen.
+   default:
+   // Unknown block type. Should not happen.
assert(0);
}
 
-   return msg;
+   throw(MAL, "mosaic.estimate", TYPE_NOT_SUPPORTED);
 }
 
 static str
diff --git a/monetdb5/modules/mosaic/mosaic_utility.h 
b/monetdb5/modules/mosaic/mosaic_utility.h
--- a/monetdb5/modules/mosaic/mosaic_utility.h
+++ b/monetdb5/modules/mosaic/mosaic_utility.h
@@ -41,18 +41,21 @@ ALGEBRA_INTERFACES_INTEGERS_ONLY(NAME)\
 ALGEBRA_INTERFACE(NAME, flt);\
 ALGEBRA_INTERFACE(NAME, dbl);
 
-#define DO_OPERATION_ON_INTEGERS_ONLY_bte(OPERATION, NAME, ...) 
do_##OPERATION(NAME, bte, __VA_ARGS__)
-#define DO_OPERATION_ON_INTEGERS_ONLY_sht(OPERATION, NAME, ...) 
do_##OPERATION(NAME, sht, __VA_ARGS__)
-#define DO_OPERATION_ON_INTEGERS_ONLY_int(OPERATION, NAME, ...) 
do_##OPERATION(NAME, int, __VA_ARGS__)
-#define DO_OPERATION_ON_INTEGERS_ONLY_lng(OPERATION, NAME, ...) 
do_##OPERATION(NAME, lng, __VA_ARGS__)
+// This is just an ugly work around for Microsoft Visual Studio to get the 
expansion of __VA_ARGS__ right.
+#define EXPAND(X) X
+
+#define DO_OPERATION_ON_INTEGERS_ONLY_bte(OPERATION, NAME, ...) 
EXPAND(do_##OPERATION(NAME, bte, __VA_ARGS__))
+#define DO_OPERATION_ON_INTEGERS_ONLY_sht(OPERATION, NAME, ...) 
EXPAND(do_##OPERATION(NAME, sht, __VA_ARGS__))
+#define DO_OPERATION_ON_INTEGERS_ONLY_int(OPERATION, NAME, ...) 
EXPAND(do_##OPERATION(NAME, int, __VA_ARGS__))
+#define DO_OPERATION_ON_INTEGERS_ONLY_lng(OPERATION, NAME, ...) 
EXPAND(do_##OPERATION(NAME, lng, __VA_ARGS__))
 #define DO_OPERATION_ON_INTEGERS_ONLY_flt(OPERATION, NAME, ...) assert(0)
 #define DO_OPERATION_ON_INTEGERS_ONLY_dbl(OPERATION, NAME, ...) assert(0)
 #ifdef HAVE_HGE
-#define DO_OPERATION_ON_INTEGERS_ONLY_hge(OPERATION, NAME, ...) 
do_##OPERATION(NAME, hge, __VA_ARGS__)
+#define DO_OPERATION_ON_INTEGERS_ONLY_hge(OPERATION, NAME, ...) 
EXPAND(do_##OPERATION(NAME, hge, __VA_ARGS__))
 #endif
 
 #define DO_OPERATION_ON_INTEGERS_ONLY(OPERATION, NAME, TPE, ...)
DO_OPERATION_ON_INTEGERS_ONLY_##TPE(OPERATION, NAME, __VA_ARGS__)
-#define DO_OPERATION_ON_ALL_TYPES(OPERATION, NAME, TPE, ...)
do_##OPERATION(NAME, TPE, __VA_ARGS__)
+#define DO_OPERATION_ON_ALL_TYPES(OPERATION, NAME, TPE, ...)
EXPAND(do_##OPERATION(NAME, TPE, __VA_ARGS__))
 
 /*DUMMY_PARAM is just an ugly workaround for the fact that a variadic macro 
must have at least one variadic parameter*/
 #define DO_OPERATION_IF_ALLOWED(OPERATION, NAME, TPE)   
DO_OPERATION_ON_##NAME(OPERATION, TPE, 0 /*DUMMY_PARAM*/)
___
checkin-list mailing list
checkin-list@monetdb.org
https://www.monetdb.org/mailman/listinfo/checkin-list


MonetDB: mosaic - Update TODO's.

2019-12-06 Thread Aris Koning
Changeset: 1478513258aa for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=1478513258aa
Modified Files:
monetdb5/modules/mosaic/TODO_MOSAIC.txt
Branch: mosaic
Log Message:

Update TODO's.


diffs (30 lines):

diff --git a/monetdb5/modules/mosaic/TODO_MOSAIC.txt 
b/monetdb5/modules/mosaic/TODO_MOSAIC.txt
--- a/monetdb5/modules/mosaic/TODO_MOSAIC.txt
+++ b/monetdb5/modules/mosaic/TODO_MOSAIC.txt
@@ -2,15 +2,15 @@
 Add lots of tests with candidate lists for all
 Add test for float/double
 Add test for huge
-Be sure alignment is correct. Use asserts for this.
+Be sure alignment is correct. Use asserts and type specialized block headers 
for this.(1*)
 Check MOSanalysis and its test.
 Fix/check/test MOSlayout.
 Introduce mosaic into gdk: create hooks in scanselect functions/macro's, joins 
and projections.
 benchmark using TPC-H
 make mitosis work with mosaic and see how this relates to the previous 
landmark stuff.
-Apply compressed operations more directly: on keys in dictionary compression 
(1)
-Apply compressed operations more directly: on prefix|suffix in prefix 
compression (1)
-Apply compressed operations more directly: on delta's and frame in frame 
compression (1)
+Apply compressed operations more directly: on keys in dictionary compression
+Apply compressed operations more directly: on prefix|suffix in prefix 
compression
+Apply compressed operations more directly: on delta's and frame in frame 
compression
 consider packing mosaic_block_header's more efficiently.
 Add asserts on type degeneration for bit => bte daytime => lng timestmap => 
lng date => int.
 DO nil checking more efficient similar to gdk_select
@@ -21,5 +21,5 @@ See if the iteration algorithms can be i
 Get rid of (most of) MOStask and/or don't allocate it on the heap.
 Make sure the parameters.bits fields are always char.
 Use GDK naming conventions, e.g. o for stuff coming out if canditer_next.
-Make block headers specific by having type parametrized blockheader struct's.
+Make block headers specific by having type parametrized blockheader 
struct's.(1)
 Update copyright in 2020.
___
checkin-list mailing list
checkin-list@monetdb.org
https://www.monetdb.org/mailman/listinfo/checkin-list


MonetDB: default - Add raw_strings as a database property setabl...

2019-12-06 Thread Panagiotis Koutsourakis
Changeset: b018ee27db69 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=b018ee27db69
Modified Files:
tools/merovingian/client/monetdb.1
tools/merovingian/daemon/forkmserver.c
tools/merovingian/utils/properties.c
Branch: default
Log Message:

Add raw_strings as a database property setable by the daemon client

The user can set the raw_strings property to yes or no for a database to control
how the server interprets raw strings.


diffs (93 lines):

diff --git a/tools/merovingian/client/monetdb.1 
b/tools/merovingian/client/monetdb.1
--- a/tools/merovingian/client/monetdb.1
+++ b/tools/merovingian/client/monetdb.1
@@ -341,6 +341,11 @@ the same time.  Setting this to a high v
 multiplex-funnel may be more performant, see
 .I MULTIPLEX-FUNNEL
 below.
+.TP
+.BR raw_strings= < yes | no >
+Defines how the server interprets literal strings. See the
+.IR mserver5 (1)
+manpage for more details.
 .RE
 .TP
 \fBinherit\fP \fIproperty\fP \fIdatabase\fP [\fIdatabase\fP ...]
diff --git a/tools/merovingian/daemon/forkmserver.c 
b/tools/merovingian/daemon/forkmserver.c
--- a/tools/merovingian/daemon/forkmserver.c
+++ b/tools/merovingian/daemon/forkmserver.c
@@ -215,6 +215,7 @@ forkMserver(char *database, sabdb** stat
char *embeddedr = NULL;
char *embeddedpy = NULL;
char *embeddedc = NULL;
+   char *raw_strings = NULL;
char *ipv6 = NULL;
char *dbextra = NULL;
char *mserver5_extra = NULL;
@@ -537,6 +538,11 @@ forkMserver(char *database, sabdb** stat
} else {
listenaddr[0] = '\0';
}
+
+   kv = findConfKey(ckv, "raw_strings");
+   if (kv->val != NULL && strcmp(kv->val, "no") != 0) {
+   raw_strings="raw_strings=true";
+   }
mport = (unsigned int)getConfNum(_mero_props, "port");
ipv6 = getConfNum(_mero_props, "ipv6") == 1 ? "mapi_ipv6=true" : 
"mapi_ipv6=false";
 
@@ -618,6 +624,9 @@ forkMserver(char *database, sabdb** stat
if (readonly != NULL) {
argv[c++] = readonly;
}
+   if (raw_strings != NULL) {
+   argv[c++] = "--set"; argv[c++] = raw_strings;
+   }
/* get the rest (non-default) mserver props set in the conf file */
list = ckv;
while (list->key != NULL) {
diff --git a/tools/merovingian/utils/properties.c 
b/tools/merovingian/utils/properties.c
--- a/tools/merovingian/utils/properties.c
+++ b/tools/merovingian/utils/properties.c
@@ -25,23 +25,24 @@
 
 /* these are the properties used for starting an mserver */
 static const confkeyval _internal_prop_keys[PROPLENGTH] = {
-   {"type",   NULL, 0, STR},
-   {"shared", NULL, 0, STR},
-   {"nthreads",   NULL, 0, INT},
-   {"optpipe",NULL, 0, STR},
-   {"readonly",   NULL, 0, BOOLEAN},
-   {"embedr", NULL, 0, BOOLEAN},
-   {"embedpy",NULL, 0, BOOLEAN},
-   {"embedpy3",   NULL, 0, BOOLEAN},
-   {"embedc", NULL, 0, BOOLEAN},
-   {"ipv6",   NULL, 0, BOOLEAN},
-   {"listenaddr", NULL, 0, STR},
-   {"nclients",   NULL, 0, INT},
-   {"mfunnel",NULL, 0, STR},
-   {"dbextra",NULL, 0, STR},
-   {"memmaxsize", NULL, 0, INT},
-   {"vmmaxsize",  NULL, 0, INT},
-   { NULL,NULL, 0, INVALID}
+   {"type",NULL, 0, STR},
+   {"shared",  NULL, 0, STR},
+   {"nthreads",NULL, 0, INT},
+   {"optpipe", NULL, 0, STR},
+   {"readonly",NULL, 0, BOOLEAN},
+   {"embedr",  NULL, 0, BOOLEAN},
+   {"embedpy", NULL, 0, BOOLEAN},
+   {"embedpy3",NULL, 0, BOOLEAN},
+   {"embedc",  NULL, 0, BOOLEAN},
+   {"ipv6",NULL, 0, BOOLEAN},
+   {"listenaddr",  NULL, 0, STR},
+   {"nclients",NULL, 0, INT},
+   {"mfunnel", NULL, 0, STR},
+   {"dbextra", NULL, 0, STR},
+   {"memmaxsize",  NULL, 0, INT},
+   {"vmmaxsize",   NULL, 0, INT},
+   {"raw_strings", NULL, 0, BOOLEAN},
+   { NULL, NULL, 0, INVALID}
 };
 
 static pthread_mutex_t readprops_lock = PTHREAD_MUTEX_INITIALIZER;
___
checkin-list mailing list
checkin-list@monetdb.org
https://www.monetdb.org/mailman/listinfo/checkin-list


MonetDB: default - Add new mserver5 option for string interpreta...

2019-12-06 Thread Panagiotis Koutsourakis
Changeset: 1d0bc11dbd60 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=1d0bc11dbd60
Modified Files:
common/options/monet_options.c
sql/server/sql_scan.c
tools/mserver/mserver5.1.in
Branch: default
Log Message:

Add new mserver5 option for string interpretation

The boolean option raw_strings controls how the sql scanner interprets string
literals. If the value is false then strings are interpreted as if they were
delimited with E-quotes, that is `SELECT '\"';` will return a single character
string. If the value is true then strings are interpreted as if they were
delimited with R-quotes, that is `SELECT '\"';` will return a two-character
string. The default value is false.

mserver5 --set raw_strings=false
mserver5 --set raw_strings=true


diffs (88 lines):

diff --git a/common/options/monet_options.c b/common/options/monet_options.c
--- a/common/options/monet_options.c
+++ b/common/options/monet_options.c
@@ -43,7 +43,7 @@
 #define getpid _getpid
 #endif
 
-/* these two are used of the set parameter passed into functions is NULL */
+/* these two are used if the set parameter passed into functions is NULL */
 static int default_setlen = 0;
 static opt *default_set = NULL;
 
@@ -218,7 +218,7 @@ mo_builtin_settings(opt **Set)
if (Set == NULL)
return 0;
 
-#define N_OPTIONS  7   /*MUST MATCH # OPTIONS BELOW */
+#define N_OPTIONS  8   /*MUST MATCH # OPTIONS BELOW */
set = malloc(sizeof(opt) * N_OPTIONS);
if (set == NULL)
return 0;
@@ -252,6 +252,10 @@ mo_builtin_settings(opt **Set)
set[i].name = strdup("sql_debug");
set[i].value = strdup("0");
i++;
+   set[i].kind = opt_builtin;
+   set[i].name = strdup("raw_strings");
+   set[i].value = strdup("false");
+   i++;
 
assert(i == N_OPTIONS);
*Set = set;
diff --git a/sql/server/sql_scan.c b/sql/server/sql_scan.c
--- a/sql/server/sql_scan.c
+++ b/sql/server/sql_scan.c
@@ -1309,17 +1309,18 @@ sql_get_next_token(YYSTYPE *yylval, void
quote = '\'';
*dst = 0;
} else {
-#if 0
-   char *dst = str;
-   for (char *src = yylval->sval + 1; *src; dst++)
-   if ((*dst = *src++) == '\'' && *src == '\'')
-   src++;
-   *dst = 0;
-#else
-   GDKstrFromStr((unsigned char *) str,
- (unsigned char *) yylval->sval + 1,
- lc->yycur-lc->yysval - 1);
-#endif
+   bool raw_strings = GDKgetenv_istrue("raw_strings");
+   if (raw_strings) {
+   char *dst = str;
+   for (char *src = yylval->sval + 1; *src; dst++)
+   if ((*dst = *src++) == '\'' && *src == 
'\'')
+   src++;
+   *dst = 0;
+   } else {
+   GDKstrFromStr((unsigned char *)str,
+ (unsigned char *)yylval->sval + 1,
+ lc->yycur - lc->yysval - 1);
+   }
}
yylval->sval = str;
 
diff --git a/tools/mserver/mserver5.1.in b/tools/mserver/mserver5.1.in
--- a/tools/mserver/mserver5.1.in
+++ b/tools/mserver/mserver5.1.in
@@ -335,6 +335,19 @@ users of the server are allowed to execu
 therefore able to read and modify all data that the server process has
 access to.  In addition, if the C code causes a crash, all bets are
 off.
+.TP
+.B raw_strings=true
+The boolean option raw_strings controls how the sql scanner interprets string
+literals. If the value is
+.B false
+then strings are interpreted as if they were delimited with E-quotes, that is
+strings are interpreted as C strings and backslash characters are needed to
+escape special characters. If the value is
+.B true
+then strings are interpreted as if they were delimited with R-quotes, that is
+all characters are interpreted literally. Single quote characters need to be
+doubled inside strings. The default value is
+.BR false .
 .SH CONFIG FILE FORMAT
 The configuration file readable by
 .I mserver5
___
checkin-list mailing list
checkin-list@monetdb.org
https://www.monetdb.org/mailman/listinfo/checkin-list


MonetDB: Nov2019 - Properly convert int to BUN.

2019-12-06 Thread Sjoerd Mullender
Changeset: 52b7b18fc058 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=52b7b18fc058
Modified Files:
sql/backends/monet5/sql.c
sql/backends/monet5/sql_result.c
sql/backends/monet5/sql_scenario.c
Branch: Nov2019
Log Message:

Properly convert int to BUN.


diffs (39 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
@@ -2904,7 +2904,8 @@ mvc_export_chunk_wrap(Client cntxt, MalB
(void) mb;  /* NOT USED */
if (pci->argc == 5) {
offset = (BUN) *getArgReference_int(stk, pci, 3);
-   nr = (BUN) *getArgReference_int(stk, pci, 4);
+   int cnt = *getArgReference_int(stk, pci, 4);
+   nr = cnt < 0 ? BUN_NONE : (BUN) cnt;
}
 
if ((msg = checkSQLContext(cntxt)) != NULL)
diff --git a/sql/backends/monet5/sql_result.c b/sql/backends/monet5/sql_result.c
--- a/sql/backends/monet5/sql_result.c
+++ b/sql/backends/monet5/sql_result.c
@@ -2563,7 +2563,7 @@ mvc_export_chunk(backend *b, stream *s, 
cnt = BATcount(order);
if (offset >= BATcount(order))
cnt = 0;
-   if (offset + cnt > BATcount(order))
+   if (cnt == BUN_NONE || offset + cnt > BATcount(order))
cnt = BATcount(order) - offset;
 
if (b->client->protocol != PROTOCOL_10) {
diff --git a/sql/backends/monet5/sql_scenario.c 
b/sql/backends/monet5/sql_scenario.c
--- a/sql/backends/monet5/sql_scenario.c
+++ b/sql/backends/monet5/sql_scenario.c
@@ -1104,7 +1104,9 @@ SQLparser(Client c)
n = sscanf(in->buf + in->pos + 7, "%d %d %d", , , 
);
 
if (n == 2 || n == 3) {
-   if (mvc_export_chunk(be, out, v, off, n == 3 ? len : 
m->reply_size)) {
+   if (n == 2)
+   len = m->reply_size;
+   if (mvc_export_chunk(be, out, v, off, len < 0 ? 
BUN_NONE : (BUN) len)) {
msg = createException(SQL, "SQLparser", 
SQLSTATE(45000) "Result set construction failed");
goto finalize;
}
___
checkin-list mailing list
checkin-list@monetdb.org
https://www.monetdb.org/mailman/listinfo/checkin-list


MonetDB: Nov2019 - Fix for bug 6726 failing test. Look for TYPE_...

2019-12-06 Thread Pedro Ferreira
Changeset: 2d8848e66425 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=2d8848e66425
Modified Files:
sql/backends/monet5/UDF/pyapi/conversion.c
sql/backends/monet5/UDF/pyapi/convert_loops.h
sql/backends/monet5/UDF/pyapi/pyapi.c
sql/backends/monet5/UDF/pyapi/pyloader.c
sql/backends/monet5/UDF/pyapi/pytypes.c
Branch: Nov2019
Log Message:

Fix for bug 6726 failing test. Look for TYPE_void bats in pyapi and generate 
dense sequences from them. (I have to check for 32-bit architectures yet)


diffs (216 lines):

diff --git a/sql/backends/monet5/UDF/pyapi/conversion.c 
b/sql/backends/monet5/UDF/pyapi/conversion.c
--- a/sql/backends/monet5/UDF/pyapi/conversion.c
+++ b/sql/backends/monet5/UDF/pyapi/conversion.c
@@ -37,6 +37,11 @@ static bool IsBlobType(int type)
return type == TYPE_blob;
 }
 
+static bool IsVoidType(int type)
+{
+   return type == TYPE_void;
+}
+
 PyObject *PyArrayObject_FromScalar(PyInput *inp, char **return_message)
 {
PyObject *vararray = NULL;
@@ -44,6 +49,12 @@ PyObject *PyArrayObject_FromScalar(PyInp
assert(inp->scalar); // input has to be a scalar
 
switch (inp->bat_type) {
+   case TYPE_void:
+   vararray = PyArray_Arange(0, 1, 1, NPY_ULONGLONG);
+   break;
+   case TYPE_oid:
+   vararray = PyInt_FromLong((long)(*(oid *)inp->dataptr));
+   break;
case TYPE_bit:
vararray = PyInt_FromLong((long)(*(bit *)inp->dataptr));
break;
@@ -165,7 +176,7 @@ PyObject *PyArrayObject_FromBAT(PyInput 
goto wrapup;
}
 
-   if (!IsBlobType(inp->bat_type) &&
+   if (!IsVoidType(inp->bat_type) && !IsBlobType(inp->bat_type) &&
(!IsStandardBATType(inp->bat_type) ||
 ConvertableSQLType(inp->sql_subtype))) { // if the sql type is 
set, we

  // have to do some conversion
@@ -205,6 +216,12 @@ PyObject *PyArrayObject_FromBAT(PyInput 
}
} else {
switch (inp->bat_type) {
+   case TYPE_void:
+   BAT_TO_NP_CREATE_ALWAYS(b, NPY_ULONGLONG);
+   break;
+   case TYPE_oid:
+   BAT_TO_NP(b, oid, NPY_ULONG);
+   break;
case TYPE_bit:
BAT_TO_NP(b, bit, NPY_INT8);
break;
@@ -927,6 +944,9 @@ BAT *PyObject_ConvertToBAT(PyReturn *ret
BATsettrivprop(b);
} else {
switch (bat_type) {
+   case TYPE_void:
+   NP_CREATE_EMPTY_BAT(b, oid);
+   break;
case TYPE_bit:
NP_CREATE_BAT(b, bit);
break;
diff --git a/sql/backends/monet5/UDF/pyapi/convert_loops.h 
b/sql/backends/monet5/UDF/pyapi/convert_loops.h
--- a/sql/backends/monet5/UDF/pyapi/convert_loops.h
+++ b/sql/backends/monet5/UDF/pyapi/convert_loops.h
@@ -12,6 +12,9 @@
  * these are in a separate header because they are used in multiple places
  */
 
+#define BAT_TO_NP_CREATE_ALWAYS(bat, nptpe)
\
+   vararray = PyArray_Arange(0, (double)bat->batCount, 1, nptpe);
+
 #define BAT_TO_NP(bat, mtpe, nptpe)
\
if (copy) { 
   \
vararray = PyArray_EMPTY(1, elements, nptpe, 0);
   \
@@ -561,6 +564,22 @@ convert_and_append(BAT* b, const char* t
 #define NOT_HGE(mtpe) true
 #endif
 
+#define NP_CREATE_EMPTY_BAT(bat, mtpe) \
+   {  \
+   bat = COLnew(seqbase, TYPE_##mtpe, (BUN)ret->count, TRANSIENT); 
   \
+   if (bat == NULL) {  
   \
+   msg = createException(MAL, "pyapi.eval", 
SQLSTATE(PY000) "Cannot create column"); \
+   goto wrapup;
   \
+   }   
   \
+   bat->tkey = false;  
   \
+   bat->tsorted = false;   
   \
+   bat->trevsorted = false;
   \
+   bat->tnil = false;  
   \
+   bat->tnonil = true; 
   \
+ 

MonetDB: batcalc-updated - Merge with default branch.

2019-12-06 Thread Sjoerd Mullender
Changeset: 4f9a1a5bceb9 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=4f9a1a5bceb9
Added Files:
debian/libmonetdb19.install
sql/backends/monet5/sql_subquery.c
sql/backends/monet5/sql_subquery.h
sql/backends/monet5/sql_subquery.mal
sql/jdbc/tests/Tests/Bug_PrepStmt_With_Errors_Jira292.SQL.bat
sql/jdbc/tests/Tests/Bug_PrepStmt_With_Errors_Jira292.SQL.sh
sql/jdbc/tests/Tests/Bug_PrepStmt_With_Errors_Jira292.stable.err
sql/jdbc/tests/Tests/Bug_PrepStmt_With_Errors_Jira292.stable.out
sql/test/BugTracker-2019/Tests/cast-interval.Bug-6793.sql
sql/test/BugTracker-2019/Tests/cast-interval.Bug-6793.stable.err
sql/test/BugTracker-2019/Tests/cast-interval.Bug-6793.stable.out
sql/test/BugTracker-2019/Tests/could-not-allocate-space.Bug-6795.sql

sql/test/BugTracker-2019/Tests/could-not-allocate-space.Bug-6795.stable.err

sql/test/BugTracker-2019/Tests/could-not-allocate-space.Bug-6795.stable.out
sql/test/BugTracker-2019/Tests/count-distinct.Bug-6790.sql
sql/test/BugTracker-2019/Tests/count-distinct.Bug-6790.stable.err
sql/test/BugTracker-2019/Tests/count-distinct.Bug-6790.stable.out
sql/test/BugTracker-2019/Tests/grant-select-column.Bug-6765.stable.err
sql/test/BugTracker-2019/Tests/grant-select-column.Bug-6765.stable.out
sql/test/BugTracker-2019/Tests/jsonpath-validity.Bug-6792.sql
sql/test/BugTracker-2019/Tests/jsonpath-validity.Bug-6792.stable.err
sql/test/BugTracker-2019/Tests/jsonpath-validity.Bug-6792.stable.out

sql/test/BugTracker-2019/Tests/prepared-select-with-error-causes-hang.Jira-292.sql

sql/test/BugTracker-2019/Tests/prepared-select-with-error-causes-hang.Jira-292.stable.err

sql/test/BugTracker-2019/Tests/prepared-select-with-error-causes-hang.Jira-292.stable.out
sql/test/BugTracker-2019/Tests/python-aggregate-no-groups.Bug-6726.sql

sql/test/BugTracker-2019/Tests/python-aggregate-no-groups.Bug-6726.stable.err

sql/test/BugTracker-2019/Tests/python-aggregate-no-groups.Bug-6726.stable.out

sql/test/BugTracker-2019/Tests/remote-table-non-existent-column.Bug-6750.stable.out
sql/test/BugTracker-2019/Tests/str_to_time.Bug-6791.sql
sql/test/BugTracker-2019/Tests/str_to_time.Bug-6791.stable.err
sql/test/BugTracker-2019/Tests/str_to_time.Bug-6791.stable.out
sql/test/Tests/fsum1.stable.out
sql/test/analytics/Tests/analytics10.sql
sql/test/analytics/Tests/analytics10.stable.err
sql/test/analytics/Tests/analytics10.stable.out
sql/test/analytics/Tests/analytics11.sql
sql/test/analytics/Tests/analytics11.stable.err
sql/test/analytics/Tests/analytics11.stable.out
sql/test/analytics/Tests/analytics12.sql
sql/test/analytics/Tests/analytics12.stable.err
sql/test/analytics/Tests/analytics12.stable.out
sql/test/analytics/Tests/analytics13.sql
sql/test/analytics/Tests/analytics13.stable.err
sql/test/analytics/Tests/analytics13.stable.out
sql/test/mapi/Tests/utf8test.stable.out.Windows
sql/test/mergetables/Tests/sqlsmith-exists.stable.err
sql/test/mergetables/Tests/sqlsmith-exists.stable.out
sql/test/scanner/Tests/All
sql/test/scanner/Tests/raw_strings.sql
sql/test/scanner/Tests/raw_strings.stable.err
sql/test/scanner/Tests/raw_strings.stable.out
Removed Files:
ChangeLog.Apr2019
buildtools/ChangeLog.Apr2019
buildtools/selinux/ChangeLog.Apr2019
clients/ChangeLog.Apr2019
clients/mapilib/ChangeLog.Apr2019
common/stream/ChangeLog.Apr2019
debian/libmonetdb18.install
gdk/ChangeLog.Apr2019
geom/ChangeLog.Apr2019
monetdb5/ChangeLog.Apr2019
sql/ChangeLog.Apr2019
testing/ChangeLog.Apr2019
tools/merovingian/ChangeLog.Apr2019
Modified Files:
.hgtags
ChangeLog
MonetDB.spec
NT/monetdb_config.h.in
NT/rules.msc
buildtools/conf/Maddlog
buildtools/doc/windowsbuild.rst
buildtools/selinux/monetdb.te
clients/NT/mclient.bat
clients/NT/msqldump.bat
clients/NT/stethoscope.bat
clients/R/Tests/deps-install.stable.out
clients/Tests/MAL-signatures.stable.out
clients/Tests/MAL-signatures.stable.out.int128
clients/Tests/exports.stable.out
clients/Tests/mclient-uri.stable.out
clients/Tests/mclient-uri.stable.out.Windows
clients/mapiclient/eventparser.c
clients/mapiclient/mhelp.c
clients/mapiclient/msqldump.c
clients/mapilib/mapi.rc
clients/odbc/driver/ODBCConvert.c
clients/odbc/driver/README
clients/odbc/driver/driver.rc
clients/odbc/winsetup/setup.rc
common/utils/mstring.h
common/utils/mutils.h

MonetDB: Nov2019 - Set cache limit for dump to infinite (aka -1).

2019-12-06 Thread Sjoerd Mullender
Changeset: 838d7af08408 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=838d7af08408
Modified Files:
clients/mapiclient/msqldump.c
Branch: Nov2019
Log Message:

Set cache limit for dump to infinite (aka -1).
The limit should be less than infinite if there are multiple
concurrent queries on the connection, but that is not the case in
msqldump.
This should fix bug 6777.


diffs (12 lines):

diff --git a/clients/mapiclient/msqldump.c b/clients/mapiclient/msqldump.c
--- a/clients/mapiclient/msqldump.c
+++ b/clients/mapiclient/msqldump.c
@@ -186,7 +186,7 @@ main(int argc, char **argv)
fprintf(stderr, "%s", motd);
}
mapi_trace(mid, trace);
-   mapi_cache_limit(mid, 1);
+   mapi_cache_limit(mid, -1);
 
out = file_wastream(stdout, "stdout");
if (out == NULL) {
___
checkin-list mailing list
checkin-list@monetdb.org
https://www.monetdb.org/mailman/listinfo/checkin-list


MonetDB: Nov2019 - Make sure we always have the correct name in ...

2019-12-06 Thread Sjoerd Mullender
Changeset: f0447bbb66c3 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=f0447bbb66c3
Modified Files:
sql/backends/monet5/sql_upgrades.c
Branch: Nov2019
Log Message:

Make sure we always have the correct name in errors, even after copy-paste.


diffs (216 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
@@ -37,7 +37,7 @@ sql_fix_system_tables(Client c, mvc *sql
sql_schema *s;
 
if (buf == NULL)
-   throw(SQL, "sql_fix_system_tables", SQLSTATE(HY001) 
MAL_MALLOC_FAIL);
+   throw(SQL, __func__, SQLSTATE(HY001) MAL_MALLOC_FAIL);
s = mvc_bind_schema(sql, "sys");
pos += snprintf(buf + pos, bufsize - pos, "set schema \"sys\";\n");
 
@@ -195,7 +195,7 @@ sql_update_hugeint(Client c, mvc *sql, c
*systabfixed = true;
 
if ((buf = GDKmalloc(bufsize)) == NULL)
-   throw(SQL, "sql_update_hugeint", SQLSTATE(HY001) 
MAL_MALLOC_FAIL);
+   throw(SQL, __func__, SQLSTATE(HY001) MAL_MALLOC_FAIL);
 
pos += snprintf(buf + pos, bufsize - pos, "set schema \"sys\";\n");
 
@@ -277,12 +277,12 @@ sql_update_geom(Client c, mvc *sql, int 
 
geomupgrade = (*fixfunc)(olddb);
if (geomupgrade == NULL)
-   throw(SQL, "sql_update_geom", SQLSTATE(HY001) MAL_MALLOC_FAIL);
+   throw(SQL, __func__, SQLSTATE(HY001) MAL_MALLOC_FAIL);
bufsize = strlen(geomupgrade) + 512;
buf = GDKmalloc(bufsize);
if (buf == NULL) {
GDKfree(geomupgrade);
-   throw(SQL, "sql_update_geom", SQLSTATE(HY001) MAL_MALLOC_FAIL);
+   throw(SQL, __func__, SQLSTATE(HY001) MAL_MALLOC_FAIL);
}
pos += snprintf(buf + pos, bufsize - pos, "set schema \"sys\";\n");
pos += snprintf(buf + pos, bufsize - pos, "%s", geomupgrade);
@@ -320,7 +320,7 @@ sql_update_jul2017(Client c, const char 
BAT *b;
 
if( buf == NULL)
-   throw(SQL, "sql_update_jul2017", SQLSTATE(HY001) 
MAL_MALLOC_FAIL);
+   throw(SQL, __func__, SQLSTATE(HY001) MAL_MALLOC_FAIL);
pos += snprintf(buf + pos, bufsize - pos, "set schema \"sys\";\n");
 
pos += snprintf(buf + pos, bufsize - pos,
@@ -444,7 +444,7 @@ sql_update_jul2017_sp2(Client c)
char *buf = GDKmalloc(bufsize);
 
if (buf == NULL)
-   throw(SQL, "sql_update_jul2017_sp2", 
SQLSTATE(HY001) MAL_MALLOC_FAIL);
+   throw(SQL, __func__, SQLSTATE(HY001) 
MAL_MALLOC_FAIL);
 
/* 51_sys_schema_extensions.sql and 25_debug.sql */
pos += snprintf(buf + pos, bufsize - pos,
@@ -502,7 +502,7 @@ sql_update_jul2017_sp3(Client c, mvc *sq
size_t bufsize = 1024, pos = 0;
char *buf = GDKmalloc(bufsize);
if (buf == NULL)
-   throw(SQL, "sql_update_jul2017_sp3", SQLSTATE(HY001) 
MAL_MALLOC_FAIL);
+   throw(SQL, __func__, SQLSTATE(HY001) MAL_MALLOC_FAIL);
pos += snprintf(
buf + pos,
bufsize - pos,
@@ -525,7 +525,7 @@ sql_update_mar2018_geom(Client c, sql_ta
char *buf = GDKmalloc(bufsize), *err = NULL;
 
if (buf == NULL)
-   throw(SQL, "sql_update_mar2018_geom", SQLSTATE(HY001) 
MAL_MALLOC_FAIL);
+   throw(SQL, __func__, SQLSTATE(HY001) MAL_MALLOC_FAIL);
pos += snprintf(buf + pos, bufsize - pos, "set schema \"sys\";\n");
 
t->system = 0;
@@ -585,7 +585,7 @@ sql_update_mar2018(Client c, mvc *sql, c
 
buf = GDKmalloc(bufsize);
if (buf == NULL)
-   throw(SQL, "sql_update_mar2018", SQLSTATE(HY001) 
MAL_MALLOC_FAIL);
+   throw(SQL, __func__, SQLSTATE(HY001) MAL_MALLOC_FAIL);
s = mvc_bind_schema(sql, "sys");
 
t = mvc_create_table(sql, s, "comments", tt_table, 1, SQL_PERSIST, 0, 
-1, 0);
@@ -1040,7 +1040,7 @@ sql_update_mar2018_netcdf(Client c, cons
char *buf = GDKmalloc(bufsize), *err;
 
if (buf == NULL)
-   throw(SQL, "sql_update_mar2018_netcdf", SQLSTATE(HY001) 
MAL_MALLOC_FAIL);
+   throw(SQL, __func__, SQLSTATE(HY001) MAL_MALLOC_FAIL);
 
pos += snprintf(buf + pos, bufsize - pos, "set schema sys;\n");
 
@@ -1077,7 +1077,7 @@ sql_update_mar2018_samtools(Client c, mv
 
buf = GDKmalloc(bufsize);
if (buf == NULL)
-   throw(SQL, "sql_update_mar2018_samtools", SQLSTATE(HY001) 
MAL_MALLOC_FAIL);
+   throw(SQL, __func__, SQLSTATE(HY001) MAL_MALLOC_FAIL);
 
pos += snprintf(buf + pos, bufsize - pos, "set schema sys;\n");
 
@@ -1146,7 +1146,7 @@ sql_update_mar2018_sp1(Client c, const c
char *buf = GDKmalloc(bufsize), *err = NULL;
 
if (buf == 

MonetDB: default - Give informative message when essential argum...

2019-12-06 Thread Martin Kersten
Changeset: 8b90ae23d066 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=8b90ae23d066
Modified Files:
clients/mapiclient/msqldump.c
Branch: default
Log Message:

Give informative message when essential argument is missing


diffs (14 lines):

diff --git a/clients/mapiclient/msqldump.c b/clients/mapiclient/msqldump.c
--- a/clients/mapiclient/msqldump.c
+++ b/clients/mapiclient/msqldump.c
@@ -159,6 +159,10 @@ main(int argc, char **argv)
if (user_set_as_flag)
passwd = NULL;
 
+   if( dbname == NULL){
+   printf("msqldump, please specify a database\n");
+   usage(argv[0], -1);
+   }
if (user == NULL)
user = simple_prompt("user", BUFSIZ, 1, prompt_getlogin());
if (passwd == NULL)
___
checkin-list mailing list
checkin-list@monetdb.org
https://www.monetdb.org/mailman/listinfo/checkin-list


MonetDB: default - Approved labels

2019-12-06 Thread Pedro Ferreira
Changeset: 27a04f23aba6 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=27a04f23aba6
Modified Files:

sql/test/BugTracker-2019/Tests/could-not-allocate-space.Bug-6795.stable.out

sql/test/BugTracker-2019/Tests/python-aggregate-no-groups.Bug-6726.stable.out
Branch: default
Log Message:

Approved labels


diffs (92 lines):

diff --git 
a/sql/test/BugTracker-2019/Tests/could-not-allocate-space.Bug-6795.stable.out 
b/sql/test/BugTracker-2019/Tests/could-not-allocate-space.Bug-6795.stable.out
--- 
a/sql/test/BugTracker-2019/Tests/could-not-allocate-space.Bug-6795.stable.out
+++ 
b/sql/test/BugTracker-2019/Tests/could-not-allocate-space.Bug-6795.stable.out
@@ -160,7 +160,7 @@ stdout of test 'could-not-allocate-space
 #join eoproduct eo on eo.image_id=i.image_id 
 #join ingestion ing on ing.ingestion_id=eo.ingestion_id 
 #where  m.mission = 'S2A';
-% .L7, sys.i,  sys.m,  sys.m,  sys.m,  sys.m,  sys.m,  sys.m,  sys.m,  sys.m,  
sys.m,  sys.m,  sys.m,  sys.m,  sys.m,  sys.m,  sys.m,  sys.m,  sys.m,  sys.m,  
sys.m,  sys.m,  sys.m,  sys.m,  sys.m,  sys.m,  sys.m,  sys.m,  sys.m,  sys.m,  
sys.m,  sys.m,  sys.m,  sys.m,  sys.m,  sys.m,  sys.m,  sys.m,  sys.m,  sys.m,  
sys.m,  sys.m,  sys.m,  sys.m,  sys.m,  sys.m,  sys.m,  sys.m,  sys.m,  sys.m,  
sys.m,  sys.m,  sys.m,  sys.m,  sys.m,  sys.m,  sys.m,  sys.m,  sys.m,  sys.m,  
sys.m,  sys.m,  sys.m,  sys.m,  sys.m,  sys.m,  sys.m,  sys.m,  sys.m,  sys.m,  
sys.m,  sys.m,  sys.m,  sys.m,  sys.m,  sys.m,  sys.m,  sys.m,  sys.m,  sys.m,  
sys.m,  sys.m,  sys.m,  sys.i,  sys.i,  sys.i,  sys.i,  sys.i,  sys.i,  sys.i,  
sys.i,  sys.i,  sys.i,  sys.i,  sys.eo, sys.eo, sys.eo, sys.ing,
sys.ing,sys.ing,sys.ing,sys.ing,sys.ing,
sys.ing,sys.ing,sys.ing,sys.ing,sys.ing,
sys.ing,sys.ing,sys.ing # table_name
+% .,   sys.i,  sys.m,  sys.m,  sys.m,  sys.m,  sys.m,  sys.m,  sys.m,  sys.m,  
sys.m,  sys.m,  sys.m,  sys.m,  sys.m,  sys.m,  sys.m,  sys.m,  sys.m,  sys.m,  
sys.m,  sys.m,  sys.m,  sys.m,  sys.m,  sys.m,  sys.m,  sys.m,  sys.m,  sys.m,  
sys.m,  sys.m,  sys.m,  sys.m,  sys.m,  sys.m,  sys.m,  sys.m,  sys.m,  sys.m,  
sys.m,  sys.m,  sys.m,  sys.m,  sys.m,  sys.m,  sys.m,  sys.m,  sys.m,  sys.m,  
sys.m,  sys.m,  sys.m,  sys.m,  sys.m,  sys.m,  sys.m,  sys.m,  sys.m,  sys.m,  
sys.m,  sys.m,  sys.m,  sys.m,  sys.m,  sys.m,  sys.m,  sys.m,  sys.m,  sys.m,  
sys.m,  sys.m,  sys.m,  sys.m,  sys.m,  sys.m,  sys.m,  sys.m,  sys.m,  sys.m,  
sys.m,  sys.m,  sys.m,  sys.i,  sys.i,  sys.i,  sys.i,  sys.i,  sys.i,  sys.i,  
sys.i,  sys.i,  sys.i,  sys.i,  sys.eo, sys.eo, sys.eo, sys.ing,
sys.ing,sys.ing,sys.ing,sys.ing,sys.ing,
sys.ing,sys.ing,sys.ing,sys.ing,sys.ing,
sys.ing,sys.ing,sys.ing # table_name
 % selected,image_id,   metadata_id,mission,orbitphase, 
absorbit,   relorbit,   orbitcycle, numorbitsincycle,   
orbitdirection, sensor, imagingmode,antennareceiveconfiguration,
lookdirection,  polarisationmode,   pollayer,   projection, 
mapprojection,  producttype,productvariant, radiometriccorrection,  
resolutionvariant,  pixelvalueid,   columncontent,  rowcontent, 
imagedatadepth, imagedataformat,imagedatatype,  imagestorageorder,  
numberoflayers, sceneid,starttimegps,   starttimegpsfraction,   
starttimeutc,   stoptimegps,stoptimegpsfraction,stoptimeutc,
rangetimefirstpixel,rangetimelastpixel, scenestoptimeutc,   
centerazimuthtimeutc,   scenerangeextent,   sceneazimuthextent, 
scenecentercoord_refrow,scenecentercoord_refcolumn, 
scenecentercoord_lat,   scenecentercoord_lon,   
scenecentercoord_azimuthtimeutc,scenecentercoord_incidenceangle,
scenecentercoord_rangetime, scenecorner_ul_lon, scenecorner_ul_lat, 
scenecorner_ul_refrow,  scenecorner_ul_refcolumn,   
scenecorner_ul_azimuthtimeutc,  scenecorner_ul_incidence
 angle, scenecorner_ul_rangetime,   scenecorner_ur_lon, 
scenecorner_ur_lat, scenecorner_ur_refrow,  scenecorner_ur_refcolumn,   
scenecorner_ur_azimuthtimeutc,  scenecorner_ur_incidenceangle,  
scenecorner_ur_rangetime,   scenecorner_ll_lon, scenecorner_ll_lat, 
scenecorner_ll_refrow,  scenecorner_ll_refcolumn,   
scenecorner_ll_azimuthtimeutc,  scenecorner_ll_incidenceangle,  
scenecorner_ll_rangetime,   scenecorner_lr_lon, scenecorner_lr_lat, 
scenecorner_lr_refrow,  scenecorner_lr_refcolumn,   
scenecorner_lr_azimuthtimeutc,  scenecorner_lr_incidenceangle,  
scenecorner_lr_rangetime,   headingangle,   sceneaverageheight, 
referenceprojection,laterror,   lonerror,   image_id,   
metadata_id,azimuthlooks,   rangelooks, filename,   
azimuthresolution,  

MonetDB: default - Merge with Nov2019

2019-12-06 Thread Pedro Ferreira
Changeset: 9500918e8d18 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=9500918e8d18
Added Files:
sql/test/BugTracker-2019/Tests/cast-interval.Bug-6793.sql
sql/test/BugTracker-2019/Tests/cast-interval.Bug-6793.stable.err
sql/test/BugTracker-2019/Tests/cast-interval.Bug-6793.stable.out
sql/test/BugTracker-2019/Tests/could-not-allocate-space.Bug-6795.sql

sql/test/BugTracker-2019/Tests/could-not-allocate-space.Bug-6795.stable.err

sql/test/BugTracker-2019/Tests/could-not-allocate-space.Bug-6795.stable.out
sql/test/BugTracker-2019/Tests/python-aggregate-no-groups.Bug-6726.sql

sql/test/BugTracker-2019/Tests/python-aggregate-no-groups.Bug-6726.stable.err

sql/test/BugTracker-2019/Tests/python-aggregate-no-groups.Bug-6726.stable.out
Modified Files:
sql/test/BugTracker-2019/Tests/All
sql/test/emptydb/Tests/check.SQL.py
sql/test/emptydb/Tests/check.stable.out
sql/test/emptydb/Tests/check.stable.out.32bit
sql/test/emptydb/Tests/check.stable.out.int128
tools/mserver/mserver5.c
Branch: default
Log Message:

Merge with Nov2019


diffs (truncated from 969 to 300 lines):

diff --git a/sql/test/BugTracker-2019/Tests/All 
b/sql/test/BugTracker-2019/Tests/All
--- a/sql/test/BugTracker-2019/Tests/All
+++ b/sql/test/BugTracker-2019/Tests/All
@@ -21,6 +21,7 @@ select_window_function_and_asterisk.Bug-
 disallow_duplicate_column_aliases.Bug-6723
 prepare-types.Bug-6724
 prepare-non-existing-function.Bug-6725
+HAVE_LIBPY3?python-aggregate-no-groups.Bug-6726
 select-distinct.Bug-6728
 table-duplicate-column.Bug-6729
 view-too-few-rows.Bug-6736
@@ -51,3 +52,5 @@ isaUUID.Bug-6784
 count-distinct.Bug-6790
 str_to_time.Bug-6791
 jsonpath-validity.Bug-6792
+cast-interval.Bug-6793
+could-not-allocate-space.Bug-6795
diff --git a/sql/test/BugTracker-2019/Tests/cast-interval.Bug-6793.sql 
b/sql/test/BugTracker-2019/Tests/cast-interval.Bug-6793.sql
new file mode 100644
--- /dev/null
+++ b/sql/test/BugTracker-2019/Tests/cast-interval.Bug-6793.sql
@@ -0,0 +1,20 @@
+CREATE TABLE INTERVAL_TBL (f1 interval second);
+INSERT INTO INTERVAL_TBL (f1) VALUES (1.123);
+INSERT INTO INTERVAL_TBL (f1) VALUES (2.123);
+INSERT INTO INTERVAL_TBL (f1) VALUES (3.123);
+INSERT INTO INTERVAL_TBL (f1) VALUES (4.123);
+SELECT f1, cast(f1 as int), cast(f1 as dec(8,3)), cast(f1 as real) FROM 
INTERVAL_TBL;
+SELECT count(f1), sum(f1), cast(sum(f1) as int), cast(sum(f1) as dec(8,3)), 
cast(sum(f1) as real) FROM INTERVAL_TBL;
+DROP TABLE INTERVAL_TBL;
+
+CREATE TABLE INTERVAL_TBL (f1 interval month);
+INSERT INTO INTERVAL_TBL (f1) VALUES (1);
+INSERT INTO INTERVAL_TBL (f1) VALUES (2);
+INSERT INTO INTERVAL_TBL (f1) VALUES (3);
+INSERT INTO INTERVAL_TBL (f1) VALUES (4);
+SELECT f1, cast(f1 as int) FROM INTERVAL_TBL;
+SELECT f1, cast(f1 as dec(3,0)) FROM INTERVAL_TBL;  -- returns error: types 
month_interval(3,0) and decimal(3,0) are not equal for column 'f1'
+SELECT f1, cast(f1 as real) FROM INTERVAL_TBL;  --  returns error: types 
month_interval(3,0) and real(24,0) are not equal for column 'f1'
+SELECT count(f1), sum(f1), cast(sum(f1) as int), cast(sum(f1) as dec(8,3)), 
cast(sum(f1) as real) FROM INTERVAL_TBL;
+DROP TABLE INTERVAL_TBL;
+
diff --git a/sql/test/BugTracker-2019/Tests/cast-interval.Bug-6793.stable.err 
b/sql/test/BugTracker-2019/Tests/cast-interval.Bug-6793.stable.err
new file mode 100644
--- /dev/null
+++ b/sql/test/BugTracker-2019/Tests/cast-interval.Bug-6793.stable.err
@@ -0,0 +1,30 @@
+stderr of test 'cast-interval.Bug-6793` in directory 
'sql/test/BugTracker-2019` itself:
+
+
+# 13:25:35 >  
+# 13:25:35 >  "mserver5" "--debug=10" "--set" "gdk_nr_threads=0" "--set" 
"mapi_open=true" "--set" "mapi_port=33951" "--set" 
"mapi_usock=/var/tmp/mtest-5984/.s.monetdb.33951" "--forcemito" 
"--dbpath=/home/dinther/dev/dev/INSTALL/var/MonetDB/mTests_sql_test_BugTracker-2019"
 "--set" "embedded_c=true"
+# 13:25:35 >  
+
+# builtin opt  gdk_dbpath = 
/home/dinther/dev/dev/INSTALL/var/monetdb5/dbfarm/demo
+# builtin opt  mapi_port = 5
+# builtin opt  mapi_open = false
+# builtin opt  mapi_ipv6 = 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 = 33951
+# cmdline opt  mapi_usock = /var/tmp/mtest-5984/.s.monetdb.33951
+# cmdline opt  gdk_dbpath = 
/home/dinther/dev/dev/INSTALL/var/MonetDB/mTests_sql_test_BugTracker-2019
+# cmdline opt  embedded_c = true
+
+# 13:25:36 >  
+# 13:25:36 >  "mclient" "-lsql" "-ftest" "-tnone" "-Eutf-8" "-i" "-e" 
"--host=/var/tmp/mtest-5984" "--port=33951"
+# 13:25:36 >  
+
+
+# 13:25:36 >  
+# 13:25:36 >  "Done."
+# 13:25:36 >  
+
diff --git a/sql/test/BugTracker-2019/Tests/cast-interval.Bug-6793.stable.out 
b/sql/test/BugTracker-2019/Tests/cast-interval.Bug-6793.stable.out
new file mode 100644
--- /dev/null
+++ 

MonetDB: Nov2019 - Use E'...' escapes for SQL strings with to-be...

2019-12-06 Thread Sjoerd Mullender
Changeset: 0fb4beaf2d4c for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=0fb4beaf2d4c
Modified Files:
sql/test/emptydb/Tests/check.SQL.py
sql/test/emptydb/Tests/check.stable.out
sql/test/emptydb/Tests/check.stable.out.32bit
sql/test/emptydb/Tests/check.stable.out.int128
Branch: Nov2019
Log Message:

Use E'...' escapes for SQL strings with to-be-interpreted backslashes.


diffs (127 lines):

diff --git a/sql/test/emptydb/Tests/check.SQL.py 
b/sql/test/emptydb/Tests/check.SQL.py
--- a/sql/test/emptydb/Tests/check.SQL.py
+++ b/sql/test/emptydb/Tests/check.SQL.py
@@ -8,18 +8,18 @@ clt = process.client('sql', format='csv'
  stdin=process.PIPE, stdout=process.PIPE, 
stderr=process.PIPE)
 
 for c in 'ntvsf':
-clt.stdin.write("select 'd%s';\n" % c)
+clt.stdin.write("select E'd%s';\n" % c)
 
 for c in 'ntvsf':
-clt.stdin.write("select 'dS%s';\n" % c)
+clt.stdin.write("select E'dS%s';\n" % c)
 
-clt.stdin.write("select 'dn ' || name from sys.schemas order by name;\n")
+clt.stdin.write("select E'dn ' || name from sys.schemas order by name;\n")
 
-clt.stdin.write("select 'dSt ' || s.name || '.' || t.name from sys._tables 
t, sys.schemas s where t.schema_id = s.id and t.query is null order by s.name, 
t.name;\n")
+clt.stdin.write("select E'dSt ' || s.name || '.' || t.name from 
sys._tables t, sys.schemas s where t.schema_id = s.id and t.query is null order 
by s.name, t.name;\n")
 
-clt.stdin.write("select 'dSv ' || s.name || '.' || t.name from sys._tables 
t, sys.schemas s where t.schema_id = s.id and t.query is not null order by 
s.name, t.name;\n")
+clt.stdin.write("select E'dSv ' || s.name || '.' || t.name from 
sys._tables t, sys.schemas s where t.schema_id = s.id and t.query is not null 
order by s.name, t.name;\n")
 
-clt.stdin.write("select distinct 'dSf ' || s.name || '.\"' || f.name || 
'\"' from sys.functions f, sys.schemas s where f.language between 1 and 2 and 
f.schema_id = s.id and s.name = 'sys' order by s.name, f.name;\n")
+clt.stdin.write("select distinct E'dSf ' || s.name || '.\"' || f.name || 
'\"' from sys.functions f, sys.schemas s where f.language between 1 and 2 and 
f.schema_id = s.id and s.name = 'sys' order by s.name, f.name;\n")
 
 out, err = clt.communicate()
 out = re.sub('^"(.*)"$', r'\1', out, flags=re.MULTILINE).replace('"\n', 
'\n').replace('\n"', '\n').replace('""', '"').replace(r'\\', '\\')
@@ -67,7 +67,7 @@ create function pcre_replace(origin stri
 -- schemas
 select name, authorization, owner, system from sys.schemas order by name;
 -- _tables
-select s.name, t.name, replace(replace(pcre_replace(pcre_replace(t.query, 
'--.*\n*', '', ''), '[ \t\n]+', ' ', ''), '( ', '('), ' )', ')') as query, 
tt.table_type_name as type, t.system, ca.action_name as commit_action, at.value 
as access from sys._tables t left outer join sys.schemas s on t.schema_id = 
s.id left outer join sys.table_types tt on t.type = tt.table_type_id left outer 
join (values (0, 'COMMIT'), (1, 'DELETE'), (2, 'PRESERVE'), (3, 'DROP'), (4, 
'ABORT')) as ca (action_id, action_name) on t.commit_action = ca.action_id left 
outer join (values (0, 'WRITABLE'), (1, 'READONLY'), (2, 'APPENDONLY')) as at 
(id, value) on t.access = at.id order by s.name, t.name;
+select s.name, t.name, replace(replace(pcre_replace(pcre_replace(t.query, 
E'--.*\n*', '', ''), E'[ \t\n]+', ' ', ''), '( ', '('), ' )', ')') as query, 
tt.table_type_name as type, t.system, ca.action_name as commit_action, at.value 
as access from sys._tables t left outer join sys.schemas s on t.schema_id = 
s.id left outer join sys.table_types tt on t.type = tt.table_type_id left outer 
join (values (0, 'COMMIT'), (1, 'DELETE'), (2, 'PRESERVE'), (3, 'DROP'), (4, 
'ABORT')) as ca (action_id, action_name) on t.commit_action = ca.action_id left 
outer join (values (0, 'WRITABLE'), (1, 'READONLY'), (2, 'APPENDONLY')) as at 
(id, value) on t.access = at.id order by s.name, t.name;
 -- _columns
 select t.name, c.name, c.type, c.type_digits, c.type_scale, c."default", 
c."null", c.number, c.storage from sys._tables t, sys._columns c where t.id = 
c.table_id order by t.name, c.number;
 -- partitioned tables (these three should be empty)
@@ -75,7 +75,7 @@ select t.name, c.name, p.expression from
 select t.name, p.expression, r.minimum, r.maximum, r.with_nulls from 
sys.range_partitions r left outer join sys._tables t on t.id = r.table_id left 
outer join sys.table_partitions p on r.partition_id = p.id;
 select t.name, p.expression, v.value from sys.value_partitions v left outer 
join sys._tables t on t.id = v.table_id left outer join sys.table_partitions p 
on v.partition_id = p.id;
 -- external functions that don't reference existing MAL function (should be 
empty)
-with funcs as (select name, pcre_replace(func, '--.*\n*', '', '') as func, 
schema_id from sys.functions), x (sname, name, modfunc) as (select s.name, 
f.name, 

MonetDB: Nov2019 - Added test and output for bug 6795

2019-12-06 Thread Pedro Ferreira
Changeset: 1cd809f47444 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=1cd809f47444
Added Files:
sql/test/BugTracker-2019/Tests/could-not-allocate-space.Bug-6795.sql

sql/test/BugTracker-2019/Tests/could-not-allocate-space.Bug-6795.stable.err

sql/test/BugTracker-2019/Tests/could-not-allocate-space.Bug-6795.stable.out
Modified Files:
sql/test/BugTracker-2019/Tests/All
Branch: Nov2019
Log Message:

Added test and output for bug 6795


diffs (truncated from 468 to 300 lines):

diff --git a/sql/test/BugTracker-2019/Tests/All 
b/sql/test/BugTracker-2019/Tests/All
--- a/sql/test/BugTracker-2019/Tests/All
+++ b/sql/test/BugTracker-2019/Tests/All
@@ -53,3 +53,4 @@ count-distinct.Bug-6790
 str_to_time.Bug-6791
 jsonpath-validity.Bug-6792
 cast-interval.Bug-6793
+could-not-allocate-space.Bug-6795
diff --git 
a/sql/test/BugTracker-2019/Tests/could-not-allocate-space.Bug-6795.sql 
b/sql/test/BugTracker-2019/Tests/could-not-allocate-space.Bug-6795.sql
new file mode 100644
--- /dev/null
+++ b/sql/test/BugTracker-2019/Tests/could-not-allocate-space.Bug-6795.sql
@@ -0,0 +1,234 @@
+START TRANSACTION;
+
+CREATE TABLE ingestion (
+   ingestion_idINTEGER NOT NULL,
+   sourcepath  VARCHAR(1024),
+   destinationpath VARCHAR(1024),
+   sourcereference VARCHAR(4096),
+   operatorVARCHAR(64),
+   tilesizerow INTEGER,
+   tilesizecolumn  INTEGER,
+   gridlevels  INTEGER,
+   multitemporal   boolean,
+   overlaprows INTEGER,
+   overlapcolumns  INTEGER,
+   timeStartUTCVARCHAR(30),
+   timeStoptUTCVARCHAR(30),
+   "status"INTEGER,
+   CONSTRAINT ingestion_id_pkey PRIMARY KEY (ingestion_id)
+);
+
+COPY 22 RECORDS INTO "sys"."ingestion" FROM stdin USING DELIMITERS 
E'\t',E'\n','"';
+1  "/usr/src/S_product/GRANULE/L1C_T31TCJ_A012232_20190710T105335" 
"https://platform.candela-h2020.eu/rest/img/L1C_T31TCJ_A012232_20190710T105335/L1C_T31TCJ_A012232_20190710T105335;
  
"/usr/src/dmg/L1C_T31TCJ_A012232_20190710T105335/L1C_T31TCJ_A012232_20190710T105335"
"test"  120 120 1   false   120 120 
"2019-11-05T11:03:51.000Z"  "2019-11-05T11:06:58.000Z"  2
+2  "/usr/src/S_product/GRANULE/L1C_T33UVR_A021326_20190723T101347" 
"https://platform.candela-h2020.eu/rest/img/L1C_T33UVR_A021326_20190723T101347/L1C_T33UVR_A021326_20190723T101347;
  
"/usr/src/dmg/L1C_T33UVR_A021326_20190723T101347/L1C_T33UVR_A021326_20190723T101347"
"test"  120 120 1   false   120 120 
"2019-11-05T11:13:26.000Z"  "2019-11-05T11:16:58.000Z"  2
+4  "/usr/src/S_product/GRANULE/L1C_T32TMT_A012432_20190724T103030" 
"https://platform.candela-h2020.eu/rest/img/L1C_T32TMT_A012432_20190724T103030/L1C_T32TMT_A012432_20190724T103030;
  
"/usr/src/dmg/L1C_T32TMT_A012432_20190724T103030/L1C_T32TMT_A012432_20190724T103030"
"test"  120 120 1   false   120 120 
"2019-11-05T11:13:40.000Z"  "2019-11-05T11:17:13.000Z"  2
+5  "/usr/src/S_product/GRANULE/L1C_T31UES_A021784_20190824T105344" 
"https://platform.candela-h2020.eu/rest/img/L1C_T31UES_A021784_20190824T105344/L1C_T31UES_A021784_20190824T105344;
  
"/usr/src/dmg/L1C_T31UES_A021784_20190824T105344/L1C_T31UES_A021784_20190824T105344"
"test"  120 120 1   false   120 120 
"2019-11-05T11:13:47.000Z"  "2019-11-05T11:17:26.000Z"  2
+8  "/usr/src/S_product/GRANULE/L1C_T32UPU_A012961_20190830T102552" 
"https://platform.candela-h2020.eu/rest/img/L1C_T32UPU_A012961_20190830T102552/L1C_T32UPU_A012961_20190830T102552;
  
"/usr/src/dmg/L1C_T32UPU_A012961_20190830T102552/L1C_T32UPU_A012961_20190830T102552"
"test"  120 120 1   false   120 120 
"2019-11-05T11:13:57.000Z"  "2019-11-05T11:17:37.000Z"  2
+10 "/usr/src/S_product/GRANULE/L1C_T31UFU_A021784_20190824T105344" 
"https://platform.candela-h2020.eu/rest/img/L1C_T31UFU_A021784_20190824T105344/L1C_T31UFU_A021784_20190824T105344;
  
"/usr/src/dmg/L1C_T31UFU_A021784_20190824T105344/L1C_T31UFU_A021784_20190824T105344"
"test"  120 120 1   false   120 120 
"2019-11-05T11:12:34.000Z"  "2019-11-05T11:17:34.000Z"  2
+11 
"/usr/src/S1B_IW_GRDH_1SDV_20190718T060632_20190718T060657_017184_020521_F49E"  
"https://platform.candela-h2020.eu/rest/img/S1B_IW_GRDH_1SDV_20190718T060632_20190718T060657_017184_020521_F49E;

"/usr/src/dmg/S1B_IW_GRDH_1SDV_20190718T060632_20190718T060657_017184_020521_F49E"
  "test"  120 120 1   false   120 120 
"2019-11-05T11:14:29.000Z"  "2019-11-05T11:40:00.000Z"  2
+12 
"/usr/src/S1B_IW_GRDH_1SDV_20190713T055956_20190713T060021_017111_020314_080A"  

MonetDB: default - Add DISABLES CODE comment.

2019-12-06 Thread Sjoerd Mullender
Changeset: ece90b78f370 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=ece90b78f370
Modified Files:
sql/server/rel_optimizer.c
Branch: default
Log Message:

Add DISABLES CODE comment.


diffs (12 lines):

diff --git a/sql/server/rel_optimizer.c b/sql/server/rel_optimizer.c
--- a/sql/server/rel_optimizer.c
+++ b/sql/server/rel_optimizer.c
@@ -9225,7 +9225,7 @@ optimize_rel(mvc *sql, sql_rel *rel, int
if (level <= 0)
rel = rewrite(sql, rel, _join_push_exps_down, 
);
 
-   if (0) rel = rewrite(sql, rel, _merge_identical_joins, 
_changes);
+   if (/* DISABLES CODE */ (0)) rel = rewrite(sql, rel, 
_merge_identical_joins, _changes);
}
 
/* Important -> Re-write semijoins after rel_join_order */
___
checkin-list mailing list
checkin-list@monetdb.org
https://www.monetdb.org/mailman/listinfo/checkin-list


MonetDB: default - New sqlsmith crash

2019-12-06 Thread Pedro Ferreira
Changeset: ec1f1976849b for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=ec1f1976849b
Modified Files:
sql/test/mergetables/Tests/sqlsmith-exists.sql
Branch: default
Log Message:

New sqlsmith crash

Also removed bam module dependency for sqlsmith-exists test.


diffs (178 lines):

diff --git a/sql/test/mergetables/Tests/sqlsmith-exists.sql 
b/sql/test/mergetables/Tests/sqlsmith-exists.sql
--- a/sql/test/mergetables/Tests/sqlsmith-exists.sql
+++ b/sql/test/mergetables/Tests/sqlsmith-exists.sql
@@ -417,26 +417,26 @@ from
  subq_0.c0 as c1
  from 
  (select 
- ref_1.ln as c0, 
- ref_1.ln as c1, 
+ ref_1.col1 as c0, 
+ ref_1.col1 as c1, 
  ref_0.name as c2, 
- ref_1.ln as c3, 
+ ref_1.col1 as c3, 
  ref_0.fullname as c4, 
- ref_1.sn as c5, 
+ ref_1.col1 as c5, 
  ref_0.default_schema as c6, 
- ref_1.sp as c7, 
+ ref_1.col6 as c7, 
  5 as c8, 
- ref_1.ln as c9, 
- ref_1.ur as c10, 
+ ref_1.col1 as c9, 
+ ref_1.col4 as c10, 
  ref_0.name as c11, 
  ref_0.default_schema as c12
  from 
  sys.users as ref_0
- inner join bam.sq as ref_1
- on (ref_0.default_schema = ref_1.ln )
+ inner join another_T as ref_1
+ on (ref_0.default_schema = ref_1.col1 )
  where exists (
  select 
- ref_1.ur as c0
+ ref_1.col4 as c0
  from 
  sys.privilege_codes as ref_2
  where (((exists (
@@ -446,25 +446,25 @@ from
  sys.table_types as ref_3
  where true)) 
  or (((true) 
- or (ref_1.m5 is not null)) 
+ or (ref_1.col3 is not null)) 
  and (false))) 
  and ((exists (
  select 
  87 as c0, 
- ref_1.sp as c1, 
- ref_1.m5 as c2, 
+ ref_1.col2 as c1, 
+ ref_1.col3 as c2, 
  ref_0.name as c3, 
  ref_4.type as c4, 
  ref_4.rkey as c5, 
- ref_1.ln as c6, 
- ref_1.ln as c7, 
+ ref_1.col1 as c6, 
+ ref_1.col1 as c7, 
  ref_2.privilege_code_name as c8, 
  ref_4.type as c9
  from 
  tmp.keys as ref_4
- where ref_1.file_id is not null)) 
+ where ref_1.col5 is not null)) 
  and (ref_2.privilege_code_id is null))) 
- and (ref_1.m5 is null))
+ and (ref_1.col3 is null))
  limit 26) as subq_0
  where (subq_0.c3 is null) 
  and ((false) 
@@ -473,4 +473,104 @@ where (subq_1.c1 is not null)
  and (subq_1.c0 is not null)
 limit 79;
 
+select 
+ subq_2.c18 as c0, 
+ subq_0.c0 as c1, 
+ cast(coalesce(subq_0.c1,
+ subq_2.c5) as int) as c2, 
+ 92 as c3, 
+ subq_0.c1 as c4, 
+ subq_2.c21 as c5, 
+ subq_2.c24 as c6, 
+ subq_2.c11 as c7, 
+ subq_2.c13 as c8, 
+ subq_2.c16 as c9, 
+ case when subq_2.c26 is null then subq_2.c20 else subq_2.c20 end
+ as c10, 
+ subq_0.c0 as c11, 
+ subq_0.c0 as c12, 
+ subq_0.c1 as c13, 
+ subq_0.c1 as c14
+from 
+ (select 
+ ref_0.col7 as c0, 
+ ref_0.col2 as c1
+ from 
+ sys.another_t as ref_0
+ where (true) 
+ and ((ref_0.col4 is not null) 
+ and (ref_0.col5 is not null))
+ limit 58) as subq_0
+ inner join (select 
+ subq_1.c15 as c0, 
+ subq_1.c1 as c1, 
+ subq_1.c7 as c2, 
+ subq_1.c13 as c3, 
+ subq_1.c17 as c4, 
+ subq_1.c21 as c5, 
+ subq_1.c12 as c6, 
+ subq_1.c0 as c7, 
+ subq_1.c22 as c8, 
+ subq_1.c20 as c9, 
+ subq_1.c17 as c10, 
+ subq_1.c12 as c11, 
+ subq_1.c10 as c12, 
+ subq_1.c5 as c13, 
+ subq_1.c3 as c14, 
+ subq_1.c14 as c15, 
+ subq_1.c2 as c16, 
+ subq_1.c20 as c17, 
+ subq_1.c4 as c18, 
+ subq_1.c20 as c19, 
+ subq_1.c12 as c20, 
+ subq_1.c11 as c21, 
+ subq_1.c3 as c22, 
+ subq_1.c3 as c23, 
+ subq_1.c6 as c24, 
+ subq_1.c4 as c25, 
+ 85 as c26, 
+ subq_1.c0 as c27, 
+ subq_1.c12 as c28, 
+ subq_1.c16 as c29, 
+ subq_1.c19 as c30
+ from 
+ (select 
+ ref_1.col6 as c0, 
+ ref_1.col1 as c1, 
+ 18 as c2, 
+ ref_1.col8 as c3, 
+ ref_1.col4 as c4, 
+ ref_1.col1 as c5, 
+ ref_1.col2 as c6, 
+ ref_1.col5 as c7, 
+ ref_1.col7 as c8, 
+ ref_1.col3 as c9, 
+ ref_1.col4 as c10, 
+ ref_1.col2 as c11, 
+ ref_1.col3 as c12, 
+ ref_1.col4 as c13, 
+ ref_1.col6 as c14, 
+ ref_1.col3 as c15, 
+ ref_1.col4 as c16, 
+ ref_1.col5 as c17, 
+ ref_1.col2 as c18, 
+ ref_1.col2 as c19, 
+ ref_1.col2 as c20, 
+ ref_1.col8 as c21, 
+ ref_1.col6 as c22
+ from 
+ sys.another_t as ref_1
+ where true
+ limit 133) as subq_1
+ where (false) 
+ and ((subq_1.c2 is not null) 
+ or (false))
+ limit 115) as subq_2
+ on (((true) 
+ and (subq_2.c3 is null)) 
+ or (true))
+where case when subq_0.c1 is null then subq_2.c25 else subq_2.c25 end
+ is null
+limit 81;
+
 ROLLBACK;
___
checkin-list mailing list
checkin-list@monetdb.org
https://www.monetdb.org/mailman/listinfo/checkin-list