Changeset: 54b74c40f2f9 for MonetDB URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=54b74c40f2f9 Added Files: sql/test/BugTracker-2017/Tests/copy_into_crash.Bug-6404.sql sql/test/BugTracker-2017/Tests/copy_into_crash.Bug-6404.stable.err sql/test/BugTracker-2017/Tests/copy_into_crash.Bug-6404.stable.out sql/test/BugTracker-2017/Tests/null_matches_in_outer.Bug-6398.sql sql/test/BugTracker-2017/Tests/null_matches_in_outer.Bug-6398.stable.err sql/test/BugTracker-2017/Tests/null_matches_in_outer.Bug-6398.stable.out sql/test/BugTracker-2017/Tests/side-effect.Bug-6397.stable.err sql/test/BugTracker-2017/Tests/side-effect.Bug-6397.stable.out sql/test/bugs/Tests/unicode_varchar-bug-sf-1041324_JdbcClient.stable.out.Windows Modified Files: clients/Tests/MAL-signatures.stable.out clients/Tests/MAL-signatures.stable.out.int128 clients/Tests/exports.stable.out clients/mapiclient/ReadlineTools.c clients/mapiclient/eventparser.c clients/mapiclient/mhelp.c clients/mapiclient/tomograph.c clients/mapilib/mapi.c clients/odbc/driver/ODBCConvert.c clients/odbc/driver/ODBCUtil.c common/options/monet_options.c common/utils/mutils.c common/utils/strptime.c configure.ag gdk/ChangeLog gdk/gdk.h gdk/gdk_atoms.c gdk/gdk_atoms.h gdk/gdk_bat.c gdk/gdk_calc.c gdk/gdk_select.c gdk/gdk_value.c geom/monetdb5/geom.c monetdb5/mal/mal_client.c monetdb5/mal/mal_debugger.c monetdb5/mal/mal_instruction.c monetdb5/mal/mal_interpreter.c monetdb5/mal/mal_listing.c monetdb5/mal/mal_parser.c monetdb5/mal/mal_profiler.c monetdb5/mal/mal_readline.c monetdb5/mal/mal_type.c monetdb5/modules/atoms/blob.c monetdb5/modules/atoms/color.c monetdb5/modules/atoms/inet.c monetdb5/modules/atoms/json.c monetdb5/modules/atoms/mtime.c monetdb5/modules/atoms/str.c monetdb5/modules/atoms/url.c monetdb5/modules/atoms/uuid.c monetdb5/modules/atoms/xml.c monetdb5/modules/kernel/algebra.c monetdb5/modules/mal/inspect.c monetdb5/modules/mal/mal_io.c monetdb5/modules/mal/mal_mapi.c monetdb5/modules/mal/mdb.c monetdb5/modules/mal/remote.c monetdb5/modules/mal/tablet.c monetdb5/modules/mal/txtsim.c monetdb5/modules/mal/wlc.c monetdb5/optimizer/opt_projectionpath.c monetdb5/optimizer/opt_remoteQueries.c sql/backends/monet5/rel_bin.c sql/backends/monet5/sql.c sql/backends/monet5/sql.h sql/backends/monet5/sql.mal sql/backends/monet5/sql_cast.c sql/backends/monet5/sql_execute.c sql/backends/monet5/sql_gencode.c sql/backends/monet5/sql_result.c sql/backends/monet5/sql_statement.c sql/backends/monet5/sql_statistics.c sql/backends/monet5/vaults/bam/bam_export.c sql/backends/monet5/vaults/shp/shp.c sql/benchmarks/tpch/fileleak/Tests/leaks.stable.out sql/benchmarks/tpch/fileleak/Tests/leaks.stable.out.Windows sql/common/sql_string.c sql/include/sql_relation.h sql/jdbc/tests/Tests/Test_CisValid.stable.out sql/server/rel_dump.c sql/server/rel_exp.c sql/server/rel_optimizer.c sql/server/rel_updates.c sql/server/sql_atom.c sql/server/sql_decimal.c sql/test/BugTracker-2011/Tests/crash_on_alias.Bug-2798.stable.out sql/test/BugTracker-2011/Tests/crash_on_alias.Bug-2798.stable.out.int128 sql/test/BugTracker-2017/Tests/All sql/test/BugTracker-2017/Tests/sqllitelogistest_case.Bug-6335.sql testing/difflib.c testing/helpers.h Branch: data-vaults Log Message:
Merge with default diffs (truncated from 4576 to 300 lines): diff --git a/clients/Tests/MAL-signatures.stable.out b/clients/Tests/MAL-signatures.stable.out --- a/clients/Tests/MAL-signatures.stable.out +++ b/clients/Tests/MAL-signatures.stable.out @@ -8366,19 +8366,15 @@ Ready. [ "sql", "dec_round", "command sql.dec_round(v:int, r:int):int ", "int_dec_round_wrap;", "round off the value v to nearests multiple of r" ] [ "sql", "dec_round", "command sql.dec_round(v:lng, r:lng):lng ", "lng_dec_round_wrap;", "round off the value v to nearests multiple of r" ] [ "sql", "dec_round", "command sql.dec_round(v:sht, r:sht):sht ", "sht_dec_round_wrap;", "round off the value v to nearests multiple of r" ] -[ "sql", "declaredTable", "pattern sql.declaredTable(name:str):int ", "mvc_declared_table_wrap;", "Prepare a declared table" ] [ "sql", "delete", "pattern sql.delete(mvc:int, sname:str, tname:str, b:any):int ", "mvc_delete_wrap;", "Delete a row from a table. Returns sequence number for order dependece." ] [ "sql", "delta", "command sql.delta(col:bat[:any_3], uid:bat[:oid], uval:bat[:any_3]):bat[:any_3] ", "DELTAbat2;", "Return column bat with delta's applied." ] [ "sql", "delta", "command sql.delta(col:bat[:any_3], uid:bat[:oid], uval:bat[:any_3], ins:bat[:any_3]):bat[:any_3] ", "DELTAbat;", "Return column bat with delta's applied." ] [ "sql", "dense_rank", "pattern sql.dense_rank(b:any_1, p:bit, o:bit):int ", "SQLdense_rank;", "return the densely ranked groups" ] [ "sql", "diff", "pattern sql.diff(b:any_1):bit ", "SQLdiff;", "return true if cur != prev row" ] [ "sql", "diff", "pattern sql.diff(p:bit, b:any_1):bit ", "SQLdiff;", "return true if cur != prev row" ] -[ "sql", "dropDeclaredTable", "pattern sql.dropDeclaredTable(name:str):void ", "mvc_drop_declared_table_wrap;", "drop a declared table" ] -[ "sql", "dropDeclaredTables", "pattern sql.dropDeclaredTables(nr:int):void ", "mvc_drop_declared_tables_wrap;", "drop top n declared tables" ] [ "sql", "drop_func_upgrade_oct2014", "pattern sql.drop_func_upgrade_oct2014(id:int):int ", "UPGdrop_func;", "Drop the function identified by id, needed for the Oct2014 upgrade" ] [ "sql", "drop_hash", "pattern sql.drop_hash(sch:str, tbl:str):void ", "SQLdrop_hash;", "Drop hash indices for the given table" ] [ "sql", "droporderindex", "pattern sql.droporderindex(sch:str, tbl:str, col:str):void ", "sql_droporderindex;", "Drop the order index on a column" ] -[ "sql", "dtColumn", "pattern sql.dtColumn(rs:int, tname:str, name:str, typename:str, digits:int, scale:int):void ", "mvc_declared_table_column_wrap;", "" ] [ "sql", "dump_cache", "pattern sql.dump_cache() (query:bat[:str], count:bat[:int]) ", "dump_cache;", "dump the content of the query cache" ] [ "sql", "dump_opt_stats", "pattern sql.dump_opt_stats() (rewrite:bat[:str], count:bat[:int]) ", "dump_opt_stats;", "dump the optimizer rewrite statistics" ] [ "sql", "dump_trace", "pattern sql.dump_trace() (event:bat[:int], clk:bat[:str], pc:bat[:str], thread:bat[:int], ticks:bat[:lng], rssMB:bat[:lng], vmMB:bat[:lng], reads:bat[:lng], writes:bat[:lng], minflt:bat[:lng], majflt:bat[:lng], nvcsw:bat[:lng], stmt:bat[:str]) ", "dump_trace;", "dump the trace statistics" ] @@ -8405,6 +8401,7 @@ Ready. [ "sql", "getVariable", "pattern sql.getVariable(mvc:int, varname:str):any_1 ", "getVariable;", "Get the value of a session variable" ] [ "sql", "getVersion", "command sql.getVersion(clientid:int):lng ", "mvc_getVersion;", "Return the database version identifier for a client." ] [ "sql", "get_value", "pattern sql.get_value(sname:str, sequence:str):lng ", "mvc_get_value;", "return the current value of the sequence" ] +[ "sql", "grow", "pattern sql.grow(tid:bat[:oid], X_0:any_1):int ", "mvc_grow_wrap;", "Resize the tid column of a declared table." ] [ "sql", "importTable", "pattern sql.importTable(sname:str, tname:str, fname:str...):bat[:any]... ", "mvc_bin_import_table_wrap;", "Import a table from the files (fname)" ] [ "sql", "include", "pattern sql.include(fname:str):void ", "SQLinclude;", "Compile and execute a sql statements on the file" ] [ "sql", "init", "pattern sql.init():void ", "SQLinitEnvironment;", "Initialize the environment for MAL" ] diff --git a/clients/Tests/MAL-signatures.stable.out.int128 b/clients/Tests/MAL-signatures.stable.out.int128 --- a/clients/Tests/MAL-signatures.stable.out.int128 +++ b/clients/Tests/MAL-signatures.stable.out.int128 @@ -10729,19 +10729,15 @@ Ready. [ "sql", "dec_round", "command sql.dec_round(v:int, r:int):int ", "int_dec_round_wrap;", "round off the value v to nearests multiple of r" ] [ "sql", "dec_round", "command sql.dec_round(v:lng, r:lng):lng ", "lng_dec_round_wrap;", "round off the value v to nearests multiple of r" ] [ "sql", "dec_round", "command sql.dec_round(v:sht, r:sht):sht ", "sht_dec_round_wrap;", "round off the value v to nearests multiple of r" ] -[ "sql", "declaredTable", "pattern sql.declaredTable(name:str):int ", "mvc_declared_table_wrap;", "Prepare a declared table" ] [ "sql", "delete", "pattern sql.delete(mvc:int, sname:str, tname:str, b:any):int ", "mvc_delete_wrap;", "Delete a row from a table. Returns sequence number for order dependece." ] [ "sql", "delta", "command sql.delta(col:bat[:any_3], uid:bat[:oid], uval:bat[:any_3]):bat[:any_3] ", "DELTAbat2;", "Return column bat with delta's applied." ] [ "sql", "delta", "command sql.delta(col:bat[:any_3], uid:bat[:oid], uval:bat[:any_3], ins:bat[:any_3]):bat[:any_3] ", "DELTAbat;", "Return column bat with delta's applied." ] [ "sql", "dense_rank", "pattern sql.dense_rank(b:any_1, p:bit, o:bit):int ", "SQLdense_rank;", "return the densely ranked groups" ] [ "sql", "diff", "pattern sql.diff(b:any_1):bit ", "SQLdiff;", "return true if cur != prev row" ] [ "sql", "diff", "pattern sql.diff(p:bit, b:any_1):bit ", "SQLdiff;", "return true if cur != prev row" ] -[ "sql", "dropDeclaredTable", "pattern sql.dropDeclaredTable(name:str):void ", "mvc_drop_declared_table_wrap;", "drop a declared table" ] -[ "sql", "dropDeclaredTables", "pattern sql.dropDeclaredTables(nr:int):void ", "mvc_drop_declared_tables_wrap;", "drop top n declared tables" ] [ "sql", "drop_func_upgrade_oct2014", "pattern sql.drop_func_upgrade_oct2014(id:int):int ", "UPGdrop_func;", "Drop the function identified by id, needed for the Oct2014 upgrade" ] [ "sql", "drop_hash", "pattern sql.drop_hash(sch:str, tbl:str):void ", "SQLdrop_hash;", "Drop hash indices for the given table" ] [ "sql", "droporderindex", "pattern sql.droporderindex(sch:str, tbl:str, col:str):void ", "sql_droporderindex;", "Drop the order index on a column" ] -[ "sql", "dtColumn", "pattern sql.dtColumn(rs:int, tname:str, name:str, typename:str, digits:int, scale:int):void ", "mvc_declared_table_column_wrap;", "" ] [ "sql", "dump_cache", "pattern sql.dump_cache() (query:bat[:str], count:bat[:int]) ", "dump_cache;", "dump the content of the query cache" ] [ "sql", "dump_opt_stats", "pattern sql.dump_opt_stats() (rewrite:bat[:str], count:bat[:int]) ", "dump_opt_stats;", "dump the optimizer rewrite statistics" ] [ "sql", "dump_trace", "pattern sql.dump_trace() (event:bat[:int], clk:bat[:str], pc:bat[:str], thread:bat[:int], ticks:bat[:lng], rssMB:bat[:lng], vmMB:bat[:lng], reads:bat[:lng], writes:bat[:lng], minflt:bat[:lng], majflt:bat[:lng], nvcsw:bat[:lng], stmt:bat[:str]) ", "dump_trace;", "dump the trace statistics" ] @@ -10768,6 +10764,7 @@ Ready. [ "sql", "getVariable", "pattern sql.getVariable(mvc:int, varname:str):any_1 ", "getVariable;", "Get the value of a session variable" ] [ "sql", "getVersion", "command sql.getVersion(clientid:int):lng ", "mvc_getVersion;", "Return the database version identifier for a client." ] [ "sql", "get_value", "pattern sql.get_value(sname:str, sequence:str):lng ", "mvc_get_value;", "return the current value of the sequence" ] +[ "sql", "grow", "pattern sql.grow(tid:bat[:oid], X_0:any_1):int ", "mvc_grow_wrap;", "Resize the tid column of a declared table." ] [ "sql", "importTable", "pattern sql.importTable(sname:str, tname:str, fname:str...):bat[:any]... ", "mvc_bin_import_table_wrap;", "Import a table from the files (fname)" ] [ "sql", "include", "pattern sql.include(fname:str):void ", "SQLinclude;", "Compile and execute a sql statements on the file" ] [ "sql", "init", "pattern sql.init():void ", "SQLinitEnvironment;", "Initialize the environment for MAL" ] 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 @@ -13,7 +13,7 @@ int ATOMallocate(const char *nme); int ATOMcmp(int id, const void *v_1, const void *v_2); ptr ATOMdup(int id, const void *val); bte ATOMelmshift(int sz); -ssize_t ATOMformat(int id, const void *val, char **buf); +char *ATOMformat(int id, const void *val); int ATOMindex(const char *nme); size_t ATOMlen(int id, const void *v); str ATOMname(int id); @@ -330,7 +330,7 @@ int VALcmp(const ValRecord *p, const Val ptr VALconvert(int typ, ValPtr t); ValPtr VALcopy(ValPtr dst, const ValRecord *src); void VALempty(ValPtr v); -ssize_t VALformat(char **buf, const ValRecord *res); +char *VALformat(const ValRecord *res); void *VALget(ValPtr v); ValPtr VALinit(ValPtr d, int tpe, const void *s); int VALisnil(const ValRecord *v); diff --git a/clients/mapiclient/ReadlineTools.c b/clients/mapiclient/ReadlineTools.c --- a/clients/mapiclient/ReadlineTools.c +++ b/clients/mapiclient/ReadlineTools.c @@ -177,9 +177,9 @@ mal_help(int cnt, int key) (void) key; c = rl_line_buffer + strlen(rl_line_buffer) - 1; - while (c > rl_line_buffer && isspace(*c)) + while (c > rl_line_buffer && isspace((unsigned char) *c)) c--; - while (c > rl_line_buffer && !isspace(*c)) + while (c > rl_line_buffer && !isspace((unsigned char) *c)) c--; if ((buf = malloc(strlen(c) + 20)) == NULL) return 0; @@ -221,7 +221,7 @@ mal_command_generator(const char *text, /* we pick our own portion of the linebuffer */ text = rl_line_buffer + strlen(rl_line_buffer) - 1; - while (text > rl_line_buffer && !isspace((int) *text)) + while (text > rl_line_buffer && !isspace((unsigned char) *text)) text--; if (!state) { idx = 0; @@ -245,7 +245,7 @@ mal_command_generator(const char *text, c = strstr(text, ":="); if (c) text = c + 2; - while (isspace((int) *text)) + while (isspace((unsigned char) *text)) text++; if ((buf = malloc(strlen(text) + 32)) == NULL) return NULL; diff --git a/clients/mapiclient/eventparser.c b/clients/mapiclient/eventparser.c --- a/clients/mapiclient/eventparser.c +++ b/clients/mapiclient/eventparser.c @@ -202,7 +202,7 @@ keyvalueparser(char *txt, EventRecord *e *c++ = 0; skipto(':'); c++; - while( *c && isspace((int)*c)) c++; + while( *c && isspace((unsigned char) *c)) c++; if( *c == '"'){ val = ++c; skipstr(); @@ -508,7 +508,7 @@ lineparser(char *row, EventRecord *ev) *c=':'; ev->fcn = c + 2; /* find genuine function calls */ - while (isspace((int) *ev->fcn) && *ev->fcn) + while (isspace((unsigned char) *ev->fcn) && *ev->fcn) ev->fcn++; if (strchr(ev->fcn, '.') == 0) ev->fcn = 0; diff --git a/clients/mapiclient/mhelp.c b/clients/mapiclient/mhelp.c --- a/clients/mapiclient/mhelp.c +++ b/clients/mapiclient/mhelp.c @@ -761,7 +761,7 @@ sql_grammar_rule(const char *word, strea { char buf[65], *s = buf; int i; - while (s < buf + 64 && *word != ',' && *word && !isspace((int) *word)) + while (s < buf + 64 && *word != ',' && *word && !isspace((unsigned char) *word)) *s++ = *word++; *s = 0; @@ -770,9 +770,9 @@ sql_grammar_rule(const char *word, strea mnstr_printf(toConsole, "%s : %s\n", buf, sqlhelp[i].syntax); } } - while (*word && (isalnum((int) *word || *word == '_'))) + while (*word && (isalnum((unsigned char) *word || *word == '_'))) word++; - while (*word && isspace((int) *word)) + while (*word && isspace((unsigned char) *word)) word++; return *word == ',' ? word + 1 : NULL; } @@ -828,10 +828,10 @@ sql_help(char *pattern, stream *toConsol if (*pattern == '\\') pattern++; - while (*pattern && !isspace((int) *pattern)) { + while (*pattern && !isspace((unsigned char) *pattern)) { pattern++; } - while (*pattern && isspace((int) *pattern)) { + while (*pattern && isspace((unsigned char) *pattern)) { pattern++; } @@ -851,7 +851,7 @@ sql_help(char *pattern, stream *toConsol } // collect the major topics for (i = 0; sqlhelp[i].command; i++) { - if (islower((int) sqlhelp[i].command[0]) && *pattern != '*') + if (islower((unsigned char) sqlhelp[i].command[0]) && *pattern != '*') break; total++; if ((len = strlen(sqlhelp[i].command)) > maxlen) diff --git a/clients/mapiclient/tomograph.c b/clients/mapiclient/tomograph.c --- a/clients/mapiclient/tomograph.c +++ b/clients/mapiclient/tomograph.c @@ -856,7 +856,7 @@ showcpu(void) s = box[i].stmt +1; while (s) { s = strchr(s + 1, ' '); - while (s && isspace((int) *s)) + while (s && isspace((unsigned char) *s)) s++; if( s){ cpuload[j++] = atof(s); @@ -1423,11 +1423,11 @@ update(char *line, EventRecord *ev) if( (s= ev->stmt,'[')) s++; else s = ev->stmt; - while (s && isspace((int) *s)) + while (s && isspace((unsigned char) *s)) s++; while (s) { s = strchr(s + 1, ' '); - while (s && isspace((int) *s)) + while (s && isspace((unsigned char) *s)) s++; if (s) cpus++; diff --git a/clients/mapilib/mapi.c b/clients/mapilib/mapi.c --- a/clients/mapilib/mapi.c +++ b/clients/mapilib/mapi.c @@ -3591,7 +3591,7 @@ slice_row(const char *reply, char *null, } lens[i] = len; anchors[i++] = start; - while (reply && *reply && isspace((int) (unsigned char) *reply)) + while (reply && *reply && isspace((unsigned char) *reply)) reply++; } while (reply && *reply && *reply != endchar); *anchorsp = anchors; @@ -3814,7 +3814,7 @@ parse_header_line(MapiHdl hdl, char *lin result->commentonly = 0; tag = etag + 1; - while (*tag && isspace((int) (unsigned char) *tag)) + while (*tag && isspace((unsigned char) *tag)) tag++; if (n > result->fieldcnt) { @@ -4568,7 +4568,7 @@ unquote(const char *msg, char **str, con char quote; /* first skip over leading white space */ - while (*p && isspace((int) (unsigned char) *p)) + while (*p && isspace((unsigned char) *p)) p++; quote = *p; if (quote == '\'' || quote == '"') { @@ -4676,9 +4676,9 @@ unquote(const char *msg, char **str, con while (*p && *p != ',' && *p != '\t' && *p != endchar) p++; /* search back over trailing white space */ - for (s = p - 1; s > msg && isspace((int) (unsigned char) *s); s--) + for (s = p - 1; s > msg && isspace((unsigned char) *s); s--) ; - if (s < msg || !isspace((int) (unsigned char) *s)) /* gone one too far */ + if (s < msg || !isspace((unsigned char) *s)) /* gone one too far */ s++; if (*p == ',' || *p == '\t') { /* there is more to come; skip over separator */ @@ -4882,7 +4882,7 @@ store_field(struct MapiResultSet *result unsigned int fac = 1000000000; unsigned int nsec = 0; - for (n++; isdigit((int) (unsigned char) val[n]); n++) { + for (n++; isdigit((unsigned char) val[n]); n++) { fac /= 10; nsec += (val[n] - '0') * fac; } diff --git a/clients/odbc/driver/ODBCConvert.c b/clients/odbc/driver/ODBCConvert.c --- a/clients/odbc/driver/ODBCConvert.c +++ b/clients/odbc/driver/ODBCConvert.c @@ -461,7 +461,7 @@ parseoptionalbracketednumber(char **sval char *eptr; long val; - while (slen > 0 && isspace((int) *sval)) { + while (slen > 0 && isspace((unsigned char) *sval)) { slen--; sval++; } @@ -471,7 +471,7 @@ parseoptionalbracketednumber(char **sval } slen--; sval++; - while (slen > 0 && isspace((int) *sval)) { + while (slen > 0 && isspace((unsigned char) *sval)) { slen--; sval++; } @@ -493,14 +493,14 @@ parseoptionalbracketednumber(char **sval slen -= (int) (eptr - sval); sval = eptr; *val1p = (int) val; - while (slen > 0 && isspace((int) *sval)) { + while (slen > 0 && isspace((unsigned char) *sval)) { slen--; sval++; } if (val2p != NULL && slen > 0 && *sval == ',') { slen--; sval++; - while (slen > 0 && isspace((int) *sval)) { + while (slen > 0 && isspace((unsigned char) *sval)) { slen--; sval++; } @@ -539,9 +539,9 @@ parsemonthintervalstring(char **svalp, return SQL_ERROR; _______________________________________________ checkin-list mailing list checkin-list@monetdb.org https://www.monetdb.org/mailman/listinfo/checkin-list