MonetDB: default - Merge with Nov2019 branch.
Changeset: 7637dc59c7a0 for MonetDB URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=7637dc59c7a0 Modified Files: common/utils/msabaoth.c sql/backends/monet5/sql_gencode.c tools/merovingian/client/monetdb.c tools/merovingian/daemon/client.c tools/merovingian/daemon/connections.c tools/merovingian/daemon/forkmserver.c tools/merovingian/daemon/handlers.c tools/merovingian/daemon/merovingian.c tools/merovingian/daemon/multiplex-funnel.c tools/merovingian/utils/glob.c Branch: default Log Message: Merge with Nov2019 branch. diffs (254 lines): diff --git a/common/utils/msabaoth.c b/common/utils/msabaoth.c --- a/common/utils/msabaoth.c +++ b/common/utils/msabaoth.c @@ -148,7 +148,7 @@ msab_init(const char *dbfarm, const char if (_sabaoth_internal_dbname != NULL) free(_sabaoth_internal_dbname); - /* this UUID is supposed to be unique per-process, we use it lateron + /* this UUID is supposed to be unique per-process, we use it later on * to determine if a database is (started by) the current process, * since locking always succeeds for the same process */ if (_sabaoth_internal_uuid == NULL) diff --git a/sql/backends/monet5/sql_gencode.c b/sql/backends/monet5/sql_gencode.c --- a/sql/backends/monet5/sql_gencode.c +++ b/sql/backends/monet5/sql_gencode.c @@ -445,19 +445,14 @@ static int char *mal_session_uuid, *err = NULL; if (!GDKinmemory() && (err = msab_getUUID(_session_uuid)) == NULL) { + str lsupervisor_session = GDKstrdup(mal_session_uuid); str rsupervisor_session = GDKstrdup(mal_session_uuid); - if (rsupervisor_session == NULL) { - free(mal_session_uuid); - return -1; - } - - str lsupervisor_session = GDKstrdup(mal_session_uuid); - if (lsupervisor_session == NULL) { - free(mal_session_uuid); + free(mal_session_uuid); + if (lsupervisor_session == NULL || rsupervisor_session == NULL) { + GDKfree(lsupervisor_session); GDKfree(rsupervisor_session); return -1; } - free(mal_session_uuid); str rworker_plan_uuid = generateUUID(); if (rworker_plan_uuid == NULL) { diff --git a/tools/merovingian/client/monetdb.c b/tools/merovingian/client/monetdb.c --- a/tools/merovingian/client/monetdb.c +++ b/tools/merovingian/client/monetdb.c @@ -506,7 +506,7 @@ globMatchDBS(int argc, char *argv[], sab /* move out of orig into w, such that we can't * get double matches in the same output list * (as side effect also avoids a double free -* lateron) */ +* later on) */ if (w == NULL) { top = w = stats; } else { @@ -737,7 +737,7 @@ command_status(int argc, char *argv[]) } } /* make this option no longer available, for easy use -* lateron */ +* later on */ argv[i] = NULL; } else { doall = 0; @@ -1043,7 +1043,7 @@ command_startstop(int argc, char *argv[] } } /* make this option no longer available, for easy use -* lateron */ +* later on */ argv[i] = NULL; } } @@ -1148,7 +1148,7 @@ command_set(int argc, char *argv[], mero } } /* make this option no longer available, for easy use -* lateron */ +* later on */ argv[i] = NULL; } else if (property[0] == '\0') { /* first non-option is property, rest is database */ @@ -1282,7 +1282,7 @@ command_get(int argc, char *argv[]) } } /* make this option no longer available, for easy use -* lateron */ +* later on */ argv[i] = NULL; } else if (property == NULL) { /* first non-option is property, rest is database */ @@ -1815,7 +1815,7 @@ main(int argc, char *argv[]) fprintf(stderr, "monetdb: cannot find a control socket, use -h and/or
MonetDB: default - Merge with Nov2019 branch.
Changeset: 2b7359ba17a5 for MonetDB URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=2b7359ba17a5 Modified Files: gdk/gdk_aggr.c Branch: default Log Message: Merge with Nov2019 branch. diffs (47 lines): diff --git a/gdk/gdk_aggr.c b/gdk/gdk_aggr.c --- a/gdk/gdk_aggr.c +++ b/gdk/gdk_aggr.c @@ -2711,17 +2711,16 @@ BATmax_skipnil(BAT *b, void *aggr, bit s #define binsearch_oid(indir, offset, vals, lo, hi, v, ordering, last) binsearch_lng(indir, offset, (const lng *) vals, lo, hi, (lng) (v), ordering, last) #endif -#define DO_QUANTILE_AVG(TPE) \ - do { \ - TPE low = *(TPE*) BUNtail(bi, r + (BUN) hi); \ - TPE high = *(TPE*) BUNtail(bi, r + (BUN) lo); \ - if (is_##TPE##_nil(low) || is_##TPE##_nil(high)) { \ - v = dnil; \ - nils++; \ - } else { \ - val = (f - lo) * low + (lo + 1 - f) * high; \ - v = \ - } \ +#define DO_QUANTILE_AVG(TPE) \ + do {\ + TPE low = *(TPE*) BUNtail(bi, r + (BUN) hi);\ + TPE high = *(TPE*) BUNtail(bi, r + (BUN) lo); \ + if (is_##TPE##_nil(low) || is_##TPE##_nil(high)) { \ + val = dbl_nil; \ + nils++; \ + } else {\ + val = (f - lo) * low + (lo + 1 - f) * high; \ + } \ } while (0) static BAT * @@ -2898,6 +2897,7 @@ doBATgroupquantile(BAT *b, BAT *g, BAT * DO_QUANTILE_AVG(dbl); break; } + v = } else { /* round *down* to nearest integer */ double f = (p - r - 1) * quantile; @@ -2988,6 +2988,7 @@ doBATgroupquantile(BAT *b, BAT *g, BAT * DO_QUANTILE_AVG(dbl); break; } + v = } else { double f; /* round (p-r-1)*quantile *down* to nearest ___ checkin-list mailing list checkin-list@monetdb.org https://www.monetdb.org/mailman/listinfo/checkin-list
MonetDB: default - Merge with Nov2019 branch
Changeset: fe5e43e765fb for MonetDB URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=fe5e43e765fb Added Files: sql/test/BugTracker-2020/Tests/All sql/test/BugTracker-2020/Tests/median_avg-nulls.Bug-6807.sql sql/test/BugTracker-2020/Tests/median_avg-nulls.Bug-6807.stable.err sql/test/BugTracker-2020/Tests/median_avg-nulls.Bug-6807.stable.out Modified Files: gdk/gdk_aggr.c Branch: default Log Message: Merge with Nov2019 branch diffs (266 lines): diff --git a/gdk/gdk_aggr.c b/gdk/gdk_aggr.c --- a/gdk/gdk_aggr.c +++ b/gdk/gdk_aggr.c @@ -2711,6 +2711,19 @@ BATmax_skipnil(BAT *b, void *aggr, bit s #define binsearch_oid(indir, offset, vals, lo, hi, v, ordering, last) binsearch_lng(indir, offset, (const lng *) vals, lo, hi, (lng) (v), ordering, last) #endif +#define DO_QUANTILE_AVG(TPE) \ + do { \ + TPE low = *(TPE*) BUNtail(bi, r + (BUN) hi); \ + TPE high = *(TPE*) BUNtail(bi, r + (BUN) lo); \ + if (is_##TPE##_nil(low) || is_##TPE##_nil(high)) { \ + v = dnil; \ + nils++; \ + } else { \ + val = (f - lo) * low + (lo + 1 - f) * high; \ + v = \ + } \ + } while (0) + static BAT * doBATgroupquantile(BAT *b, BAT *g, BAT *e, BAT *s, int tp, double quantile, bool skip_nils, bool abort_on_error, bool average) @@ -2862,30 +2875,29 @@ doBATgroupquantile(BAT *b, BAT *g, BAT * double hi = ceil(f); switch (ATOMbasetype(tp)) { case TYPE_bte: - val = (f - lo) * *(bte*)BUNtail(bi, r + (BUN) hi) + (lo + 1 - f) * *(bte*)BUNtail(bi, r + (BUN) lo); + DO_QUANTILE_AVG(bte); break; case TYPE_sht: - val = (f - lo) * *(sht*)BUNtail(bi, r + (BUN) hi) + (lo + 1 - f) * *(sht*)BUNtail(bi, r + (BUN) lo); + DO_QUANTILE_AVG(sht); break; case TYPE_int: - val = (f - lo) * *(int*)BUNtail(bi, r + (BUN) hi) + (lo + 1 - f) * *(int*)BUNtail(bi, r + (BUN) lo); + DO_QUANTILE_AVG(int); break; case TYPE_lng: - val = (f - lo) * *(lng*)BUNtail(bi, r + (BUN) hi) + (lo + 1 - f) * *(lng*)BUNtail(bi, r + (BUN) lo); + DO_QUANTILE_AVG(lng); break; #ifdef HAVE_HGE case TYPE_hge: - val = (f - lo) * *(hge*)BUNtail(bi, r + (BUN) hi) + (lo + 1 - f) * *(hge*)BUNtail(bi, r + (BUN) lo); + DO_QUANTILE_AVG(hge); break; #endif case TYPE_flt: - val = (f - lo) * *(flt*)BUNtail(bi, r + (BUN) hi) + (lo + 1 - f) * *(flt*)BUNtail(bi, r + (BUN) lo); + DO_QUANTILE_AVG(flt); break; case TYPE_dbl: - val = (f - lo) * *(dbl*)BUNtail(bi, r + (BUN) hi) + (lo + 1 - f) * *(dbl*)BUNtail(bi, r + (BUN) lo); + DO_QUANTILE_AVG(dbl); break; } - v = } else { /* round *down* to nearest integer */ double f = (p - r - 1) * quantile; @@ -2953,30 +2965,29 @@ doBATgroupquantile(BAT *b, BAT *g, BAT * double hi = ceil(f); switch (ATOMbasetype(tp)) { case TYPE_bte: - val = (f - lo) * *(bte*)BUNtail(bi, r + (BUN) hi) + (lo + 1 - f) * *(bte*)BUNtail(bi, r + (BUN) lo); + DO_QUANTILE_AVG(bte); break; case TYPE_sht: - val = (f - lo) * *(sht*)BUNtail(bi, r + (BUN) hi) + (lo + 1 - f) * *(sht*)BUNtail(bi, r + (BUN) lo); + DO_QUANTILE_AVG(sht); break; case TYPE_int: - val = (f - lo) * *(int*)BUNtail(bi, r + (BUN) hi) + (lo + 1 - f) * *(int*)BUNtail(bi, r + (BUN) lo); + DO_QUANTILE_AVG(int); break; case TYPE_lng: -
MonetDB: default - Merge with Nov2019 branch.
Changeset: ea6749b0f655 for MonetDB URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=ea6749b0f655 Modified Files: clients/Tests/MAL-signatures.stable.out clients/Tests/MAL-signatures.stable.out.int128 clients/mapiclient/dump.c clients/mapiclient/mclient.1 clients/mapilib/mapi.c clients/odbc/driver/SQLPrepare.c gdk/gdk.h gdk/gdk_atoms.h gdk/gdk_bat.c gdk/gdk_batop.c gdk/gdk_bbp.c gdk/gdk_calc.c gdk/gdk_firstn.c gdk/gdk_heap.c gdk/gdk_imprints.c gdk/gdk_join.c gdk/gdk_logger.c gdk/gdk_private.h gdk/gdk_select.c gdk/gdk_storage.c gdk/gdk_string.c gdk/gdk_utils.c gdk/gdk_value.c monetdb5/extras/mal_optimizer_template/Tests/opt_sql_append.stable.out monetdb5/extras/mal_optimizer_template/Tests/opt_sql_append.stable.out.Windows monetdb5/extras/rapi/converters.c.h monetdb5/mal/mal_instruction.c monetdb5/mal/mal_interpreter.c monetdb5/modules/kernel/algebra.mal sql/backends/monet5/UDF/pyapi/pyheader.h testing/Mfilter.py testing/difflib.c tools/merovingian/client/monetdb.c tools/merovingian/daemon/client.c tools/merovingian/daemon/connections.c tools/merovingian/daemon/controlrunner.c tools/merovingian/daemon/forkmserver.c tools/merovingian/daemon/multiplex-funnel.c tools/merovingian/daemon/proxy.c tools/merovingian/utils/control.c tools/merovingian/utils/utils.c Branch: default Log Message: Merge with Nov2019 branch. diffs (truncated from 1294 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 @@ -589,15 +589,15 @@ stdout of test 'MAL-signatures` in direc [ "algebra", "slice","command algebra.slice(b:bat[:any_1], x:int, y:int):bat[:any_1] ", "ALGslice_int;","Return the slice with the BUNs at position x till y." ] [ "algebra", "slice","command algebra.slice(b:bat[:any_1], x:lng, y:lng):bat[:any_1] ", "ALGslice_lng;","Return the slice with the BUNs at position x till y." ] [ "algebra", "slice","command algebra.slice(b:bat[:any_1], x:oid, y:oid):bat[:any_1] ", "ALGslice_oid;","Return the slice based on head oid x till y (exclusive)." ] -[ "algebra", "sort", "command algebra.sort(b:bat[:any_1], reverse:bit, nilslast:bit, stable:bit):bat[:any_1] ", "ALGsort11;", "Returns a copy of the BAT sorted on tail values.\n The input and output are (must be) dense headed.\n The order is descending if the reverse bit is set.\n\t\t This is a stable sort if the stable bit is set."] -[ "algebra", "sort", "command algebra.sort(b:bat[:any_1], reverse:bit, nilslast:bit, stable:bit) (X_0:bat[:any_1], X_1:bat[:oid]) ", "ALGsort12;", "Returns a copy of the BAT sorted on tail values and a BAT that\n specifies how the input was reordered.\n The input and output are (must be) dense headed.\n The order is descending if the reverse bit is set.\n\t\t This is a stable sort if the stable bit is set." ] -[ "algebra", "sort", "command algebra.sort(b:bat[:any_1], reverse:bit, nilslast:bit, stable:bit) (X_0:bat[:any_1], X_1:bat[:oid], X_2:bat[:oid]) ", "ALGsort13;", "Returns a copy of the BAT sorted on tail values, a BAT that specifies\n how the input was reordered, and a BAT with group information.\n The input and output are (must be) dense headed.\n The order is descending if the reverse bit is set.\n\t\t This is a stable sort if the stable bit is set." ] -[ "algebra", "sort", "command algebra.sort(b:bat[:any_1], o:bat[:oid], reverse:bit, nilslast:bit, stable:bit):bat[:any_1] ", "ALGsort21;", "Returns a copy of the BAT sorted on tail values.\n The input and output are (must be) dense headed.\n The order is descending if the reverse bit is set.\n\t\t This is a stable sort if the stable bit is set."] -[ "algebra", "sort", "command algebra.sort(b:bat[:any_1], o:bat[:oid], reverse:bit, nilslast:bit, stable:bit) (X_0:bat[:any_1], X_1:bat[:oid]) ", "ALGsort22;", "Returns a copy of the BAT sorted on tail values and a BAT that\n specifies how the input was reordered.\n The input and output are (must be) dense headed.\n The order is descending if the reverse bit is set.\n\t\t This is a stable sort if the stable bit is set." ] -[ "algebra", "sort", "command algebra.sort(b:bat[:any_1], o:bat[:oid], reverse:bit, nilslast:bit, stable:bit) (X_0:bat[:any_1], X_1:bat[:oid], X_2:bat[:oid]) ", "ALGsort23;", "Returns a copy of the BAT sorted on tail values, a BAT that specifies\n how the input was reordered,
MonetDB: default - Merge with Nov2019 branch.
Changeset: 9e01122c07e1 for MonetDB URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=9e01122c07e1 Added Files: sql/test/BugTracker-2019/Tests/set-schema-mclient-msg.Bug-6754.sql sql/test/BugTracker-2019/Tests/set-schema-mclient-msg.Bug-6754.stable.err sql/test/BugTracker-2019/Tests/set-schema-mclient-msg.Bug-6754.stable.out Modified Files: clients/mapiclient/mclient.c monetdb5/modules/kernel/mmath.c sql/server/sql_privileges.c sql/test/BugTracker-2019/Tests/All sql/test/BugTracker-2019/Tests/index-insert-crash.Bug-6781.sql sql/test/BugTracker-2019/Tests/index-insert-crash.Bug-6781.stable.out Branch: default Log Message: Merge with Nov2019 branch. diffs (260 lines): diff --git a/clients/mapiclient/mclient.c b/clients/mapiclient/mclient.c --- a/clients/mapiclient/mclient.c +++ b/clients/mapiclient/mclient.c @@ -1933,7 +1933,7 @@ format_result(Mapi mid, MapiHdl hdl, boo SQLqueryEcho(hdl); if (formatter == TABLEformatter || formatter == ROWCOUNTformatter) - mnstr_printf(toConsole, "operation successful\n"); + mnstr_printf(toConsole, "auto commit mode: %s\n", mapi_get_autocommit(mid) ? "on" : "off"); timerHuman(sqloptimizer, maloptimizer, querytime, singleinstr, false); continue; case Q_PREPARE: diff --git a/monetdb5/modules/kernel/mmath.c b/monetdb5/modules/kernel/mmath.c --- a/monetdb5/modules/kernel/mmath.c +++ b/monetdb5/modules/kernel/mmath.c @@ -295,6 +295,7 @@ str MATHsqlrandint(int *res, const int *seed) { #ifdef STATIC_CODE_ANALYSIS + (void) seed; *res = 0; #else MT_lock_set(_rse_lock); diff --git a/sql/server/sql_privileges.c b/sql/server/sql_privileges.c --- a/sql/server/sql_privileges.c +++ b/sql/server/sql_privileges.c @@ -754,11 +754,11 @@ mvc_set_schema(mvc *m, char *schema) if (m->session->schema_name) _DELETE(m->session->schema_name); m->session->schema_name = new_schema_name; - m->type = Q_TRANS; + m->type = Q_SCHEMA; if (m->session->tr->active) m->session->schema = s; ret = 1; - } else if(new_schema_name) { + } else if (new_schema_name) { _DELETE(new_schema_name); } return ret; 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 @@ -32,6 +32,7 @@ sequences-defaults.Bug-6744 sequences-types.Bug-6745 alter_table_drop_column.Bug-6749 KNOWNFAIL_PYMONETDB?remote-table-non-existent-column.Bug-6750 +set-schema-mclient-msg.Bug-6754 cte-union.Bug-6755 merge-table-limit.Bug-6756 double-free.Bug-6757 diff --git a/sql/test/BugTracker-2019/Tests/index-insert-crash.Bug-6781.sql b/sql/test/BugTracker-2019/Tests/index-insert-crash.Bug-6781.sql --- a/sql/test/BugTracker-2019/Tests/index-insert-crash.Bug-6781.sql +++ b/sql/test/BugTracker-2019/Tests/index-insert-crash.Bug-6781.sql @@ -1,9 +1,13 @@ start transaction; create table a(a int, b int, id bigserial); create ordered index a_pk on a(id); +create imprints index a_impk on a(id); create index a_idx1 on a(a); +select type, name from sys.idxs where table_id in (select id from sys._tables where name = 'a'); + insert into a(a) values(1), (2); update a set a = 3, b = 3 where a = 1; +select * from a; delete from a where a = 3; truncate table a; rollback; diff --git a/sql/test/BugTracker-2019/Tests/index-insert-crash.Bug-6781.stable.out b/sql/test/BugTracker-2019/Tests/index-insert-crash.Bug-6781.stable.out --- a/sql/test/BugTracker-2019/Tests/index-insert-crash.Bug-6781.stable.out +++ b/sql/test/BugTracker-2019/Tests/index-insert-crash.Bug-6781.stable.out @@ -17,45 +17,6 @@ stdout of test 'index-insert-crash.Bug-6 # Listening for UNIX domain connection requests on mapi:monetdb:///var/tmp/mtest-320772/.s.monetdb.39858 # MonetDB/GIS module loaded # SQL catalog created, loading sql scripts once -# loading sql script: 09_like.sql -# loading sql script: 10_math.sql -# loading sql script: 12_url.sql -# loading sql script: 13_date.sql -# loading sql script: 14_inet.sql -# loading sql script: 15_querylog.sql -# loading sql script: 16_tracelog.sql -# loading sql script: 17_temporal.sql -# loading sql script: 18_index.sql -# loading sql script: 20_vacuum.sql -# loading sql script: 21_dependency_views.sql -# loading sql script: 22_clients.sql -# loading sql script: 23_skyserver.sql -# loading sql script: 25_debug.sql -# loading sql script: 26_sysmon.sql -# loading sql script: 27_rejects.sql -# loading sql script: 39_analytics.sql -# loading sql script: 39_analytics_hge.sql -# loading sql script: 40_geom.sql -# loading sql script: 40_json.sql -#
MonetDB: default - Merge with Nov2019 branch.
Changeset: 0c282e7e11e8 for MonetDB URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=0c282e7e11e8 Modified Files: HowToStart.rst Makefile.ag NT/Makefile NT/monetdb_config.h.in NT/rules.msc NT/wincompile.py NT/winconfig.py README.rst bootstrap buildtools/Makefile.ag buildtools/autogen/autogen.py buildtools/autogen/autogen/am.py buildtools/autogen/autogen/codegen.py buildtools/autogen/autogen/filesplit.py buildtools/autogen/autogen/msc.py buildtools/autogen/autogen/var.py buildtools/conf/Maddlog buildtools/conf/Makefile.ag buildtools/conf/fixlicense.py buildtools/conf/rules.mk buildtools/conf/website.html buildtools/doc/HowToRelease.rst buildtools/doc/windowsbuild.rst clients/Makefile.ag clients/NT/Makefile.ag clients/NT/mclient.bat clients/NT/msqldump.bat clients/NT/stethoscope.bat clients/examples/C/Makefile.ag 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/examples/Makefile.ag clients/examples/perl/Makefile.ag clients/examples/perl/malsample.pl clients/examples/perl/sqlsample.pl clients/examples/php/Makefile.ag clients/examples/php/sqlsample.php clients/examples/python/basics.py clients/examples/python/mclient-python2.py clients/examples/python/mclient-python3.py clients/examples/python/perf.py clients/examples/python/sqlsample.py clients/mapiclient/Makefile.ag clients/mapiclient/ReadlineTools.c clients/mapiclient/ReadlineTools.h clients/mapiclient/dotfile.py clients/mapiclient/dotmonetdb.c clients/mapiclient/dotmonetdb.h clients/mapiclient/dump.c clients/mapiclient/eventparser.c clients/mapiclient/eventparser.h clients/mapiclient/mclient.c clients/mapiclient/mhelp.c clients/mapiclient/mhelp.h clients/mapiclient/msqldump.c clients/mapiclient/msqldump.h clients/mapiclient/stethoscope.c clients/mapiclient/tachograph.c clients/mapiclient/tomograph.c clients/mapilib/Makefile.ag clients/mapilib/mapi.c clients/mapilib/mapi.h clients/mapilib/mapi.rc clients/mapilib/monetdb-mapi.pc.in clients/odbc/Makefile.ag clients/odbc/doc/ExcelMonetDB.html clients/odbc/doc/unixODBC.html clients/odbc/driver/Makefile.ag clients/odbc/driver/ODBCConvert.c clients/odbc/driver/ODBCDbc.c clients/odbc/driver/ODBCDbc.h clients/odbc/driver/ODBCDesc.c clients/odbc/driver/ODBCDesc.h clients/odbc/driver/ODBCEnv.c clients/odbc/driver/ODBCEnv.h clients/odbc/driver/ODBCError.c clients/odbc/driver/ODBCError.h clients/odbc/driver/ODBCGlobal.h clients/odbc/driver/ODBCQueries.h clients/odbc/driver/ODBCStmt.c clients/odbc/driver/ODBCStmt.h clients/odbc/driver/ODBCUtil.c clients/odbc/driver/ODBCUtil.h clients/odbc/driver/SQLAllocConnect.c clients/odbc/driver/SQLAllocEnv.c clients/odbc/driver/SQLAllocHandle.c clients/odbc/driver/SQLAllocStmt.c clients/odbc/driver/SQLBindCol.c clients/odbc/driver/SQLBindParameter.c clients/odbc/driver/SQLBrowseConnect.c clients/odbc/driver/SQLBulkOperations.c clients/odbc/driver/SQLCancel.c clients/odbc/driver/SQLCloseCursor.c clients/odbc/driver/SQLColAttribute.c clients/odbc/driver/SQLColAttributes.c clients/odbc/driver/SQLColumnPrivileges.c clients/odbc/driver/SQLColumns.c clients/odbc/driver/SQLConnect.c clients/odbc/driver/SQLCopyDesc.c clients/odbc/driver/SQLDataSources.c clients/odbc/driver/SQLDescribeCol.c clients/odbc/driver/SQLDescribeParam.c clients/odbc/driver/SQLDisconnect.c clients/odbc/driver/SQLDriverConnect.c clients/odbc/driver/SQLDrivers.c clients/odbc/driver/SQLEndTran.c clients/odbc/driver/SQLError.c clients/odbc/driver/SQLExecDirect.c clients/odbc/driver/SQLExecute.c clients/odbc/driver/SQLExtendedFetch.c clients/odbc/driver/SQLFetch.c clients/odbc/driver/SQLFetchScroll.c clients/odbc/driver/SQLForeignKeys.c clients/odbc/driver/SQLFreeConnect.c clients/odbc/driver/SQLFreeEnv.c clients/odbc/driver/SQLFreeHandle.c clients/odbc/driver/SQLFreeStmt.c clients/odbc/driver/SQLGetConnectAttr.c clients/odbc/driver/SQLGetConnectOption.c clients/odbc/driver/SQLGetCursorName.c clients/odbc/driver/SQLGetData.c
MonetDB: default - Merge with Nov2019 branch.
Changeset: 015bdc204c26 for MonetDB URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=015bdc204c26 Modified Files: monetdb5/modules/mal/wlc.c tools/merovingian/client/monetdb.c tools/merovingian/daemon/argvcmds.c tools/merovingian/daemon/forkmserver.c tools/merovingian/utils/utils.c Branch: default Log Message: Merge with Nov2019 branch. diffs (261 lines): diff --git a/tools/merovingian/client/monetdb.c b/tools/merovingian/client/monetdb.c --- a/tools/merovingian/client/monetdb.c +++ b/tools/merovingian/client/monetdb.c @@ -213,6 +213,7 @@ MEROgetStatus(sabdb **ret, char *databas char *p; char *buf; char *e; + char *sp; if (database == NULL) database = "#all"; @@ -224,14 +225,14 @@ MEROgetStatus(sabdb **ret, char *databas sw = malloc(sizeof(sabdb *) * swlen); orig = NULL; - if ((p = strtok(buf, "\n")) != NULL) { + if ((p = strtok_r(buf, "\n", )) != NULL) { if (strcmp(p, "OK") != 0) { p = strdup(p); free(buf); free(sw); return(p); } - for (swpos = 0; (p = strtok(NULL, "\n")) != NULL; swpos++) { + for (swpos = 0; (p = strtok_r(NULL, "\n", )) != NULL; swpos++) { e = msab_deserialise(, p); if (e != NULL) { printf("WARNING: failed to parse response from " @@ -898,6 +899,7 @@ command_discover(int argc, char *argv[]) size_t posloc = 0; size_t loclen = 0; char **locations = malloc(sizeof(char*) * numlocs); + char *sp; if (argc == 0) { exit(2); @@ -921,14 +923,14 @@ command_discover(int argc, char *argv[]) exit(2); } - if ((p = strtok(buf, "\n")) != NULL) { + if ((p = strtok_r(buf, "\n", )) != NULL) { if (strcmp(p, "OK") != 0) { fprintf(stderr, "%s: %s\n", argv[0], p); exit(1); } if (twidth > 0) location = malloc(twidth + 1); - while ((p = strtok(NULL, "\n")) != NULL) { + while ((p = strtok_r(NULL, "\n", )) != NULL) { if ((q = strchr(p, '\t')) == NULL) { /* doesn't look correct */ printf("%s: WARNING: discarding incorrect line: %s\n", @@ -1376,9 +1378,10 @@ command_get(int argc, char *argv[]) } else { /* check validity of properties before printing them */ if (stats == orig) { + char *sp; snprintf(vbuf, sizeof(vbuf), "%s", property); buf = vbuf; - while ((p = strtok(buf, ",")) != NULL) { + while ((p = strtok_r(buf, ",", )) != NULL) { buf = NULL; if (strcmp(p, "name") == 0) continue; @@ -1394,7 +1397,8 @@ command_get(int argc, char *argv[]) if (stats == orig) printf(" name prop source value\n"); - while ((p = strtok(buf, ",")) != NULL) { + char *sp; + while ((p = strtok_r(buf, ",", )) != NULL) { buf = NULL; /* filter properties based on object type */ diff --git a/tools/merovingian/daemon/argvcmds.c b/tools/merovingian/daemon/argvcmds.c --- a/tools/merovingian/daemon/argvcmds.c +++ b/tools/merovingian/daemon/argvcmds.c @@ -209,7 +209,8 @@ command_get(confkeyval *ckv, int argc, c } printf(" propertyvalue\n"); - while ((p = strtok(property, ",")) != NULL) { + char *sp; + while ((p = strtok_r(property, ",", )) != NULL) { property = NULL; if (strcmp(p, "dbfarm") == 0) { value = dbfarm; 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 @@ -223,7 +223,9 @@ forkMserver(char *database, sabdb** stat char *argv[MAX_NR_ARGS+1]; /* for the exec arguments */ char property_other[1024]; int c = 0; + int freec = 0; /* from where to free entries in argv */ unsigned int mport; + char *set = "--set"; er = msab_getStatus(stats, database); if (er != NULL) { @@ -557,35 +559,34 @@ forkMserver(char *database, sabdb** stat _mero_hostname, mport, database); argv[c++] = _mero_mserver;
MonetDB: default - Merge with Nov2019 branch.
Changeset: dc287ccdbcb7 for MonetDB URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=dc287ccdbcb7 Added Files: sql/backends/monet5/UDF/pyapi/pyapi_locatepython2.bat.in sql/backends/monet5/UDF/pyapi3/pyapi_locatepython3.bat.in Removed Files: sql/backends/monet5/UDF/pyapi/pyapi_locatepython2.bat sql/backends/monet5/UDF/pyapi3/pyapi_locatepython3.bat Modified Files: NT/rules.msc sql/backends/monet5/UDF/pyapi/Makefile.ag sql/backends/monet5/UDF/pyapi3/Makefile.ag testing/Mtest.py.in Branch: default Log Message: Merge with Nov2019 branch. diffs (127 lines): diff --git a/NT/rules.msc b/NT/rules.msc --- a/NT/rules.msc +++ b/NT/rules.msc @@ -64,18 +64,24 @@ PTHREAD_LIBS = ODBCINST_LIBS = odbccp32.lib user32.lib $(LEGACY_STDIO_DEFINITIONS) ODBC_LIBS = odbc32.lib +!IFNDEF PY3VER +PY2VER=7 +!ENDIF !IFNDEF PYTHON2BASE -PYTHON2BASE=C:\Python27 +PYTHON2BASE=C:\Python2$(PY2VER) !ENDIF !IFNDEF PYTHON2LIB -PYTHON2LIB=python27.lib +PYTHON2LIB=python2$(PY2VER).lib !ENDIF +!IFNDEF PY3VER +PY3VER=7 +!ENDIF !IFNDEF PYTHON3BASE -PYTHON3BASE=C:\Python32 +PYTHON3BASE=C:\Python3$(PY3VER) !ENDIF !IFNDEF PYTHON3LIB -PYTHON3LIB=python37.lib +PYTHON3LIB=python3$(PY3VER).lib !ENDIF PYTHON_LIBDIR=share\MonetDB\python @@ -416,6 +422,8 @@ CONFIGURE="$(PYTHON)" $(CONFIGURE_PY) \ "PACKAGE=$(pkg)" \ "PYTHON=$(PYTHON)" \ "PYTHON_LIBDIR=$(PYTHON_LIBDIR)" \ + "PY2VER=$(PY2VER)" \ + "PY3VER=$(PY3VER)" \ "PYTHON2=$(PYTHON2)" \ "PYTHON3=$(PYTHON3)" \ "TOPDIR=$(TOPDIR)" \ diff --git a/sql/backends/monet5/UDF/pyapi/Makefile.ag b/sql/backends/monet5/UDF/pyapi/Makefile.ag --- a/sql/backends/monet5/UDF/pyapi/Makefile.ag +++ b/sql/backends/monet5/UDF/pyapi/Makefile.ag @@ -47,7 +47,7 @@ scripts_bat = { COND = NATIVE_WIN32 EXT = bat DIR = prefix - SOURCES = pyapi_locatepython2.bat + SOURCES = pyapi_locatepython2.bat.in } EXTRA_DIST_DIR = Tests diff --git a/sql/backends/monet5/UDF/pyapi/pyapi_locatepython2.bat b/sql/backends/monet5/UDF/pyapi/pyapi_locatepython2.bat.in rename from sql/backends/monet5/UDF/pyapi/pyapi_locatepython2.bat rename to sql/backends/monet5/UDF/pyapi/pyapi_locatepython2.bat.in --- a/sql/backends/monet5/UDF/pyapi/pyapi_locatepython2.bat +++ b/sql/backends/monet5/UDF/pyapi/pyapi_locatepython2.bat.in @@ -7,7 +7,7 @@ @echo off setlocal ENABLEEXTENSIONS -set KEY_NAME="HKEY_LOCAL_MACHINE\SOFTWARE\Python\PythonCore\2.7\InstallPath" +set KEY_NAME="HKEY_LOCAL_MACHINE\SOFTWARE\Python\PythonCore\2.@PY2VER@\InstallPath" set VALUE_NAME="" FOR /F "usebackq skip=2 tokens=1,2,*" %%A IN (`REG QUERY %KEY_NAME% /v %VALUE_NAME% 2^>nul`) DO ( @@ -28,6 +28,6 @@ IF defined LOCALPYTHONHOME ( set "PATH=%LOCALPYTHONHOME%;%PATH%" ) ) ELSE ( -@echo MonetDB/Python Disabled: Python 2.7 installation not found. +@echo MonetDB/Python Disabled: Python 2.@PY2VER@ installation not found. endlocal ) diff --git a/sql/backends/monet5/UDF/pyapi3/Makefile.ag b/sql/backends/monet5/UDF/pyapi3/Makefile.ag --- a/sql/backends/monet5/UDF/pyapi3/Makefile.ag +++ b/sql/backends/monet5/UDF/pyapi3/Makefile.ag @@ -50,7 +50,7 @@ scripts_bat = { COND = NATIVE_WIN32 EXT = bat DIR = prefix - SOURCES = pyapi_locatepython3.bat + SOURCES = pyapi_locatepython3.bat.in } EXTRA_DIST_DIR = Tests diff --git a/sql/backends/monet5/UDF/pyapi3/pyapi_locatepython3.bat b/sql/backends/monet5/UDF/pyapi3/pyapi_locatepython3.bat.in rename from sql/backends/monet5/UDF/pyapi3/pyapi_locatepython3.bat rename to sql/backends/monet5/UDF/pyapi3/pyapi_locatepython3.bat.in --- a/sql/backends/monet5/UDF/pyapi3/pyapi_locatepython3.bat +++ b/sql/backends/monet5/UDF/pyapi3/pyapi_locatepython3.bat.in @@ -7,7 +7,7 @@ @echo off setlocal ENABLEEXTENSIONS -set KEY_NAME="HKEY_LOCAL_MACHINE\SOFTWARE\Python\PythonCore\3.7\InstallPath" +set KEY_NAME="HKEY_LOCAL_MACHINE\SOFTWARE\Python\PythonCore\3.@PY3VER@\InstallPath" set VALUE_NAME="" FOR /F "usebackq skip=2 tokens=1,2,*" %%A IN (`REG QUERY %KEY_NAME% /v %VALUE_NAME% 2^>nul`) DO ( @@ -28,6 +28,6 @@ IF defined LOCALPYTHONHOME ( set "PATH=%LOCALPYTHONHOME%;%PATH%" ) ) ELSE ( -@echo MonetDB/Python Disabled: Python 3.7 installation not found. +@echo MonetDB/Python Disabled: Python 3.@PY3VER@ installation not found. endlocal ) diff --git a/testing/Mtest.py.in b/testing/Mtest.py.in --- a/testing/Mtest.py.in +++ b/testing/Mtest.py.in @@ -3074,11 +3074,11 @@ def DoIt(env, SERVER, CALL, TST, EXT, Te if winreg is not None: if env['TST_BITS'] == '32bit': if sys.maxsize > 2**32: -regkey = r'SOFTWARE\Wow6432Node\Python\PythonCore\3.7-32\InstallPath' +regkey = r'SOFTWARE\Wow6432Node\Python\PythonCore\3.@PY3VER@-32\InstallPath' else: -
MonetDB: default - Merge with Nov2019 branch, not changing any f...
Changeset: 77214e5c56da for MonetDB URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=77214e5c56da Modified Files: MonetDB.spec NT/monetdb_config.h.in NT/rules.msc clients/mapilib/mapi.rc clients/odbc/driver/driver.rc clients/odbc/winsetup/setup.rc configure.ag gdk/libbat.rc monetdb5/tools/libmonetdb5.rc vertoo.data Branch: default Log Message: Merge with Nov2019 branch, not changing any files.. ___ checkin-list mailing list checkin-list@monetdb.org https://www.monetdb.org/mailman/listinfo/checkin-list
MonetDB: default - Merge with Nov2019 branch.
Changeset: ad9f924629b5 for MonetDB URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=ad9f924629b5 Modified Files: .hgtags MonetDB.spec debian/changelog Branch: default Log Message: Merge with Nov2019 branch. diffs (38 lines): diff --git a/.hgtags b/.hgtags --- a/.hgtags +++ b/.hgtags @@ -747,3 +747,6 @@ fffd3aabeae5e2c5b535179471e5730742962a76 e0719bdebf32967ca0a0043f556b3f48f93e0ce0 Nov2019_7 fffd3aabeae5e2c5b535179471e5730742962a76 Nov2019_SP1_release e0719bdebf32967ca0a0043f556b3f48f93e0ce0 Nov2019_SP1_release +8d4258444e2a0a809468fb85be7999a407d47e04 Nov2019_9 +e0719bdebf32967ca0a0043f556b3f48f93e0ce0 Nov2019_SP1_release +8d4258444e2a0a809468fb85be7999a407d47e04 Nov2019_SP1_release diff --git a/MonetDB.spec b/MonetDB.spec --- a/MonetDB.spec +++ b/MonetDB.spec @@ -1061,6 +1061,10 @@ fi %postun -p /sbin/ldconfig %changelog +* Wed Dec 18 2019 Sjoerd Mullender - 11.35.9-20191218 +- Rebuilt. +- BZ#6804: DNS resolution of 0.0.0.0 fails on recent Ubuntus + * Tue Dec 17 2019 Sjoerd Mullender - 11.35.7-20191217 - Rebuilt. diff --git a/debian/changelog b/debian/changelog --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,10 @@ +monetdb (11.35.9) unstable; urgency=low + + * Rebuilt. + * BZ#6804: DNS resolution of 0.0.0.0 fails on recent Ubuntus + + -- Sjoerd Mullender Wed, 18 Dec 2019 11:02:41 +0100 + monetdb (11.35.7) unstable; urgency=low * Rebuilt. ___ checkin-list mailing list checkin-list@monetdb.org https://www.monetdb.org/mailman/listinfo/checkin-list
MonetDB: default - Merge with Nov2019 branch, not changing any f...
Changeset: 33d7d629f757 for MonetDB URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=33d7d629f757 Modified Files: MonetDB.spec NT/monetdb_config.h.in NT/rules.msc clients/mapilib/mapi.rc clients/odbc/driver/driver.rc clients/odbc/winsetup/setup.rc configure.ag gdk/libbat.rc monetdb5/tools/libmonetdb5.rc vertoo.data Branch: default Log Message: Merge with Nov2019 branch, not changing any files. ___ checkin-list mailing list checkin-list@monetdb.org https://www.monetdb.org/mailman/listinfo/checkin-list
MonetDB: default - Merge with Nov2019 branch.
Changeset: 8edf0b57f80a for MonetDB URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=8edf0b57f80a Modified Files: tools/merovingian/daemon/connections.c Branch: default Log Message: Merge with Nov2019 branch. diffs (12 lines): diff --git a/tools/merovingian/daemon/connections.c b/tools/merovingian/daemon/connections.c --- a/tools/merovingian/daemon/connections.c +++ b/tools/merovingian/daemon/connections.c @@ -143,7 +143,7 @@ openConnectionTCP(int *ret, bool bind_ip return(newErr("failed setting socket to listen: %s", strerror(errno))); } - Mfprintf(log, "accepting connections on TCP socket %s:%u\n", bindaddr, port); + Mfprintf(log, "accepting connections on TCP socket %s:%hu\n", bindaddr, port); *ret = sock; return(NO_ERR); ___ checkin-list mailing list checkin-list@monetdb.org https://www.monetdb.org/mailman/listinfo/checkin-list
MonetDB: default - Merge with Nov2019 branch, not changing any f...
Changeset: 6c0db6d3e397 for MonetDB URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=6c0db6d3e397 Modified Files: MonetDB.spec NT/monetdb_config.h.in NT/rules.msc clients/mapilib/mapi.rc clients/odbc/driver/driver.rc clients/odbc/winsetup/setup.rc configure.ag gdk/libbat.rc monetdb5/tools/libmonetdb5.rc vertoo.data Branch: default Log Message: Merge with Nov2019 branch, not changing any files.. ___ checkin-list mailing list checkin-list@monetdb.org https://www.monetdb.org/mailman/listinfo/checkin-list
MonetDB: default - Merge with Nov2019 branch.
Changeset: 543be8d19191 for MonetDB URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=543be8d19191 Modified Files: .hgtags MonetDB.spec debian/changelog libversions Branch: default Log Message: Merge with Nov2019 branch. diffs (48 lines): diff --git a/.hgtags b/.hgtags --- a/.hgtags +++ b/.hgtags @@ -744,3 +744,6 @@ 90486f8f87ff0602f3ab143c629ba0aed2153d64 13efc12c95a279d41dbc4440369defc1d7c21d0f Nov2019_release fffd3aabeae5e2c5b535179471e5730742962a76 Nov2019_5 fffd3aabeae5e2c5b535179471e5730742962a76 Nov2019_SP1_release +e0719bdebf32967ca0a0043f556b3f48f93e0ce0 Nov2019_7 +fffd3aabeae5e2c5b535179471e5730742962a76 Nov2019_SP1_release +e0719bdebf32967ca0a0043f556b3f48f93e0ce0 Nov2019_SP1_release diff --git a/MonetDB.spec b/MonetDB.spec --- a/MonetDB.spec +++ b/MonetDB.spec @@ -1061,6 +1061,9 @@ fi %postun -p /sbin/ldconfig %changelog +* Tue Dec 17 2019 Sjoerd Mullender - 11.35.7-20191217 +- Rebuilt. + * Thu Dec 12 2019 Sjoerd Mullender - 11.35.5-20191212 - Rebuilt. - BZ#6723: columns aliases duplicates should not be allowed. automatic diff --git a/debian/changelog b/debian/changelog --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +monetdb (11.35.7) unstable; urgency=low + + * Rebuilt. + + -- Sjoerd Mullender Tue, 17 Dec 2019 10:03:07 +0100 + monetdb (11.35.5) unstable; urgency=low * Rebuilt. diff --git a/libversions b/libversions --- a/libversions +++ b/libversions @@ -42,7 +42,7 @@ GDK_VERSION=19:2:0 MAPI_VERSION=12:2:0 # version of the MONETDB5 library (subdirectory monetdb5, not including extras or sql) -MONETDB5_VERSION=28:2:0 +MONETDB5_VERSION=28:3:0 # version of the STREAM library (subdirectory common/stream) STREAM_VERSION=13:3:0 ___ checkin-list mailing list checkin-list@monetdb.org https://www.monetdb.org/mailman/listinfo/checkin-list
MonetDB: default - Merge with Nov2019 branch, not changing any f...
Changeset: cca37d18e02d for MonetDB URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=cca37d18e02d Modified Files: MonetDB.spec NT/monetdb_config.h.in NT/rules.msc clients/mapilib/mapi.rc clients/odbc/driver/driver.rc clients/odbc/winsetup/setup.rc configure.ag gdk/libbat.rc monetdb5/tools/libmonetdb5.rc vertoo.data Branch: default Log Message: Merge with Nov2019 branch, not changing any files. ___ checkin-list mailing list checkin-list@monetdb.org https://www.monetdb.org/mailman/listinfo/checkin-list
MonetDB: default - Merge with Nov2019 branch.
Changeset: 6de7d2fee8f2 for MonetDB URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=6de7d2fee8f2 Modified Files: NT/mksqlwxs.py monetdb5/NT/M5server.bat sql/test/BugTracker-2012/Tests/now_results_in_illegal_argument.Bug-2978.sql Branch: default Log Message: Merge with Nov2019 branch. diffs (44 lines): diff --git a/NT/mksqlwxs.py b/NT/mksqlwxs.py --- a/NT/mksqlwxs.py +++ b/NT/mksqlwxs.py @@ -157,7 +157,8 @@ def main(): r'lib\libmonetdb5.pdb', r'lib\libstream.pdb']) id = comp(geom, id, 14, - [r'%s\bin\geos_c.dll' % makedefs['LIBGEOS']]) + [r'%s\bin\geos_c.dll' % makedefs['LIBGEOS'], + r'%s\bin\geos.dll' % makedefs['LIBGEOS']]) print(r'') print(r'') id = comp(features, id, 14, [r'etc\.monetdb']) diff --git a/monetdb5/NT/M5server.bat b/monetdb5/NT/M5server.bat --- a/monetdb5/NT/M5server.bat +++ b/monetdb5/NT/M5server.bat @@ -23,12 +23,14 @@ if "%APPDATA%" == "" goto usevar rem if the APPDATA variable does exist, put the database there set MONETDBDIR=%APPDATA%\MonetDB5 set MONETDBFARM="--dbpath=%MONETDBDIR%\dbfarm\demo" +mkdir "%MONETDBDIR%\dbfarm\demo" goto skipusevar :usevar rem if the APPDATA variable does not exist, put the database in the rem installation folder (i.e. default location, so no command line argument) -set MONETDBDIR=%MONETDB%\var\MonetDB5 +set MONETDBDIR=%MONETDB%\var\monetdb5 set MONETDBFARM= +mkdir "%MONETDB%\var\monetdb5\dbfarm" :skipusevar rem the SQL log directory used to be in %MONETDBDIR%, but we now diff --git a/sql/test/BugTracker-2012/Tests/now_results_in_illegal_argument.Bug-2978.sql b/sql/test/BugTracker-2012/Tests/now_results_in_illegal_argument.Bug-2978.sql --- a/sql/test/BugTracker-2012/Tests/now_results_in_illegal_argument.Bug-2978.sql +++ b/sql/test/BugTracker-2012/Tests/now_results_in_illegal_argument.Bug-2978.sql @@ -1,3 +1,5 @@ -select now() + 1 - now(); -select now() + interval '1' second - now(); -select now() - now(); +declare deterministic timestamp; +set deterministic = now(); +select deterministic + 1 - deterministic; +select deterministic + interval '1' second - deterministic; +select deterministic - deterministic; ___ checkin-list mailing list checkin-list@monetdb.org https://www.monetdb.org/mailman/listinfo/checkin-list
MonetDB: default - Merge with Nov2019 branch.
Changeset: 1c8006d041d0 for MonetDB URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=1c8006d041d0 Modified Files: sql/test/BugTracker-2014/Tests/current_timestamp.Bug-3427.sql sql/test/BugTracker-2014/Tests/current_timestamp.Bug-3427.stable.out Branch: default Log Message: Merge with Nov2019 branch. diffs (60 lines): diff --git a/sql/test/BugTracker-2014/Tests/current_timestamp.Bug-3427.sql b/sql/test/BugTracker-2014/Tests/current_timestamp.Bug-3427.sql --- a/sql/test/BugTracker-2014/Tests/current_timestamp.Bug-3427.sql +++ b/sql/test/BugTracker-2014/Tests/current_timestamp.Bug-3427.sql @@ -1,5 +1,8 @@ start transaction; +declare deterministic_insert timestamp; +set deterministic_insert = current_timestamp; + create table x( i integer, t timestamp, @@ -7,10 +10,14 @@ tn timestamp default null, td timestamp default now(), tc timestamp default current_timestamp); -insert into x(i,t) values(0,now()); +insert into x(i,t,td,tc) values(0,deterministic_insert,deterministic_insert,deterministic_insert); select i, tn, td - t, tc - t from x; +insert into x(i,t) values(0,now()); drop table x; +declare other_deterministic_insert time; +set other_deterministic_insert = current_time; + create table x( i integer, t time, @@ -18,8 +25,9 @@ tn time default null, td time default now(), tc time default current_time); +insert into x(i,t,td,tc) values(0,other_deterministic_insert,other_deterministic_insert,other_deterministic_insert); +select i, tn, td - t, tc - t from x; insert into x(i,t) values(0,now()); -select i, tn, td - t, tc - t from x; drop table x; declare t timestamp; diff --git a/sql/test/BugTracker-2014/Tests/current_timestamp.Bug-3427.stable.out b/sql/test/BugTracker-2014/Tests/current_timestamp.Bug-3427.stable.out --- a/sql/test/BugTracker-2014/Tests/current_timestamp.Bug-3427.stable.out +++ b/sql/test/BugTracker-2014/Tests/current_timestamp.Bug-3427.stable.out @@ -68,6 +68,8 @@ stdout of test 'current_timestamp.Bug-34 % int, timestamp, sec_interval, sec_interval # type % 1, 26, 5, 5 # length [ 0, NULL, 0.000, 0.000 ] +#insert into x(i,t) values(0,now()); +[ 1] #drop table x; #create table x( #i integer, @@ -83,6 +85,8 @@ stdout of test 'current_timestamp.Bug-34 % int, time, sec_interval, sec_interval # type % 1, 8, 5, 5 # length [ 0, NULL, 0.000, 0.000 ] +#insert into x(i,t) values(0,now()); +[ 1] #drop table x; #declare t timestamp; #declare tt time; ___ checkin-list mailing list checkin-list@monetdb.org https://www.monetdb.org/mailman/listinfo/checkin-list
MonetDB: default - Merge with Nov2019 branch, not changing any f...
Changeset: 24704d193728 for MonetDB URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=24704d193728 Modified Files: MonetDB.spec NT/monetdb_config.h.in NT/rules.msc clients/mapilib/mapi.rc clients/odbc/driver/driver.rc clients/odbc/winsetup/setup.rc configure.ag gdk/libbat.rc monetdb5/tools/libmonetdb5.rc vertoo.data Branch: default Log Message: Merge with Nov2019 branch, not changing any files.. ___ checkin-list mailing list checkin-list@monetdb.org https://www.monetdb.org/mailman/listinfo/checkin-list
MonetDB: default - Merge with Nov2019 branch.
Changeset: 8b7962acdd4e for MonetDB URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=8b7962acdd4e Modified Files: .hgtags MonetDB.spec debian/changelog libversions Branch: default Log Message: Merge with Nov2019 branch. diffs (99 lines): diff --git a/.hgtags b/.hgtags --- a/.hgtags +++ b/.hgtags @@ -742,3 +742,5 @@ 90486f8f87ff0602f3ab143c629ba0aed2153d64 13efc12c95a279d41dbc4440369defc1d7c21d0f Nov2019_3 90486f8f87ff0602f3ab143c629ba0aed2153d64 Nov2019_release 13efc12c95a279d41dbc4440369defc1d7c21d0f Nov2019_release +fffd3aabeae5e2c5b535179471e5730742962a76 Nov2019_5 +fffd3aabeae5e2c5b535179471e5730742962a76 Nov2019_SP1_release diff --git a/MonetDB.spec b/MonetDB.spec --- a/MonetDB.spec +++ b/MonetDB.spec @@ -114,7 +114,7 @@ Group: Applications/Databases License: MPLv2.0 URL: https://www.monetdb.org/ BugURL: https://bugs.monetdb.org/ -Source: https://www.monetdb.org/downloads/sources/Nov2019/%{name}-%{version}.tar.bz2 +Source: https://www.monetdb.org/downloads/sources/Nov2019-SP1/%{name}-%{version}.tar.bz2 # we need systemd for the _unitdir macro to exist # we need checkpolicy and selinux-policy-devel for the SELinux policy @@ -1061,6 +1061,27 @@ fi %postun -p /sbin/ldconfig %changelog +* Thu Dec 12 2019 Sjoerd Mullender - 11.35.5-20191212 +- Rebuilt. +- BZ#6723: columns aliases duplicates should not be allowed. automatic + aliasing required. +- BZ#6724: Prepare confuses types when more than one argument is used +- BZ#6726: Python aggregation does not create aggr_group when aggregating + over all rows +- BZ#6765: GRANT SELECT privilege on a subset of table columns results + in access denied error when selecting the same columns from the table +- BZ#6790: Count distinct giving wrong results +- BZ#6791: str_to_time('11:40', '%H:%M') creates wrong time value +- BZ#6792: JSON path compiler accepts invalid input +- BZ#6793: cast(interval second value to int or decimal) is wrong (by + a factor of 1000), cast(interval month value to decimal or floating + point) fails +- BZ#6794: external name fits.listdir not bound (sys.listdir) Fatal + error during initialization: +- BZ#6796: Incorrect crash time reported by monetdb tool after crash + of mserver5 +- BZ#6798: json.text off by one error + * Mon Nov 25 2019 Sjoerd Mullender - 11.35.3-20191125 - Rebuilt. - BZ#3533: SQL aggregate functions avg(), sum() and median() return an diff --git a/debian/changelog b/debian/changelog --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,27 @@ +monetdb (11.35.5) unstable; urgency=low + + * Rebuilt. + * BZ#6723: columns aliases duplicates should not be allowed. automatic +aliasing required. + * BZ#6724: Prepare confuses types when more than one argument is used + * BZ#6726: Python aggregation does not create aggr_group when aggregating +over all rows + * BZ#6765: GRANT SELECT privilege on a subset of table columns results +in access denied error when selecting the same columns from the table + * BZ#6790: Count distinct giving wrong results + * BZ#6791: str_to_time('11:40', '%H:%M') creates wrong time value + * BZ#6792: JSON path compiler accepts invalid input + * BZ#6793: cast(interval second value to int or decimal) is wrong (by +a factor of 1000), cast(interval month value to decimal or floating +point) fails + * BZ#6794: external name fits.listdir not bound (sys.listdir) Fatal +error during initialization: + * BZ#6796: Incorrect crash time reported by monetdb tool after crash +of mserver5 + * BZ#6798: json.text off by one error + + -- Sjoerd Mullender Thu, 12 Dec 2019 09:24:08 +0100 + monetdb (11.35.3) unstable; urgency=low * Rebuilt. diff --git a/libversions b/libversions --- a/libversions +++ b/libversions @@ -36,13 +36,13 @@ # version of the GDK library (subdirectory gdk; also includes # common/options and common/utils) -GDK_VERSION=19:1:0 +GDK_VERSION=19:2:0 # version of the MAPI library (subdirectory clients/mapilib) MAPI_VERSION=12:2:0 # version of the MONETDB5 library (subdirectory monetdb5, not including extras or sql) -MONETDB5_VERSION=28:1:0 +MONETDB5_VERSION=28:2:0 # version of the STREAM library (subdirectory common/stream) STREAM_VERSION=13:3:0 ___ checkin-list mailing list checkin-list@monetdb.org https://www.monetdb.org/mailman/listinfo/checkin-list
MonetDB: default - Merge with Nov2019 branch, not changing any f...
Changeset: c4b77f736040 for MonetDB URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=c4b77f736040 Modified Files: MonetDB.spec NT/monetdb_config.h.in NT/rules.msc clients/mapilib/mapi.rc clients/odbc/driver/driver.rc clients/odbc/winsetup/setup.rc configure.ag gdk/libbat.rc monetdb5/tools/libmonetdb5.rc vertoo.data Branch: default Log Message: Merge with Nov2019 branch, not changing any files. ___ checkin-list mailing list checkin-list@monetdb.org https://www.monetdb.org/mailman/listinfo/checkin-list
MonetDB: default - Merge with Nov2019 branch.
Changeset: 8436d13becf4 for MonetDB URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=8436d13becf4 Added Files: sql/test/BugTracker-2019/Tests/json-text-empty-separator.Bug-6798.sql sql/test/BugTracker-2019/Tests/json-text-empty-separator.Bug-6798.stable.err sql/test/BugTracker-2019/Tests/json-text-empty-separator.Bug-6798.stable.out sql/test/mergetables/Tests/transaction-conflict.py Modified Files: common/utils/msabaoth.c monetdb5/modules/atoms/json.c sql/backends/monet5/sql_cat.c sql/include/sql_catalog.h sql/server/sql_partition.c sql/storage/store.c sql/test/BugTracker-2019/Tests/All sql/test/mergetables/Tests/All tools/merovingian/client/monetdb.c Branch: default Log Message: Merge with Nov2019 branch. diffs (truncated from 2360 to 300 lines): diff --git a/common/utils/msabaoth.c b/common/utils/msabaoth.c --- a/common/utils/msabaoth.c +++ b/common/utils/msabaoth.c @@ -848,8 +848,7 @@ msab_getUplogInfo(sabuplog *ret, const s start = stop = up = 0; p = data; while ((c = getc(f)) != EOF) { - *p = (char)c; - switch (*p) { + switch (c) { case '\t': /* start attempt */ ret->startcntr++; @@ -879,7 +878,7 @@ msab_getUplogInfo(sabuplog *ret, const s break; default: /* timestamp */ - p++; + *p++ = c; break; } } diff --git a/monetdb5/modules/atoms/json.c b/monetdb5/modules/atoms/json.c --- a/monetdb5/modules/atoms/json.c +++ b/monetdb5/modules/atoms/json.c @@ -1183,7 +1183,7 @@ JSONjson2textSeparator(str *ret, json *j } JSONplaintext(s, , jt, 0, **sep); l = strlen(s); - if (l) + if (l && **sep) s[l - 1] = 0; *ret = s; JSONfree(jt); diff --git a/sql/backends/monet5/sql_cat.c b/sql/backends/monet5/sql_cat.c --- a/sql/backends/monet5/sql_cat.c +++ b/sql/backends/monet5/sql_cat.c @@ -38,21 +38,21 @@ #include "orderidx.h" #define initcontext() \ -if ((msg = getSQLContext(cntxt, mb, , NULL)) != NULL)\ -return msg;\ -if ((msg = checkSQLContext(cntxt)) != NULL)\ -return msg;\ -if (STORE_READONLY)\ -throw(SQL,"sql.cat",SQLSTATE(25006) "Schema statements cannot be executed on a readonly database."); + if ((msg = getSQLContext(cntxt, mb, , NULL)) != NULL)\ + return msg;\ + if ((msg = checkSQLContext(cntxt)) != NULL)\ + return msg;\ + if (STORE_READONLY)\ + throw(SQL,"sql.cat",SQLSTATE(25006) "Schema statements cannot be executed on a readonly database."); static char * SaveArgReference(MalStkPtr stk, InstrPtr pci, int arg) -{ -char *val = *getArgReference_str(stk, pci, arg); - -if (val && strcmp(val, str_nil) == 0) -val = NULL; -return val; +{ + char *val = *getArgReference_str(stk, pci, arg); + + if (val && strcmp(val, str_nil) == 0) + val = NULL; + return val; } static int @@ -88,14 +88,14 @@ rel_check_tables(sql_table *nt, sql_tabl if (subtype_cmp(>type, >type) != 0) throw(SQL,"sql.rel_check_tables",SQLSTATE(3F000) "ALTER %s: to be added table column type doesn't match %s definition", errtable, errtable); - if(isRangePartitionTable(nt) || isListPartitionTable(nt)) { + if (isRangePartitionTable(nt) || isListPartitionTable(nt)) { if (nc->null != mc->null) throw(SQL,"sql.rel_check_tables",SQLSTATE(3F000) "ALTER %s: to be added table column NULL check doesn't match %s definition", errtable, errtable); if ((!nc->def && mc->def) || (nc->def && !mc->def) || (nc->def && mc->def && strcmp(nc->def, mc->def) != 0)) throw(SQL,"sql.rel_check_tables",SQLSTATE(3F000) "ALTER %s: to be added table column DEFAULT value doesn't match %s definition", errtable, errtable); } } - if(isNonPartitionedTable(nt)) { + if (isNonPartitionedTable(nt)) { if (cs_size(>idxs) != cs_size(>idxs)) throw(SQL,"sql.rel_check_tables",SQLSTATE(3F000) "ALTER %s: to be added table index doesn't match %s definition", errtable, errtable); if (cs_size(>idxs)) @@ -128,8 +128,8 @@ rel_check_tables(sql_table *nt, sql_tabl } } - for(sql_table *up = nt->p ; up ; up = up->p) { - if(!strcmp(up->s->base.name,
MonetDB: default - Merge with Nov2019 branch.
Changeset: 7bbf87248806 for MonetDB URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=7bbf87248806 Modified Files: sql/common/sql_types.c sql/test/BugTracker-2019/Tests/cast-interval.Bug-6793.stable.out Branch: default Log Message: Merge with Nov2019 branch. diffs (33 lines): diff --git a/sql/common/sql_types.c b/sql/common/sql_types.c --- a/sql/common/sql_types.c +++ b/sql/common/sql_types.c @@ -110,7 +110,7 @@ static int convert_matrix[EC_MAX][EC_MAX /* EC_BLOB */ { 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, /* EC_POS */ { 0, 0, 2, 1, 1, 0, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0 }, /* EC_NUM */ { 0, 0, 2, 1, 1, 0, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0 }, -/* EC_MONTH*/ { 0, 0, 0, 1, 1, 0, 1, 1, 1, 0, 0, 0, 0, 1, 0, 0, 0 }, +/* EC_MONTH*/ { 0, 0, 0, 1, 1, 0, 1, 1, 1, 0, 1, 1, 0, 1, 0, 0, 0 }, /* EC_SEC*/ { 0, 0, 0, 1, 1, 0, 1, 1, 0, 1, 1, 1, 1, 0, 1, 0, 0 }, /* EC_DEC */ { 0, 0, 0, 1, 1, 0, 1, 1, 0, 1, 1, 1, 0, 0, 0, 0, 0 }, /* EC_FLT */ { 0, 0, 0, 1, 1, 0, 1, 1, 0, 3, 1, 1, 0, 0, 0, 0, 0 }, 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 --- a/sql/test/BugTracker-2019/Tests/cast-interval.Bug-6793.stable.out +++ b/sql/test/BugTracker-2019/Tests/cast-interval.Bug-6793.stable.out @@ -69,7 +69,7 @@ stdout of test 'cast-interval.Bug-6793` % sys.interval_tbl,sys.L1 # table_name % f1, L1 # name % month_interval, decimal # type -% 1, 5 # length +% 1, 4 # length [ 1, 1 ] [ 2, 2 ] [ 3, 3 ] @@ -88,7 +88,7 @@ stdout of test 'cast-interval.Bug-6793` % L2, L3, L5, L7, L11 # name % bigint, month_interval, int,decimal,real # type % 1, 2, 2, 10, 15 # length -[ 4, 10, 10, 10.000, 10.000 ] +[ 4, 10, 10, 10.000, 10 ] #DROP TABLE INTERVAL_TBL; # 13:25:36 > ___ checkin-list mailing list checkin-list@monetdb.org https://www.monetdb.org/mailman/listinfo/checkin-list
MonetDB: default - Merge with Nov2019 branch.
Changeset: 58f647162da8 for MonetDB URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=58f647162da8 Modified Files: NT/monetdb_config.h.in configure.ag gdk/gdk_batop.c gdk/gdk_posix.c monetdb5/extras/rapi/rapi.c Branch: default Log Message: Merge with Nov2019 branch. diffs (197 lines): diff --git a/NT/monetdb_config.h.in b/NT/monetdb_config.h.in --- a/NT/monetdb_config.h.in +++ b/NT/monetdb_config.h.in @@ -394,9 +394,6 @@ /* Define if semtimedop exists */ /* #undef HAVE_SEMTIMEDOP */ -/* Define to 1 if you have the `setenv' function. */ -/* #undef HAVE_SETENV */ - /* Define to 1 if you have the `setsid' function. */ /* #undef HAVE_SETSID */ diff --git a/configure.ag b/configure.ag --- a/configure.ag +++ b/configure.ag @@ -2427,7 +2427,6 @@ AC_CHECK_FUNCS([\ posix_fallocate \ posix_madvise \ putenv \ - setenv \ setsid \ shutdown \ sigaction \ diff --git a/gdk/gdk_batop.c b/gdk/gdk_batop.c --- a/gdk/gdk_batop.c +++ b/gdk/gdk_batop.c @@ -839,6 +839,10 @@ BATdel(BAT *b, BAT *d) gdk_return BATreplace(BAT *b, BAT *p, BAT *n, bool force) { + lng t0 = 0; + + ALGODEBUG t0 = GDKusec(); + if (b == NULL || b->ttype == TYPE_void || p == NULL || n == NULL) { return GDK_SUCCEED; } @@ -987,6 +991,87 @@ BATreplace(BAT *b, BAT *p, BAT *n, bool #endif } } + } else if (BATtdense(p)) { + oid updid = BUNtoid(p, 0); + + if (updid < b->hseqbase || updid + BATcount(p) > hseqend) { + GDKerror("BATreplace: id out of range\n"); + return GDK_FAIL; + } + updid -= b->hseqbase; + if (!force && updid < b->batInserted) { + GDKerror("BATreplace: updating committed value\n"); + return GDK_FAIL; + } + + /* we copy all of n, so if there are nils in n we get +* nils in b (and else we don't know) */ + b->tnil = n->tnil; + /* we may not copy over all of b, so we only know that +* there are no nils in b afterward if there weren't +* any in either b or n to begin with */ + b->tnonil &= n->tnonil; + if (n->ttype == TYPE_void) { + assert(b->ttype == TYPE_oid); + oid *o = Tloc(b, updid); + if (is_oid_nil(n->tseqbase)) { + /* we may or may not overwrite the old +* min/max values */ + BATrmprop(b, GDK_MAX_VALUE); + BATrmprop(b, GDK_MIN_VALUE); + for (BUN i = 0, j = BATcount(p); i < j; i++) + o[i] = oid_nil; + b->tnil = true; + } else { + oid v = n->tseqbase; + /* we know min/max of n, so we know +* the new min/max of b if those of n +* are smaller/larger than the old */ + if (minprop && v <= minprop->v.val.oval) + BATsetprop(b, GDK_MIN_VALUE, TYPE_oid, ); + else + BATrmprop(b, GDK_MIN_VALUE); + for (BUN i = 0, j = BATcount(p); i < j; i++) + o[i] = v++; + if (maxprop && --v >= maxprop->v.val.oval) + BATsetprop(b, GDK_MAX_VALUE, TYPE_oid, ); + else + BATrmprop(b, GDK_MAX_VALUE); + } + } else { + /* if the extremes of n are at least as +* extreme as those of b, we can replace b's +* min/max, else we don't know what b's new +* min/max are*/ + PROPrec *prop; + if (maxprop != NULL && + (prop = BATgetprop(n, GDK_MAX_VALUE)) != NULL && + atomcmp(VALptr(>v), VALptr(>v)) <= 0) + BATsetprop(b, GDK_MAX_VALUE, b->ttype, VALptr(>v)); + else + BATrmprop(b, GDK_MAX_VALUE); + if (minprop != NULL && + (prop = BATgetprop(n, GDK_MIN_VALUE)) != NULL && + atomcmp(VALptr(>v), VALptr(>v)) >= 0) + BATsetprop(b, GDK_MIN_VALUE, b->ttype, VALptr(>v)); + else + BATrmprop(b,
MonetDB: default - Merge with Nov2019 branch.
Changeset: bc3e06a3a647 for MonetDB URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=bc3e06a3a647 Modified Files: gdk/gdk_batop.c Branch: default Log Message: Merge with Nov2019 branch. diffs (11 lines): diff --git a/gdk/gdk_batop.c b/gdk/gdk_batop.c --- a/gdk/gdk_batop.c +++ b/gdk/gdk_batop.c @@ -865,6 +865,7 @@ BATreplace(BAT *b, BAT *p, BAT *n, bool b->tsorted = b->trevsorted = false; b->tnosorted = b->tnorevsorted = 0; + b->tseqbase = oid_nil; b->tkey = false; b->tnokey[0] = b->tnokey[1] = 0; ___ checkin-list mailing list checkin-list@monetdb.org https://www.monetdb.org/mailman/listinfo/checkin-list
MonetDB: default - Merge with Nov2019 branch.
Changeset: 3c2bf1acbc06 for MonetDB URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=3c2bf1acbc06 Modified Files: gdk/gdk_batop.c sql/storage/bat/bat_storage.c Branch: default Log Message: Merge with Nov2019 branch. diffs (266 lines): diff --git a/gdk/gdk_batop.c b/gdk/gdk_batop.c --- a/gdk/gdk_batop.c +++ b/gdk/gdk_batop.c @@ -839,27 +839,247 @@ BATdel(BAT *b, BAT *d) gdk_return BATreplace(BAT *b, BAT *p, BAT *n, bool force) { - BUN r, s; - BATiter nvi = bat_iterator(n); - oid hseqend; - - if (b == NULL || b->ttype == TYPE_void || - p == NULL || n == NULL || BATcount(n) == 0) { + if (b == NULL || b->ttype == TYPE_void || p == NULL || n == NULL) { + return GDK_SUCCEED; + } + if (BATcount(p) != BATcount(n)) { + GDKerror("BATreplace: update BATs not the same size\n"); + return GDK_FAIL; + } + if (ATOMtype(p->ttype) != TYPE_oid) { + GDKerror("BATreplace: positions BAT not type OID\n"); + return GDK_FAIL; + } + if (BATcount(n) == 0) { return GDK_SUCCEED; } - hseqend = b->hseqbase + BATcount(b); - BATloop(n, r, s) { - oid updid = BUNtoid(p, r); - const void *val = BUNtail(nvi, r); + if (!force && (b->batRestricted != BAT_WRITE || b->batSharecnt > 0)) { + GDKerror("BATreplace: access denied to %s, aborting.\n", +BATgetId(b)); + return GDK_FAIL; + } + + HASHdestroy(b); + OIDXdestroy(b); + IMPSdestroy(b); + + b->tsorted = b->trevsorted = false; + b->tnosorted = b->tnorevsorted = 0; + b->tkey = false; + b->tnokey[0] = b->tnokey[1] = 0; + + const PROPrec *maxprop = BATgetprop(b, GDK_MAX_VALUE); + const PROPrec *minprop = BATgetprop(b, GDK_MIN_VALUE); + int (*atomcmp)(const void *, const void *) = ATOMcompare(b->ttype); + const void *nil = ATOMnilptr(b->ttype); + oid hseqend = b->hseqbase + BATcount(b); + BATiter bi = bat_iterator(b); + BATiter ni = bat_iterator(n); + bool anynil = false; + + b->theap.dirty = true; + if (b->tvarsized) { + b->tvheap->dirty = true; + for (BUN i = 0, j = BATcount(p); i < j; i++) { + oid updid = BUNtoid(p, i); + + if (updid < b->hseqbase || updid >= hseqend) { + GDKerror("BATreplace: id out of range\n"); + return GDK_FAIL; + } + updid -= b->hseqbase; + if (!force && updid < b->batInserted) { + GDKerror("BATreplace: updating committed value\n"); + return GDK_FAIL; + } + + const void *old = BUNtvar(bi, updid); + const void *new = BUNtvar(ni, i); + bool isnil = atomcmp(new, nil) == 0; + anynil |= isnil; + if (b->tnil && + !anynil && + atomcmp(old, nil) == 0) { + /* if old value is nil and no new +* value is, we're not sure anymore +* about the nil property, so we must +* clear it */ + b->tnil = false; + } + b->tnonil &= !isnil; + b->tnil |= isnil; + if (maxprop) { + if (!isnil && + atomcmp(VALptr(>v), new) < 0) { + /* new value is larger than +* previous largest */ + BATsetprop(b, GDK_MAX_VALUE, b->ttype, new); + maxprop = BATgetprop(b, GDK_MAX_VALUE); + } else if (atomcmp(VALptr(>v), old) == 0 && + atomcmp(new, old) != 0) { + /* old value is equal to +* largest and new value is +* smaller, so we don't know +* anymore which is the +* largest */ + BATrmprop(b, GDK_MAX_VALUE); + maxprop = NULL; + } + } + if (minprop) { + if (!isnil && + atomcmp(VALptr(>v), new) > 0) { + /* new value is
MonetDB: default - Merge with Nov2019 branch.
Changeset: afe779b2cab8 for MonetDB URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=afe779b2cab8 Modified Files: debian/monetdb5-server.install monetdb5/modules/mal/Tests/inspect05.malC monetdb5/modules/mal/Tests/inspect05.stable.out monetdb5/modules/mal/Tests/inspect05.stable.out.int128 Branch: default Log Message: Merge with Nov2019 branch. diffs (truncated from 307 to 300 lines): diff --git a/debian/monetdb5-server.install b/debian/monetdb5-server.install --- a/debian/monetdb5-server.install +++ b/debian/monetdb5-server.install @@ -1,16 +1,17 @@ debian/tmp/usr/bin/mserver5 usr/bin debian/tmp/usr/lib/x86_64-linux-gnu/libmonetdb5.so.* usr/lib/x86_64-linux-gnu -# usr/lib/x86_64-linux-gnu/monetdb5/lib_*.so EXCEPT: lib_{bam,geom,gsl,lidar,pyapi,rapi,sql}.so +# usr/lib/x86_64-linux-gnu/monetdb5/lib_*.so EXCEPT: lib_{bam,fits,geom,gsl,lidar,pyapi*,rapi,sql}.so debian/tmp/usr/lib/x86_64-linux-gnu/monetdb5/lib_capi.so usr/lib/x86_64-linux-gnu/monetdb5 debian/tmp/usr/lib/x86_64-linux-gnu/monetdb5/lib_generator.so usr/lib/x86_64-linux-gnu/monetdb5 debian/tmp/usr/lib/x86_64-linux-gnu/monetdb5/lib_opt_sql_append.so usr/lib/x86_64-linux-gnu/monetdb5 debian/tmp/usr/lib/x86_64-linux-gnu/monetdb5/lib_udf.so usr/lib/x86_64-linux-gnu/monetdb5 -# usr/lib/x86_64-linux-gnu/monetdb5/*.mal EXCEPT: {bam,geom,gsl,lidar,pyapi,rapi,sql*,*_hge}.mal -debian/tmp/usr/lib/x86_64-linux-gnu/monetdb5/[!bglprsu]*.mal usr/lib/x86_64-linux-gnu/monetdb5 +# usr/lib/x86_64-linux-gnu/monetdb5/*.mal EXCEPT: {bam,fits,geom,gsl,lidar,pyapi,rapi,sql*,*_hge}.mal +debian/tmp/usr/lib/x86_64-linux-gnu/monetdb5/[!bfglprsu]*.mal usr/lib/x86_64-linux-gnu/monetdb5 debian/tmp/usr/lib/x86_64-linux-gnu/monetdb5/ba[!m]*.mal usr/lib/x86_64-linux-gnu/monetdb5 debian/tmp/usr/lib/x86_64-linux-gnu/monetdb5/b[!a]*.mal usr/lib/x86_64-linux-gnu/monetdb5 +debian/tmp/usr/lib/x86_64-linux-gnu/monetdb5/f[!i]*.mal usr/lib/x86_64-linux-gnu/monetdb5 debian/tmp/usr/lib/x86_64-linux-gnu/monetdb5/generator.mal usr/lib/x86_64-linux-gnu/monetdb5 debian/tmp/usr/lib/x86_64-linux-gnu/monetdb5/g[!es]*.mal usr/lib/x86_64-linux-gnu/monetdb5 debian/tmp/usr/lib/x86_64-linux-gnu/monetdb5/l[!i]*.mal usr/lib/x86_64-linux-gnu/monetdb5 diff --git a/monetdb5/modules/mal/Tests/inspect05.malC b/monetdb5/modules/mal/Tests/inspect05.malC --- a/monetdb5/modules/mal/Tests/inspect05.malC +++ b/monetdb5/modules/mal/Tests/inspect05.malC @@ -1,17 +1,17 @@ #Illustrate the modules loaded after start m:= inspect.getModule(); m0:= algebra.select(m,nil:bat[:oid],"bat", "bat", true,true,false);# limit the list -m1:= algebra.projection(m0,m); k:= inspect.getKind(); -k0:= algebra.projection(m0,k); f:= inspect.getFunction(); +s:= inspect.getSignatures(); +a:= inspect.getAddresses(); + f0:= algebra.projection(m0,f); -s:= inspect.getSignatures(); -s0:= algebra.projection(m0,s); -a:= inspect.getAddresses(); -a0:= algebra.projection(m0,a); - (fv,forder):= algebra.sort(f0,false,false,true); +m1:= algebra.projectionpath(forder,m0,m); +k0:= algebra.projectionpath(forder,m0,k); +s0:= algebra.projectionpath(forder,m0,s); +a0:= algebra.projectionpath(forder,m0,a); + io.print(fv,k0,m1,s0,a0); - diff --git a/monetdb5/modules/mal/Tests/inspect05.stable.out b/monetdb5/modules/mal/Tests/inspect05.stable.out --- a/monetdb5/modules/mal/Tests/inspect05.stable.out +++ b/monetdb5/modules/mal/Tests/inspect05.stable.out @@ -29,46 +29,46 @@ stdout of test 'inspect05` in directory # str str str str str # type #--# [ 0@0, "append", "command", "bat", "(i:bat[:any_1], u:any_1):bat[:any_1] ","BKCappend_val_wrap;" ] -[ 1@0, "append", "command", "bat", "(tt:int, heapfile:str):bat[:any_1] ", "BKCattach;"] -[ 2@0, "append", "command", "bat", "(i:bat[:any_1], u:any_1, force:bit):bat[:any_1] ", "BKCappend_val_force_wrap;" ] -[ 3@0, "append", "command", "bat", "(i:bat[:any_1], u:bat[:any_1], s:bat[:oid], force:bit):bat[:any_1] ", "BKCappend_cand_force_wrap;"] -[ 4@0, "append", "command", "bat", "(i:bat[:any_1], u:bat[:any_1], s:bat[:oid]):bat[:any_1] ", "BKCappend_cand_wrap;" ] -[ 5@0, "append", "command", "bat", "(i:bat[:any_1], u:bat[:any_1], force:bit):bat[:any_1] ", "BKCappend_force_wrap;" ] -[ 6@0, "attach", "command", "bat", "(i:bat[:any_1], u:bat[:any_1]):bat[:any_1] ", "BKCappend_wrap;" ] -[ 7@0, "delete", "command", "bat", "(a:bat[:oid], b:bat[:oid]):bat[:oid] ","BKCdiffcand;" ] -[ 8@0, "delete", "command", "bat", "(sz:lng):bat[:oid] ", "BKCdensebat;" ] -[ 9@0, "delete", "command", "bat", "(b:bat[:any_1]):bat[:any_1] ", "BKCdelete_all;"] -[ 10@0,"densebat", "command", "bat", "(b:bat[:any_1], d:bat[:oid]):bat[:any_1] ","BKCdelete_multi;" ] -[ 11@0,"diffcand", "command",
MonetDB: default - Merge with Nov2019 branch.
Changeset: c4cbe38769c4 for MonetDB URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=c4cbe38769c4 Modified Files: NT/rules.msc buildtools/doc/windowsbuild.rst Branch: default Log Message: Merge with Nov2019 branch. diffs (209 lines): diff --git a/NT/rules.msc b/NT/rules.msc --- a/NT/rules.msc +++ b/NT/rules.msc @@ -139,14 +139,19 @@ bzip2_CFLAGS = -DHAVE_LIBBZ2 "-I$(LIBBZI !IFNDEF LIBXML2 LIBXML2 = C:\libxml2-2.6.30.win$(bits) !ENDIF -libxml2_CFLAGS = -DHAVE_LIBXML "-I$(LIBXML2)\include" $(zlib_CFLAGS) $(ICONV_CFLAGS) +# by default libxml2 include files get installed in ...\include\libxml2\libxml +# but this has sometimes been moved to ...\include\libxml +libxml2_CFLAGS = -DHAVE_LIBXML "-I$(LIBXML2)\include\libxml2" "-I$(LIBXML2)\include" $(zlib_CFLAGS) $(ICONV_CFLAGS) libxml2_LIBS = "$(LIBXML2)\lib\libxml2.lib" $(zlib_LIBS) $(ICONV_LIBS) !ENDIF !IFNDEF LIBGEOS LIBGEOS = C:\geos-3.0.win$(bits) !ENDIF -GEOS_LIBS = $(LIBGEOS)\lib\geos_c_i.lib +!IFNDEF GEOSFILE +GEOSFILE = geos_c +!ENDIF +GEOS_LIBS = $(LIBGEOS)\lib\$(GEOSFILE).lib GEOS_INCS = -I$(LIBGEOS)\include !IFDEF HAVE_LIBR diff --git a/buildtools/doc/windowsbuild.rst b/buildtools/doc/windowsbuild.rst --- a/buildtools/doc/windowsbuild.rst +++ b/buildtools/doc/windowsbuild.rst @@ -243,6 +243,8 @@ PCRE (Perl Compatible Regular Expression The PCRE__ library is used to extend the string matching capabilities of MonetDB. The PCRE library is required for the monetdb5 component. +.. _pcre_cmake: + Download the source from http://www.pcre.org/. In order to build the library, you will need a program called ``cmake`` which you can download from http://www.cmake.org/ or by using Chocolatey_. Follow @@ -255,14 +257,14 @@ Configure button. This pops up a dialog chose Visual Studio 14 2015. You need to configure some PCRE build options. I chose to do build -shared libs, to match newlines with the ``ANYCRLF`` option, and to do -have UTF-8 support and support for Unicode properties. When you're -satisfied with the options, click on Generate. Then in the build -folder you've chosen, open the PCRE.sln file with Visual Studio, and -build and install. Make sure you set the Solution Configuration to -Release if you want to build a releasable version of the MonetDB -suite. By default the library will be installed in ``C:\Program -Files\PCRE``. +shared libs, to match newlines with the ``ANYCRLF`` and +``PCRE_SUPPORT_JIT`` options, and to do have UTF-8 support and support +for Unicode properties. When you're satisfied with the options, click +on Generate. Then in the build folder you've chosen, open the +PCRE.sln file with Visual Studio, and build and install. Make sure +you set the Solution Configuration to Release if you want to build a +releasable version of the MonetDB suite. By default the library will +be installed in ``C:\Program Files\PCRE``. For Windows64, select the correct compiler (``Visual Studio 14 2015 Win64``) and proceed normally. When building the 32 bit version on @@ -304,15 +306,15 @@ required for the clients component when server. Download the source from http://www.openssl.org/. We used the latest -stable version (1.1.0g). Follow the instructions in the file +stable version (1.1.1d). Follow the instructions in the file ``NOTES.WIN``. .. The actual commands used were:: - perl Configure VC-WIN32 no-asm --prefix=C:\Libraries\openssl-1.1.0g.win32 + perl Configure VC-WIN32 no-asm --prefix=C:\Libraries\openssl-1.1.1d.win32 --openssldir=SSL nmake nmake install and:: - perl Configure VC-WIN64A no-asm --prefix=C:\Libraries\openssl-1.1.0g.win64 + perl Configure VC-WIN64A no-asm --prefix=C:\Libraries\openssl-1.1.1d.win64 --openssldir=SSL nmake nmake install @@ -346,7 +348,7 @@ the correct locations for the iconv and nmake /f Makefile.msvc install We needed to edit the file ``win32\Makefile.msvc`` and change -``iconv.lib`` to ``iconv.dll.lib``. +``iconv.lib`` to ``iconv.dll.lib`` and ``zlib.lib`` to ``zdll.lib``. __ http://xmlsoft.org/ @@ -361,39 +363,22 @@ so to get the software, you will have to yourself. Get the source tar ball from http://trac.osgeo.org/geos/#Download and -extract somewhere. You can follow the instructions in e.g. `Building -on Windows with NMake`__. - -We needed to make a few changes to the file ``nmake.opt``. We needed -to add a blurb for the version of ``nmake`` that we were using. Look -at the version number of ``nmake /P`` and adapt the closest match. - -For newer versions of Visual Studio, we also needed to add a line:: - - #include +extract somewhere. -to the files:: - - src\algorithm\LineIntersector.cpp - src\geom\LineSegment.cpp - src\io\WKTWriter.cpp - src\operation\buffer\OffsetCurveSetBuilder.cpp - -.. The actual commands were:: - autogen.bat - nmake /f makefile.vc - -.. On Windows64, add ``WIN64=YES`` to the nmake command line. +We are now using the 3.8.0 version which uses CMake
MonetDB: default - Merge with Nov2019 branch.
Changeset: daf21d970320 for MonetDB URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=daf21d970320 Modified Files: clients/mapiclient/mhelp.c sql/test/emptydb-upgrade-chain-hge/Tests/upgrade.stable.out.int128 sql/test/emptydb-upgrade-chain-hge/Tests/upgrade.stable.out.powerpc64.int128 sql/test/emptydb-upgrade-chain/Tests/upgrade.stable.out sql/test/emptydb-upgrade-chain/Tests/upgrade.stable.out.32bit sql/test/emptydb-upgrade-chain/Tests/upgrade.stable.out.int128 sql/test/emptydb-upgrade-chain/Tests/upgrade.stable.out.powerpc64 sql/test/emptydb-upgrade-chain/Tests/upgrade.stable.out.powerpc64.int128 sql/test/emptydb-upgrade-hge/Tests/upgrade.stable.out.int128 sql/test/emptydb-upgrade/Tests/upgrade.stable.out sql/test/emptydb-upgrade/Tests/upgrade.stable.out.32bit sql/test/emptydb-upgrade/Tests/upgrade.stable.out.int128 sql/test/testdb-upgrade-chain-hge/Tests/upgrade.stable.out.int128 sql/test/testdb-upgrade-chain/Tests/upgrade.stable.out sql/test/testdb-upgrade-chain/Tests/upgrade.stable.out.32bit sql/test/testdb-upgrade-chain/Tests/upgrade.stable.out.int128 sql/test/testdb-upgrade-hge/Tests/upgrade.stable.out.int128 sql/test/testdb-upgrade/Tests/upgrade.stable.out sql/test/testdb-upgrade/Tests/upgrade.stable.out.32bit sql/test/testdb-upgrade/Tests/upgrade.stable.out.int128 Branch: default Log Message: Merge with Nov2019 branch. diffs (truncated from 133619 to 300 lines): diff --git a/clients/mapiclient/mhelp.c b/clients/mapiclient/mhelp.c --- a/clients/mapiclient/mhelp.c +++ b/clients/mapiclient/mhelp.c @@ -72,9 +72,9 @@ SQLhelp sqlhelp1[] = { "See also https://www.monetdb.org/Documentation/SQLreference/Alter"}, {"ALTER SEQUENCE", "", -"ALTER SEQUENCE ident [ AS data_type] [ RESTART [WITH start]] [INCREMENT BY increment]\n" -"[MINVALUE minvalue | NO MINVALUE] [MAXVALUE maxvalue | NO MAXVALUE] [CACHE cachevalue] [[NO] CYCLE]", -"ident,data_type", +"ALTER SEQUENCE qname [ AS int_datatype] [ RESTART [WITH intval]] [INCREMENT BY intval]\n" +"[MINVALUE intval | NO MINVALUE] [MAXVALUE intval | NO MAXVALUE] [CACHE intval] [[NO] CYCLE]", +"int_datatype,intval", "See also https://www.monetdb.org/Documentation/Manuals/SQLreference/SerialTypes"}, {"ALTER USER", "Change a user's login name or password or default schema", @@ -209,9 +209,9 @@ SQLhelp sqlhelp1[] = { "See also https://www.monetdb.org/Documentation/SQLreference/Schema"}, {"CREATE SEQUENCE", "Define a new integer number sequence generator", -"CREATE SEQUENCE ident [ AS data_type] [ START [WITH start]] [INCREMENT BY increment]\n" -"[MINVALUE minvalue | NO MINVALUE] [MAXVALUE maxvalue | NO MAXVALUE] [CACHE cachevalue] [[NO] CYCLE]", -"ident,data_type", +"CREATE SEQUENCE qname [ AS int_datatype] [ START [WITH intval]] [INCREMENT BY intval]\n" +"[MINVALUE intval | NO MINVALUE] [MAXVALUE intval | NO MAXVALUE] [CACHE intval] [[NO] CYCLE]", +"int_datatype,intval", "See also https://www.monetdb.org/Documentation/Manuals/SQLreference/SerialTypes"}, {"CREATE STREAM TABLE", "Temporary table, locked during updates/ continues query processing", @@ -548,8 +548,8 @@ SQLhelp sqlhelp2[] = { NULL}, {"column_def", NULL, -"COLUMN { data_type [ column_option ... ] | SERIAL | BIGSERIAL }", -"data_type,column_option", +"ident { data_type [ column_option ... ] | SERIAL | BIGSERIAL }", +"ident,data_type,column_option", NULL}, {"column_list", NULL, @@ -652,6 +652,11 @@ SQLhelp sqlhelp2[] = { "ident [',' ...]", "ident", NULL}, + {"int_datatype", +NULL, +"BIGINT | INTEGER | INT | SMALLINT | TINYINT", +NULL, +NULL}, {"interval", NULL, "INTERVAL [ '+' | '-' ] string start_field TO end_field", diff --git a/sql/test/emptydb-upgrade-chain-hge/Tests/upgrade.stable.out.int128 b/sql/test/emptydb-upgrade-chain-hge/Tests/upgrade.stable.out.int128 --- a/sql/test/emptydb-upgrade-chain-hge/Tests/upgrade.stable.out.int128 +++ b/sql/test/emptydb-upgrade-chain-hge/Tests/upgrade.stable.out.int128 @@ -18,6044 +18,6 @@ stdout of test 'upgrade` in directory 's # MonetDB/GIS module loaded Running database upgrade commands: set schema "sys"; -delete from sys.dependencies where id < 2000; -delete from sys.types where id < 2000; -insert into sys.types values (0, 'void', 'any', 0, 0, 0, 0, 2000); -insert into sys.types values (1, 'bat', 'table', 0, 0, 0, 1, 2000); -insert into sys.types values (2, 'ptr', 'ptr', 0, 0, 0, 1, 2000); -insert into sys.types values (3, 'bit', 'boolean', 1, 0, 2, 2, 2000); -insert into sys.types values (4, 'str', 'char', 0, 0, 0,
MonetDB: default - Merge with Nov2019 branch.
Changeset: 9d0623ae89aa for MonetDB URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=9d0623ae89aa Modified Files: MonetDB.spec debian/changelog gdk/gdk_utils.c sql/test/BugTracker-2018/Tests/sqlitelogictest-having-not-null-not-in.Bug-6557.sql tools/mserver/mserver5.c Branch: default Log Message: Merge with Nov2019 branch. diffs (80 lines): diff --git a/MonetDB.spec b/MonetDB.spec --- a/MonetDB.spec +++ b/MonetDB.spec @@ -1063,8 +1063,6 @@ fi - Rebuilt. - BZ#3533: SQL aggregate functions avg(), sum() and median() return an error when used on a column with datatype interval second -- BZ#6723: columns aliases duplicates should not be allowed. automatic - aliasing required. * Mon Nov 18 2019 Sjoerd Mullender - 11.35.1-20191118 - Rebuilt. diff --git a/debian/changelog b/debian/changelog --- a/debian/changelog +++ b/debian/changelog @@ -3,8 +3,6 @@ monetdb (11.35.3) unstable; urgency=low * Rebuilt. * BZ#3533: SQL aggregate functions avg(), sum() and median() return an error when used on a column with datatype interval second - * BZ#6723: columns aliases duplicates should not be allowed. automatic -aliasing required. -- Sjoerd Mullender Mon, 25 Nov 2019 12:34:22 +0100 diff --git a/gdk/gdk_utils.c b/gdk/gdk_utils.c --- a/gdk/gdk_utils.c +++ b/gdk/gdk_utils.c @@ -679,6 +679,11 @@ GDKinit(opt *set, int setlen) } /* Mserver by default takes 80% of all memory as a default */ +#if SIZEOF_SIZE_T == 4 + if ((double) MT_npages() * (double) MT_pagesize() * 0.815 >= (double) GDK_VM_MAXSIZE) + GDK_mem_maxsize = GDK_VM_MAXSIZE; + else +#endif GDK_mem_maxsize = (size_t) ((double) MT_npages() * (double) MT_pagesize() * 0.815); if (BBPinit() != GDK_SUCCEED) return GDK_FAIL; diff --git a/sql/test/BugTracker-2018/Tests/sqlitelogictest-having-not-null-not-in.Bug-6557.sql b/sql/test/BugTracker-2018/Tests/sqlitelogictest-having-not-null-not-in.Bug-6557.sql --- a/sql/test/BugTracker-2018/Tests/sqlitelogictest-having-not-null-not-in.Bug-6557.sql +++ b/sql/test/BugTracker-2018/Tests/sqlitelogictest-having-not-null-not-in.Bug-6557.sql @@ -10,4 +10,8 @@ SELECT CAST(SUM(col0) AS BIGINT) FROM ta SELECT CAST(SUM(col0) AS BIGINT) FROM tab0 WHERE + + col0 NOT BETWEEN NULL AND + col2; SELECT DISTINCT COUNT(*) FROM tab0 WHERE NOT col2 NOT BETWEEN ( 35 ) AND ( NULL ); SELECT CAST(- COUNT(*) * - - 61 + + + ( + COUNT(*) ) AS BIGINT) FROM tab0 WHERE NOT col0 + + 10 BETWEEN NULL AND NULL; + +SELECT ALL * FROM tab0 AS cor0 WHERE col2 BETWEEN NULL AND NULL; --empty +SELECT COUNT ( * ) FROM tab0 WHERE NOT col1 NOT BETWEEN NULL AND NULL; --0 +SELECT - 78 * + MAX ( DISTINCT col2 ) + - 52 AS col1 FROM tab0 AS cor0 WHERE NOT - col0 + col2 NOT BETWEEN ( NULL ) AND NULL; --NULL DROP TABLE tab0; diff --git a/tools/mserver/mserver5.c b/tools/mserver/mserver5.c --- a/tools/mserver/mserver5.c +++ b/tools/mserver/mserver5.c @@ -121,7 +121,7 @@ usage(char *prog, int xit) static void monet_hello(void) { - dbl sz_mem_h; + double sz_mem_h; char *qc = " kMGTPE"; int qi = 0; @@ -149,14 +149,14 @@ monet_hello(void) "" #endif ); - sz_mem_h = (dbl) (MT_npages() * MT_pagesize()); + sz_mem_h = (double) MT_npages() * MT_pagesize(); while (sz_mem_h >= 1000.0 && qi < 6) { sz_mem_h /= 1024.0; qi++; } printf("# Found %.3f %ciB available main-memory", sz_mem_h, qc[qi]); - sz_mem_h = (dbl) GDK_mem_maxsize; + sz_mem_h = (double) GDK_mem_maxsize; qi = 0; while (sz_mem_h >= 1000.0 && qi < 6) { sz_mem_h /= 1024.0; ___ checkin-list mailing list checkin-list@monetdb.org https://www.monetdb.org/mailman/listinfo/checkin-list
MonetDB: default - Merge with Nov2019 branch.
Changeset: ccde0a14df0f for MonetDB URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=ccde0a14df0f Modified Files: sql/test/emptydb-upgrade-chain-hge/Tests/upgrade.stable.out.int128 sql/test/emptydb-upgrade-chain-hge/Tests/upgrade.stable.out.powerpc64.int128 sql/test/emptydb-upgrade-chain/Tests/upgrade.stable.out sql/test/emptydb-upgrade-chain/Tests/upgrade.stable.out.32bit sql/test/emptydb-upgrade-chain/Tests/upgrade.stable.out.int128 sql/test/emptydb-upgrade-chain/Tests/upgrade.stable.out.powerpc64 sql/test/emptydb-upgrade-chain/Tests/upgrade.stable.out.powerpc64.int128 sql/test/emptydb-upgrade-hge/Tests/upgrade.stable.out.int128 sql/test/emptydb-upgrade/Tests/upgrade.stable.out sql/test/emptydb-upgrade/Tests/upgrade.stable.out.32bit sql/test/emptydb-upgrade/Tests/upgrade.stable.out.int128 sql/test/testdb-upgrade-chain-hge/Tests/upgrade.stable.out.int128 sql/test/testdb-upgrade-chain/Tests/upgrade.stable.out sql/test/testdb-upgrade-chain/Tests/upgrade.stable.out.32bit sql/test/testdb-upgrade-chain/Tests/upgrade.stable.out.int128 sql/test/testdb-upgrade-hge/Tests/upgrade.stable.out.int128 sql/test/testdb-upgrade/Tests/upgrade.stable.out sql/test/testdb-upgrade/Tests/upgrade.stable.out.32bit sql/test/testdb-upgrade/Tests/upgrade.stable.out.int128 Branch: default Log Message: Merge with Nov2019 branch. diffs (truncated from 86931 to 300 lines): diff --git a/sql/test/emptydb-upgrade-chain-hge/Tests/upgrade.stable.out.powerpc64.int128 b/sql/test/emptydb-upgrade-chain-hge/Tests/upgrade.stable.out.powerpc64.int128 --- a/sql/test/emptydb-upgrade-chain-hge/Tests/upgrade.stable.out.powerpc64.int128 +++ b/sql/test/emptydb-upgrade-chain-hge/Tests/upgrade.stable.out.powerpc64.int128 @@ -240,5639 +240,5647 @@ insert into sys.args values (25336, 80, insert into sys.args values (25337, 80, 'arg_1', 'boolean', 1, 0, 1, 1); insert into sys.args values (25338, 80, 'arg_2', 'boolean', 1, 0, 1, 2); insert into sys.args values (25339, 80, 'arg_3', 'boolean', 1, 0, 1, 3); -insert into sys.functions values (85, 'sql_exists', 'exist', 'aggr', 0, 1, false, false, false, 2000, true); -insert into sys.args values (25340, 85, 'res_0', 'boolean', 1, 0, 0, 0); -insert into sys.args values (25341, 85, 'arg_1', 'any', 0, 0, 1, 1); -insert into sys.functions values (86, 'sql_not_exists', 'not_exist', 'aggr', 0, 1, false, false, false, 2000, true); -insert into sys.args values (25342, 86, 'res_0', 'boolean', 1, 0, 0, 0); -insert into sys.args values (25343, 86, 'arg_1', 'any', 0, 0, 1, 1); -insert into sys.functions values (87, 'in', 'in', 'calc', 0, 1, false, false, false, 2000, true); -insert into sys.args values (25344, 87, 'res_0', 'boolean', 1, 0, 0, 0); -insert into sys.args values (25345, 87, 'arg_1', 'any', 0, 0, 1, 1); -insert into sys.args values (25346, 87, 'arg_2', 'any', 0, 0, 1, 2); -insert into sys.functions values (88, 'identity', 'identity', 'calc', 0, 1, false, false, false, 2000, true); -insert into sys.args values (25347, 88, 'res_0', 'oid', 63, 0, 0, 0); -insert into sys.args values (25348, 88, 'arg_1', 'any', 0, 0, 1, 1); -insert into sys.functions values (89, 'rowid', 'identity', 'calc', 0, 1, false, false, false, 2000, true); -insert into sys.args values (25349, 89, 'res_0', 'int', 32, 0, 0, 0); -insert into sys.args values (25350, 89, 'arg_1', 'any', 0, 0, 1, 1); -insert into sys.functions values (90, 'rowid', 'rowid', 'calc', 0, 1, false, false, false, 2000, true); -insert into sys.args values (25351, 90, 'res_0', 'oid', 63, 0, 0, 0); -insert into sys.args values (25352, 90, 'arg_1', 'any', 0, 0, 1, 1); -insert into sys.args values (25353, 90, 'arg_2', 'varchar', 0, 0, 1, 2); -insert into sys.args values (25354, 90, 'arg_3', 'varchar', 0, 0, 1, 3); -insert into sys.functions values (93, 'sql_min', 'min', 'calc', 0, 1, false, false, false, 2000, true); -insert into sys.args values (25355, 93, 'res_0', 'any', 0, 0, 0, 0); -insert into sys.args values (25356, 93, 'arg_1', 'any', 0, 0, 1, 1); -insert into sys.args values (25357, 93, 'arg_2', 'any', 0, 0, 1, 2); -insert into sys.functions values (94, 'sql_max', 'max', 'calc', 0, 1, false, false, false, 2000, true); -insert into sys.args values (25358, 94, 'res_0', 'any', 0, 0, 0, 0); -insert into sys.args values (25359, 94, 'arg_1', 'any', 0, 0, 1, 1); -insert into sys.args values (25360, 94, 'arg_2', 'any', 0, 0, 1, 2); -insert into sys.functions values (95, 'least', 'min_no_nil', 'calc', 0, 1, false, false, false, 2000, true); +insert into sys.functions values (83, 'sql_anyequal', 'anyequal', 'aggr', 0, 1, false, false, false, 2000, true); +insert into sys.args values (25340, 83, 'res_0', 'boolean', 1, 0, 0, 0); +insert into sys.args values (25341, 83, 'arg_1', 'any', 0, 0, 1, 1); +insert into sys.args values (25342, 83, 'arg_2', 'any', 0, 0, 1, 2); +insert into sys.functions values
MonetDB: default - Merge with Nov2019 branch, not changing any f...
Changeset: 612c2df01aa9 for MonetDB URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=612c2df01aa9 Modified Files: MonetDB.spec NT/monetdb_config.h.in NT/rules.msc clients/mapilib/mapi.rc clients/odbc/driver/driver.rc clients/odbc/winsetup/setup.rc configure.ag gdk/libbat.rc monetdb5/tools/libmonetdb5.rc vertoo.data Branch: default Log Message: Merge with Nov2019 branch, not changing any files.. ___ checkin-list mailing list checkin-list@monetdb.org https://www.monetdb.org/mailman/listinfo/checkin-list
MonetDB: default - Merge with Nov2019 branch.
Changeset: ffc8249cfae2 for MonetDB URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=ffc8249cfae2 Modified Files: .hgtags MonetDB.spec debian/changelog libversions Branch: default Log Message: Merge with Nov2019 branch. diffs (63 lines): diff --git a/.hgtags b/.hgtags --- a/.hgtags +++ b/.hgtags @@ -739,3 +739,6 @@ 6566d90185b83ed95129db9ea68baf52f2de5cc7 d4c1a8c3cbcd965169f1836eaa635101436db81c Nov2019_root 90486f8f87ff0602f3ab143c629ba0aed2153d64 Nov2019_1 90486f8f87ff0602f3ab143c629ba0aed2153d64 Nov2019_release +13efc12c95a279d41dbc4440369defc1d7c21d0f Nov2019_3 +90486f8f87ff0602f3ab143c629ba0aed2153d64 Nov2019_release +13efc12c95a279d41dbc4440369defc1d7c21d0f Nov2019_release diff --git a/MonetDB.spec b/MonetDB.spec --- a/MonetDB.spec +++ b/MonetDB.spec @@ -1059,6 +1059,13 @@ fi %postun -p /sbin/ldconfig %changelog +* Mon Nov 25 2019 Sjoerd Mullender - 11.35.3-20191125 +- Rebuilt. +- BZ#3533: SQL aggregate functions avg(), sum() and median() return an + error when used on a column with datatype interval second +- BZ#6723: columns aliases duplicates should not be allowed. automatic + aliasing required. + * Mon Nov 18 2019 Sjoerd Mullender - 11.35.1-20191118 - Rebuilt. - BZ#6134: Query produces error: HEAPalloc: Insufficient space for HEAP diff --git a/debian/changelog b/debian/changelog --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,13 @@ +monetdb (11.35.3) unstable; urgency=low + + * Rebuilt. + * BZ#3533: SQL aggregate functions avg(), sum() and median() return an +error when used on a column with datatype interval second + * BZ#6723: columns aliases duplicates should not be allowed. automatic +aliasing required. + + -- Sjoerd Mullender Mon, 25 Nov 2019 12:34:22 +0100 + monetdb (11.35.1) unstable; urgency=low * Rebuilt. diff --git a/libversions b/libversions --- a/libversions +++ b/libversions @@ -36,13 +36,13 @@ # version of the GDK library (subdirectory gdk; also includes # common/options and common/utils) -GDK_VERSION=19:0:0 +GDK_VERSION=19:1:0 # version of the MAPI library (subdirectory clients/mapilib) MAPI_VERSION=12:2:0 # version of the MONETDB5 library (subdirectory monetdb5, not including extras or sql) -MONETDB5_VERSION=28:0:0 +MONETDB5_VERSION=28:1:0 # version of the STREAM library (subdirectory common/stream) STREAM_VERSION=13:3:0 ___ checkin-list mailing list checkin-list@monetdb.org https://www.monetdb.org/mailman/listinfo/checkin-list
MonetDB: default - Merge with Nov2019 branch, not changing any f...
Changeset: a1bc8e97ef3a for MonetDB URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=a1bc8e97ef3a Modified Files: MonetDB.spec NT/monetdb_config.h.in NT/rules.msc clients/mapilib/mapi.rc clients/odbc/driver/driver.rc clients/odbc/winsetup/setup.rc configure.ag gdk/libbat.rc monetdb5/tools/libmonetdb5.rc vertoo.data Branch: default Log Message: Merge with Nov2019 branch, not changing any files. ___ checkin-list mailing list checkin-list@monetdb.org https://www.monetdb.org/mailman/listinfo/checkin-list
MonetDB: default - Merge with Nov2019 branch.
Changeset: eb22fdb14289 for MonetDB URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=eb22fdb14289 Modified Files: gdk/gdk_utils.c tools/merovingian/daemon/client.c Branch: default Log Message: Merge with Nov2019 branch. diffs (56 lines): diff --git a/gdk/gdk_utils.c b/gdk/gdk_utils.c --- a/gdk/gdk_utils.c +++ b/gdk/gdk_utils.c @@ -2056,6 +2056,7 @@ GDKmmap(const char *path, int mode, size void *ret; if (GDKvm_cursize() + len >= GDK_vm_maxsize) { + GDKmemfail("GDKmmap", len); GDKerror("allocating too much virtual address space\n"); return NULL; } @@ -2089,6 +2090,7 @@ GDKmremap(const char *path, int mode, vo if (*new_size > old_size && GDKvm_cursize() + *new_size - old_size >= GDK_vm_maxsize) { + GDKmemfail("GDKmmap", *new_size); GDKerror("allocating too much virtual address space\n"); return NULL; } diff --git a/tools/merovingian/daemon/client.c b/tools/merovingian/daemon/client.c --- a/tools/merovingian/daemon/client.c +++ b/tools/merovingian/daemon/client.c @@ -50,6 +50,7 @@ struct clientdata { int sock; bool isusock; struct threads *self; + char challenge[32]; }; static void * @@ -80,6 +81,7 @@ handleClient(void *data) sock = ((struct clientdata *) data)->sock; isusock = ((struct clientdata *) data)->isusock; self = ((struct clientdata *) data)->self; + memcpy(chal, ((struct clientdata *) data)->challenge, sizeof(chal)); free(data); fdin = socket_rstream(sock, "merovingian<-client (read)"); if (fdin == 0) { @@ -112,8 +114,6 @@ handleClient(void *data) } /* note: since Jan2012 we speak proto 9 for control connections */ - chal[31] = '\0'; - generateSalt(chal, 31); mnstr_printf(fout, "%s:merovingian:9:%s:%s:%s:", chal, mcrypt_getHashAlgorithms(), @@ -624,6 +624,8 @@ acceptConnections(int sock, int usock) data->isusock = isusock; p->dead = 0; data->self = p; + data->challenge[31] = '\0'; + generateSalt(data->challenge, 31); if (pthread_create(>tid, NULL, handleClient, data) == 0) { p->next = threads; threads = p; ___ checkin-list mailing list checkin-list@monetdb.org https://www.monetdb.org/mailman/listinfo/checkin-list
MonetDB: default - Merge with Nov2019 branch.
Changeset: 10083c4cf7c0 for MonetDB URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=10083c4cf7c0 Added Files: 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/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 Modified Files: buildtools/selinux/monetdb.te sql/backends/monet5/rel_bin.c sql/backends/monet5/sql_statement.c sql/jdbc/tests/Tests/All sql/server/rel_optimizer.c sql/test/BugTracker-2019/Tests/All Branch: default Log Message: Merge with Nov2019 branch. diffs (truncated from 441 to 300 lines): diff --git a/buildtools/selinux/monetdb.te b/buildtools/selinux/monetdb.te --- a/buildtools/selinux/monetdb.te +++ b/buildtools/selinux/monetdb.te @@ -1,4 +1,4 @@ -policy_module(monetdb, 0.6) +policy_module(monetdb, 0.7) # The above line declares that this file is a SELinux policy file. Its # name is monetdb, so the file should be saved as monetdb.te @@ -8,8 +8,10 @@ require { type tmp_t; type var_t; type user_home_t; + type user_home_dir_t; type unconfined_service_t; # for EPEL 7 type proc_t;# for EPEL 7 + type cgroup_t; class dir { read }; class fd { use }; class fifo_file { getattr read write }; @@ -125,6 +127,7 @@ allow mserver5_t self:unix_stream_socket allow mserver5_t self:netlink_selinux_socket create_socket_perms; manage_dirs_pattern(mserver5_t, tmp_t, tmp_t) manage_sock_files_pattern(mserver5_t, tmp_t, tmp_t) +allow mserver5_t tmp_t:file create; manage_sock_files_pattern(mserver5_t, mserver5_db_t, mserver5_db_t) allow mserver5_t monetdbd_t:fifo_file { read write getattr }; allow mserver5_t monetdbd_t:unix_stream_socket { read write getopt shutdown }; @@ -132,10 +135,13 @@ allow mserver5_t var_t:dir { read }; # we want to be able to read some cgroup files fs_search_cgroup_dirs(mserver5_t); fs_read_cgroup_files(mserver5_t); +allow mserver5_t cgroup_t:dir search; +allow mserver5_t self:process execmem; allow monetdbd_t var_t:dir { read }; gen_tunable(mserver5_can_read_home, false) tunable_policy(`mserver5_can_read_home', ` userdom_search_user_home_dirs(mserver5_t) allow mserver5_t user_home_t:file read_file_perms; +allow mserver5_t user_home_dir_t:dir search; ') allow monetdbd_t mserver5_t:unix_stream_socket { connectto }; diff --git a/sql/backends/monet5/rel_bin.c b/sql/backends/monet5/rel_bin.c --- a/sql/backends/monet5/rel_bin.c +++ b/sql/backends/monet5/rel_bin.c @@ -1973,7 +1973,7 @@ rel2bin_join(backend *be, sql_rel *rel, /* only handle simple joins here */ if ((exp_has_func(e) && get_cmp(e) != cmp_filter) || - get_cmp(e) == cmp_or || e->f) { + get_cmp(e) == cmp_or || (e->f && e->anti)) { if (!join && !list_length(lje)) { stmt *l = bin_first_column(be, left); stmt *r = bin_first_column(be, right); @@ -2248,65 +2248,6 @@ rel2bin_semijoin(backend *be, sql_rel *r * first cheap join(s) (equality or idx) * second selects/filters */ - -#if 0 - if (rel->exps && rel->op == op_anti && need_no_nil(rel)) { - sql_subtype *lng = sql_bind_localtype("lng"); - stmt *nilcnt = NULL; - - for( en = rel->exps->h; en; en = en->next ) { - sql_exp *e = en->data, *r, *l; - stmt *s; - - if (e->type != e_cmp || e->flag != cmp_equal) - break; - l = e->l; - r = e->r; - - /* for each equality join add a rel_select(r is NULL) */ - s = exp_bin(be, r, right, NULL, NULL, NULL, NULL, NULL); - if (!s) { - s = exp_bin(be, l, right, NULL, NULL, NULL, NULL, NULL); - if(!s) - return NULL; - } - if (s && !exp_is_atom(r)) { - sql_subaggr *cnt = sql_bind_aggr(sql->sa, sql->session->schema, "count", NULL); - sql_subfunc *add = sql_bind_func_result(sql->sa, sql->session->schema, "sql_add", lng, lng, lng); - - s = stmt_selectnil(be, s); -
MonetDB: default - Merge with Nov2019 branch.
Changeset: a08187b00dfc for MonetDB URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=a08187b00dfc Modified Files: clients/NT/mclient.bat clients/NT/msqldump.bat clients/NT/stethoscope.bat clients/odbc/driver/README gdk/gdk_bbp.c gdk/gdk_heap.c gdk/gdk_utils.c monetdb5/NT/M5server.bat monetdb5/mal/mal.c monetdb5/mal/mal.h monetdb5/optimizer/opt_mitosis.c tools/mserver/mserver5.c Branch: default Log Message: Merge with Nov2019 branch. diffs (254 lines): diff --git a/clients/NT/mclient.bat b/clients/NT/mclient.bat --- a/clients/NT/mclient.bat +++ b/clients/NT/mclient.bat @@ -12,8 +12,7 @@ rem remove the final backslash from the set MONETDB=%MONETDB:~0,-1% rem extend the search path with our EXE and DLL folders -rem we depend on pthreadVCE.dll having been copied to the lib folder -set PATH=%MONETDB%\bin;%MONETDB%\lib;%MONETDB%\lib\bin;%PATH% +set PATH=%MONETDB%\bin;%MONETDB%\lib\monetdb5;%PATH% if not "%1"=="/STARTED-FROM-MENU" goto skip shift diff --git a/clients/NT/msqldump.bat b/clients/NT/msqldump.bat --- a/clients/NT/msqldump.bat +++ b/clients/NT/msqldump.bat @@ -11,8 +11,7 @@ @set MONETDB=%MONETDB:~0,-1% @rem extend the search path with our EXE and DLL folders -@rem we depend on pthreadVCE.dll having been copied to the lib folder -@set PATH=%MONETDB%\bin;%MONETDB%\lib;%MONETDB%\lib\bin;%PATH% +@set PATH=%MONETDB%\bin;%MONETDB%\lib\monetdb5;%PATH% @rem start the real client @"%MONETDB%\bin\msqldump.exe" %* diff --git a/clients/NT/stethoscope.bat b/clients/NT/stethoscope.bat --- a/clients/NT/stethoscope.bat +++ b/clients/NT/stethoscope.bat @@ -12,8 +12,7 @@ rem remove the final backslash from the set MONETDB=%MONETDB:~0,-1% rem extend the search path with our EXE and DLL folders -rem we depend on pthreadVCE.dll having been copied to the lib folder -set PATH=%MONETDB%\bin;%MONETDB%\lib;%MONETDB%\lib\bin;%PATH% +set PATH=%MONETDB%\bin;%MONETDB%\lib\monetdb5;%PATH% rem start the real client "%MONETDB%\bin\stethoscope.exe" %1 %2 %3 %4 %5 %6 %7 %8 diff --git a/clients/odbc/driver/README b/clients/odbc/driver/README --- a/clients/odbc/driver/README +++ b/clients/odbc/driver/README @@ -25,7 +25,7 @@ ODBC is chosen to be implemented first b ourselves to get this functionality now. Update 2016: the JDBC-ODBC bridge driver is no longer needed nor supported in JRE. We provide a 100% pure (type 4) JDBC driver implementation for MonetDB. -See: https://www.monetdb.org/downloads/Java/Latest/ +See: https://www.monetdb.org/downloads/Java/ Tip: === @@ -33,7 +33,6 @@ To do ODBC driver development/maintenanc specification to learn what the ODBC API functions and behavior has to be. This specification is available as MS Windows help file (ODBC.HLP and ODBC.CNT). It is part of the MS ODBC SDK which has become part of the MS MDAC SDK. -For convenience it is also available in /ufs/dinther/ODBC/ For compilation you need the ODBC API include header files: sqltypes.h /* ODBC type defines */ @@ -51,7 +50,7 @@ All ODBC driver implementation files are Every ODBC API function which needs to be implemented by the driver has its own file with the same name as the function and suffix ".c". The ODBC API functions all start with SQL, so its easy to locate them. -There are 73 SQL*.c files and thus 73 ODBC API functions implemented. +There are 76 SQL*.c files and thus 76 ODBC API functions implemented. The ODBC API function prototypes and defines are defined in sqltypes.h, sql.h, sqlext.h and sqlucode.h so there are NO SQL*.h files. @@ -61,7 +60,7 @@ the sql*.h files and other standard exte Every SQL*.c must include this ODBCGlobal.h file as first include. Besides the SQL*.c files there are the ODBC*.[ch] files. -The files ODBCEnv.[ch] ODBCDbc.[ch], ODBCStmt.[ch], ODBCHostVar.[ch] +The files ODBCEnv.[ch] ODBCDbc.[ch], ODBCStmt.[ch], ODBCDesc.[ch] and ODBCError.[ch] implement the structures needed to represent the handles (pointers to an object) and the internal state of the ODBC objects. In the implementation section below it is explained why these are necessary. @@ -100,7 +99,7 @@ In ODBC multiple environments (each appl multiple input parameters per statement, multiple output columns per result set. The management and validity of these handles is all implemented in -the ODBCEnv.[ch], ODBCDbc.{ch], ODBCStmt.[ch] and ODBCHostVar.[ch] files. +the ODBCEnv.[ch], ODBCDbc.[ch], ODBCStmt.[ch] and ODBCDesc.[ch] files. Error handling in ODBC is done in a special way which is explained here. Every ODBC API function returns a code (integer) which can be: @@ -126,7 +125,7 @@ specific handle (e.g. addDbcError()), to Implementation of the ODBC API functions: -Although 73 SQL*() functions are implemented, some do not
MonetDB: default - Merge with Nov2019 branch, not changing any f...
Changeset: d11738886ae7 for MonetDB URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=d11738886ae7 Modified Files: MonetDB.spec NT/monetdb_config.h.in NT/rules.msc clients/mapilib/mapi.rc clients/odbc/driver/driver.rc clients/odbc/winsetup/setup.rc configure.ag gdk/libbat.rc monetdb5/tools/libmonetdb5.rc vertoo.data Branch: default Log Message: Merge with Nov2019 branch, not changing any files.. ___ checkin-list mailing list checkin-list@monetdb.org https://www.monetdb.org/mailman/listinfo/checkin-list
MonetDB: default - Merge with Nov2019 branch.
Changeset: 454270f0b844 for MonetDB URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=454270f0b844 Added Files: debian/libmonetdb19.install 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 MonetDB.spec debian/changelog debian/control gdk/ChangeLog-Archive gdk/ChangeLog.Nov2019 libversions monetdb5/ChangeLog-Archive monetdb5/ChangeLog.Nov2019 sql/ChangeLog-Archive sql/ChangeLog.Nov2019 tools/merovingian/ChangeLog-Archive tools/merovingian/ChangeLog.Nov2019 Branch: default Log Message: Merge with Nov2019 branch. diffs (truncated from 763 to 300 lines): diff --git a/.hgtags b/.hgtags --- a/.hgtags +++ b/.hgtags @@ -737,3 +737,5 @@ 6566d90185b83ed95129db9ea68baf52f2de5cc7 a6674f7048a13fe7dc53995a4f723d33a34bce23 Apr2019_SP1_release 6566d90185b83ed95129db9ea68baf52f2de5cc7 Apr2019_SP1_release d4c1a8c3cbcd965169f1836eaa635101436db81c Nov2019_root +90486f8f87ff0602f3ab143c629ba0aed2153d64 Nov2019_1 +90486f8f87ff0602f3ab143c629ba0aed2153d64 Nov2019_release diff --git a/ChangeLog.Apr2019 b/ChangeLog.Apr2019 deleted file mode 100644 --- a/ChangeLog.Apr2019 +++ /dev/null @@ -1,2 +0,0 @@ -# ChangeLog file for devel -# This file is updated with Maddlog diff --git a/MonetDB.spec b/MonetDB.spec --- a/MonetDB.spec +++ b/MonetDB.spec @@ -114,7 +114,7 @@ Group: Applications/Databases License: MPLv2.0 URL: https://www.monetdb.org/ BugURL: https://bugs.monetdb.org/ -Source: https://www.monetdb.org/downloads/sources/Apr2019-SP1/%{name}-%{version}.tar.bz2 +Source: https://www.monetdb.org/downloads/sources/Nov2019/%{name}-%{version}.tar.bz2 # we need systemd for the _unitdir macro to exist # we need checkpolicy and selinux-policy-devel for the SELinux policy @@ -1059,6 +1059,146 @@ fi %postun -p /sbin/ldconfig %changelog +* Mon Nov 18 2019 Sjoerd Mullender - 11.35.1-20191118 +- Rebuilt. +- BZ#6134: Query produces error: HEAPalloc: Insufficient space for HEAP + of 1168033427456 bytes. +- BZ#6613: LATERAL crash /.../rel_bin.c:1473: rel2bin_table: Assertion + `0' failed. +- BZ#6683: Bug in subselect +- BZ#6686: Bug in subselect (count function) +- BZ#6688: Bug in subselect (or condition) +- BZ#6689: Trying to improve the performance of SQL queries with a large + list of members in IN clause. +- BZ#6695: timestamp transformation +- BZ#6700: Monetdb Bugs in Subselect statements: +- BZ#6722: window functions issues +- BZ#6740: while upgrading the database from verison (MonetDB-11.27.13) + to (MonetDB-11.33.3) we are unable to bring up the database +- BZ#6754: in mclient a strang msg is reported after issueing command: + set schema sys; +- BZ#6755: Assertion failure in rel_bin.c +- BZ#6756: Error in optimizer garbageCollector on merge tables select +- BZ#6757: Double free or corruption (out) +- BZ#6758: SIGSEGV in __strcmp_sse2_unaligned() +- BZ#6759: Python JSON loader creates invalid data type for strings +- BZ#6761: Error: Program contains errors.:(NONE).multiplex +- BZ#6762: mserver5 crashes on (re-)start +- BZ#6764: mserver5 crashes with corruption, double free, invalid size + or invalid pointer +- BZ#6766: Missing bulk implementation for get_value and next_value calls +- BZ#6769: ProfilerStart is not threadsafe +- BZ#6771: R-devel +- BZ#6773: json.filter returns corrupted string when selecting JSON + null value +- BZ#6774: PROD aggregation gives wrong result +- BZ#6775: NOT IN with an AND containing an OR gives wrong result +- BZ#6776: Creating a table with a full outer join query gives type with + wrong digits on the joined key. +- BZ#6779: Using Windows Messages translation for errno error codes. +- BZ#6780: Wrong value of the rank function +- BZ#6781: Insert after index creation crash +- BZ#6782: JDBC IsValid(int) does not reset lastquerytimeout on server +- BZ#6783: AVG changes scale of its results +- BZ#6784: function sys.isauuid(string) should return false if string + value cannot be converted to a UUID + +* Mon Nov 4 2019 Pedro Ferreira - 11.35.1-20191118 +- sql: Removed functions json.text(string) returns string and json.text(int) + returns string. Their MAL implementation didn't exist, so they were + meaningless. + +* Thu Oct 17 2019 Pedro Ferreira - 11.35.1-20191118 +- merovingian: Added "vmmaxsize" and "memmaxsize" mserver5 options to the daemon in + order to set mserver5's maximum virtual and committed memory + respectively. + +* Wed Sep 25 2019 Sjoerd Mullender - 11.35.1-20191118 +- sql: Strings are now limited
MonetDB: default - Merge with Nov2019 branch, not changing any f...
Changeset: 0012b9d1f229 for MonetDB URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=0012b9d1f229 Modified Files: MonetDB.spec NT/monetdb_config.h.in NT/rules.msc clients/mapilib/mapi.rc clients/odbc/driver/driver.rc clients/odbc/winsetup/setup.rc configure.ag gdk/libbat.rc monetdb5/tools/libmonetdb5.rc vertoo.data Branch: default Log Message: Merge with Nov2019 branch, not changing any files. ___ checkin-list mailing list checkin-list@monetdb.org https://www.monetdb.org/mailman/listinfo/checkin-list
MonetDB: default - Merge with Nov2019 branch.
Changeset: 37de9e829161 for MonetDB URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=37de9e829161 Modified Files: sql/test/BugTracker-2019/Tests/All sql/test/emptydb-upgrade-chain-hge/Tests/upgrade.stable.out.int128 sql/test/emptydb-upgrade-chain-hge/Tests/upgrade.stable.out.powerpc64.int128 sql/test/emptydb-upgrade-chain/Tests/upgrade.stable.out sql/test/emptydb-upgrade-chain/Tests/upgrade.stable.out.32bit sql/test/emptydb-upgrade-chain/Tests/upgrade.stable.out.int128 sql/test/emptydb-upgrade-chain/Tests/upgrade.stable.out.powerpc64 sql/test/emptydb-upgrade-chain/Tests/upgrade.stable.out.powerpc64.int128 sql/test/emptydb-upgrade-hge/Tests/upgrade.stable.out.int128 sql/test/emptydb-upgrade/Tests/upgrade.stable.out sql/test/emptydb-upgrade/Tests/upgrade.stable.out.32bit sql/test/emptydb-upgrade/Tests/upgrade.stable.out.int128 sql/test/mergetables/Tests/All sql/test/subquery/Tests/All sql/test/testdb-upgrade-chain-hge/Tests/upgrade.stable.out.int128 sql/test/testdb-upgrade-chain/Tests/upgrade.stable.out sql/test/testdb-upgrade-chain/Tests/upgrade.stable.out.32bit sql/test/testdb-upgrade-chain/Tests/upgrade.stable.out.int128 sql/test/testdb-upgrade-hge/Tests/upgrade.stable.out.int128 sql/test/testdb-upgrade/Tests/upgrade.stable.out sql/test/testdb-upgrade/Tests/upgrade.stable.out.32bit sql/test/testdb-upgrade/Tests/upgrade.stable.out.int128 Branch: default Log Message: Merge with Nov2019 branch. diffs (truncated from 1118 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 @@ -18,8 +18,8 @@ merge-statement-aliases.Bug-6715 insert-into-select.Bug-6718 copy-into-unicode-quote.Bug-6716 select_window_function_and_asterisk.Bug-6722 -disallow_duplicate_column_aliases.Bug-6723 -prepare-types.Bug-6724 +KNOWNFAIL?disallow_duplicate_column_aliases.Bug-6723 +KNOWNFAIL?prepare-types.Bug-6724 prepare-non-existing-function.Bug-6725 select-distinct.Bug-6728 table-duplicate-column.Bug-6729 @@ -30,13 +30,13 @@ sequence-first-next-value.Bug-6743 sequences-defaults.Bug-6744 sequences-types.Bug-6745 alter_table_drop_column.Bug-6749 -HAVE_PYMONETDB?remote-table-non-existent-column.Bug-6750 +KNOWNFAIL_PYMONETDB?remote-table-non-existent-column.Bug-6750 cte-union.Bug-6755 merge-table-limit.Bug-6756 double-free.Bug-6757 HAVE_LIBPY3?python-loader-string.Bug-6759 select-char.Bug-6761 -grant-select-column.Bug-6765 +KNOWNFAIL?grant-select-column.Bug-6765 next-get-value-bulk.Bug-6766 filter_json_null.Bug-6773 prod-decimals.Bug-6774 diff --git a/sql/test/emptydb-upgrade-chain-hge/Tests/upgrade.stable.out.int128 b/sql/test/emptydb-upgrade-chain-hge/Tests/upgrade.stable.out.int128 --- a/sql/test/emptydb-upgrade-chain-hge/Tests/upgrade.stable.out.int128 +++ b/sql/test/emptydb-upgrade-chain-hge/Tests/upgrade.stable.out.int128 @@ -5881,7 +5881,7 @@ drop procedure sys.times(); set schema "sys"; Running database upgrade commands: -insert into sys.dependencies select c1, c2, c3 from (values(11839,11848,7),(11843,11852,7),(11597,12088,7),(11590,12088,7),(11593,12088,7),(11594,12088,7),(11595,12088,7),(11596,12088,7),(11656,12100,7),(12088,12100,7),(12092,12100,7),(25153,25155,13),(25141,25155,13),(25142,25155,13),(25143,25155,13),(25144,25155,13),(25145,25155,13),(25146,25155,13),(25147,25155,13),(25148,25155,13),(25149,25155,13),(25150,25155,13),(25151,25155,13),(25152,25155,13),(25056,25155,13),(25039,25155,13),(25040,25155,13),(25041,25155,13),(25042,25155,13),(25043,25155,13),(25044,25155,13),(25045,25155,13),(25046,25155,13),(25047,25155,13),(25048,25155,13),(25049,25155,13),(25050,25155,13),(25051,25155,13),(25052,25155,13),(25053,25155,13),(25054,25155,13),(25055,25155,13),(2079,25155,13),(2080,25155,13),(2081,25155,13),(2082,25155,13),(2083,25155,13),(2084,25155,13),(2085,25155,13),(2102,25155,13),(2103,25155,13),(2104,25155,13),(2105,25155,13),(20651,25155,13),(20652,25155,13),(20653,25155,13),(20654,2
MonetDB: default - Merge with Nov2019 branch.
Changeset: 19bd77490b9a for MonetDB URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=19bd77490b9a Modified Files: common/utils/msabaoth.c common/utils/msabaoth.h gdk/gdk_utils.c monetdb5/mal/mal_session.c sql/backends/monet5/rel_bin.c sql/server/rel_exp.c sql/server/rel_optimizer.c tools/merovingian/client/monetdb.c tools/merovingian/daemon/client.c tools/merovingian/daemon/controlrunner.c tools/merovingian/daemon/discoveryrunner.c tools/merovingian/daemon/forkmserver.c tools/merovingian/daemon/forkmserver.h tools/merovingian/utils/database.c Branch: default Log Message: Merge with Nov2019 branch. diffs (truncated from 599 to 300 lines): diff --git a/common/utils/msabaoth.c b/common/utils/msabaoth.c --- a/common/utils/msabaoth.c +++ b/common/utils/msabaoth.c @@ -671,11 +671,7 @@ msab_getSingleStatus(const char *pathbuf } } snprintf(buf, sizeof(buf), "%s/%s/%s", pathbuf, dbname, MAINTENANCEFILE); - if (stat(buf, ) == -1) { - sdb->locked = 0; - } else { - sdb->locked = 1; - } + sdb->locked = stat(buf, ) != -1; /* add scenarios that are supported */ sdb->scens = NULL; diff --git a/common/utils/msabaoth.h b/common/utils/msabaoth.h --- a/common/utils/msabaoth.h +++ b/common/utils/msabaoth.h @@ -27,7 +27,7 @@ typedef enum { typedef struct Ssabdb { char *dbname;/* database name */ char *path; /* path to this database */ - int locked; /* whether this database is under maintenance */ + bool locked; /* whether this database is under maintenance */ SABdbState state;/* current database state */ sablist* scens; /* scenarios available for this database */ sablist* conns; /* connections available for this database */ diff --git a/gdk/gdk_utils.c b/gdk/gdk_utils.c --- a/gdk/gdk_utils.c +++ b/gdk/gdk_utils.c @@ -408,53 +408,110 @@ MT_init(void) fc = fopen("/proc/self/cgroup", "r"); if (fc != NULL) { char buf[1024]; + /* each line is of the form: +* hierarchy-ID:controller-list:cgroup-path +* +* For cgroup v1, the hierarchy-ID refers to the +* second column in /proc/cgroups (which we ignore) +* and the controller-list is a comma-separated list +* of the controllers bound to the hierarchy. We look +* for the "memory" controller and use its +* cgroup-path. We ignore the other lines. +* +* For cgroup v2, the hierarchy-ID is 0 and the +* controller-list is empty. We just use the +* cgroup-path. +* +* We use the first line that we can match (either v1 +* or v2) and for which we can open any of the files +* that we are looking for. +*/ while (fgets(buf, (int) sizeof(buf), fc) != NULL) { + char pth[1024]; char *p, *q; - p = strchr(buf, ':'); - if (p == NULL) - break; - q = p + 1; - p = strchr(q, ':'); + bool success = false; /* true if we can open any file */ + FILE *f; + uint64_t mem; + size_t l; + + p = strchr(buf, '\n'); if (p == NULL) break; - *p++ = 0; - if (strstr(q, "memory") != NULL) { - char pth[1024]; - FILE *f; - size_t l; - q = strchr(p, '\n'); - if (q == NULL) + *p = 0; + if (strncmp(buf, "0::", 3) == 0) { + /* cgroup v2 entry */ + l = strconcat_len(pth, sizeof(pth), + "/sys/fs/cgroup", + buf + 3, "/", NULL); + /* hard limit */ + strcpy(pth + l, "memory.max"); + f = fopen(pth, "r"); + if (f != NULL) { + if (fscanf(f, "%" SCNu64, ) == 1 && mem < (uint64_t) _MT_pagesize * _MT_npages) { + _MT_npages = (size_t) (mem / _MT_pagesize); + } + success =
MonetDB: default - Merge with Nov2019 branch.
Changeset: 913055453096 for MonetDB URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=913055453096 Modified Files: sql/backends/monet5/rel_bin.c sql/server/rel_optimizer.c sql/server/rel_unnest.c sql/test/BugTracker-2017/Tests/complicated_logic.Bug-105.stable.out Branch: default Log Message: Merge with Nov2019 branch. diffs (136 lines): diff --git a/sql/backends/monet5/rel_bin.c b/sql/backends/monet5/rel_bin.c --- a/sql/backends/monet5/rel_bin.c +++ b/sql/backends/monet5/rel_bin.c @@ -2231,7 +2231,7 @@ rel2bin_semijoin(backend *be, sql_rel *r * first cheap join(s) (equality or idx) * second selects/filters */ - + #if 0 if (rel->exps && rel->op == op_anti && need_no_nil(rel)) { sql_subtype *lng = sql_bind_localtype("lng"); 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 @@ -5268,7 +5268,7 @@ rel_find_joins(mvc *sql, sql_rel *parent case op_full: case op_semi: case op_anti: { - found_join *fl = MNEW(found_join); + found_join *fl = SA_NEW(sql->sa, found_join); fl->p = parent; fl->j = rel; list_append(l, fl); @@ -5308,43 +5308,41 @@ rel_find_joins(mvc *sql, sql_rel *parent static sql_rel * rel_merge_identical_joins(int *changes, mvc *sql, sql_rel *rel) { - if (is_joinop(rel->op)) { + if (is_joinop(rel->op) && rel->l && rel->r) { list *l1 = sa_list(sql->sa), *l2 = sa_list(sql->sa); - if (rel->l && rel->r) { - rel_find_joins(sql, rel, rel->l, l1); - rel_find_joins(sql, rel, rel->r, l2); - - if (list_length(l1) && list_length(l2)) { /* found joins on both */ - for (node *n1 = l1->h ; n1; n1 = n1->next) { - found_join *f1 = (found_join*) n1->data; - for (node *n2 = l2->h ; n2; n2 = n2->next) { - found_join *f2 = (found_join*) n2->data; - sql_rel *j1 = f1->j, *j2 = f2->j, *j1_l = j1->l, *j1_r = j1->r, *j2_l = j2->l, *j2_r = j2->r; - bool sides_equal = false; - - if (j1 != j2) { - const char *j1_ln = rel_name(j1_l), *j1_rn = rel_name(j1_r), *j2_ln = rel_name(j2_l), *j2_rn = rel_name(j2_r); - - /* So far it looks on identical relations and common basetable relations */ - if ((j1_l == j2_l || (is_basetable(j1_l->op) && is_basetable(j2_l->op) && strcmp(j1_ln, j2_ln) == 0 && j1_l->l == j2_l->l)) && - (j1_r == j2_r || (is_basetable(j1_r->op) && is_basetable(j2_r->op) && strcmp(j1_rn, j2_rn) == 0 && j1_r->l == j2_r->l))) - sides_equal = true; - else if ((j1_l == j2_r || (is_basetable(j1_l->op) && is_basetable(j2_r->op) && strcmp(j1_ln, j2_rn) == 0 && j1_l->l == j2_r->l)) && - (j1_r == j2_l || (is_basetable(j1_r->op) && is_basetable(j2_l->op) && strcmp(j1_rn, j2_ln) == 0 && j1_r->l == j2_l->l))) - sides_equal = true; - - /* the left and right sides are equal */ - if (sides_equal && exp_match_list(j1->exps, j2->exps)) { - sql_rel *p2 = f2->p; - - if (p2->l == j2) /* replace j2's parent join with j1 */ - p2->l = rel_dup(j1); - else - p2->r = rel_dup(j1); - (*changes)++; - return rel; - } + rel_find_joins(sql, rel, rel->l, l1); + rel_find_joins(sql, rel, rel->r, l2); + + if (list_length(l1) && list_length(l2)) { /* found joins on both */ + for (node *n1 = l1->h ; n1; n1 = n1->next) { + found_join
MonetDB: default - Merge with Nov2019 branch.
Changeset: c2f23b27baf7 for MonetDB URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=c2f23b27baf7 Modified Files: gdk/gdk_bat.c gdk/gdk_calc.c Branch: default Log Message: Merge with Nov2019 branch. diffs (23 lines): diff --git a/gdk/gdk_bat.c b/gdk/gdk_bat.c --- a/gdk/gdk_bat.c +++ b/gdk/gdk_bat.c @@ -682,7 +682,7 @@ COLcopy(BAT *b, int tt, bool writable, r if (tt != bn->ttype) { bn->ttype = tt; bn->tvarsized = ATOMvarsized(tt); - bn->tseqbase = b->tseqbase; + bn->tseqbase = ATOMtype(tt) == TYPE_oid ? b->tseqbase : oid_nil; } } else { /* check whether we need case (4); BUN-by-BUN copy (by diff --git a/gdk/gdk_calc.c b/gdk/gdk_calc.c --- a/gdk/gdk_calc.c +++ b/gdk/gdk_calc.c @@ -14219,6 +14219,7 @@ BATconvert(BAT *b, BAT *s, int tp, bool if (cnt == ncand && tp != TYPE_bit && ATOMbasetype(b->ttype) == ATOMbasetype(tp) && + (tp != TYPE_oid || b->ttype == TYPE_oid) && (tp != TYPE_str || BATatoms[b->ttype].atomToStr == BATatoms[TYPE_str].atomToStr)) { return COLcopy(b, tp, false, TRANSIENT); ___ checkin-list mailing list checkin-list@monetdb.org https://www.monetdb.org/mailman/listinfo/checkin-list
MonetDB: default - Merge with Nov2019 branch.
Changeset: 043642d1d5ba for MonetDB URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=043642d1d5ba Added Files: sql/jdbc/tests/Tests/Bug_IsValid_Timeout_Bug_6782.SQL.bat sql/jdbc/tests/Tests/Bug_IsValid_Timeout_Bug_6782.SQL.sh sql/jdbc/tests/Tests/Bug_IsValid_Timeout_Bug_6782.stable.err sql/jdbc/tests/Tests/Bug_IsValid_Timeout_Bug_6782.stable.out Modified Files: clients/mapiclient/tomograph.c gdk/gdk.h monetdb5/mal/mal_profiler.c monetdb5/modules/mal/clients.c sql/backends/monet5/UDF/pyapi/pyapi.c sql/jdbc/tests/Tests/All sql/test/BugTracker-2019/Tests/double-free.Bug-6757.sql sql/test/emptydb-upgrade-chain-hge/Tests/upgrade.stable.out.int128 sql/test/emptydb-upgrade-chain-hge/Tests/upgrade.stable.out.powerpc64.int128 sql/test/emptydb-upgrade-chain/Tests/upgrade.stable.out sql/test/emptydb-upgrade-chain/Tests/upgrade.stable.out.32bit sql/test/emptydb-upgrade-chain/Tests/upgrade.stable.out.int128 sql/test/emptydb-upgrade-chain/Tests/upgrade.stable.out.powerpc64 sql/test/emptydb-upgrade-chain/Tests/upgrade.stable.out.powerpc64.int128 sql/test/emptydb-upgrade-hge/Tests/upgrade.stable.out.int128 sql/test/emptydb-upgrade/Tests/upgrade.stable.out sql/test/emptydb-upgrade/Tests/upgrade.stable.out.32bit sql/test/emptydb-upgrade/Tests/upgrade.stable.out.int128 sql/test/testdb-upgrade-chain-hge/Tests/upgrade.stable.out.int128 sql/test/testdb-upgrade-chain/Tests/upgrade.stable.out sql/test/testdb-upgrade-chain/Tests/upgrade.stable.out.32bit sql/test/testdb-upgrade-chain/Tests/upgrade.stable.out.int128 sql/test/testdb-upgrade-hge/Tests/upgrade.stable.out.int128 sql/test/testdb-upgrade/Tests/upgrade.stable.out sql/test/testdb-upgrade/Tests/upgrade.stable.out.32bit sql/test/testdb-upgrade/Tests/upgrade.stable.out.int128 tools/merovingian/daemon/controlrunner.c tools/merovingian/utils/control.c Branch: default Log Message: Merge with Nov2019 branch. diffs (truncated from 706 to 300 lines): diff --git a/clients/mapiclient/tomograph.c b/clients/mapiclient/tomograph.c --- a/clients/mapiclient/tomograph.c +++ b/clients/mapiclient/tomograph.c @@ -1688,7 +1688,7 @@ main(int argc, char **argv) break; if( *optarg == '=') optarg++; - cnt = sscanf(optarg,"%"PRId64"-%"PRId64, ,); + cnt = sscanf(optarg,"%"SCNd64"-%"SCNd64, ,); if( cnt != 2) usageTomograph(); diff --git a/gdk/gdk.h b/gdk/gdk.h --- a/gdk/gdk.h +++ b/gdk/gdk.h @@ -509,6 +509,8 @@ typedef char *str; #define LL_CONSTANT(val) INT64_C(val) #define LLFMT "%" PRId64 #define ULLFMT "%" PRIu64 +#define LLSCN "%" SCNd64 +#define ULLSCN "%" SCNu64 typedef oid var_t; /* type used for heap index of var-sized BAT */ #define SIZEOF_VAR_T SIZEOF_OID diff --git a/monetdb5/mal/mal_profiler.c b/monetdb5/mal/mal_profiler.c --- a/monetdb5/mal/mal_profiler.c +++ b/monetdb5/mal/mal_profiler.c @@ -445,7 +445,7 @@ getCPULoad(char cpuload[BUFSIZ]){ break; while( *s && isspace((unsigned char)*s)) s++; - i= sscanf(s,LLFMT" "LLFMT" "LLFMT" "LLFMT" "LLFMT, , , , , ); + i= sscanf(s,LLSCN" "LLSCN" "LLSCN" "LLSCN" "LLSCN, , , , , ); if ( i != 5 ) goto skip; newload = (user - corestat[cpu].user + nice - corestat[cpu].nice + system - corestat[cpu].system); diff --git a/monetdb5/modules/mal/clients.c b/monetdb5/modules/mal/clients.c --- a/monetdb5/modules/mal/clients.c +++ b/monetdb5/modules/mal/clients.c @@ -481,6 +481,9 @@ CLTsetPrintTimeout(void *ret, int *secs) str CLTmd5sum(str *ret, str *pw) { #ifdef HAVE_MD5_UPDATE char *mret = mcrypt_MD5Sum(*pw, strlen(*pw)); + + if (!mret) + throw(MAL, "clients.md5sum", SQLSTATE(HY001) MAL_MALLOC_FAIL); *ret = GDKstrdup(mret); free(mret); if(*ret == NULL) @@ -496,6 +499,9 @@ str CLTmd5sum(str *ret, str *pw) { str CLTsha1sum(str *ret, str *pw) { #ifdef HAVE_SHA1_UPDATE char *mret = mcrypt_SHA1Sum(*pw, strlen(*pw)); + + if (!mret) + throw(MAL, "clients.sha1sum", SQLSTATE(HY001) MAL_MALLOC_FAIL); *ret = GDKstrdup(mret); free(mret); if(*ret == NULL) @@ -511,6 +517,9 @@ str CLTsha1sum(str *ret, str *pw) { str CLTripemd160sum(str *ret, str *pw) { #ifdef HAVE_RIPEMD160_UPDATE char *mret = mcrypt_RIPEMD160Sum(*pw, strlen(*pw)); + + if (!mret) + throw(MAL,
MonetDB: default - Merge with Nov2019 branch.
Changeset: 3890859a2c56 for MonetDB URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=3890859a2c56 Modified Files: NT/Makefile gdk/gdk_select.c monetdb5/modules/mal/clients.c Branch: default Log Message: Merge with Nov2019 branch. diffs (178 lines): diff --git a/NT/Makefile b/NT/Makefile --- a/NT/Makefile +++ b/NT/Makefile @@ -25,6 +25,8 @@ all: _all install: targetdirs all $(MAKE) /nologo /f "$(srcdir)\Makefile.msc" "prefix=$(prefix)" "bits=$(bits)" install $(INSTALL) .monetdb "$(sysconfdir)" + +makewxs: $(PYTHON) $(NT)\mksqlwxs.py $(VERSION) "$(MAKE_INCLUDEFILE)" "$(prefix)" > "$(prefix)\MonetDB5-SQL-Installer.wxs" $(PYTHON) $(NT)\mkodbcwxs.py $(VERSION) "$(MAKE_INCLUDEFILE)" "$(prefix)" > "$(prefix)\MonetDB-ODBC-Installer.wxs" diff --git a/gdk/gdk_select.c b/gdk/gdk_select.c --- a/gdk/gdk_select.c +++ b/gdk/gdk_select.c @@ -971,7 +971,8 @@ ilog2(BUN x) * v1 v2 truefalse truex < v1 or x >= v2 * v1 v2 false truetruex <= v1 or x > v2 * v1 v2 truetruetruex < v1 or x > v2 - * v2 v1 ignored ignored ignored NOTHING + * v2 v1 ignored ignored false NOTHING + * v2 v1 ignored ignored truex != nil */ BAT * BATselect(BAT *b, BAT *s, const void *tl, const void *th, diff --git a/monetdb5/modules/mal/clients.c b/monetdb5/modules/mal/clients.c --- a/monetdb5/modules/mal/clients.c +++ b/monetdb5/modules/mal/clients.c @@ -87,42 +87,39 @@ CLTsetScenario(Client cntxt, MalBlkPtr m return msg; } -static char * -local_itoa(int i) +static char* +CLTtimeConvert(time_t l, char *s, size_t len) { - static char buf[32]; - - sprintf(buf, "%d", i); - return buf; -} + char *converted = NULL; + struct tm localt; -static void -CLTtimeConvert(time_t l, char *s){ - struct tm localt; - + (void) len; #ifdef HAVE_LOCALTIME_R - (void) localtime_r(, ); + (void) localtime_r(, ); #else - /* race condition: return value could be -* overwritten in parallel thread before -* assignment complete */ - localt = *localtime(); + /* race condition: return value could be +* overwritten in parallel thread before +* assignment complete */ + localt = *localtime(); #endif #ifdef HAVE_ASCTIME_R3 - asctime_r(, s, 26); + converted = asctime_r(, s, 26); #else #ifdef HAVE_ASCTIME_R - asctime_r(, s); + converted = asctime_r(, s); #else - /* race condition: return value could be -* overwritten in parallel thread before copy -* complete, however on Windows, asctime is -* thread-safe */ - strncpy(s, asctime(), 26); + /* race condition: return value could be +* overwritten in parallel thread before copy +* complete, however on Windows, asctime is +* thread-safe */ + converted = asctime(); + if (!converted || strlen(converted) > (len - 1)) + return NULL; + strcpy(s, converted); #endif #endif - s[24] = 0; + return converted; } str @@ -132,7 +129,7 @@ CLTInfo(Client cntxt, MalBlkPtr mb, MalS bat *ret2= getArgReference_bat(stk,pci,0); BAT *b = COLnew(0, TYPE_str, 12, TRANSIENT); BAT *bn = COLnew(0, TYPE_str, 12, TRANSIENT); - char s[26]; + char buf[32]; /* 32 bytes are enough */ (void) mb; if (b == 0 || bn == 0){ @@ -141,29 +138,36 @@ CLTInfo(Client cntxt, MalBlkPtr mb, MalS throw(MAL, "clients.info", SQLSTATE(HY001) MAL_MALLOC_FAIL); } + (void) sprintf(buf, ""LLFMT"", (lng) cntxt->user); if (BUNappend(b, "user", false) != GDK_SUCCEED || - BUNappend(bn, local_itoa((int)cntxt->user), false) != GDK_SUCCEED || - - BUNappend(b, "scenario", false) != GDK_SUCCEED || - BUNappend(bn, cntxt->scenario, false) != GDK_SUCCEED || + BUNappend(bn, buf, false) != GDK_SUCCEED) + goto bailout; - BUNappend(b, "listing", false) != GDK_SUCCEED || - BUNappend(bn, local_itoa(cntxt->listing), false) != GDK_SUCCEED || - - BUNappend(b, "debug", false) != GDK_SUCCEED || - BUNappend(bn, local_itoa(cntxt->debug), false) != GDK_SUCCEED) + if (BUNappend(b, "scenario", false) != GDK_SUCCEED || + BUNappend(bn, cntxt->scenario, false) != GDK_SUCCEED) goto bailout; - CLTtimeConvert(cntxt->login, s); + (void) sprintf(buf, "%d", cntxt->listing); + if (BUNappend(b, "listing", false) != GDK_SUCCEED || + BUNappend(bn, buf, false) !=
MonetDB: default - Merge with Nov2019 branch.
Changeset: b4f69dc5dca5 for MonetDB URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=b4f69dc5dca5 Modified Files: configure.ag monetdb5/modules/mal/pcre.c sql/backends/monet5/wlr.c sql/server/rel_exp.h sql/server/rel_optimizer.c sql/server/rel_rel.c sql/server/rel_rel.h sql/server/rel_select.c sql/server/sql_mvc.c sql/server/sql_mvc.h sql/test/emptydb/Tests/check.stable.out sql/test/emptydb/Tests/check.stable.out.32bit sql/test/emptydb/Tests/check.stable.out.int128 sql/test/subquery/Tests/subquery3.sql Branch: default Log Message: Merge with Nov2019 branch. diffs (truncated from 598 to 300 lines): diff --git a/configure.ag b/configure.ag --- a/configure.ag +++ b/configure.ag @@ -1666,12 +1666,22 @@ AS_VAR_IF([enable_rintegration], [no], [ enable_rintegration=no why_not_rintegration="(libR library not found)"])], [AS_IF([RHOME=`$RCMD RHOME` && libr_CFLAGS=`$RCMD CMD config --cppflags` && libr_LIBS=`$RCMD CMD config --ldflags | sed -e 's|-fopenmp |-fopenmp=libgomp |'`], - [have_libr=yes -AC_DEFINE([HAVE_LIBR], 1, [Define if you have libR installed]) -AC_SUBST([libr_CFLAGS], [$libr_CFLAGS]) -AC_SUBST([libr_LIBS], [$libr_LIBS]) -AC_SUBST([RHOME], [$RHOME]) -AC_DEFINE_UNQUOTED([RHOME], ["$RHOME"], [The home of R])])])]) + [save_CPPFLAGS="$CPPFLAGS" +CPPFLAGS="$CPPFLAGS $libr_CFLAGS" +AC_CHECK_HEADER([Rembedded.h], + [have_libr=yes +AC_DEFINE([HAVE_LIBR], 1, [Define if you have libR installed]) +AC_SUBST([libr_CFLAGS], [$libr_CFLAGS]) +AC_SUBST([libr_LIBS], [$libr_LIBS]) +AC_SUBST([RHOME], [$RHOME]) +AC_DEFINE_UNQUOTED([RHOME], ["$RHOME"], [The home of R])], + [AS_VAR_IF([enable_rintegration], [yes], + [AC_MSG_ERROR([libR library required for R integration support])], + [have_libr=no +why_not_libr="(Rembedded.h not found)" +enable_rintegration=no +why_not_rintegration="(Rembedded.h not found)"])]) +CPPFLAGS="$save_CPPFLAGS"])])]) AM_CONDITIONAL([HAVE_LIBR], [test x"$have_libr" != xno]) # Python API (Python UDFs) diff --git a/monetdb5/modules/mal/pcre.c b/monetdb5/modules/mal/pcre.c --- a/monetdb5/modules/mal/pcre.c +++ b/monetdb5/modules/mal/pcre.c @@ -32,7 +32,9 @@ #ifndef PCRE_STUDY_JIT_COMPILE /* old library version on e.g. EPEL 6 */ #define pcre_free_study(x) pcre_free(x) +#define PCRE_STUDY_JIT_COMPILE 0 #endif +#define JIT_COMPILE_MIN1024/* when to try JIT compilation of patterns */ #else @@ -221,17 +223,6 @@ utf8stoucs(const char *src) return dest; } -static uint32_t * -myucschr(const uint32_t *ucs, uint32_t uc) -{ - while (*ucs) { - if (*ucs == uc) - return (uint32_t *) ucs; - ucs++; - } - return NULL; -} - static size_t myucslen(const uint32_t *ucs) { @@ -364,32 +355,43 @@ mywstrcasestr(const char *restrict hayst return NULL; } -static int -re_simple(const char *pat) +/* returns true if the pattern does not contain unescaped `_' (single + * character match) and ends with unescaped `%' (any sequence + * match) */ +static bool +re_simple(const char *pat, unsigned char esc) { - int nr = 0; + bool escaped = false; + bool percatend = false; if (pat == 0) return 0; - if (*pat == '%') + if (*pat == '%') { + percatend = true; pat++; + } while (*pat) { - if (*pat == '_') + percatend = false; + if (escaped) { + escaped = false; + } else if ((unsigned char) *pat == esc) { + escaped = true; + } else if (*pat == '_') { return 0; - if (*pat++ == '%') - nr++; + } else if (*pat == '%') { + percatend = true; + } + pat++; } - if (*(pat-1) != '%') - return 0; - return nr; + return percatend; } static bool -is_strcmpable(const char *pat, const str esc) +is_strcmpable(const char *pat, const char *esc) { if (pat[strcspn(pat, "%_")]) return false; -
MonetDB: default - Merge with Nov2019 branch.
Changeset: 57e878e3a9e7 for MonetDB URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=57e878e3a9e7 Modified Files: monetdb5/mal/mal.h monetdb5/mal/mal_profiler.c monetdb5/mal/mal_runtime.c monetdb5/mal/mal_runtime.h monetdb5/modules/mal/clients.c monetdb5/modules/mal/sysmon.c sql/backends/monet5/sql_upgrades.c sql/test/BugTracker-2016/Tests/set-negative-querytimeout.Bug-6070.stable.err sql/test/BugTracker-2016/Tests/set-negative-querytimeout.Bug-6070.stable.out sql/test/emptydb-upgrade-chain-hge/Tests/upgrade.stable.out.int128 sql/test/emptydb-upgrade-chain-hge/Tests/upgrade.stable.out.powerpc64.int128 sql/test/emptydb-upgrade-chain/Tests/upgrade.stable.out sql/test/emptydb-upgrade-chain/Tests/upgrade.stable.out.32bit sql/test/emptydb-upgrade-chain/Tests/upgrade.stable.out.int128 sql/test/emptydb-upgrade-chain/Tests/upgrade.stable.out.powerpc64 sql/test/emptydb-upgrade-chain/Tests/upgrade.stable.out.powerpc64.int128 sql/test/emptydb-upgrade-hge/Tests/upgrade.stable.out.int128 sql/test/emptydb-upgrade/Tests/upgrade.stable.out sql/test/emptydb-upgrade/Tests/upgrade.stable.out.32bit sql/test/emptydb-upgrade/Tests/upgrade.stable.out.int128 sql/test/testdb-upgrade-chain-hge/Tests/upgrade.stable.out.int128 sql/test/testdb-upgrade-chain/Tests/upgrade.stable.out sql/test/testdb-upgrade-chain/Tests/upgrade.stable.out.32bit sql/test/testdb-upgrade-chain/Tests/upgrade.stable.out.int128 sql/test/testdb-upgrade-hge/Tests/upgrade.stable.out.int128 sql/test/testdb-upgrade/Tests/upgrade.stable.out sql/test/testdb-upgrade/Tests/upgrade.stable.out.32bit sql/test/testdb-upgrade/Tests/upgrade.stable.out.int128 Branch: default Log Message: Merge with Nov2019 branch. diffs (truncated from 1758 to 300 lines): diff --git a/monetdb5/mal/mal.h b/monetdb5/mal/mal.h --- a/monetdb5/mal/mal.h +++ b/monetdb5/mal/mal.h @@ -175,7 +175,7 @@ typedef struct { typedef struct MALBLK { char binding[IDLENGTH]; /* related C-function */ str help; /* supportive commentary */ - lng tag;/* unique block tag */ + oid tag;/* unique block tag */ struct MALBLK *alternative; int vtop; /* next free slot */ int vsize; /* size of variable arena */ @@ -229,7 +229,7 @@ typedef struct MALSTK { char cmd; /* debugger and runtime communication */ char status;/* srunning 'R' suspended 'S', quiting 'Q' */ int pcup; /* saved pc upon a recursive all */ - lng tag;/* unique invocation call tag */ + oid tag;/* unique invocation call tag */ struct MALSTK *up; /* stack trace list */ struct MALBLK *blk; /* associated definition */ ValRecord stk[FLEXIBLE_ARRAY_MEMBER]; diff --git a/monetdb5/mal/mal_profiler.c b/monetdb5/mal/mal_profiler.c --- a/monetdb5/mal/mal_profiler.c +++ b/monetdb5/mal/mal_profiler.c @@ -165,14 +165,14 @@ renderProfilerEvent(MalBlkPtr mb, MalStk logadd("\"function\":\"%s.%s\",%s", getModuleId(getInstrPtr(mb, 0)), getFunctionId(getInstrPtr(mb, 0)), prettify); logadd("\"pc\":%d,%s", mb?getPC(mb,pci):0, prettify); - logadd("\"tag\":"LLFMT",%s", stk?stk->tag:0, prettify); + logadd("\"tag\":"OIDFMT",%s", stk?stk->tag:0, prettify); logadd("\"module\":\"%s\",%s", pci->modname ? pci->modname : "", prettify); if (pci->modname && strcmp(pci->modname, "user") == 0) { - lng caller_tag = 0; + oid caller_tag = 0; if(stk && stk->up) { caller_tag = stk->up->tag; } - logadd("\"caller\":"LLFMT",%s", caller_tag, prettify); + logadd("\"caller\":"OIDFMT",%s", caller_tag, prettify); } logadd("\"instruction\":\"%s\",%s", pci->fcnname ? pci->fcnname : "", prettify); if (!GDKinmemory()) { @@ -906,9 +906,9 @@ cachedProfilerEvent(MalBlkPtr mb, MalStk return; /* update the Trace tables */ - snprintf(buf, BUFSIZ, "%s.%s[%d]"LLFMT, - getModuleId(getInstrPtr(mb, 0)), - getFunctionId(getInstrPtr(mb, 0)), getPC(mb, pci), stk->tag); + snprintf(buf, BUFSIZ, "%s.%s[%d]"OIDFMT, +getModuleId(getInstrPtr(mb, 0)), +getFunctionId(getInstrPtr(mb, 0)), getPC(mb, pci), stk->tag); /* generate actual call statement */ stmt = instruction2str(mb, stk, pci, LIST_MAL_ALL); diff --git a/monetdb5/mal/mal_runtime.c b/monetdb5/mal/mal_runtime.c --- a/monetdb5/mal/mal_runtime.c +++ b/monetdb5/mal/mal_runtime.c @@ -29,7 +29,8 @@ //
MonetDB: default - Merge with Nov2019 branch.
Changeset: 13b94f34048b for MonetDB URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=13b94f34048b Modified Files: sql/common/sql_types.c sql/test/subquery/Tests/subquery2.sql sql/test/subquery/Tests/subquery3.sql Branch: default Log Message: Merge with Nov2019 branch. diffs (132 lines): diff --git a/sql/common/sql_types.c b/sql/common/sql_types.c --- a/sql/common/sql_types.c +++ b/sql/common/sql_types.c @@ -1269,7 +1269,6 @@ sql_create_funcSE(sql_allocator *sa, con return sql_create_func_(sa, name, mod, imp, l, sres, TRUE, F_FUNC, fix_scale); } - static sql_func * sql_create_func3(sql_allocator *sa, const char *name, const char *mod, const char *imp, sql_type *tpe1, sql_type *tpe2, sql_type *tpe3, sql_type *res, int fix_scale) { @@ -2195,4 +2194,3 @@ types_init(sql_allocator *sa, int debug) MT_lock_unset(>ht_lock); sqltypeinit( sa ); } - diff --git a/sql/test/subquery/Tests/subquery2.sql b/sql/test/subquery/Tests/subquery2.sql --- a/sql/test/subquery/Tests/subquery2.sql +++ b/sql/test/subquery/Tests/subquery2.sql @@ -24,6 +24,9 @@ SELECT name, major FROM students s WHERE drop table students; drop table exams; +SELECT 1 IN (1, (SELECT 2)), 1 NOT IN (1, (SELECT 2)); + -- True, False + CREATE TABLE tbl_ProductSales (ColID int, Product_Category varchar(64), Product_Name varchar(64), TotalSales int); INSERT INTO tbl_ProductSales VALUES (1,'Game','Mobo Game',200),(2,'Game','PKO Game',400),(3,'Fashion','Shirt',500),(4,'Fashion','Shorts',100); CREATE TABLE another_T (col1 INT, col2 INT, col3 INT, col4 INT, col5 INT, col6 INT, col7 INT, col8 INT); diff --git a/sql/test/subquery/Tests/subquery3.sql b/sql/test/subquery/Tests/subquery3.sql --- a/sql/test/subquery/Tests/subquery3.sql +++ b/sql/test/subquery/Tests/subquery3.sql @@ -33,5 +33,99 @@ GROUP BY col1, col2, col5; -- 10 -- 10 +SELECT +(SELECT AVG(col1) OVER (PARTITION BY col5 ORDER BY col1 ROWS UNBOUNDED PRECEDING) FROM tbl_ProductSales) +FROM another_T t1; --error, more than one row returned by a subquery used as an expression + +SELECT +(SELECT SUM(col2) OVER (PARTITION BY SUM(col2) ORDER BY MAX(col1 + ColID) ROWS UNBOUNDED PRECEDING) FROM tbl_ProductSales) +FROM another_T t1 +GROUP BY col1; --error, subquery uses ungrouped column "t1.col2" from outer query + +SELECT +(SELECT SUM(SUM(col2)) OVER (PARTITION BY SUM(col2) ORDER BY MAX(col2) ROWS UNBOUNDED PRECEDING) FROM tbl_ProductSales) +FROM another_T t1 +GROUP BY col1; --error, more than one row returned by a subquery used as an expression + +SELECT +(SELECT DENSE_RANK() OVER (PARTITION BY col5 ORDER BY col1) FROM tbl_ProductSales) +FROM another_T t1; --error, more than one row returned by a subquery used as an expression + +SELECT +(SELECT DENSE_RANK() OVER (PARTITION BY MIN(col5) ORDER BY MAX(col8)) FROM tbl_ProductSales) +FROM another_T t1 +GROUP BY col6; --error, more than one row returned by a subquery used as an expression + +SELECT +(SELECT DENSE_RANK() OVER (PARTITION BY MIN(col5) ORDER BY col8 * ColID) FROM tbl_ProductSales) +FROM another_T t1 +GROUP BY col6; --error, subquery uses ungrouped column "t1.col8" from outer query + +SELECT +(SELECT t2.col1 * SUM(SUM(t1.col2)) OVER (PARTITION BY SUM(t1.col2) ORDER BY MAX(t1.col1) ROWS UNBOUNDED PRECEDING) FROM another_T t2) +FROM another_T t1 +GROUP BY col1; --error, more than one row returned by a subquery used as an expression + +SELECT +(SELECT t2.col1 * SUM(SUM(col2)) OVER (PARTITION BY SUM(col2) ORDER BY MAX(col1) ROWS UNBOUNDED PRECEDING) FROM another_T t2) +FROM another_T t1 +GROUP BY col1; --error, column "t2.col1" must appear in the GROUP BY clause or be used in an aggregate function + +SELECT +(SELECT SUM(AVG(ColID)) OVER (PARTITION BY SUM(ColID) ORDER BY MAX(ColID) ROWS UNBOUNDED PRECEDING) FROM tbl_ProductSales GROUP BY t1.col1) +FROM another_T t1; + -- 2,5000 + -- 2,5000 + -- 2,5000 + -- 2,5000 + +SELECT +(SELECT SUM(AVG(ColID + col1)) OVER (PARTITION BY SUM(ColID + col3) ORDER BY MAX(ColID) * col4 ROWS UNBOUNDED PRECEDING) FROM tbl_ProductSales GROUP BY t1.col1) +FROM another_T t1; + -- 3,5000 + -- 13,5000 + -- 113,5000 + -- 1113,5000 + +SELECT +(SELECT MAX(t1.col2) * SUM(AVG(ColID)) OVER (PARTITION BY SUM(ColID) ORDER BY MAX(ColID) ROWS UNBOUNDED PRECEDING) FROM tbl_ProductSales) +FROM another_T t1; + -- + +SELECT +(SELECT SUM(AVG(ColID)) OVER (PARTITION BY MAX(t1.col2) * SUM(ColID) ORDER BY MAX(ColID) ROWS UNBOUNDED PRECEDING) FROM tbl_ProductSales) +FROM another_T t1; + -- 2,5000 + +SELECT +(SELECT SUM(AVG(ColID)) OVER (PARTITION BY SUM(ColID) ORDER BY MAX(t1.col2) * MAX(ColID) ROWS UNBOUNDED PRECEDING) FROM tbl_ProductSales) +FROM another_T t1; + -- 2,5000 + +SELECT +(SELECT MAX(ColID) * SUM(AVG(ColID)) OVER (PARTITION BY SUM(ColID) ORDER BY MAX(ColID) ROWS UNBOUNDED
MonetDB: default - Merge with Nov2019 branch.
Changeset: b7481bc59184 for MonetDB URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=b7481bc59184 Added Files: sql/scripts/61_wlcr.sql sql/test/mergetables/Tests/sqlsmith-exists.sql sql/test/wlcr/Tests/wlc80.py sql/test/wlcr/Tests/wlr10.py sql/test/wlcr/Tests/wlr10.stable.err sql/test/wlcr/Tests/wlr10.stable.out sql/test/wlcr/Tests/wlr80.py Modified Files: Makefile.ag MonetDB.spec NT/rules.msc buildtools/doc/HowToRelease.rst buildtools/doc/windowsbuild.rst clients/Tests/MAL-signatures.stable.out clients/Tests/MAL-signatures.stable.out.int128 clients/Tests/exports.stable.out configure.ag debian/rules geom/Makefile.ag monetdb5/mal/mal.h monetdb5/mal/mal_interpreter.c monetdb5/mal/mal_profiler.c monetdb5/mal/mal_runtime.c monetdb5/mal/mal_runtime.h monetdb5/modules/atoms/json.c monetdb5/modules/mal/clients.c monetdb5/modules/mal/clients.h monetdb5/modules/mal/clients.mal monetdb5/modules/mal/mdb.c monetdb5/modules/mal/sysmon.c monetdb5/modules/mal/wlc.c monetdb5/modules/mal/wlc.h monetdb5/modules/mal/wlc.mal sql/backends/monet5/sql_scenario.c sql/backends/monet5/sql_upgrades.c sql/backends/monet5/wlr.c sql/backends/monet5/wlr.h sql/backends/monet5/wlr.mal sql/scripts/60_wlcr.sql sql/scripts/Makefile.ag sql/test/BugTracker-2012/Tests/table_functions_fail_after_restart-0.Bug-3063.stable.out sql/test/BugTracker-2012/Tests/table_functions_fail_after_restart-1.Bug-3063.stable.out sql/test/Dependencies/Tests/Dependencies.stable.out sql/test/Dependencies/Tests/Dependencies.stable.out.int128 sql/test/Tests/copy-from-lz4.py sql/test/bugs/Tests/groupby_having_charlength-bug-sf-943566.stable.out sql/test/emptydb/Tests/check.stable.out sql/test/emptydb/Tests/check.stable.out.32bit sql/test/emptydb/Tests/check.stable.out.int128 sql/test/mergetables/Tests/All sql/test/sys-schema/Tests/systemfunctions.stable.out sql/test/sys-schema/Tests/systemfunctions.stable.out.int128 sql/test/wlcr/Tests/All sql/test/wlcr/Tests/wlc01.py sql/test/wlcr/Tests/wlc100.py sql/test/wlcr/Tests/wlc20.py sql/test/wlcr/Tests/wlc21.py sql/test/wlcr/Tests/wlc30.py sql/test/wlcr/Tests/wlc40.py sql/test/wlcr/Tests/wlc50.py sql/test/wlcr/Tests/wlc70.py sql/test/wlcr/Tests/wlcr00.py sql/test/wlcr/Tests/wlr01.py sql/test/wlcr/Tests/wlr01.stable.err sql/test/wlcr/Tests/wlr01.stable.out sql/test/wlcr/Tests/wlr100.py sql/test/wlcr/Tests/wlr100.stable.err sql/test/wlcr/Tests/wlr100.stable.out sql/test/wlcr/Tests/wlr20.py sql/test/wlcr/Tests/wlr20.stable.err sql/test/wlcr/Tests/wlr20.stable.out sql/test/wlcr/Tests/wlr30.py sql/test/wlcr/Tests/wlr30.stable.err sql/test/wlcr/Tests/wlr30.stable.out sql/test/wlcr/Tests/wlr40.py sql/test/wlcr/Tests/wlr40.stable.err sql/test/wlcr/Tests/wlr40.stable.out sql/test/wlcr/Tests/wlr50.py sql/test/wlcr/Tests/wlr50.stable.err sql/test/wlcr/Tests/wlr50.stable.out sql/test/wlcr/Tests/wlr70.py sql/test/wlcr/Tests/wlr70.stable.err sql/test/wlcr/Tests/wlr70.stable.out testing/Mtest.py.in tools/Makefile.ag tools/merovingian/Makefile.ag Branch: default Log Message: Merge with Nov2019 branch. diffs (truncated from 6643 to 300 lines): diff --git a/Makefile.ag b/Makefile.ag --- a/Makefile.ag +++ b/Makefile.ag @@ -5,9 +5,9 @@ # Copyright 1997 - July 2008 CWI, August 2008 - 2019 MonetDB B.V. SUBDIRS = buildtools common clients \ - HAVE_GDK?gdk \ - HAVE_MONETDB5?monetdb5 \ - HAVE_SQL?sql \ + gdk \ + monetdb5 \ + sql \ HAVE_GEOM?geom \ tools \ HAVE_TESTING?testing \ diff --git a/MonetDB.spec b/MonetDB.spec --- a/MonetDB.spec +++ b/MonetDB.spec @@ -60,7 +60,7 @@ # derivatives (CentOS, Scientific Linux), the liblas library is only # available if EPEL is enabled, and then only on version 7. %if %{fedpkgs} -%if %{?rhel:0}%{!?rhel:1} || 0%{?rhel} >= 7 +%if %{?rhel:0}%{!?rhel:1} || 0%{?rhel} == 7 # By default create the MonetDB-lidar package on Fedora and RHEL 7 %bcond_without lidar %endif @@ -959,12 +959,10 @@ export CFLAGS --enable-embedded=no \ --enable-embedded-r=no \ --enable-fits=%{?with_fits:yes}%{!?with_fits:no} \ - --enable-gdk=yes \ --enable-geom=%{?with_geos:yes}%{!?with_geos:no} \ --enable-int128=%{?with_hugeint:yes}%{!?with_hugeint:no} \ --enable-lidar=%{?with_lidar:yes}%{!?with_lidar:no} \ --enable-mapi=yes \ -
MonetDB: default - Merge with Nov2019 branch.
Changeset: feab46331a00 for MonetDB URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=feab46331a00 Modified Files: sql/backends/monet5/vaults/fits/fits.c tools/merovingian/daemon/connections.c Branch: default Log Message: Merge with Nov2019 branch. diffs (36 lines): diff --git a/sql/backends/monet5/vaults/fits/fits.c b/sql/backends/monet5/vaults/fits/fits.c --- a/sql/backends/monet5/vaults/fits/fits.c +++ b/sql/backends/monet5/vaults/fits/fits.c @@ -973,6 +973,10 @@ str FITSloadTable(Client cntxt, MalBlkPt /* data load */ fits_get_num_rows(fptr, , ); + /* Nothing more to do */ + if (rows == 0) { + goto bailout; + } fprintf(stderr,"#Loading %ld rows in table %s\n", rows, tname); for (j = 1; j <= cnum; j++) { BAT *tmp = NULL; diff --git a/tools/merovingian/daemon/connections.c b/tools/merovingian/daemon/connections.c --- a/tools/merovingian/daemon/connections.c +++ b/tools/merovingian/daemon/connections.c @@ -71,11 +71,17 @@ openConnectionTCP(int *ret, bool bind_ip break; /* working */ } if (rp == NULL) { + int e = errno; if (result) freeaddrinfo(result); if (sock != -1) closesocket(sock); - return newErr("cannot bind to host %s", bindaddr); + if (result) { /* results found, tried socket, setsockopt and bind calls */ + errno = e; + return newErr("binding to stream socket port %hu failed: %s", port, strerror(errno)); + } else { /* no results found, could not translate address */ + return newErr("cannot translate host %s", bindaddr); + } } server = rp->ai_addr; length = rp->ai_addrlen; ___ checkin-list mailing list checkin-list@monetdb.org https://www.monetdb.org/mailman/listinfo/checkin-list
MonetDB: default - Merge with Nov2019 branch.
Changeset: 839378895295 for MonetDB URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=839378895295 Added Files: sql/test/subquery/Tests/subquery3.sql Modified Files: sql/server/sql_partition.c sql/test/subquery/Tests/All tools/merovingian/daemon/handlers.c tools/merovingian/daemon/merovingian.c tools/merovingian/daemon/merovingian.h Branch: default Log Message: Merge with Nov2019 branch. diffs (116 lines): diff --git a/sql/server/sql_partition.c b/sql/server/sql_partition.c --- a/sql/server/sql_partition.c +++ b/sql/server/sql_partition.c @@ -316,13 +316,11 @@ bootstrap_partition_expression(mvc* sql, if (r) r = rel_optimizer(sql, r, 0); if (r) { - int i; node *n, *found = NULL; list *id_l = rel_dependencies(sql, r); - for(i = 0, n = id_l->h ; n ; n = n->next, i++) { //remove the table itself from the list of dependencies - if(*(int *) n->data == mt->base.id) + for (n = id_l->h ; n ; n = n->next) //remove the table itself from the list of dependencies + if(*(sqlid *) n->data == mt->base.id) found = n; - } assert(found); list_remove_node(id_l, found); mvc_create_dependencies(sql, id_l, mt->base.id, TABLE_DEPENDENCY); diff --git a/sql/test/subquery/Tests/All b/sql/test/subquery/Tests/All --- a/sql/test/subquery/Tests/All +++ b/sql/test/subquery/Tests/All @@ -2,6 +2,7 @@ subquery any all subquery2 +subquery3 scalar any_all correlated diff --git a/sql/test/subquery/Tests/subquery3.sql b/sql/test/subquery/Tests/subquery3.sql new file mode 100644 --- /dev/null +++ b/sql/test/subquery/Tests/subquery3.sql @@ -0,0 +1,37 @@ +CREATE TABLE tbl_ProductSales (ColID int, Product_Category varchar(64), Product_Name varchar(64), TotalSales int); +INSERT INTO tbl_ProductSales VALUES (1,'Game','Mobo Game',200),(2,'Game','PKO Game',400),(3,'Fashion','Shirt',500),(4,'Fashion','Shorts',100); +CREATE TABLE another_T (col1 INT, col2 INT, col3 INT, col4 INT, col5 INT, col6 INT, col7 INT, col8 INT); +INSERT INTO another_T VALUES (1,2,3,4,5,6,7,8), (11,22,33,44,55,66,77,88), (111,222,333,444,555,666,777,888), (,,,,,,,); + +SELECT +NOT MAX(t1.col6) IN (SELECT SUM(t1.col6) FROM tbl_ProductSales tp HAVING MAX(t1.col1) > MIN(tp.colID)) +FROM another_T t1 +GROUP BY t1.col6, t1.col7; + -- True + -- False + -- False + -- False + +SELECT +(SELECT MAX(ColID + col2) FROM tbl_ProductSales) * DENSE_RANK() OVER (PARTITION BY AVG(DISTINCT col5)), +AVG(col1) * MIN(col8) OVER (PARTITION BY col5 ORDER BY col1 ROWS UNBOUNDED PRECEDING) evil, +MAX(col3) / 10 + SUM(col1) * 10 +FROM another_T +GROUP BY col1, col2, col5, col8; + -- 68 10 + -- 26 968 113 + -- 226 98568 1143 + -- 2226 9874568 11443 + +SELECT +CAST (NOT col1 IN (SELECT col2 FROM another_T GROUP BY col2) AS INTEGER) | CAST (col2 IN (SELECT col2 FROM another_T GROUP BY col2) AS INTEGER), +CAST (EXISTS (SELECT MAX(col5) * MAX(col4) FROM another_T GROUP BY col5, col4) AS INTEGER) & CAST (SUM(col4) IN (SELECT DISTINCT col2 FROM another_T GROUP BY col2) AS INTEGER) +FROM another_T +GROUP BY col1, col2, col5; + -- 10 + -- 10 + -- 10 + -- 10 + +DROP TABLE tbl_ProductSales; +DROP TABLE another_T; diff --git a/tools/merovingian/daemon/handlers.c b/tools/merovingian/daemon/handlers.c --- a/tools/merovingian/daemon/handlers.c +++ b/tools/merovingian/daemon/handlers.c @@ -79,7 +79,7 @@ handler(int sig) /* we're not using a lock for setting, reading and clearing this flag * (deadlock!), but we should use atomic instructions */ -static volatile int hupflag = 0; +static volatile sig_atomic_t hupflag = 0; /** * Handler for SIGHUP, causes a re-read of the .merovingian_properties diff --git a/tools/merovingian/daemon/merovingian.c b/tools/merovingian/daemon/merovingian.c --- a/tools/merovingian/daemon/merovingian.c +++ b/tools/merovingian/daemon/merovingian.c @@ -106,7 +106,7 @@ pthread_mutex_t _mero_topdp_lock = PTHRE /* for the logger, when set to 0, the logger terminates */ volatile int _mero_keep_logging = 1; /* for accepting connections, when set to 0, listening socket terminates */ -volatile char _mero_keep_listening = 1; +volatile sig_atomic_t _mero_keep_listening = 1; /* stream to where to write the log */ FILE *_mero_logfile = NULL; /* stream to the stdout for the neighbour discovery service */ diff --git a/tools/merovingian/daemon/merovingian.h b/tools/merovingian/daemon/merovingian.h --- a/tools/merovingian/daemon/merovingian.h +++ b/tools/merovingian/daemon/merovingian.h @@ -11,6
MonetDB: default - Merge with Nov2019 branch
Changeset: b81895f34f9a for MonetDB URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=b81895f34f9a Added Files: sql/test/BugTracker-2019/Tests/duplicates-not-eliminated-long-CASE-stmt.Bug-6697.stable.out.single Modified Files: sql/server/rel_exp.c sql/server/rel_exp.h sql/server/rel_rel.c sql/server/rel_select.c sql/test/BugTracker-2018/Tests/sqlitelogictest-having-not-null-not-in.Bug-6557.sql sql/test/BugTracker-2018/Tests/sqlitelogictest-having-not-null-not-in.Bug-6557.stable.err sql/test/emptydb/Tests/check.stable.out sql/test/emptydb/Tests/check.stable.out.32bit Branch: default Log Message: Merge with Nov2019 branch diffs (truncated from 552 to 300 lines): diff --git a/sql/server/rel_exp.c b/sql/server/rel_exp.c --- a/sql/server/rel_exp.c +++ b/sql/server/rel_exp.c @@ -230,7 +230,7 @@ exp_op( sql_allocator *sa, list *l, sql_ } sql_exp * -exp_aggr( sql_allocator *sa, list *l, sql_subaggr *a, int distinct, int no_nils, int card, int has_nils ) +exp_aggr( sql_allocator *sa, list *l, sql_subaggr *a, int distinct, int no_nils, unsigned int card, int has_nils ) { sql_exp *e = exp_create(sa, e_aggr); if (e == NULL) @@ -469,7 +469,7 @@ have_nil(list *exps) } sql_exp * -exp_column(sql_allocator *sa, const char *rname, const char *cname, sql_subtype *t, int card, int has_nils, int intern) +exp_column(sql_allocator *sa, const char *rname, const char *cname, sql_subtype *t, unsigned int card, int has_nils, int intern) { sql_exp *e = exp_create(sa, e_column); @@ -504,7 +504,7 @@ exp_propagate(sql_allocator *sa, sql_exp } sql_exp * -exp_alias(sql_allocator *sa, const char *arname, const char *acname, const char *org_rname, const char *org_cname, sql_subtype *t, int card, int has_nils, int intern) +exp_alias(sql_allocator *sa, const char *arname, const char *acname, const char *org_rname, const char *org_cname, sql_subtype *t, unsigned int card, int has_nils, int intern) { sql_exp *e = exp_column(sa, org_rname, org_cname, t, card, has_nils, intern); @@ -833,7 +833,7 @@ exp_find_rel_name(sql_exp *e) return NULL; } -int +unsigned int exp_card( sql_exp *e ) { return e->card; @@ -1809,20 +1809,20 @@ exps_card( list *l ) } void -exps_fix_card( list *exps, int card) +exps_fix_card( list *exps, unsigned int card) { node *n; for (n = exps->h; n; n = n->next) { sql_exp *e = n->data; - if (e->card > (unsigned) card) + if (e->card > card) e->card = card; } } void -exps_setcard( list *exps, int card) +exps_setcard( list *exps, unsigned int card) { node *n; diff --git a/sql/server/rel_exp.h b/sql/server/rel_exp.h --- a/sql/server/rel_exp.h +++ b/sql/server/rel_exp.h @@ -44,7 +44,7 @@ extern sql_exp *exp_op(sql_allocator *sa exp_op(sa, append(append(append(new_exp_list(sa),l),r),r2), f) #define exp_op4(sa,l,r,r2,r3,f) \ exp_op(sa, append(append(append(append(new_exp_list(sa),l),r),r2),r3), f) -extern sql_exp *exp_aggr(sql_allocator *sa, list *l, sql_subaggr *a, int distinct, int no_nils, int card, int has_nil ); +extern sql_exp *exp_aggr(sql_allocator *sa, list *l, sql_subaggr *a, int distinct, int no_nils, unsigned int card, int has_nil ); #define exp_aggr1(sa, e, a, d, n, c, hn) \ exp_aggr(sa, append(new_exp_list(sa), e), a, d, n, c, hn) extern sql_exp * exp_atom(sql_allocator *sa, atom *a); @@ -70,10 +70,10 @@ extern sql_exp * exp_values(sql_allocato extern list * exp_types(sql_allocator *sa, list *exps); extern int have_nil(list *exps); -extern sql_exp * exp_column(sql_allocator *sa, const char *rname, const char *name, sql_subtype *t, int card, int has_nils, int intern); +extern sql_exp * exp_column(sql_allocator *sa, const char *rname, const char *name, sql_subtype *t, unsigned int card, int has_nils, int intern); extern sql_exp * exp_propagate(sql_allocator *sa, sql_exp *ne, sql_exp *oe); #define exp_ref(sa, e) exp_propagate(sa, exp_column(sa, exp_relname(e), exp_name(e), exp_subtype(e), exp_card(e), has_nil(e), is_intern(e)), e) -extern sql_exp * exp_alias(sql_allocator *sa, const char *arname, const char *acname, const char *org_rname, const char *org_cname, sql_subtype *t, int card, int has_nils, int intern); +extern sql_exp * exp_alias(sql_allocator *sa, const char *arname, const char *acname, const char *org_rname, const char *org_cname, sql_subtype *t, unsigned int card, int has_nils, int intern); extern sql_exp * exp_alias_or_copy( mvc *sql, const char *tname, const char *cname, sql_rel *orel, sql_exp *old); extern sql_exp * exp_set(sql_allocator *sa, const char *name, sql_exp *val, int level); extern sql_exp * exp_var(sql_allocator *sa, const char *name, sql_subtype *type, int level); @@ -105,7 +105,7 @@ extern sql_subtype * exp_subtype( sql_ex extern const char *
MonetDB: default - Merge with Nov2019 branch.
Changeset: 9712353dd761 for MonetDB URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=9712353dd761 Added Files: sql/test/BugTracker-2019/Tests/grant-select-column.Bug-6765.py sql/test/BugTracker-2019/Tests/next-get-value-bulk.Bug-6766.sql sql/test/BugTracker-2019/Tests/next-get-value-bulk.Bug-6766.stable.out sql/test/miscellaneous/Tests/groupby_error.sql sql/test/miscellaneous/Tests/groupby_error.stable.err sql/test/miscellaneous/Tests/groupby_error.stable.out Modified Files: sql/backends/monet5/sql.c sql/include/sql_relation.h sql/server/rel_exp.c sql/server/rel_exp.h sql/server/rel_rel.c sql/server/rel_rel.h sql/server/rel_select.c sql/server/rel_unnest.c sql/test/BugTracker-2015/Tests/crash.Bug-3736.stable.out sql/test/BugTracker-2019/Tests/All sql/test/BugTracker-2019/Tests/correlated-subquery-aggregation.Bug-6714.stable.out sql/test/miscellaneous/Tests/All sql/test/subquery/Tests/correlated.stable.out sql/test/subquery/Tests/subquery2.sql Branch: default Log Message: Merge with Nov2019 branch. diffs (truncated from 813 to 300 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 @@ -3512,6 +3512,7 @@ SQLnil_grp(bat *ret, const bat *bid, con BAT *l, *g, *e, *res; bit F = FALSE; BUN offset = 0; + bit has_nil = 0; (void)no_nil; if ((l = BATdescriptor(*bid)) == NULL) { @@ -3546,14 +3547,16 @@ SQLnil_grp(bat *ret, const bat *bid, con oid id = *(oid*)BUNtail(gi, s); if (ret[id] != TRUE) { - if (ocmp(lv, nilp) == 0) - ret[id] = TRUE; + if (ocmp(lv, nilp) == 0) { + ret[id] = bit_nil; + has_nil = 1; + } } } } res->hseqbase = g->hseqbase; - res->tnil = 0; - res->tnonil = 1; + res->tnil = has_nil != 0; + res->tnonil = has_nil == 0; res->tsorted = res->trevsorted = 0; res->tkey = 0; BBPunfix(l->batCacheid); diff --git a/sql/include/sql_relation.h b/sql/include/sql_relation.h --- a/sql/include/sql_relation.h +++ b/sql/include/sql_relation.h @@ -242,18 +242,18 @@ typedef enum operator_type { /* does the expression (possibly) have nils */ #define has_nil(e) \ - ((e->flag_NO_NIL) == 0) + (((e)->flag_NO_NIL) == 0) #define set_has_no_nil(e) \ - e->flag |= HAS_NO_NIL + (e)->flag |= HAS_NO_NIL #define set_has_nil(e) \ - e->flag &= (~HAS_NO_NIL) + (e)->flag &= (~HAS_NO_NIL) #define is_ascending(e) \ - ((e->flag)==ASCENDING) + (((e)->flag)==ASCENDING) #define nulls_last(e) \ - ((e->flag_LAST)==NULLS_LAST) + (((e)->flag_LAST)==NULLS_LAST) #define set_direction(e, dir) \ - e->flag |= ((dir&1)?ASCENDING:0) | ((dir&2)?NULLS_LAST:0) + (e)->flag |= ((dir&1)?ASCENDING:0) | ((dir&2)?NULLS_LAST:0) #define is_anti(e) \ ((e)->anti) diff --git a/sql/server/rel_exp.c b/sql/server/rel_exp.c --- a/sql/server/rel_exp.c +++ b/sql/server/rel_exp.c @@ -991,7 +991,7 @@ exps_match_col_exps( sql_exp *e1, sql_ex return 0; } -static int +int exp_match_list( list *l, list *r) { node *n, *m; diff --git a/sql/server/rel_exp.h b/sql/server/rel_exp.h --- a/sql/server/rel_exp.h +++ b/sql/server/rel_exp.h @@ -120,6 +120,8 @@ extern int exp_match_exp( sql_exp *e1, s /* match just the column (cmp equality) expressions */ extern int exp_match_col_exps( sql_exp *e, list *l); extern int exps_match_col_exps( sql_exp *e1, sql_exp *e2); +/* todo rename */ +extern int exp_match_list( list *l, list *r); extern int exp_is_join(sql_exp *e, list *rels); extern int exp_is_eqjoin(sql_exp *e); extern int exp_is_correlation(sql_exp *e, sql_rel *r ); diff --git a/sql/server/rel_rel.c b/sql/server/rel_rel.c --- a/sql/server/rel_rel.c +++ b/sql/server/rel_rel.c @@ -11,6 +11,7 @@ #include "rel_exp.h" #include "rel_prop.h" #include "rel_remote.h" +#include "rel_unnest.h" #include "sql_semantic.h" #include "sql_mvc.h" @@ -1364,6 +1365,56 @@ rel_add_identity(mvc *sql, sql_rel *rel, return _rel_add_identity(sql, rel, exp); } +static sql_rel * +_rel_add_identity2(mvc *sql, sql_rel *rel, sql_exp **exp) +{ + list *exps = rel_projections(sql, rel, NULL, 1, 2); + sql_exp *e; + + if (list_length(exps) == 0) { + *exp = NULL; + return rel; + } + rel = rel_project(sql->sa, rel, exps); + e = rel->exps->h->data; + e = exp_column(sql->sa, exp_relname(e), exp_name(e), exp_subtype(e), rel->card, has_nil(e), is_intern(e)); +
MonetDB: default - Merge with Nov2019 branch
Changeset: fdff06af533d for MonetDB URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=fdff06af533d Modified Files: clients/Tests/MAL-signatures.stable.out clients/Tests/MAL-signatures.stable.out.int128 gdk/gdk_system.h monetdb5/modules/mal/tokenizer.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_rank.mal sql/server/rel_optimizer.c sql/server/rel_rel.c sql/server/rel_select.c sql/storage/store.c sql/test/BugTracker-2017/Tests/crash_after_oidx_on_sys_statistics.Bug-6251.sql sql/test/BugTracker-2017/Tests/crash_after_oidx_on_sys_statistics.Bug-6251.stable.out sql/test/BugTracker-2019/Tests/view-where-cast-error.Bug-6712.stable.err sql/test/BugTracker-2019/Tests/view-where-cast-error.Bug-6712.stable.out sql/test/pg_regress/Tests/vacuum.stable.out sql/test/pg_regress/Tests/vacuum.stable.out.single sql/test/subquery/Tests/correlated.sql sql/test/subquery/Tests/correlated.stable.err sql/test/subquery/Tests/correlated.stable.out sql/test/subquery/Tests/subquery2.sql Branch: default Log Message: Merge with Nov2019 branch diffs (truncated from 1212 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 @@ -128,6 +128,8 @@ stdout of test 'MAL-signatures` in direc [ "aggr", "min", "command aggr.min(b:bat[:any_1], g:bat[:oid], e:bat[:any_2]):bat[:any_1] ", "AGGRmin3;","" ] [ "aggr", "min", "command aggr.min(b:bat[:any_2]):any_2 ", "ALGminany;", "Return the lowest tail value or nil." ] [ "aggr", "min", "command aggr.min(b:bat[:any_2], skipnil:bit):any_2 ", "ALGminany_skipnil;", "Return the lowest tail value or nil." ] +[ "aggr", "not_exist","command aggr.not_exist(b:bat[:any_2]):bit ", "SQLnot_exist;","" ] +[ "aggr", "not_exist","pattern aggr.not_exist(v:any_2):bit ", "SQLnot_exist_val;","" ] [ "aggr", "prod", "command aggr.prod(b:bat[:bte], g:bat[:oid], e:bat[:any_1]):bat[:bte] ","AGGRprod3_bte;", "Grouped tail product on bte" ] [ "aggr", "prod", "command aggr.prod(b:bat[:dbl], g:bat[:oid], e:bat[:any_1]):bat[:dbl] ","AGGRprod3_dbl;", "Grouped tail product on dbl" ] [ "aggr", "prod", "command aggr.prod(b:bat[:flt], g:bat[:oid], e:bat[:any_1]):bat[:dbl] ","AGGRprod3_dbl;", "Grouped tail product on flt" ] @@ -318,6 +320,7 @@ stdout of test 'MAL-signatures` in direc [ "aggr", "submin", "command aggr.submin(b:bat[:any_1], g:bat[:oid], e:bat[:any_2], skip_nils:bit):bat[:any_1] ", "AGGRsubmin_val;", "Grouped minimum aggregate" ] [ "aggr", "submin", "command aggr.submin(b:bat[:any_1], g:bat[:oid], e:bat[:any_2], s:bat[:oid], skip_nils:bit):bat[:oid] ", "AGGRsubmincand;", "Grouped minimum aggregate with candidates list" ] [ "aggr", "submin", "command aggr.submin(b:bat[:any_1], g:bat[:oid], e:bat[:any_2], s:bat[:oid], skip_nils:bit):bat[:any_1] ", "AGGRsubmincand_val;", "Grouped minimum aggregate with candidates list" ] +[ "aggr", "subnot_exist", "command aggr.subnot_exist(b:bat[:any_2], g:bat[:oid], e:bat[:oid], no_nil:bit):bat[:bit] ","SQLsubnot_exist;", "" ] [ "aggr", "subprod", "command aggr.subprod(b:bat[:bte], g:bat[:oid], e:bat[:any_1], skip_nils:bit, abort_on_error:bit):bat[:bte] ", "AGGRsubprod_bte;", "Grouped product aggregate" ] [ "aggr", "subprod", "command aggr.subprod(b:bat[:dbl], g:bat[:oid], e:bat[:any_1], skip_nils:bit, abort_on_error:bit):bat[:dbl] ", "AGGRsubprod_dbl;", "Grouped product aggregate" ] [ "aggr", "subprod", "command aggr.subprod(b:bat[:flt], g:bat[:oid], e:bat[:any_1], skip_nils:bit, abort_on_error:bit):bat[:dbl] ", "AGGRsubprod_dbl;", "Grouped product aggregate" ] @@ -11755,6 +11758,7 @@ stdout of test 'MAL-signatures` in direc [ "sql", "storage", "pattern sql.storage(sname:str) (schema:bat[:str], table:bat[:str], column:bat[:str], type:bat[:str], mode:bat[:str], location:bat[:str], count:bat[:lng], atomwidth:bat[:int], columnsize:bat[:lng], heap:bat[:lng], hashes:bat[:lng], phash:bat[:bit], imprints:bat[:lng], sorted:bat[:bit], revsorted:bat[:bit], key:bat[:bit], orderidx:bat[:lng]) ", "sql_storage;", "return a table with storage information for a particular schema " ] [ "sql", "storage", "pattern sql.storage(sname:str, tname:str) (schema:bat[:str], table:bat[:str], column:bat[:str], type:bat[:str], mode:bat[:str], location:bat[:str], count:bat[:lng], atomwidth:bat[:int],
MonetDB: default - Merge with Nov2019 branch.
Changeset: cb91c634a7d4 for MonetDB URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=cb91c634a7d4 Modified Files: MonetDB.spec NT/mkodbcwxs.py NT/mksqlwxs.py sql/backends/monet5/sql_upgrades.c sql/common/sql_types.c sql/server/sql_scan.c sql/test/emptydb-upgrade-chain-hge/Tests/upgrade.stable.out.int128 sql/test/emptydb-upgrade-chain-hge/Tests/upgrade.stable.out.powerpc64.int128 sql/test/emptydb-upgrade-chain/Tests/upgrade.stable.out sql/test/emptydb-upgrade-chain/Tests/upgrade.stable.out.32bit sql/test/emptydb-upgrade-chain/Tests/upgrade.stable.out.int128 sql/test/emptydb-upgrade-chain/Tests/upgrade.stable.out.powerpc64 sql/test/emptydb-upgrade-chain/Tests/upgrade.stable.out.powerpc64.int128 sql/test/emptydb-upgrade-hge/Tests/upgrade.stable.out.int128 sql/test/emptydb-upgrade/Tests/upgrade.stable.out sql/test/emptydb-upgrade/Tests/upgrade.stable.out.32bit sql/test/emptydb-upgrade/Tests/upgrade.stable.out.int128 sql/test/emptydb/Tests/check.stable.out sql/test/emptydb/Tests/check.stable.out.32bit sql/test/emptydb/Tests/check.stable.out.int128 sql/test/pg_regress/Tests/interval.stable.err sql/test/pg_regress/Tests/interval.stable.err.int128 sql/test/pg_regress/Tests/interval.stable.out sql/test/pg_regress/Tests/interval.stable.out.int128 sql/test/pg_regress/Tests/timestamp.sql sql/test/pg_regress/Tests/timestamptz.sql sql/test/sys-schema/Tests/systemfunctions.stable.out sql/test/sys-schema/Tests/systemfunctions.stable.out.int128 sql/test/testdb-upgrade-chain-hge/Tests/upgrade.stable.out.int128 sql/test/testdb-upgrade-chain/Tests/upgrade.stable.out sql/test/testdb-upgrade-chain/Tests/upgrade.stable.out.32bit sql/test/testdb-upgrade-chain/Tests/upgrade.stable.out.int128 sql/test/testdb-upgrade-hge/Tests/upgrade.stable.out.int128 sql/test/testdb-upgrade/Tests/upgrade.stable.out sql/test/testdb-upgrade/Tests/upgrade.stable.out.32bit sql/test/testdb-upgrade/Tests/upgrade.stable.out.int128 Branch: default Log Message: Merge with Nov2019 branch. diffs (truncated from 184021 to 300 lines): diff --git a/MonetDB.spec b/MonetDB.spec --- a/MonetDB.spec +++ b/MonetDB.spec @@ -19,15 +19,16 @@ %global _hardened_build 1 # On RedHat Enterprise Linux and derivatives, if the Extra Packages -# for Enterprise Linux (EPEL) repository is available, you can enable -# its use by providing rpmbuild or mock with the "--with epel" option. +# for Enterprise Linux (EPEL) repository is not available, you can +# disable its use by providing rpmbuild or mock with the "--without +# epel" option. # If the EPEL repository is availabe, or if building for Fedora, most # optional sub packages can be built. We indicate that here by # setting the macro fedpkgs to 1. If the EPEL repository is not # available and we are not building for Fedora, we set fedpkgs to 0. %if %{?rhel:1}%{!?rhel:0} # RedHat Enterprise Linux (or CentOS or Scientific Linux) -%bcond_with epel +%bcond_without epel %if %{with epel} # EPEL is enabled through the command line %global fedpkgs 1 diff --git a/NT/mkodbcwxs.py b/NT/mkodbcwxs.py --- a/NT/mkodbcwxs.py +++ b/NT/mkodbcwxs.py @@ -55,8 +55,8 @@ def main(): print(r'') print(r'') print(r'') -if vs == '17': -msvc = r'C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Redist\MSVC' +if vs in ('17', '19'): +msvc = r'C:\Program Files (x86)\Microsoft Visual Studio\20%s\Community\VC\Redist\MSVC' % vs d = sorted(os.listdir(msvc))[-1] msm = '_CRT_%s.msm' % arch for f in sorted(os.listdir(os.path.join(msvc, d, 'MergeModules'))): diff --git a/NT/mksqlwxs.py b/NT/mksqlwxs.py --- a/NT/mksqlwxs.py +++ b/NT/mksqlwxs.py @@ -114,8 +114,8 @@ def main(): print(r'') print(r'') print(r'') -if vs == '17': -msvc = r'C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Redist\MSVC' +if vs in ('17', '19'): +msvc = r'C:\Program Files (x86)\Microsoft Visual Studio\20%s\Community\VC\Redist\MSVC' % vs d = sorted(os.listdir(msvc))[-1] msm = '_CRT_%s.msm' % arch for f in sorted(os.listdir(os.path.join(msvc, d, 'MergeModules'))): 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 @@ -21,19 +21,14 @@ #include "rel_remote.h" #include "mal_authorize.h" -#ifdef HAVE_EMBEDDED -#define printf(fmt,...) ((void) 0) -#endif - /* this function can be used to recreate the system tables (types, * functions, args) when internal types and/or functions have changed * (i.e. the ones in sql_types.c) */ static str -sql_fix_system_tables(Client c, mvc *sql)
MonetDB: default - Merge with Nov2019 branch.
Changeset: cdb37660b2e1 for MonetDB URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=cdb37660b2e1 Modified Files: sql/backends/monet5/UDF/capi/capi.c sql/backends/monet5/rel_bin.c Branch: default Log Message: Merge with Nov2019 branch. diffs (42 lines): diff --git a/sql/backends/monet5/UDF/capi/capi.c b/sql/backends/monet5/UDF/capi/capi.c --- a/sql/backends/monet5/UDF/capi/capi.c +++ b/sql/backends/monet5/UDF/capi/capi.c @@ -659,7 +659,7 @@ static str CUDFeval(Client cntxt, MalBlk i + 1 - prefix_size); memcpy(buf + prefix_size, SO_PREFIX, sizeof(char) * strlen(SO_PREFIX)); path = - GDKfilepath(0, BATDIR, buf, SO_EXT[0] == '.' ? SO_EXT + 1 : SO_EXT); + GDKfilepath(0, BATDIR, buf, SO_EXT[0] == '.' ? _EXT[1] : SO_EXT); if (!path) { msg = createException(MAL, "cudf.eval", MAL_MALLOC_FAIL); goto wrapup; diff --git a/sql/backends/monet5/rel_bin.c b/sql/backends/monet5/rel_bin.c --- a/sql/backends/monet5/rel_bin.c +++ b/sql/backends/monet5/rel_bin.c @@ -565,7 +565,6 @@ exp_bin(backend *be, sql_exp *e, stmt *l } break; case e_convert: { /* if input is type any NULL or column of nulls, change type */ - sql_exp *ll = (sql_exp *) e->l; list *tps = e->r; sql_subtype *from = tps->h->data; sql_subtype *to = tps->h->next->data; @@ -574,16 +573,11 @@ exp_bin(backend *be, sql_exp *e, stmt *l if (from->type->localtype == 0) { l = stmt_atom(be, atom_general(sql->sa, to, NULL)); } else { - l = exp_bin(be, ll, left, right, grp, ext, cnt, sel); + l = exp_bin(be, e->l, left, right, grp, ext, cnt, sel); } if (!l) return NULL; - /* if attempting to convert between strings, no conversion is needed */ - if (ll->type == e_column && EC_VARCHAR(from->type->eclass) && EC_VARCHAR(to->type->eclass)) { - s = l; - } else { - s = stmt_convert(be, l, from, to, sel); - } + s = stmt_convert(be, l, from, to, sel); } break; case e_func: { node *en; ___ checkin-list mailing list checkin-list@monetdb.org https://www.monetdb.org/mailman/listinfo/checkin-list
MonetDB: default - Merge with Nov2019 branch.
Changeset: ffb46ba9f229 for MonetDB URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=ffb46ba9f229 Removed Files: sql/scripts/11_times.sql Modified Files: clients/Tests/MAL-signatures.stable.out clients/Tests/MAL-signatures.stable.out.int128 clients/Tests/exports.stable.out gdk/gdk_aggr.c gdk/gdk_calc.h gdk/gdk_group.c monetdb5/modules/kernel/aggr.c monetdb5/modules/kernel/aggr.mal monetdb5/modules/kernel/aggr.mal.sh sql/ChangeLog.Nov2019 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_upgrades.c sql/common/sql_list.c sql/include/sql_relation.h sql/scripts/39_analytics.sql sql/scripts/39_analytics_hge.sql sql/scripts/Makefile.ag sql/server/rel_dump.c sql/server/rel_exp.c sql/server/rel_exp.h sql/server/rel_optimizer.c sql/server/rel_rel.c sql/server/rel_select.c sql/server/rel_unnest.c sql/server/rel_updates.c sql/test/BugDay_2005-10-06_2.9.3/Tests/union_limitation.SF-921992.stable.out sql/test/BugTracker-2016/Tests/leftjoin.Bug-3981.stable.out sql/test/BugTracker-2018/Tests/count_from_commented_function_signatures.Bug-6542.stable.out sql/test/Tests/window_functions.stable.out sql/test/analytics/Tests/analytics09.stable.err sql/test/emptydb-upgrade-chain-hge/Tests/upgrade.stable.out.int128 sql/test/emptydb-upgrade-chain-hge/Tests/upgrade.stable.out.powerpc64.int128 sql/test/emptydb-upgrade-chain/Tests/upgrade.stable.out sql/test/emptydb-upgrade-chain/Tests/upgrade.stable.out.32bit sql/test/emptydb-upgrade-chain/Tests/upgrade.stable.out.int128 sql/test/emptydb-upgrade-chain/Tests/upgrade.stable.out.powerpc64 sql/test/emptydb-upgrade-chain/Tests/upgrade.stable.out.powerpc64.int128 sql/test/emptydb-upgrade-hge/Tests/upgrade.stable.out.int128 sql/test/emptydb-upgrade/Tests/upgrade.stable.out sql/test/emptydb-upgrade/Tests/upgrade.stable.out.32bit sql/test/emptydb-upgrade/Tests/upgrade.stable.out.int128 sql/test/emptydb/Tests/check.stable.out sql/test/emptydb/Tests/check.stable.out.32bit sql/test/emptydb/Tests/check.stable.out.int128 sql/test/mergetables/Tests/sqlsmith.Bug-6455.stable.out sql/test/subquery/Tests/subquery2.sql sql/test/sys-schema/Tests/check_ForeignKey_referential_integrity.stable.out sql/test/sys-schema/Tests/check_MaxStrLength_violations.stable.out sql/test/sys-schema/Tests/systemfunctions.stable.out sql/test/sys-schema/Tests/systemfunctions.stable.out.int128 sql/test/testdb-upgrade-chain-hge/Tests/upgrade.stable.out.int128 sql/test/testdb-upgrade-chain/Tests/upgrade.stable.out sql/test/testdb-upgrade-chain/Tests/upgrade.stable.out.32bit sql/test/testdb-upgrade-chain/Tests/upgrade.stable.out.int128 sql/test/testdb-upgrade-hge/Tests/upgrade.stable.out.int128 sql/test/testdb-upgrade/Tests/upgrade.stable.out sql/test/testdb-upgrade/Tests/upgrade.stable.out.32bit sql/test/testdb-upgrade/Tests/upgrade.stable.out.int128 Branch: default Log Message: Merge with Nov2019 branch. diffs (truncated from 4090 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 @@ -124,6 +124,7 @@ stdout of test 'MAL-signatures` in direc [ "aggr", "max", "command aggr.max(b:bat[:any_2]):any_2 ", "ALGmaxany;", "Return the highest tail value or nil." ] [ "aggr", "max", "command aggr.max(b:bat[:any_2], skipnil:bit):any_2 ", "ALGmaxany_skipnil;", "Return the highest tail value or nil." ] [ "aggr", "median", "command aggr.median(b:bat[:any_1]):any_1 ", "AGGRmedian;", "Median aggregate" ] +[ "aggr", "median_avg", "command aggr.median_avg(b:bat[:any_1]):dbl ", "AGGRmedian_avg;", "Median aggregate" ] [ "aggr", "min", "command aggr.min(b:bat[:any_1], g:bat[:oid], e:bat[:any_2]):bat[:any_1] ", "AGGRmin3;","" ] [ "aggr", "min", "command aggr.min(b:bat[:any_2]):any_2 ", "ALGminany;", "Return the lowest tail value or nil." ] [ "aggr", "min", "command aggr.min(b:bat[:any_2], skipnil:bit):any_2 ", "ALGminany_skipnil;", "Return the lowest tail value or nil." ] @@ -209,6 +210,7 @@ stdout of test 'MAL-signatures` in direc [ "aggr", "prod", "pattern aggr.prod(b:bat[:sht], s:bat[:oid], nil_if_empty:bit):lng ", "CMDBATprod;", "Calculate aggregate product of B with candidate list." ] [ "aggr", "prod", "pattern aggr.prod(b:bat[:sht], s:bat[:oid], nil_if_empty:bit):sht ",
MonetDB: default - Merge with Nov2019 branch.
Changeset: 66579176a253 for MonetDB URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=66579176a253 Added Files: sql/test/BugTracker-2019/Tests/select-char.Bug-6761.stable.err sql/test/BugTracker-2019/Tests/select-char.Bug-6761.stable.out Modified Files: common/stream/stream.c configure.ag monetdb5/modules/mal/mal_mapi.c sql/backends/monet5/rel_bin.c sql/rel.txt sql/server/rel_optimizer.c sql/server/rel_select.c sql/test/BugTracker-2019/Tests/All sql/test/BugTracker-2019/Tests/double-free.Bug-6757.sql sql/test/BugTracker-2019/Tests/select-char.Bug-6761.sql sql/test/subquery/Tests/any.sql sql/test/subquery/Tests/any.stable.err sql/test/subquery/Tests/any.stable.out sql/test/subquery/Tests/subquery2.sql tools/merovingian/daemon/client.c tools/merovingian/daemon/controlrunner.c tools/merovingian/daemon/discoveryrunner.c tools/merovingian/daemon/merovingian.c tools/merovingian/daemon/multiplex-funnel.c Branch: default Log Message: Merge with Nov2019 branch. diffs (truncated from 1165 to 300 lines): diff --git a/common/stream/stream.c b/common/stream/stream.c --- a/common/stream/stream.c +++ b/common/stream/stream.c @@ -73,6 +73,9 @@ # include # include #endif +#ifdef HAVE_POLL_H +#include +#endif #ifdef NATIVE_WIN32 #include @@ -2489,9 +2492,21 @@ socket_read(stream *restrict s, void *re #endif for (;;) { if (s->timeout) { + int ret; +#ifdef HAVE_POLL + struct pollfd pfd; + + pfd = (struct pollfd) {.fd = s->stream_data.s, + .events = POLLIN}; + + ret = poll(, 1, (int) s->timeout); + if (ret == -1 || (pfd.revents & POLLERR)) { + s->errnr = MNSTR_READ_ERROR; + return -1; + } +#else struct timeval tv; fd_set fds; - int ret; errno = 0; #ifdef _MSC_VER @@ -2512,6 +2527,7 @@ socket_read(stream *restrict s, void *re s->errnr = MNSTR_READ_ERROR; return -1; } +#endif if (ret == 0) { if (s->timeout_func == NULL || s->timeout_func()) { s->errnr = MNSTR_TIMEOUT; @@ -2520,7 +2536,11 @@ socket_read(stream *restrict s, void *re continue; } assert(ret == 1); +#ifdef HAVE_POLL + assert(pfd.revents & (POLLIN|POLLHUP)); +#else assert(FD_ISSET(s->stream_data.s, )); +#endif } #ifdef _MSC_VER nr = recv(s->stream_data.s, buf, (int) size, 0); @@ -2617,9 +2637,20 @@ static int socket_isalive(stream *s) { SOCKET fd = s->stream_data.s; - char buffer[32]; +#ifdef HAVE_POLL + struct pollfd pfd; + int ret; + pfd = (struct pollfd){.fd = fd}; + if ((ret = poll(, 1, 0)) == 0) + return 1; + if (ret < 0 || pfd.revents & (POLLERR | POLLHUP)) + return 0; + assert(0); /* unexpected revents value */ + return 0; +#else fd_set fds; struct timeval t; + char buffer[32]; t.tv_sec = 0; t.tv_usec = 0; @@ -2633,6 +2664,7 @@ socket_isalive(stream *s) #endif , NULL, NULL, ) <= 0 || recv(fd, buffer, sizeof(buffer), MSG_PEEK | MSG_DONTWAIT) != 0; +#endif } static stream * diff --git a/configure.ag b/configure.ag --- a/configure.ag +++ b/configure.ag @@ -2258,6 +2258,7 @@ AC_CHECK_HEADERS([ \ mach-o/dyld.h \ netdb.h \ netinet/in.h \ + poll.h \ procfs.h \ pwd.h \ strings.h \ @@ -2489,6 +2490,7 @@ AC_CHECK_FUNCS([\ nl_langinfo \ _NSGetExecutablePath \ pipe2 \ + poll \ popen \ posix_fadvise \ posix_fallocate \ diff --git a/monetdb5/modules/mal/mal_mapi.c b/monetdb5/modules/mal/mal_mapi.c --- a/monetdb5/modules/mal/mal_mapi.c +++ b/monetdb5/modules/mal/mal_mapi.c @@ -58,6 +58,9 @@ # include # include #endif +#ifdef HAVE_POLL_H +#include +#endif #ifdef HAVE_SYS_UIO_H # include #endif @@ -275,8 +278,13 @@ SERVERlistenThread(SOCKET *Sock) { char *msg = 0; int retval; +#ifdef HAVE_POLL + struct pollfd pfd[2]; + nfds_t npfd; +#else struct timeval tv; fd_set fds; +#endif SOCKET sock = INVALID_SOCKET; SOCKET usock = INVALID_SOCKET; SOCKET msgsock = INVALID_SOCKET; @@ -291,6 +299,17 @@ SERVERlistenThread(SOCKET *Sock) (void)
MonetDB: default - Merge with Nov2019 branch.
Changeset: 6b3b1396de21 for MonetDB URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=6b3b1396de21 Modified Files: common/utils/matomic.h debian/control debian/fix-deb.sh debian/monetdb-testing-python.install gdk/gdk.h gdk/gdk_align.c gdk/gdk_bat.c gdk/gdk_batop.c gdk/gdk_hash.c gdk/gdk_hash.h gdk/gdk_imprints.c gdk/gdk_orderidx.c gdk/gdk_private.h gdk/gdk_system.h gdk/gdk_utils.c sql/test/subquery/Tests/subquery2.sql Branch: default Log Message: Merge with Nov2019 branch. diffs (truncated from 842 to 300 lines): diff --git a/common/utils/matomic.h b/common/utils/matomic.h --- a/common/utils/matomic.h +++ b/common/utils/matomic.h @@ -476,7 +476,7 @@ ATOMIC_CLEAR(ATOMIC_FLAG *var) pthread_mutex_unlock(>lck); } -#define USE_PTHREAD_LOCKS /* must use pthread locks */ +#define USE_NATIVE_LOCKS /* must use pthread locks */ #endif diff --git a/debian/control b/debian/control --- a/debian/control +++ b/debian/control @@ -11,7 +11,7 @@ Build-Depends: debhelper (>= 9), autotoo libssl-dev, libxml2-dev, pkg-config, python, python-dev, python-numpy, python3, python3-dev, python3-numpy, - unixodbc-dev, uuid-dev, zlib1g-dev, liblas-c-dev (>= 1.8.0), r-base, + unixodbc-dev, uuid-dev, zlib1g-dev, liblas-c-dev (>= 1.8.0), r-base-dev, libcfitsio-dev Standards-Version: 3.8.0 X-Python-Version: >= 2.6 diff --git a/debian/fix-deb.sh b/debian/fix-deb.sh --- a/debian/fix-deb.sh +++ b/debian/fix-deb.sh @@ -49,17 +49,19 @@ jessie) # Debian 8 still have php5-cli and doesn't have php*-sockets; # newer ones use php-cli and do have php-sockets. sed -i 's/php-cli/php5-cli/;s/, *php-sockets//' debian/control -;; -esac -case $SUITE in -jessie) # The Python 3 version is too old for py3integration. sed -i '/^Package: monetdb-python3/,/^$/d' debian/control sed -i 's/ python3-dev, python3-numpy,//' debian/control rm debian/monetdb-python3.install sed -i 's/py3integration=yes/py3integration=no/' debian/rules -;; +;; +eoan) +# Ubuntu 19.10 (Eoan Ermine) doesn't have liblas-c-dev, hence no LiDAR +sed -i 's/ liblas-c-dev[^,]*,//' debian/control +sed -i '/^Package: libmonetdb5-server-lidar/,/^$/d' debian/control +sed -i '/--enable-lidar=yes/s/yes/no/;/--enable-liblas=yes/s/yes/no/' debian/rules +;; esac # debhelper compatibility 9 and later support multiarch by using diff --git a/debian/monetdb-testing-python.install b/debian/monetdb-testing-python.install --- a/debian/monetdb-testing-python.install +++ b/debian/monetdb-testing-python.install @@ -1,3 +1,3 @@ debian/tmp/usr/bin/Mapprove.py usr/bin debian/tmp/usr/bin/Mtest.py usr/bin -debian/tmp/usr/lib/python3.*/*-packages/MonetDBtesting/* +debian/tmp/usr/lib/python3*/*-packages/MonetDBtesting/* diff --git a/gdk/gdk.h b/gdk/gdk.h --- a/gdk/gdk.h +++ b/gdk/gdk.h @@ -807,6 +807,8 @@ typedef struct BAT { /* dynamic column properties */ COLrec T; /* column info */ + + MT_Lock batIdxLock; /* lock to manipulate indexes */ } BAT; typedef struct BATiter { diff --git a/gdk/gdk_align.c b/gdk/gdk_align.c --- a/gdk/gdk_align.c +++ b/gdk/gdk_align.c @@ -133,6 +133,7 @@ VIEWcreate(oid seq, BAT *b) BBPunshare(tp); if (bn->tvheap) BBPunshare(bn->tvheap->parentid); + MT_lock_destroy(>batIdxLock); GDKfree(bn); return NULL; } diff --git a/gdk/gdk_bat.c b/gdk/gdk_bat.c --- a/gdk/gdk_bat.c +++ b/gdk/gdk_bat.c @@ -124,6 +124,9 @@ BATcreatedesc(oid hseq, int tt, bool hea bn->tvheap->parentid = bn->batCacheid; bn->tvheap->farmid = BBPselectfarm(role, bn->ttype, varheap); } + char name[16]; + snprintf(name, sizeof(name), "BATlock%d", bn->batCacheid); /* fits */ + MT_lock_init(>batIdxLock, name); bn->batDirtydesc = true; return bn; bailout: @@ -186,16 +189,10 @@ COLnew(oid hseq, int tt, BUN cap, role_t cap = (cap + BATTINY - 1) & ~(BATTINY - 1); if (cap < BATTINY) cap = BATTINY; - /* and in case we don't have assertions enabled: limit the size */ + /* limit the size */ if (cap > BUN_MAX) cap = BUN_MAX; - /* and in case we don't have assertions enabled: limit the size */ - if (cap > BUN_MAX) { - /* shouldn't happen, but if it does... */ - assert(0); - cap = BUN_MAX; - } bn = BATcreatedesc(hseq, tt, tt != TYPE_void, role); if (bn == NULL) return NULL; @@ -222,6 +219,7 @@ COLnew(oid hseq, int tt, BUN cap, role_t bailout: BBPclear(bn->batCacheid); HEAPfree(>theap, true); + MT_lock_destroy(>batIdxLock); GDKfree(bn);
MonetDB: default - Merge with Nov2019 branch.
Changeset: 07e0a354a573 for MonetDB URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=07e0a354a573 Added Files: sql/test/BugTracker-2019/Tests/select-char.Bug-6761.sql Modified Files: MonetDB.spec clients/mapiclient/stethoscope.c configure.ag monetdb5/mal/mal_dataflow.c sql/backends/monet5/rel_bin.c sql/backends/monet5/sql.c sql/backends/monet5/sql_result.c sql/backends/monet5/sql_result.h sql/server/sql_mvc.c sql/server/sql_parser.y sql/storage/bat/res_table.c sql/storage/sql_storage.h sql/storage/store.c sql/test/BugTracker-2009/Tests/insert_into_done_by_procedure.SF-2607293.sql sql/test/BugTracker-2019/Tests/All sql/test/analytics/Tests/analytics09.stable.err sql/test/analytics/Tests/analytics09.stable.out Branch: default Log Message: Merge with Nov2019 branch. diffs (truncated from 1174 to 300 lines): diff --git a/MonetDB.spec b/MonetDB.spec --- a/MonetDB.spec +++ b/MonetDB.spec @@ -84,9 +84,9 @@ %bcond_without rintegration %endif -# On Fedora and RHEL 7, create the MonetDB-python2 package. +# On Fedora <= 30 and RHEL 7, create the MonetDB-python2 package. # On RHEL 6, numpy is too old. -%if %{?rhel:0}%{!?rhel:1} || 0%{?rhel} >= 7 +%if 0%{?rhel} == 7 || %{!?fedora:1000}%{?fedora} <= 30 %bcond_without py2integration %endif %if %{?rhel:0}%{!?rhel:1} @@ -164,12 +164,7 @@ BuildRequires: python-devel # RedHat Enterprise Linux calls it simply numpy BuildRequires: numpy %else -%if (0%{?fedora} >= 24) BuildRequires: python2-numpy -%else -# Fedora <= 23 doesn't have python2-numpy -BuildRequires: numpy -%endif %endif %endif %if %{with py3integration} @@ -1053,7 +1048,12 @@ do install -p -m 644 buildtools/selinux/monetdb.pp.${selinuxvariant} \ %{buildroot}%{_datadir}/selinux/${selinuxvariant}/monetdb.pp done -/usr/sbin/hardlink -cv %{buildroot}%{_datadir}/selinux +if [ -x /usr/sbin/hardlink ]; then +/usr/sbin/hardlink -cv %{buildroot}%{_datadir}/selinux +else +# Fedora 31 +/usr/bin/hardlink -cv %{buildroot}%{_datadir}/selinux +fi %endif %post -p /sbin/ldconfig diff --git a/clients/mapiclient/stethoscope.c b/clients/mapiclient/stethoscope.c --- a/clients/mapiclient/stethoscope.c +++ b/clients/mapiclient/stethoscope.c @@ -110,7 +110,7 @@ renderEvent(EventRecord *ev){ return; fprintf(s, "[ "); fprintf(s, "%"PRId64", ", ev->eventnr); - printf("\"%s\", ", ev->time); + fprintf(s, "\"%s\", ", ev->time); if( ev->function && *ev->function) fprintf(s, "\"%s[%d]%d\", ", ev->function, ev->pc, ev->tag); else diff --git a/configure.ag b/configure.ag --- a/configure.ag +++ b/configure.ag @@ -1013,7 +1013,7 @@ AC_PROG_LN_S AC_CHECK_PROGS([DIFF], [gdiff diff]) AC_DEFINE_UNQUOTED([DIFF], ["$DIFF"], [Program to perform diffs]) -AC_CHECK_PROGS([RPMBUILD], [rpmbuild]) +AC_CHECK_PROG([RPMBUILD], [rpmbuild], [rpmbuild], [false]) # This is how we use the various Python-related configuration variables. # PYTHON - the Python interpreter we use for testing. This can either @@ -2268,7 +2268,6 @@ AC_CHECK_HEADERS([ \ sys/param.h \ sys/resource.h \ sys/socket.h \ - sys/sysctl.h \ sys/time.h \ sys/times.h \ sys/types.h \ @@ -2283,12 +2282,14 @@ AC_CHECK_HEADERS([ \ ]) # on OpenBSD, sys/sysctl.h requires sys/param.h to be included beforehand -AC_CHECK_HEADERS([sys/sysctl.h], [], [], -[ - @%:@ifdef HAVE_SYS_PARAM_H - @%:@ include - @%:@endif -]) +AS_CASE([$host_os], + [linux*], [], + [AC_CHECK_HEADERS([sys/sysctl.h], [], [], + [ + @%:@ifdef HAVE_SYS_PARAM_H + @%:@ include + @%:@endif + ])]) SOCKET_LIBS="" diff --git a/monetdb5/mal/mal_dataflow.c b/monetdb5/mal/mal_dataflow.c --- a/monetdb5/mal/mal_dataflow.c +++ b/monetdb5/mal/mal_dataflow.c @@ -234,26 +234,30 @@ q_dequeue(Queue *q, Client cntxt) for (i = q->last - 1; i >= 0; i--) { if (q->data[i]->flow->cntxt == cntxt) { - if(minpc < 0){ + if (q->last > 1024) { + /* for long "queues", just grab the first eligible +* entry we encounter */ + minpc = i; + break; + } + /* for shorter "queues", find the oldest eligible entry */ + if (minpc < 0) { minpc = i; s = q->data[i]; } r = q->data[i]; - if( s && r && s->pc > r->pc){ +
MonetDB: default - Merge with Nov2019 branch
Changeset: a90c13e966b2 for MonetDB URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=a90c13e966b2 Modified Files: sql/backends/monet5/rel_bin.c sql/backends/monet5/sql_cat.c sql/backends/monet5/sql_upgrades.c sql/include/sql_catalog.h sql/server/rel_psm.c sql/server/rel_select.c sql/server/sql_env.c sql/server/sql_mvc.c sql/server/sql_mvc.h sql/server/sql_qc.c sql/server/sql_qc.h sql/storage/sql_storage.h sql/storage/store.c sql/storage/store_dependency.c sql/test/subquery/Tests/correlated.stable.err sql/test/subquery/Tests/correlated.stable.out sql/test/subquery/Tests/subquery.sql sql/test/subquery/Tests/subquery.stable.err Branch: default Log Message: Merge with Nov2019 branch diffs (truncated from 1256 to 300 lines): diff --git a/sql/backends/monet5/rel_bin.c b/sql/backends/monet5/rel_bin.c --- a/sql/backends/monet5/rel_bin.c +++ b/sql/backends/monet5/rel_bin.c @@ -5698,7 +5698,7 @@ output_rel_bin(backend *be, sql_rel *rel { mvc *sql = be->mvc; list *refs = sa_list(sql->sa); - int sqltype = sql->type; + sql_query_t sqltype = sql->type; stmt *s; if (refs == NULL) diff --git a/sql/backends/monet5/sql_cat.c b/sql/backends/monet5/sql_cat.c --- a/sql/backends/monet5/sql_cat.c +++ b/sql/backends/monet5/sql_cat.c @@ -768,17 +768,15 @@ create_func(mvc *sql, char *sname, char if (!s) s = cur_schema(sql); nf = mvc_create_func(sql, NULL, s, f->base.name, f->ops, f->res, f->type, f->lang, f->mod, f->imp, f->query, f->varres, f->vararg, f->system); - if (nf && nf->query && nf->lang <= FUNC_LANG_SQL) { + if (nf && nf->query && !LANG_EXT(nf->lang)) { char *buf; sql_rel *r = NULL; sql_allocator *sa = sql->sa; - sql->sa = sa_create(); - if(!sql->sa) - throw(SQL, "sql.catalog",SQLSTATE(HY001) MAL_MALLOC_FAIL); - buf = sa_strdup(sql->sa, nf->query); - if(!buf) - throw(SQL, "sql.catalog",SQLSTATE(HY001) MAL_MALLOC_FAIL); + if (!(sql->sa = sa_create())) + throw(SQL, "sql.catalog", SQLSTATE(HY001) MAL_MALLOC_FAIL); + if (!(buf = sa_strdup(sql->sa, nf->query))) + throw(SQL, "sql.catalog", SQLSTATE(HY001) MAL_MALLOC_FAIL); r = rel_parse(sql, s, buf, m_deps); if (r) r = rel_unnest(sql, r); 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 @@ -81,7 +81,7 @@ sql_fix_system_tables(Client c, mvc *sql " (%d, '%s', '%s', '%s'," " %d, %d, %s, %s, %s, %d, %s);\n", func->base.id, func->base.name, - func->imp, func->mod, FUNC_LANG_INT, + func->imp, func->mod, (int) FUNC_LANG_INT, (int) func->type, func->side_effect ? "true" : "false", func->varres ? "true" : "false", @@ -149,7 +149,7 @@ sql_fix_system_tables(Client c, mvc *sql " (%d, '%s', '%s', '%s', %d, %d, false," " %s, %s, %d, %s);\n", aggr->base.id, aggr->base.name, aggr->imp, - aggr->mod, FUNC_LANG_INT, (int) aggr->type, + aggr->mod, (int) FUNC_LANG_INT, (int) aggr->type, aggr->varres ? "true" : "false", aggr->vararg ? "true" : "false", aggr->s ? aggr->s->base.id : s->base.id, diff --git a/sql/include/sql_catalog.h b/sql/include/sql_catalog.h --- a/sql/include/sql_catalog.h +++ b/sql/include/sql_catalog.h @@ -11,6 +11,7 @@ #include "sql_mem.h" #include "sql_list.h" +#include "sql_querytype.h" #include "stream.h" #define tr_none0 @@ -40,21 +41,23 @@ #define PRIV_COPYFROMFILE 1 #define PRIV_COPYINTOFILE 2 -#define SCHEMA_DEPENDENCY 1 -#define TABLE_DEPENDENCY 2 -#define COLUMN_DEPENDENCY 3 -#define KEY_DEPENDENCY 4 -#define VIEW_DEPENDENCY 5 -#define USER_DEPENDENCY 6 -#define FUNC_DEPENDENCY 7 -#define TRIGGER_DEPENDENCY 8 -#define OWNER_DEPENDENCY 9 -#define INDEX_DEPENDENCY 10 -#define FKEY_DEPENDENCY 11 -#define SEQ_DEPENDENCY 12 -#define PROC_DEPENDENCY 13 -#define BEDROPPED_DEPENDENCY 14/*The object must be dropped when the dependent object is dropped independently of the DROP type.*/ -#define TYPE_DEPENDENCY 15 +typedef enum sql_dependency { + SCHEMA_DEPENDENCY = 1, + TABLE_DEPENDENCY
MonetDB: default - Merge with Nov2019 branch
Changeset: 1f5597aa84dd for MonetDB URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=1f5597aa84dd Added Files: sql/test/BugTracker-2019/Tests/double-free.Bug-6757.sql sql/test/BugTracker-2019/Tests/double-free.Bug-6757.stable.err sql/test/BugTracker-2019/Tests/double-free.Bug-6757.stable.out Modified Files: gdk/gdk_storage.c sql/server/rel_optimizer.c sql/test/BugTracker-2019/Tests/All sql/test/BugTracker-2019/Tests/cte-union.Bug-6755.stable.err sql/test/BugTracker-2019/Tests/cte-union.Bug-6755.stable.out sql/test/BugTracker-2019/Tests/sequence-first-next-value.Bug-6743.stable.out sql/test/subquery/Tests/subquery2.sql sql/test/testdb-reload/Tests/reload.py testing/process.py Branch: default Log Message: Merge with Nov2019 branch diffs (truncated from 2088 to 300 lines): diff --git a/gdk/gdk_storage.c b/gdk/gdk_storage.c --- a/gdk/gdk_storage.c +++ b/gdk/gdk_storage.c @@ -586,10 +586,12 @@ GDKload(int farmid, const char *nme, con nme = path; } if (nme != NULL && GDKextend(nme, size) == GDK_SUCCEED) { - int mod = MMAP_READ | MMAP_WRITE | MMAP_SEQUENTIAL | MMAP_SYNC; + int mod = MMAP_READ | MMAP_WRITE | MMAP_SEQUENTIAL; if (mode == STORE_PRIV) mod |= MMAP_COPY; + else + mod |= MMAP_SYNC; ret = GDKmmap(nme, mod, size); if (ret != NULL) { /* success: update allocated size */ 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 @@ -33,4 +33,5 @@ alter_table_drop_column.Bug-6749 HAVE_PYMONETDB?remote-table-non-existent-column.Bug-6750 cte-union.Bug-6755 merge-table-limit.Bug-6756 +double-free.Bug-6757 HAVE_LIBPY3?python-loader-string.Bug-6759 diff --git a/sql/test/BugTracker-2019/Tests/double-free.Bug-6757.sql b/sql/test/BugTracker-2019/Tests/double-free.Bug-6757.sql new file mode 100644 --- /dev/null +++ b/sql/test/BugTracker-2019/Tests/double-free.Bug-6757.sql @@ -0,0 +1,976 @@ +start transaction; + +CREATE TABLE "sys"."params_str" ( + "paramname" CHARACTER LARGE OBJECT, + "value" CHARACTER LARGE OBJECT, + "prob" DOUBLE +); +CREATE TABLE "sys"."bm_0_obj_dict" ( + "id"INTEGER NOT NULL, + "idstr" CHARACTER LARGE OBJECT NOT NULL, + "prob" FLOAT(51) NOT NULL, + CONSTRAINT "bm_0_obj_dict_id_pkey" PRIMARY KEY ("id"), + CONSTRAINT "bm_0_obj_dict_idstr_unique" UNIQUE ("idstr") +); +CREATE TABLE "sys"."bm_0_obj_type" ( + "id" INTEGER NOT NULL, + "type"INTEGER NOT NULL, + "typestr" CHARACTER LARGE OBJECT NOT NULL, + "prob"DOUBLENOT NULL, + CONSTRAINT "bm_0_obj_type_id_fkey" FOREIGN KEY ("id") REFERENCES "sys"."bm_0_obj_dict" ("id"), + CONSTRAINT "bm_0_obj_type_type_fkey" FOREIGN KEY ("type") REFERENCES "sys"."bm_0_obj_dict" ("id") +); +CREATE TABLE "sys"."tr_0_obj_dict" ( + "id"INTEGER NOT NULL, + "idstr" CHARACTER LARGE OBJECT NOT NULL, + "prob" FLOAT(51) NOT NULL, + CONSTRAINT "tr_0_obj_dict_id_pkey" PRIMARY KEY ("id"), + CONSTRAINT "tr_0_obj_dict_idstr_unique" UNIQUE ("idstr") +); +CREATE TABLE "sys"."tr_0_obj_type" ( + "id" INTEGER NOT NULL, + "type"INTEGER NOT NULL, + "typestr" CHARACTER LARGE OBJECT NOT NULL, + "prob"DOUBLENOT NULL, + CONSTRAINT "tr_0_obj_type_id_fkey" FOREIGN KEY ("id") REFERENCES "sys"."tr_0_obj_dict" ("id"), + CONSTRAINT "tr_0_obj_type_type_fkey" FOREIGN KEY ("type") REFERENCES "sys"."tr_0_obj_dict" ("id") +); + +CREATE TABLE "sys"."_cachedrel_4" ( + "a1" INTEGER, + "prob" FLOAT(51) +); +CREATE TABLE "sys"."_cachedrel_5" ( + "a1" INTEGER, + "prob" DOUBLE +); +CREATE TABLE "sys"."_cachedrel_6" ( + "a1" INTEGER, + "prob" DOUBLE +); +CREATE TABLE "sys"."_cachedrel_7" ( + "a1" INTEGER, + "prob" FLOAT(51) +); +CREATE TABLE "sys"."_cachedrel_8" ( + "a1" INTEGER, + "a2" INTEGER, + "a3" CHARACTER LARGE OBJECT, + "a4" CHARACTER LARGE OBJECT, + "prob" DOUBLE +); +CREATE TABLE "sys"."_cachedrel_9" ( + "a1" INTEGER, + "a2" INTEGER, + "a3" CHARACTER LARGE OBJECT, + "a4" CHARACTER LARGE OBJECT, + "prob" DOUBLE +); +CREATE TABLE "sys"."_cachedrel_10" ( + "a1" INTEGER, + "a2" CHARACTER LARGE OBJECT, + "a3" CHARACTER LARGE OBJECT, + "prob" DOUBLE +); +CREATE TABLE "sys"."_cachedrel_11" ( + "a1" INTEGER, + "a2" CHARACTER LARGE OBJECT, + "a3" CHARACTER LARGE
MonetDB: default - Merge with Nov2019 branch.
Changeset: 1390f2503198 for MonetDB URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=1390f2503198 Modified Files: gdk/gdk_bbp.c gdk/gdk_heap.c gdk/gdk_interprocess.c gdk/gdk_storage.c sql/backends/monet5/UDF/pyapi/pyapi.c sql/server/rel_semantic.c sql/storage/store.c sql/test/subquery/Tests/subquery2.sql tools/merovingian/daemon/controlrunner.c Branch: default Log Message: Merge with Nov2019 branch. diffs (truncated from 342 to 300 lines): diff --git a/gdk/gdk_bbp.c b/gdk/gdk_bbp.c --- a/gdk/gdk_bbp.c +++ b/gdk/gdk_bbp.c @@ -1737,7 +1737,7 @@ BBPdir_subcommit(int cnt, bat *subcommit assert(subcommit[n - 1] < subcommit[n]); #endif - if ((nbbpf = GDKfilelocate(0, "BBP", "w", "dir")) == NULL) + if ((nbbpf = GDKfilelocate(0, "BBP", "wx", "dir")) == NULL) return GDK_FAIL; n = (bat) ATOMIC_GET(); @@ -1849,7 +1849,7 @@ BBPdir(int cnt, bat *subcommit) return BBPdir_subcommit(cnt, subcommit); IODEBUG fprintf(stderr, "#BBPdir: writing BBP.dir (%d bats).\n", (int) (bat) ATOMIC_GET()); - if ((fp = GDKfilelocate(0, "BBP", "w", "dir")) == NULL) { + if ((fp = GDKfilelocate(0, "BBP", "wx", "dir")) == NULL) { goto bailout; } diff --git a/gdk/gdk_heap.c b/gdk/gdk_heap.c --- a/gdk/gdk_heap.c +++ b/gdk/gdk_heap.c @@ -61,7 +61,7 @@ HEAPcreatefile(int farmid, size_t *maxsz fn = path; } /* round up to mulitple of GDK_mmap_pagesize */ - fd = GDKfdlocate(NOFARM, fn, "wb", NULL); + fd = GDKfdlocate(NOFARM, fn, "wxb", NULL); if (fd >= 0) { close(fd); base = GDKload(NOFARM, fn, NULL, *maxsz, maxsz, STORE_MMAP); @@ -119,36 +119,12 @@ HEAPalloc(Heap *h, size_t nitems, size_t } if (!GDKinmemory() && h->base == NULL) { char *nme; - struct stat st; - if(!(nme = GDKfilepath(h->farmid, BATDIR, h->filename, NULL))) { - GDKerror("HEAPalloc: malloc failure"); + nme = GDKfilepath(h->farmid, BATDIR, h->filename, NULL); + if (nme == NULL) return GDK_FAIL; - } - if (stat(nme, ) < 0) { - h->storage = STORE_MMAP; - h->base = HEAPcreatefile(NOFARM, >size, nme); - } else { - int fd; - - fd = GDKfdlocate(NOFARM, nme, "wb", NULL); - if (fd >= 0) { - char of[sizeof(h->filename)]; - char *ext; - close(fd); - strncpy(of, h->filename, sizeof(of)); -#ifdef STATIC_CODE_ANALYSIS - /* help coverity */ - of[sizeof(h->filename) - 1] = 0; -#endif - ext = decompose_filename(of); - h->newstorage = STORE_MMAP; - if (HEAPload(h, of, ext, false) != GDK_SUCCEED) - h->base = NULL; /* superfluous */ - /* success checked by looking at -* h->base below */ - } - } + h->storage = STORE_MMAP; + h->base = HEAPcreatefile(NOFARM, >size, nme); GDKfree(nme); } if (h->base == NULL) { @@ -270,6 +246,7 @@ HEAPextend(Heap *h, size_t size, bool ma HEAPfree(, false); return GDK_SUCCEED; } + GDKclrerr(); } fd = GDKfdlocate(h->farmid, nme, "wb", ext); if (fd >= 0) { @@ -445,7 +422,7 @@ GDKupgradevarheap(BAT *b, var_t v, bool const char *base = b->theap.base; /* first save heap in file with extra .tmp extension */ - if ((fd = GDKfdlocate(b->theap.farmid, b->theap.filename, "wb", "tmp")) < 0) + if ((fd = GDKfdlocate(b->theap.farmid, b->theap.filename, "wxb", "tmp")) < 0) return GDK_FAIL; while (size > 0) { ret = write(fd, base, (unsigned) MIN(1 << 30, size)); diff --git a/gdk/gdk_interprocess.c b/gdk/gdk_interprocess.c --- a/gdk/gdk_interprocess.c +++ b/gdk/gdk_interprocess.c @@ -28,7 +28,7 @@ #include #include -static size_t interprocess_unique_id = 1; +static ATOMIC_TYPE interprocess_unique_id = ATOMIC_VAR_INIT(1); static key_t base_key = 8; // Regular ftok produces too many collisions @@ -46,12 +46,7 @@ ftok_enhanced(int id, key_t * return_key size_t GDKuniqueid(size_t offset) { - // TODO: lock this
MonetDB: default - Merge with Nov2019 branch
Changeset: 218824eb44c5 for MonetDB URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=218824eb44c5 Added Files: sql/test/BugTracker-2019/Tests/python-loader-string.Bug-6759.py sql/test/BugTracker-2019/Tests/python-loader-string.Bug-6759.stable.err sql/test/BugTracker-2019/Tests/python-loader-string.Bug-6759.stable.out Modified Files: clients/mapiclient/mclient.c gdk/gdk_logger.c monetdb5/modules/mal/tablet.c sql/backends/monet5/sql.c sql/backends/monet5/sql_upgrades.c sql/server/rel_psm.c sql/test/BugTracker-2018/Tests/All sql/test/BugTracker-2018/Tests/sqlitelogictest-having-not-null-not-in.Bug-6557.sql sql/test/BugTracker-2018/Tests/sqlitelogictest-having-not-null-not-in.Bug-6557.stable.out sql/test/BugTracker-2019/Tests/All sql/test/BugTracker-2019/Tests/duplicates-not-eliminated-long-CASE-stmt.Bug-6697.sql Branch: default Log Message: Merge with Nov2019 branch diffs (truncated from 428 to 300 lines): diff --git a/clients/mapiclient/mclient.c b/clients/mapiclient/mclient.c --- a/clients/mapiclient/mclient.c +++ b/clients/mapiclient/mclient.c @@ -3664,6 +3664,9 @@ main(int argc, char **argv) if (mode == SQL) dump_version(mid, toConsole, "Database:"); + mnstr_printf(toConsole, "FOLLOW US on https://twitter.com/MonetDB "); + mnstr_printf(toConsole, "or https://github.com/MonetDB/MonetDB\n;); + mnstr_printf(toConsole, "Type \\q to quit, \\? for a list of available commands\n"); if (mode == SQL) mnstr_printf(toConsole, "auto commit mode: %s\n", diff --git a/gdk/gdk_logger.c b/gdk/gdk_logger.c --- a/gdk/gdk_logger.c +++ b/gdk/gdk_logger.c @@ -3034,8 +3034,10 @@ pre_allocate(logger *lg) p = (lng) getfilepos(getFile(lg->log)); if (p == -1) return GDK_FAIL; - if (p > LOG_LARGE) + if (p > LOG_LARGE) { + lg->id++; return logger_open(lg); + } if (p + DBLKSZ > lg->end) { p &= ~(DBLKSZ - 1); p += SEGSZ; diff --git a/monetdb5/modules/mal/tablet.c b/monetdb5/modules/mal/tablet.c --- a/monetdb5/modules/mal/tablet.c +++ b/monetdb5/modules/mal/tablet.c @@ -670,7 +670,7 @@ tablet_error(READERtask *task, lng row, BUNappend(task->cntxt->error_msg, msg, false) != GDK_SUCCEED || BUNappend(task->cntxt->error_input, fcn, false) != GDK_SUCCEED) task->besteffort = 0; - if (!is_lng_nil(row) && task->rowerror) + if (!is_lng_nil(row) && task->rowerror && row < task->limit) task->rowerror[row]++; } if (task->as->error == NULL) { 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 @@ -464,8 +464,7 @@ create_table_from_emit(Client cntxt, cha return msg; /* for some reason we don't have an allocator here, so make one */ - sql->sa = sa_create(); - if (!sql->sa) { + if (!(sql->sa = sa_create())) { msg = sql_error(sql, 02, SQLSTATE(HY001) "CREATE TABLE: %s", MAL_MALLOC_FAIL); goto cleanup; } @@ -481,44 +480,44 @@ create_table_from_emit(Client cntxt, cha goto cleanup; } - for(i = 0; i < ncols; i++) { + for (i = 0; i < ncols; i++) { BAT *b = columns[i].b; - sql_subtype *tpe = sql_bind_localtype(ATOMname(b->ttype)); + str atoname = ATOMname(b->ttype); + sql_subtype tpe; sql_column *col = NULL; - if (!tpe) { - msg = sql_error(sql, 02, SQLSTATE(3F000) "CREATE TABLE: could not find type for column"); - goto cleanup; + if (!strcmp(atoname, "str")) + sql_find_subtype(, "clob", 0, 0); + else { + sql_subtype *t = sql_bind_localtype(atoname); + if (!t) { + msg = sql_error(sql, 02, SQLSTATE(3F000) "CREATE TABLE: could not find type for column"); + goto cleanup; + } + tpe = *t; } - col = mvc_create_column(sql, t, columns[i].name, tpe); - if (!col) { + if (!(col = mvc_create_column(sql, t, columns[i].name, ))) { msg = sql_error(sql, 02, SQLSTATE(3F000) "CREATE TABLE: could not create column %s", columns[i].name); goto cleanup; } } - msg = create_table_or_view(sql, sname, t->base.name, t, 0); - if (msg != MAL_SUCCEED) { + if ((msg = create_table_or_view(sql, sname,
MonetDB: default - Merge with Nov2019 branch.
Changeset: b8fb0f242164 for MonetDB URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=b8fb0f242164 Modified Files: NT/rules.msc configure.ag sql/backends/monet5/sql.c sql/backends/monet5/sql_cat.c sql/backends/monet5/sql_upgrades.c sql/common/sql_types.c sql/common/sql_types.h sql/include/sql_catalog.h sql/server/rel_psm.c sql/server/rel_psm.h sql/server/rel_schema.c sql/server/rel_select.c sql/server/rel_unnest.c sql/server/rel_unnest.h sql/server/sql_mvc.c sql/server/sql_mvc.h sql/server/sql_tokens.h sql/storage/sql_catalog.c sql/storage/sql_storage.h sql/storage/store.c sql/test/BugTracker-2009/Tests/All sql/test/BugTracker-2018/Tests/All sql/test/BugTracker/Tests/All sql/test/SQLite_regress/sqllogictest/sqllogictest.py testing/Mtest.py.in tools/merovingian/daemon/controlrunner.c Branch: default Log Message: Merge with Nov2019 branch. diffs (truncated from 1410 to 300 lines): diff --git a/NT/rules.msc b/NT/rules.msc --- a/NT/rules.msc +++ b/NT/rules.msc @@ -42,6 +42,7 @@ BITSMCHN=X64 # force W_CFLAGS off in debug builds: using icc, you get way more # warnings about casts which results in the code being uncompilable W_CFLAGS = +HAVE_MAL_DEBUGGER = 1 !ENDIF !IFDEF ENABLE_STRICT # strict mode: treat warnings as errors @@ -386,6 +387,11 @@ create_winconfig_conds_new_py: !ELSE $(ECHO) HAVE_SHP_FALSE='' >> "$(TOPDIR)\winconfig_conds_new.py" !ENDIF +!IFDEF HAVE_MAL_DEBUGGER + $(ECHO) HAVE_MAL_DEBUGGER_FALSE='#' >> "$(TOPDIR)\winconfig_conds_new.py" +!ELSE + $(ECHO) HAVE_MAL_DEBUGGER_FALSE='' >> "$(TOPDIR)\winconfig_conds_new.py" +!ENDIF !IFDEF HAVE_SQL $(ECHO) HAVE_SQL_FALSE='#' >> "$(TOPDIR)\winconfig_conds_new.py" !ELSE diff --git a/configure.ag b/configure.ag --- a/configure.ag +++ b/configure.ag @@ -838,6 +838,7 @@ AS_VAR_IF([enable_assert], [no], [ AC_MSG_RESULT([no])], [AC_MSG_RESULT([yes])]) +AM_CONDITIONAL([HAVE_MAL_DEBUGGER], [test "x$enable_assert" != xno]) AC_MSG_CHECKING([for --enable-optimize]) AS_CASE([$enable_optimize], [yes], [ 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 @@ -283,7 +283,7 @@ create_table_or_view(mvc *sql, char* sna int check = 0; if (STORE_READONLY) - return sql_error(sql, 06, "25006!schema statements cannot be executed on a readonly database."); + return sql_error(sql, 06, SQLSTATE(25006) "schema statements cannot be executed on a readonly database."); if (!s) return sql_message(SQLSTATE(3F000) "CREATE %s: schema '%s' doesn't exist", (t->query) ? "TABLE" : "VIEW", sname); @@ -473,11 +473,11 @@ create_table_from_emit(Client cntxt, cha if (!sname) sname = "sys"; if (!(s = mvc_bind_schema(sql, sname))) { - msg = sql_error(sql, 02, "3F000!CREATE TABLE: no such schema '%s'", sname); + msg = sql_error(sql, 02, SQLSTATE(3F000) "CREATE TABLE: no such schema '%s'", sname); goto cleanup; } if (!(t = mvc_create_table(sql, s, tname, tt_table, 0, SQL_DECLARED_TABLE, CA_COMMIT, -1, 0))) { - msg = sql_error(sql, 02, "3F000!CREATE TABLE: could not create table '%s'", tname); + msg = sql_error(sql, 02, SQLSTATE(3F000) "CREATE TABLE: could not create table '%s'", tname); goto cleanup; } @@ -487,13 +487,13 @@ create_table_from_emit(Client cntxt, cha sql_column *col = NULL; if (!tpe) { - msg = sql_error(sql, 02, "3F000!CREATE TABLE: could not find type for column"); + msg = sql_error(sql, 02, SQLSTATE(3F000) "CREATE TABLE: could not find type for column"); goto cleanup; } col = mvc_create_column(sql, t, columns[i].name, tpe); if (!col) { - msg = sql_error(sql, 02, "3F000!CREATE TABLE: could not create column %s", columns[i].name); + msg = sql_error(sql, 02, SQLSTATE(3F000) "CREATE TABLE: could not create column %s", columns[i].name); goto cleanup; } } @@ -503,7 +503,7 @@ create_table_from_emit(Client cntxt, cha } t = mvc_bind_table(sql, s, tname); if (!t) { - msg = sql_error(sql, 02, "3F000!CREATE TABLE: could not bind table %s", tname); + msg = sql_error(sql, 02, SQLSTATE(3F000) "CREATE TABLE: could not bind table %s", tname); goto cleanup; } for(i = 0; i < ncols; i++) { @@ -512,7 +512,7 @@ create_table_from_emit(Client cntxt, cha col = mvc_bind_column(sql,t,
MonetDB: default - Merge with Nov2019 branch.
Changeset: 6de0a2989c79 for MonetDB URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=6de0a2989c79 Added Files: sql/test/SQLite_regress/sqllogictest/Tests/test1.SQL.bat sql/test/SQLite_regress/sqllogictest/Tests/test1.SQL.sh sql/test/SQLite_regress/sqllogictest/Tests/test1.stable.err sql/test/SQLite_regress/sqllogictest/Tests/test1.stable.err-noapprove sql/test/SQLite_regress/sqllogictest/Tests/test1.stable.out sql/test/SQLite_regress/sqllogictest/Tests/test1.stable.out-noapprove sql/test/SQLite_regress/sqllogictest/Tests/test1.timeout sql/test/SQLite_regress/sqllogictest/Tests/test2.SQL.bat sql/test/SQLite_regress/sqllogictest/Tests/test2.SQL.sh sql/test/SQLite_regress/sqllogictest/Tests/test2.stable.err sql/test/SQLite_regress/sqllogictest/Tests/test2.stable.err-noapprove sql/test/SQLite_regress/sqllogictest/Tests/test2.stable.out sql/test/SQLite_regress/sqllogictest/Tests/test2.stable.out-noapprove sql/test/SQLite_regress/sqllogictest/Tests/test2.timeout sql/test/SQLite_regress/sqllogictest/Tests/test3.SQL.bat sql/test/SQLite_regress/sqllogictest/Tests/test3.SQL.sh sql/test/SQLite_regress/sqllogictest/Tests/test3.stable.err sql/test/SQLite_regress/sqllogictest/Tests/test3.stable.err-noapprove sql/test/SQLite_regress/sqllogictest/Tests/test3.stable.out sql/test/SQLite_regress/sqllogictest/Tests/test3.stable.out-noapprove sql/test/SQLite_regress/sqllogictest/Tests/test3.timeout sql/test/SQLite_regress/sqllogictest/Tests/test4.SQL.bat sql/test/SQLite_regress/sqllogictest/Tests/test4.SQL.sh sql/test/SQLite_regress/sqllogictest/Tests/test4.stable.err sql/test/SQLite_regress/sqllogictest/Tests/test4.stable.err-noapprove sql/test/SQLite_regress/sqllogictest/Tests/test4.stable.out sql/test/SQLite_regress/sqllogictest/Tests/test4.stable.out-noapprove sql/test/SQLite_regress/sqllogictest/Tests/test4.timeout sql/test/SQLite_regress/sqllogictest/Tests/test5.SQL.bat sql/test/SQLite_regress/sqllogictest/Tests/test5.SQL.sh sql/test/SQLite_regress/sqllogictest/Tests/test5.stable.err sql/test/SQLite_regress/sqllogictest/Tests/test5.stable.err-noapprove sql/test/SQLite_regress/sqllogictest/Tests/test5.stable.out sql/test/SQLite_regress/sqllogictest/Tests/test5.stable.out-noapprove sql/test/SQLite_regress/sqllogictest/Tests/test5.timeout sql/test/SQLite_regress/sqllogictest/sqllogictest.py Removed Files: sql/test/SQLite_regress/sqllogictest/Tests/select1.test.sql sql/test/SQLite_regress/sqllogictest/Tests/select1.test.stable.err sql/test/SQLite_regress/sqllogictest/Tests/select1.test.stable.out sql/test/SQLite_regress/sqllogictest/Tests/select1.test.stable.out.int128 sql/test/SQLite_regress/sqllogictest/Tests/select1.test.timeout sql/test/SQLite_regress/sqllogictest/Tests/select2.test.sql sql/test/SQLite_regress/sqllogictest/Tests/select2.test.stable.err sql/test/SQLite_regress/sqllogictest/Tests/select2.test.stable.out sql/test/SQLite_regress/sqllogictest/Tests/select2.test.stable.out.int128 sql/test/SQLite_regress/sqllogictest/Tests/select2.test.timeout sql/test/SQLite_regress/sqllogictest/Tests/select3.test.sql sql/test/SQLite_regress/sqllogictest/Tests/select3.test.stable.err sql/test/SQLite_regress/sqllogictest/Tests/select3.test.stable.out sql/test/SQLite_regress/sqllogictest/Tests/select3.test.stable.out.int128 sql/test/SQLite_regress/sqllogictest/Tests/select3.test.timeout sql/test/SQLite_regress/sqllogictest/Tests/select4.test.sql sql/test/SQLite_regress/sqllogictest/Tests/select4.test.stable.err sql/test/SQLite_regress/sqllogictest/Tests/select4.test.stable.out sql/test/SQLite_regress/sqllogictest/Tests/select4.test.stable.out.int128 sql/test/SQLite_regress/sqllogictest/Tests/select4.test.timeout sql/test/SQLite_regress/sqllogictest/Tests/select5.test.sql sql/test/SQLite_regress/sqllogictest/Tests/select5.test.stable.err sql/test/SQLite_regress/sqllogictest/Tests/select5.test.stable.out sql/test/SQLite_regress/sqllogictest/Tests/select5.test.timeout Modified Files: sql/backends/monet5/sql.c sql/backends/monet5/wlr.c sql/server/rel_optimizer.c sql/test/BugTracker-2018/Tests/sqlitelogictest-algebra-join-not-in.Bug-6519.sql sql/test/BugTracker-2018/Tests/sqlitelogictest-algebra-join-not-in.Bug-6519.stable.out sql/test/BugTracker-2018/Tests/sqlitelogictest-cast-null-not-in.Bug-6605.sql sql/test/BugTracker-2018/Tests/sqlitelogictest-cast-null-not-in.Bug-6605.stable.out sql/test/SQLite_regress/sqllogictest/Tests/All sql/test/subquery/Tests/subquery2.sql
MonetDB: default - Merge with Nov2019 branch.
Changeset: 83e6516454fc for MonetDB URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=83e6516454fc Removed Files: testing/monet_options.py.in Modified Files: gdk/gdk.h gdk/gdk_bat.c gdk/gdk_batop.c gdk/gdk_calc.c gdk/gdk_hash.c sql/backends/monet5/sql_statement.c sql/include/sql_catalog.h sql/rel.txt sql/server/rel_select.c sql/storage/bat/bat_storage.c sql/storage/sql_storage.h sql/storage/store.c sql/test/BugTracker-2013/Tests/rangejoin_optimizer.Bug-3411.stable.out sql/test/BugTracker-2018/Tests/All sql/test/mergetables/Tests/mergequery.stable.out sql/test/mergetables/Tests/part-elim.stable.out sql/test/remote/Tests/partition_elim.stable.out testing/Makefile.ag testing/Mtest.py.in Branch: default Log Message: Merge with Nov2019 branch. diffs (truncated from 1877 to 300 lines): diff --git a/gdk/gdk.h b/gdk/gdk.h --- a/gdk/gdk.h +++ b/gdk/gdk.h @@ -2720,6 +2720,7 @@ gdk_export void VIEWbounds(BAT *b, BAT * enum prop_t { GDK_MIN_VALUE = 3, /* smallest non-nil value in BAT */ GDK_MAX_VALUE, /* largest non-nil value in BAT */ + GDK_HASH_MASK, /* last used hash mask */ }; gdk_export void PROPdestroy(BAT *b); diff --git a/gdk/gdk_bat.c b/gdk/gdk_bat.c --- a/gdk/gdk_bat.c +++ b/gdk/gdk_bat.c @@ -1087,7 +1087,8 @@ BUNappend(BAT *b, const void *t, bool fo do { for (prop = b->tprops; prop; prop = prop->next) if (prop->id != GDK_MAX_VALUE && - prop->id != GDK_MIN_VALUE) { + prop->id != GDK_MIN_VALUE && + prop->id != GDK_HASH_MASK) { BATrmprop(b, prop->id); break; } @@ -1168,7 +1169,8 @@ BUNdelete(BAT *b, oid o) do { for (prop = b->tprops; prop; prop = prop->next) if (prop->id != GDK_MAX_VALUE && - prop->id != GDK_MIN_VALUE) { + prop->id != GDK_MIN_VALUE && + prop->id != GDK_HASH_MASK) { BATrmprop(b, prop->id); break; } @@ -1255,7 +1257,8 @@ BUNinplace(BAT *b, BUN p, const void *t, do { for (prop = b->tprops; prop; prop = prop->next) if (prop->id != GDK_MAX_VALUE && - prop->id != GDK_MIN_VALUE) { + prop->id != GDK_MIN_VALUE && + prop->id != GDK_HASH_MASK) { BATrmprop(b, prop->id); break; } diff --git a/gdk/gdk_batop.c b/gdk/gdk_batop.c --- a/gdk/gdk_batop.c +++ b/gdk/gdk_batop.c @@ -589,7 +589,8 @@ BATappend(BAT *b, BAT *n, BAT *s, bool f do { for (prop = b->tprops; prop; prop = prop->next) if (prop->id != GDK_MAX_VALUE && - prop->id != GDK_MIN_VALUE) { + prop->id != GDK_MIN_VALUE && + prop->id != GDK_HASH_MASK) { BATrmprop(b, prop->id); break; } diff --git a/gdk/gdk_calc.c b/gdk/gdk_calc.c --- a/gdk/gdk_calc.c +++ b/gdk/gdk_calc.c @@ -11009,6 +11009,8 @@ VARcalcxor(ValPtr ret, const ValRecord * /* -- */ /* logical (for type bit) or bitwise (for integral types) OR */ +#define or3(a,b) ((a) == 1 || (b) == 1 ? 1 : is_bit_nil(a) || is_bit_nil(b) ? bit_nil : 0) + #define OR(a, b) ((a) | (b)) static BUN @@ -11035,20 +11037,8 @@ or_typeswitchloop(const void *lft, int i j = x * incr2; bit v1 = ((const bit *) lft)[i]; bit v2 = ((const bit *) rgt)[j]; - /* note that any value not equal to 0 -* and not equal to bit_nil (0x80) is -* considered true */ - if (v1 & 0x7F || v2 & 0x7F) { - /* either one is true */ - ((bit *) dst)[k] = 1; - } else if (v1 == 0 && v2 == 0) { - /* both are false */ - ((bit *) dst)[k] = 0; - } else { - /* both are nil */ - ((bit *) dst)[k] = bit_nil; -
MonetDB: default - Merge with Nov2019 branch.
Changeset: 958ceda5184a for MonetDB URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=958ceda5184a Added Files: sql/test/BugTracker-2019/Tests/merge-table-limit.Bug-6756.sql sql/test/BugTracker-2019/Tests/merge-table-limit.Bug-6756.stable.err sql/test/BugTracker-2019/Tests/merge-table-limit.Bug-6756.stable.out Modified Files: gdk/gdk_string.c monetdb5/mal/mal_client.c monetdb5/modules/mal/tablet.c sql/server/rel_optimizer.c sql/test/BugTracker-2017/Tests/sqlitelogictest-comparisons-between-floating-points-and-NULL.Bug-6496.sql sql/test/BugTracker-2018/Tests/sqlitelogictest-having-not-null-not-in.Bug-6557.sql sql/test/BugTracker-2018/Tests/sqlitelogictest-having-not-null-not-in.Bug-6557.stable.out sql/test/BugTracker-2019/Tests/All sql/test/emptydb-upgrade-chain/Tests/upgrade.stable.out.32bit sql/test/emptydb-upgrade/Tests/upgrade.stable.out.32bit sql/test/testdb-upgrade-chain/Tests/upgrade.stable.out.32bit sql/test/testdb-upgrade/Tests/upgrade.stable.out.32bit Branch: default Log Message: Merge with Nov2019 branch. diffs (truncated from 34695 to 300 lines): diff --git a/gdk/gdk_string.c b/gdk/gdk_string.c --- a/gdk/gdk_string.c +++ b/gdk/gdk_string.c @@ -258,6 +258,41 @@ strPut(Heap *h, var_t *dst, const char * } /* the string was not found in the heap, we need to enter it */ + if (v[0] != '\200' || v[1] != '\0') { + /* check that string is correctly encoded UTF-8; there +* was no need to do this earlier: if the string was +* found above, it must have gone through here in the +* past */ + int nutf8 = 0; + int m = 0; + for (size_t i = 0; v[i]; i++) { + if (nutf8 > 0) { + if ((v[i] & 0xC0) != 0x80 || + (m != 0 && (v[i] & m) == 0)) { + badutf8: + GDKerror("strPut: incorrectly encoded UTF-8"); + return 0; + } + m = 0; + nutf8--; + } else if ((v[i] & 0xE0) == 0xC0) { + nutf8 = 1; + if ((v[i] & 0x1E) == 0) + goto badutf8; + } else if ((v[i] & 0xF0) == 0xE0) { + nutf8 = 2; + if ((v[i] & 0x0F) == 0) + m = 0x20; + } else if ((v[i] & 0xF8) == 0xF0) { + nutf8 = 3; + if ((v[i] & 0x07) == 0) + m = 0x30; + } else if ((v[i] & 0x80) != 0) { + goto badutf8; + } + } + } + pad = GDK_VARALIGN - (h->free & (GDK_VARALIGN - 1)); if (elimbase == 0) {/* i.e. h->free < GDK_ELIMLIMIT */ if (pad < sizeof(stridx_t)) { @@ -310,56 +345,6 @@ strPut(Heap *h, var_t *dst, const char * /* insert string */ pos = h->free + pad + extralen; *dst = (var_t) pos; -#ifndef NDEBUG - /* just before inserting into the heap, make sure that the -* string is actually UTF-8 (if we encountered a return -* statement before this, the string was already in the heap, -* and hence already checked) */ - if (v[0] != '\200' || v[1] != '\0') { - /* not str_nil, must be UTF-8 */ - size_t i; - - for (i = 0; v[i] != '\0'; i++) { - /* check that v[i] is the start of a validly -* coded UTF-8 sequence: this involves -* checking that the first byte is a valid -* start byte and is followed by the correct -* number of follow-up bytes, but also that -* the sequence cannot be shorter */ - if ((v[i] & 0x80) == 0) { - /* 0aaa */ - continue; - } else if ((v[i] & 0xE0) == 0xC0) { - /* 110a 10aa -* one of the b's must be set*/ - assert(v[i] & 0x4D); - i++; - assert((v[i] & 0xC0) == 0x80); - } else if ((v[i] & 0xF0) == 0xE0) { - /* 1110 10ca 10aa -* one of the c's must be set*/ - assert(v[i] & 0x0F || v[i + 1] & 0x20); -
MonetDB: default - Merge with Nov2019 branch.
Changeset: 503c8dae0cbe for MonetDB URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=503c8dae0cbe Modified Files: gdk/gdk_calc.c sql/test/BugTracker-2017/Tests/sqlitelogictest-comparisons-between-floating-points-and-NULL.Bug-6496.stable.out sql/test/BugTracker-2018/Tests/sqlitelogictest-algebra-rangejoin-undefined.Bug-6610.stable.out sql/test/BugTracker-2018/Tests/sqlitelogictest-groupby-having-in-cast.Bug-6561.stable.out sql/test/BugTracker-2018/Tests/sqlitelogictest-having-not-null-not-in.Bug-6557.stable.out sql/test/BugTracker-2018/Tests/sqlitelogictest-wrong-select-not-between.Bug-6511.stable.out testing/Mtest.py.in Branch: default Log Message: Merge with Nov2019 branch. diffs (truncated from 319 to 300 lines): diff --git a/gdk/gdk_calc.c b/gdk/gdk_calc.c --- a/gdk/gdk_calc.c +++ b/gdk/gdk_calc.c @@ -12757,16 +12757,46 @@ VARcalcrsh(ValPtr ret, const ValRecord * /* -- */ /* between (any "linear" type) */ +#define LTbte(a,b) ((a) < (b)) +#define LTsht(a,b) ((a) < (b)) +#define LTint(a,b) ((a) < (b)) +#define LTlng(a,b) ((a) < (b)) +#define LThge(a,b) ((a) < (b)) +#define LTflt(a,b) ((a) < (b)) +#define LTdbl(a,b) ((a) < (b)) +#define LTany(a,b) ((*atomcmp)(a, b) < 0) +#define EQbte(a,b) ((a) == (b)) +#define EQsht(a,b) ((a) == (b)) +#define EQint(a,b) ((a) == (b)) +#define EQlng(a,b) ((a) == (b)) +#define EQhge(a,b) ((a) == (b)) +#define EQflt(a,b) ((a) == (b)) +#define EQdbl(a,b) ((a) == (b)) +#define EQany(a,b) ((*atomcmp)(a, b) == 0) + +#define is_any_nil(v) ((v) == NULL || (*atomcmp)((v), nil) == 0) + +#define less3(a,b,i,t) (is_##t##_nil(a) || is_##t##_nil(b) ? bit_nil : LT##t(a, b) || (i && EQ##t(a, b))) +#define grtr3(a,b,i,t) (is_##t##_nil(a) || is_##t##_nil(b) ? bit_nil : LT##t(b, a) || (i && EQ##t(a, b))) +#define and3(a,b) (is_bit_nil(a) ? is_bit_nil(b) || (b) ? bit_nil : 0 : is_bit_nil(b) ? (a) ? bit_nil : 0 : (a) && (b)) +#define or3(a,b) (is_bit_nil(a) ? (is_bit_nil(b) || !(b) ? bit_nil : 1) : ((a) ? 1 : (is_bit_nil(b) ? bit_nil : (b +#define not3(a)(is_bit_nil(a) ? bit_nil : !(a)) + +#define between3(v, lo, linc, hi, hinc, TYPE) \ + and3(grtr3(v, lo, linc, TYPE), less3(v, hi, hinc, TYPE)) + #define BETWEEN(v, lo, hi, TYPE) \ (is_##TYPE##_nil(v) \ -? nils_false ? 0 : (nils++, bit_nil) \ -: (is_##TYPE##_nil(lo) || is_##TYPE##_nil(hi) \ - ? (nils++, bit_nil) \ - : (bit) (lo) < (v) || (linc && (lo) == (v))) && \ - ((v) < (hi) || (hinc && (v) == (hi ||\ - (symmetric && \ - ((hi) < (v) || (hinc && (hi) == (v))) && \ - ((v) < (lo) || (linc && (v) == (lo) ^ anti))) +? nils_false ? 0 : bit_nil \ +: (bit) (anti \ + ? (symmetric \ +? not3(or3(between3(v, lo, linc, hi, hinc, TYPE), \ + between3(v, hi, hinc, lo, linc, TYPE))) \ +: not3(between3(v, lo, linc, hi, hinc, TYPE))) \ + : (symmetric \ +? or3(between3(v, lo, linc, hi, hinc, TYPE), \ + between3(v, hi, hinc, lo, linc, TYPE)) \ +: between3(v, lo, linc, hi, hinc, TYPE #define BETWEEN_LOOP_TYPE(TYPE) \ do {\ @@ -12781,6 +12811,7 @@ VARcalcrsh(ValPtr ret, const ValRecord * ((const TYPE *) lo)[j],\ ((const TYPE *) hi)[k],\ TYPE); \ + nils += is_bit_nil(dst[l]); \ } \ } while (0) @@ -12862,34 +12893,8 @@ BATcalcbetween_intern(const void *src, i p3 = hp3 ? (const void *) (hp3 + VarHeapVal(hi, k, wd3)) : (const void *) ((const char *) hi + hoff); - if (p1 == NULL || p2 == NULL || p3 == NULL) { - nils++; - dst[l] = bit_nil; - } else if ((*atomcmp)(p1, nil) == 0) { - if
MonetDB: default - Merge with Nov2019 branch.
Changeset: f63479990036 for MonetDB URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=f63479990036 Modified Files: testing/Mtest.py.in Branch: default Log Message: Merge with Nov2019 branch. diffs (43 lines): diff --git a/testing/Mtest.py.in b/testing/Mtest.py.in --- a/testing/Mtest.py.in +++ b/testing/Mtest.py.in @@ -3349,8 +3349,8 @@ def CheckClassPath() : cp = '' cpx = '' JARS = { -'HAVE_MONETDBJDBC_JAR' : re.compile('^monetdb-jdbc-[0-9]\.[0-9]+(-[a-f0-9]{12})?\.jar$'), -'HAVE_JDBCCLIENT_JAR' : re.compile('^jdbcclient\.jar$'), +'HAVE_MONETDBJDBC_JAR' : re.compile('^monetdb-jdbc-[0-9]\.[0-9]+(-[a-f0-9]{12})?\.jre[0-9]+\.jar$'), +'HAVE_JDBCCLIENT_JAR' : re.compile('^jdbcclient\.jre[0-9]+\.jar$'), 'HAVE_JDBCTESTS_JAR' : re.compile('^jdbctests\.jar$'), } # check for known JARs in CLASSPATH files @@ -3359,19 +3359,17 @@ def CheckClassPath() : for f in os.listdir(p): if not f.endswith('.jar'): continue -C = 'HAVE_%s' % f.upper().replace('.','_') -if C not in JARS: -C = 'HAVE_MONETDBJDBC_JAR' +for C in JARS: +if JARS[C].match(f): +CONDITIONALS[C] = '#' +cp = os.path.join(p, f) + os.pathsep + cp +break +elif os.path.isfile(p): +f = os.path.basename(p) +for C in JARS: if JARS[C].match(f): CONDITIONALS[C] = '#' -cp = os.path.join(p, f) + os.pathsep + cp -elif os.path.isfile(p): -f = os.path.basename(p) -C = 'HAVE_%s' % f.upper().replace('.','_') -if C not in JARS: -C = 'HAVE_MONETDBJDBC_JAR' -if JARS[C].match(f): -CONDITIONALS[C] = '#' +break # check for known JARs in CLASSPATH directories # + fall-back using pkgdatadir/lib cpx += _configure(os.path.join('@QXdatadir@','monetdb','lib')) ___ checkin-list mailing list checkin-list@monetdb.org https://www.monetdb.org/mailman/listinfo/checkin-list