Changeset: c323fb1e3d7f for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=c323fb1e3d7f
Added Files:
sql/test/BugTracker-2018/Tests/timestamp-as-boolean.Bug-6642.sql
sql/test/BugTracker-2018/Tests/timestamp-as-boolean.Bug-6642.stable.err
sql/test/BugTracker-2018/Tests/timestamp-as-boolean.Bug-6642.stable.out
sql/test/BugTracker-2018/Tests/timestamp-roundtrip.Bug-6640.sql
sql/test/BugTracker-2018/Tests/timestamp-roundtrip.Bug-6640.stable.err
sql/test/BugTracker-2018/Tests/timestamp-roundtrip.Bug-6640.stable.out
Modified Files:
clients/Tests/exports.stable.out
clients/examples/C/sample0.c
clients/examples/C/sample1.c
clients/examples/C/sample4.c
clients/examples/C/smack00.c
clients/examples/C/smack01.c
clients/mapiclient/mclient.c
clients/mapiclient/mhelp.c
clients/mapiclient/msqldump.c
clients/mapilib/ChangeLog
clients/mapilib/mapi.c
clients/mapilib/mapi.h
clients/odbc/driver/SQLExecute.c
clients/odbc/driver/SQLGetTypeInfo.c
common/stream/stream.c
common/stream/stream.h
gdk/gdk_align.c
gdk/gdk_bat.c
gdk/gdk_batop.c
gdk/gdk_bbp.c
gdk/gdk_cross.c
gdk/gdk_heap.c
gdk/gdk_join.c
gdk/gdk_logger.c
gdk/gdk_orderidx.c
gdk/gdk_posix.c
gdk/gdk_project.c
gdk/gdk_select.c
gdk/gdk_storage.c
gdk/gdk_tm.c
gdk/gdk_unique.c
gdk/gdk_utils.c
monetdb5/mal/mal_client.c
monetdb5/mal/mal_client.h
monetdb5/mal/mal_import.c
monetdb5/mal/mal_readline.c
monetdb5/mal/mal_session.c
monetdb5/mal/mal_session.h
monetdb5/modules/atoms/mtime.c
monetdb5/modules/mal/mal_mapi.c
monetdb5/modules/mal/projectionpath.c
monetdb5/modules/mal/remote.c
monetdb5/modules/mal/tablet.c
monetdb5/optimizer/opt_dataflow.c
sql/backends/monet5/mal_backend.c
sql/backends/monet5/mal_backend.h
sql/backends/monet5/rel_bin.c
sql/backends/monet5/sql_scenario.c
sql/backends/monet5/sql_statement.c
sql/include/sql_hash.h
sql/server/rel_select.c
sql/server/sql_scan.c
sql/storage/bat/bat_logger.c
sql/test/BugTracker-2018/Tests/All
tools/merovingian/daemon/client.c
tools/merovingian/daemon/config/monetdbd.in
tools/merovingian/daemon/multiplex-funnel.c
Branch: analytics
Log Message:
Merge with default
diffs (truncated from 6464 to 300 lines):
diff --git a/clients/Tests/exports.stable.out b/clients/Tests/exports.stable.out
--- a/clients/Tests/exports.stable.out
+++ b/clients/Tests/exports.stable.out
@@ -479,7 +479,6 @@ MapiMsg mapi_bind_numeric(MapiHdl hdl, i
MapiMsg mapi_bind_var(MapiHdl hdl, int fnr, int type, void *ptr);
MapiMsg mapi_cache_freeup(MapiHdl hdl, int percentage);
MapiMsg mapi_cache_limit(Mapi mid, int limit);
-MapiMsg mapi_cache_shuffle(MapiHdl hdl, int percentage);
MapiMsg mapi_clear_bindings(MapiHdl hdl);
MapiMsg mapi_clear_params(MapiHdl hdl);
MapiMsg mapi_close_handle(MapiHdl hdl);
@@ -500,19 +499,19 @@ MapiMsg mapi_fetch_reset(MapiHdl hdl);
int mapi_fetch_row(MapiHdl hdl);
MapiMsg mapi_finish(MapiHdl hdl);
MapiHdl mapi_get_active(Mapi mid);
-int mapi_get_autocommit(Mapi mid);
-char *mapi_get_dbname(Mapi mid);
+bool mapi_get_autocommit(Mapi mid);
+const char *mapi_get_dbname(Mapi mid);
int mapi_get_digits(MapiHdl hdl, int fnr);
int mapi_get_field_count(MapiHdl hdl);
stream *mapi_get_from(Mapi mid);
-char *mapi_get_host(Mapi mid);
-char *mapi_get_lang(Mapi mid);
+const char *mapi_get_host(Mapi mid);
+const char *mapi_get_lang(Mapi mid);
int64_t mapi_get_last_id(MapiHdl hdl);
int mapi_get_len(MapiHdl hdl, int fnr);
int64_t mapi_get_maloptimizertime(MapiHdl hdl);
-char *mapi_get_mapi_version(Mapi mid);
-char *mapi_get_monet_version(Mapi mid);
-char *mapi_get_motd(Mapi mid);
+const char *mapi_get_mapi_version(Mapi mid);
+const char *mapi_get_monet_version(Mapi mid);
+const char *mapi_get_motd(Mapi mid);
char *mapi_get_name(MapiHdl hdl, int fnr);
char *mapi_get_query(MapiHdl hdl);
int64_t mapi_get_querytime(MapiHdl hdl);
@@ -523,19 +522,19 @@ int64_t mapi_get_sqloptimizertime(MapiHd
char *mapi_get_table(MapiHdl hdl, int fnr);
int mapi_get_tableid(MapiHdl hdl);
stream *mapi_get_to(Mapi mid);
-int mapi_get_trace(Mapi mid);
+bool mapi_get_trace(Mapi mid);
char *mapi_get_type(MapiHdl hdl, int fnr);
-char *mapi_get_uri(Mapi mid);
-char *mapi_get_user(Mapi mid);
-int mapi_is_connected(Mapi mid);
+const char *mapi_get_uri(Mapi mid);
+const char *mapi_get_user(Mapi mid);
+bool mapi_is_connected(Mapi mid);
MapiMsg mapi_log(Mapi mid, const char *nme);
Mapi mapi_mapi(const char *host, int port, const char *username, const char
*password, const char *lang, const char *dbname);
Mapi mapi_mapiuri(const char *url, const char *user, const char *pass, const
char *lang);
-int mapi_more_results(MapiHdl hdl);
+bool mapi_more_results(MapiHdl hdl);
MapiMsg mapi_needmore(MapiHdl hdl);
MapiHdl mapi_new_handle(Mapi mid);
MapiMsg mapi_next_result(MapiHdl hdl);
-void mapi_noexplain(Mapi mid, char *errorprefix);
+void mapi_noexplain(Mapi mid, const char *errorprefix);
MapiMsg mapi_param(MapiHdl hdl, int fnr, char **ptr);
MapiMsg mapi_param_numeric(MapiHdl hdl, int fnr, int scale, int precision,
void *ptr);
MapiMsg mapi_param_string(MapiHdl hdl, int fnr, int sqltype, char *ptr, int
*sizeptr);
@@ -558,16 +557,14 @@ const char *mapi_result_errorcode(MapiHd
int64_t mapi_rows_affected(MapiHdl hdl);
MapiMsg mapi_seek_row(MapiHdl hdl, int64_t rowne, int whence);
MapiHdl mapi_send(Mapi mid, const char *cmd);
-MapiMsg mapi_setAutocommit(Mapi mid, int autocommit);
+MapiMsg mapi_setAutocommit(Mapi mid, bool autocommit);
MapiMsg mapi_set_size_header(Mapi mid, int value);
int mapi_split_line(MapiHdl hdl);
MapiMsg mapi_start_talking(Mapi mid);
MapiMsg mapi_store_field(MapiHdl hdl, int fnr, int outtype, void *outparam);
-MapiHdl mapi_stream_query(Mapi mid, const char *cmd, int windowsize);
MapiMsg mapi_timeout(Mapi mid, unsigned int time);
-void mapi_trace(Mapi mid, int flag);
+void mapi_trace(Mapi mid, bool flag);
char *mapi_unquote(char *msg);
-MapiMsg mapi_virtual_result(MapiHdl hdl, int columns, const char
**columnnames, const char **columntypes, const int *columnlengths, int
tuplecount, const char ***tuples);
char *mcrypt_BackendSum(const char *string, size_t len);
char *mcrypt_MD5Sum(const char *string, size_t len);
char *mcrypt_RIPEMD160Sum(const char *string, size_t len);
@@ -1462,7 +1459,7 @@ char *MSP_locate_sqlscript(const char *m
str MSinitClientPrg(Client cntxt, str mod, str nme);
void MSresetInstructions(MalBlkPtr mb, int start);
void MSresetVariables(Client cntxt, MalBlkPtr mb, MalStkPtr glb, int start);
-void MSscheduleClient(str command, str challenge, bstream *fin, stream *fout,
protocol_version protocol, size_t blocksize, int compute_column_widths);
+void MSscheduleClient(str command, str challenge, bstream *fin, stream *fout,
protocol_version protocol, size_t blocksize);
str MSserveClient(void *dummy);
str MTIMEcompute_rule_foryear(date *ret, const rule *val, const int *year);
str MTIMEcurrent_date(date *d);
@@ -2703,14 +2700,10 @@ str zero_or_oneRef;
# stream
stream *block_stream(stream *s);
-stream *block_stream2(stream *s, size_t bufsiz, compression_method comp,
column_compression colcomp);
+stream *block_stream2(stream *s, size_t bufsiz, compression_method comp);
buffer bs2_buffer(stream *s);
-column_compression bs2_colcomp(stream *ss);
-void bs2_resetbuf(stream *ss);
int bs2_resizebuf(stream *ss, size_t bufsiz);
void bs2_setpos(stream *ss, size_t pos);
-void *bs2_stealbuf(stream *ss);
-stream *bs_stealstream(stream *s);
stream *bs_stream(stream *s);
bstream *bstream_create(stream *rs, size_t chunk_size);
void bstream_destroy(bstream *s);
@@ -2733,8 +2726,7 @@ int getFileNo(stream *s);
size_t getFileSize(stream *s);
stream *iconv_rstream(stream *restrict ss, const char *restrict charset, const
char *restrict name);
stream *iconv_wstream(stream *restrict ss, const char *restrict charset, const
char *restrict name);
-int isa_block_stream(stream *s);
-int isa_fixed_block_stream(stream *s);
+bool isa_block_stream(stream *s);
int mnstr_byteorder(stream *s);
void mnstr_clearerr(stream *s);
void mnstr_close(stream *s);
diff --git a/clients/examples/C/sample0.c b/clients/examples/C/sample0.c
--- a/clients/examples/C/sample0.c
+++ b/clients/examples/C/sample0.c
@@ -36,10 +36,10 @@ main(int argc, char **argv)
if (dbh == NULL || mapi_error(dbh))
die(dbh, hdl);
- /* mapi_trace(dbh, 1); */
+ /* mapi_trace(dbh, true); */
if (strcmp(argv[3], "sql") == 0) {
/* switch of autocommit */
- if (mapi_setAutocommit(dbh, 0) != MOK || mapi_error(dbh))
+ if (mapi_setAutocommit(dbh, false) != MOK || mapi_error(dbh))
die(dbh,NULL);
if ((hdl = mapi_query(dbh, "create table emp(name varchar(20),
age int)")) == NULL || mapi_error(dbh))
die(dbh, hdl);
diff --git a/clients/examples/C/sample1.c b/clients/examples/C/sample1.c
--- a/clients/examples/C/sample1.c
+++ b/clients/examples/C/sample1.c
@@ -36,11 +36,11 @@ main(int argc, char **argv)
if (dbh == NULL || mapi_error(dbh))
die(dbh, hdl);
- /* mapi_trace(dbh, 1); */
+ /* mapi_trace(dbh, true); */
mapi_cache_limit(dbh, 2);
if (strcmp(argv[3], "sql") == 0) {
/* switch of autocommit */
- if (mapi_setAutocommit(dbh, 0) != MOK || mapi_error(dbh))
+ if (mapi_setAutocommit(dbh, false) != MOK || mapi_error(dbh))
die(dbh,NULL);
if ((hdl = mapi_query(dbh, "create table emp(name varchar(20),
age int)")) == NULL || mapi_error(dbh))
die(dbh, hdl);
diff --git a/clients/examples/C/sample4.c b/clients/examples/C/sample4.c
--- a/clients/examples/C/sample4.c
+++ b/clients/examples/C/sample4.c
@@ -40,10 +40,10 @@ main(int argc, char **argv)
mapi_cache_limit(dbh, 2);
/* mapi_trace_log(dbh, "/tmp/mapilog"); */
- /* mapi_trace(dbh, 1); */
+ /* mapi_trace(dbh, true); */
if (strcmp(argv[3], "sql") == 0) {
/* switch of autocommit */
- if (mapi_setAutocommit(dbh, 0) != MOK || mapi_error(dbh))
+ if (mapi_setAutocommit(dbh, false) != MOK || mapi_error(dbh))
die(dbh,NULL);
if ((hdl = mapi_query(dbh, "create table emp(name varchar(20),
age int)")) == NULL || mapi_error(dbh))
die(dbh, hdl);
diff --git a/clients/examples/C/smack00.c b/clients/examples/C/smack00.c
--- a/clients/examples/C/smack00.c
+++ b/clients/examples/C/smack00.c
@@ -60,7 +60,7 @@ main(int argc, char **argv)
die(dbh, hdl);
/* switch of autocommit */
- if (lang==1 && (mapi_setAutocommit(dbh, 0) != MOK || mapi_error(dbh)))
+ if (lang==1 && (mapi_setAutocommit(dbh, false) != MOK ||
mapi_error(dbh)))
die(dbh,NULL);
for (i = 0; i < n; i++) {
diff --git a/clients/examples/C/smack01.c b/clients/examples/C/smack01.c
--- a/clients/examples/C/smack01.c
+++ b/clients/examples/C/smack01.c
@@ -66,7 +66,7 @@ main(int argc, char **argv)
die(dbh, hdl);
/* switch of autocommit */
- if (lang==1 && (mapi_setAutocommit(dbh, 0) != MOK ||
mapi_error(dbh)))
+ if (lang==1 && (mapi_setAutocommit(dbh, false) != MOK ||
mapi_error(dbh)))
die(dbh,NULL);
if (lang==1)
diff --git a/clients/mapiclient/mclient.c b/clients/mapiclient/mclient.c
--- a/clients/mapiclient/mclient.c
+++ b/clients/mapiclient/mclient.c
@@ -2438,12 +2438,12 @@ doFile(Mapi mid, stream *fp, bool useins
case 'A':
if (mode != SQL)
break;
- mapi_setAutocommit(mid, 1);
+ mapi_setAutocommit(mid, true);
continue;
case 'a':
if (mode != SQL)
break;
- mapi_setAutocommit(mid, 0);
+ mapi_setAutocommit(mid, false);
continue;
case 'w':
pagewidth = atoi(line + 2);
@@ -3088,7 +3088,7 @@ main(int argc, char **argv)
char *dbname = NULL;
char *output = NULL; /* output format as string */
FILE *fp = NULL;
- int trace = 0;
+ bool trace = false;
bool dump = false;
bool useinserts = false;
int c = 0;
@@ -3321,7 +3321,7 @@ main(int argc, char **argv)
pagewidthset = pagewidth != 0;
break;
case 'X':
- trace = MAPI_TRACE;
+ trace = true;
break;
case 'z':
settz = false;
diff --git a/clients/mapiclient/mhelp.c b/clients/mapiclient/mhelp.c
--- a/clients/mapiclient/mhelp.c
+++ b/clients/mapiclient/mhelp.c
@@ -14,11 +14,11 @@
/* produce a synposis of the SQL syntax, inspired by a competing product.
* Use the conventional grammar constructs:
- * [ A | B ] optionally token A or B or none
- * { A | B } exactly one of the options should be chosen
- * A [ ',' ...] a comma separate lists of A elements
- * { A | B } ... a series of A and Bs
- * ( A B ) [','...] a series of AB,AB,AB,AB
+ * [ A | B ] token A or B or none
+ * { A | B } exactly one of the options A or B should be chosen
+ * A [',' ...] a comma separated list of A elements
+ * { A | B } ... a series of A and B's
+ * { A B } [',' ...] a series of A B,A B,A B,A B
*
* Ideally each major command line should point into the website for
* more details and variations not covered here.
@@ -47,27 +47,27 @@ SQLhelp sqlhelp[] = {
// major commands
{"ALTER TABLE",
"",
- "ALTER TABLE qname ADD [COLUMN] { column_def | table_constraint }\n"
- "ALTER TABLE qname ALTER [COLUMN] ident SET DEFAULT value\n"
- "ALTER TABLE qname ALTER [COLUMN] ident SET [NOT] NULL\n"
- "ALTER TABLE qname ALTER [COLUMN] ident DROP DEFAULT\n"
- "ALTER TABLE qname ALTER [COLUMN] ident SET STORAGE {string | NULL}\n"
- "ALTER TABLE qname DROP [COLUMN] ident [RESTRICT | CASCADE]\n"
- "ALTER TABLE qname DROP CONSTRAINT ident [RESTRICT | CASCADE]\n"
+ "ALTER TABLE qname ADD [ COLUMN ] { column_def | table_constraint }\n"
+ "ALTER TABLE qname ALTER [ COLUMN ] ident SET DEFAULT value\n"
+ "ALTER TABLE qname ALTER [ COLUMN ] ident SET [NOT] NULL\n"
+ "ALTER TABLE qname ALTER [ COLUMN ] ident DROP DEFAULT\n"
+ "ALTER TABLE qname ALTER [ COLUMN ] ident SET STORAGE {string |
NULL}\n"
+ "ALTER TABLE qname DROP [ COLUMN ] ident [ RESTRICT | CASCADE ]\n"
+ "ALTER TABLE qname DROP CONSTRAINT ident [ RESTRICT | CASCADE ]\n"
"ALTER TABLE qname SET { { READ | INSERT } ONLY | READ WRITE }",
"column_def,table_constraint",
"See also https://www.monetdb.org/Documentation/SQLreference/Alter"},
{"ALTER MERGE TABLE",
"",
- "ALTER TABLE qname ADD TABLE qname [AS PARTITION opt_partition_spec]\n"
- "ALTER TABLE qname DROP TABLE qname [RESTRICT | CASCADE]\n"
+ "ALTER TABLE qname ADD TABLE qname [ AS PARTITION opt_partition_spec
]\n"
+ "ALTER TABLE qname DROP TABLE qname [ RESTRICT | CASCADE ]\n"
"ALTER TABLE qname SET TABLE qname AS PARTITION opt_partition_spec",
"",
"See also
https://www.monetdb.org/Documentation/Cookbooks/SQLrecipes/DataPartitioning"},
{"ALTER SEQUENCE",
"",
"ALTER SEQUENCE ident [ AS datatype] [ RESTART [WITH start]]
[INCREMENT BY increment]\n"
- "[MINVALUE minvalue | NO MINVALUE] [MAXVALUE maxvalue | NOMAXVALUE] |
[ [ NO] CYCLE]",
+ "[MINVALUE minvalue | NO MINVALUE] [MAXVALUE maxvalue | NOMAXVALUE] |
[ [NO] CYCLE]",
NULL,
"See also
https://www.monetdb.org/Documentation/Manuals/SQLreference/SerialTypes"},
{"ALTER USER",
@@ -86,7 +86,7 @@ SQLhelp sqlhelp[] = {
"See also
https://www.monetdb.org/Documentation/Cookbooks/SQLrecipes/statistics"},
{"CALL",
"",
- "CALL qname '(' [ [scalar_expression ] [ ',' ...] ]')' | CALL ident
'.' ident",
+ "CALL qname '(' [ scalar_expression [',' ...] ] ')' | CALL ident '.'
ident",
NULL,
NULL},
{"CASE",
@@ -108,13 +108,13 @@ SQLhelp sqlhelp[] = {
NULL},
{"COPY BINARY",
"Append binary representations into a table",
- "COPY [nrofrecords] BINARY INTO qname [column_list] FROM string
[','...] [NO CONSTRAINT]",
+ "COPY [nrofrecords] BINARY INTO qname [column_list] FROM string [','
...] [NO CONSTRAINT]",
_______________________________________________
checkin-list mailing list
[email protected]
https://www.monetdb.org/mailman/listinfo/checkin-list