MonetDB: default - Merge with Jun2020 branch.
Changeset: 795b4a189ea3 for MonetDB URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=795b4a189ea3 Modified Files: gdk/gdk_bat.c sql/backends/monet5/vaults/shp/shp.h sql/server/rel_optimizer.c sql/server/rel_unnest.c Branch: default Log Message: Merge with Jun2020 branch. diffs (173 lines): diff --git a/gdk/gdk_bat.c b/gdk/gdk_bat.c --- a/gdk/gdk_bat.c +++ b/gdk/gdk_bat.c @@ -2317,6 +2317,8 @@ BATassertProps(BAT *b) BATloop(b, p, q) { valp = BUNtail(bi, p); bool isnil = cmpf(valp, nilp) == 0; + assert(b->ttype != TYPE_flt || !isinf(*(flt*)valp)); + assert(b->ttype != TYPE_dbl || !isinf(*(dbl*)valp)); if (maxval && !isnil) { cmp = cmpf(maxval, valp); assert(cmp >= 0); @@ -2396,6 +2398,8 @@ BATassertProps(BAT *b) BUN prb; valp = BUNtail(bi, p); bool isnil = cmpf(valp, nilp) == 0; + assert(b->ttype != TYPE_flt || !isinf(*(flt*)valp)); + assert(b->ttype != TYPE_dbl || !isinf(*(dbl*)valp)); if (maxval && !isnil) { cmp = cmpf(maxval, valp); assert(cmp >= 0); 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 @@ -5415,115 +5415,6 @@ rel_join2semijoin(visitor *v, sql_rel *r return rel; } -typedef struct { - sql_rel *p; /* the found join's parent */ - sql_rel *j; /* the found join relation itself */ -} found_join; - -static void -rel_find_joins(mvc *sql, sql_rel *parent, sql_rel *rel, list *l, int depth) -{ - if (!rel || depth == 5) /* limit to 5 relations below in the tree */ - return; - - switch (rel->op) { - case op_basetable: - case op_table: - case op_ddl: - case op_truncate: - break; - case op_join: - case op_left: - case op_right: - case op_full: - case op_semi: - case op_anti: { - found_join *fl = SA_NEW(sql->sa, found_join); - fl->p = parent; - fl->j = rel; - list_append(l, fl); - - if (rel->l) - rel_find_joins(sql, rel, rel->l, l, depth + 1); - if (rel->r) - rel_find_joins(sql, rel, rel->r, l, depth + 1); - } break; - case op_union: - case op_inter: - case op_except: { - if (rel->l) - rel_find_joins(sql, rel, rel->l, l, depth + 1); - if (rel->r) - rel_find_joins(sql, rel, rel->r, l, depth + 1); - } break; - case op_groupby: - case op_project: - case op_select: - case op_topn: - case op_sample: { - if (rel->l) - rel_find_joins(sql, rel, rel->l, l, depth + 1); - } break; - case op_insert: - case op_update: - case op_delete: { - if (rel->r) - rel_find_joins(sql, rel, rel->r, l, depth + 1); - } break; - } -} - -/* find identical joins in diferent branches of the relational plan and merge them together */ -static sql_rel * -rel_merge_identical_joins(visitor *v, sql_rel *rel) -{ - if (is_joinop(rel->op) && rel->l && rel->r) { - list *l1 = sa_list(v->sql->sa), *l2 = sa_list(v->sql->sa); - - rel_find_joins(v->sql, rel, rel->l, l1, 0); - rel_find_joins(v->sql, rel, rel->r, l2, 0); - - 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 =
MonetDB: default - Merge with Jun2020 branch.
Changeset: a9f0fe4f2e37 for MonetDB URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=a9f0fe4f2e37 Modified Files: clients/examples/C/smack00.c clients/examples/C/smack01.c clients/mapiclient/eventparser.c clients/mapiclient/eventparser.h clients/mapiclient/mclient.c clients/mapiclient/stethoscope.c clients/odbc/winsetup/install.c clients/odbc/winsetup/resource.h clients/odbc/winsetup/setup.c common/utils/msabaoth.c ctest/tools/monetdbe/backup.c ctest/tools/monetdbe/example_backup.c gdk/gdk_aggr.c gdk/gdk_imprints.c gdk/gdk_logger.c gdk/gdk_storage.c gdk/gdk_subquery.c gdk/gdk_tracer.c geom/lib/libgeom.c geom/lib/libgeom.h geom/monetdb5/geom.c geom/monetdb5/geom.h monetdb5/extras/rapi/converters.c.h monetdb5/mal/mal.c monetdb5/mal/mal.h monetdb5/mal/mal_builder.c monetdb5/mal/mal_builder.h monetdb5/mal/mal_client.c monetdb5/mal/mal_client.h monetdb5/mal/mal_dataflow.c monetdb5/mal/mal_debugger.c monetdb5/mal/mal_errors.h monetdb5/mal/mal_exception.h monetdb5/mal/mal_function.c monetdb5/mal/mal_import.c monetdb5/mal/mal_instruction.c monetdb5/mal/mal_interpreter.c monetdb5/mal/mal_linker.c monetdb5/mal/mal_listing.c monetdb5/mal/mal_module.c monetdb5/mal/mal_parser.c monetdb5/mal/mal_prelude.c monetdb5/mal/mal_resolve.c monetdb5/mal/mal_resource.c monetdb5/mal/mal_runtime.c monetdb5/mal/mal_scenario.c monetdb5/mal/mal_session.c monetdb5/mal/mal_stack.c monetdb5/mal/mel.h monetdb5/modules/atoms/blob.c monetdb5/modules/atoms/color.c monetdb5/modules/atoms/identifier.c monetdb5/modules/atoms/inet.c monetdb5/modules/atoms/json.c monetdb5/modules/atoms/streams.c monetdb5/modules/atoms/url.c monetdb5/modules/atoms/uuid.c monetdb5/modules/atoms/xml.c monetdb5/modules/kernel/aggr.c monetdb5/modules/kernel/alarm.c monetdb5/modules/kernel/algebra.c monetdb5/modules/kernel/bat5.c monetdb5/modules/mal/batExtensions.c monetdb5/modules/mal/batcalc.c monetdb5/modules/mal/calc.c monetdb5/modules/mal/clients.c monetdb5/modules/mal/groupby.c monetdb5/modules/mal/json_util.c monetdb5/modules/mal/language.c monetdb5/modules/mal/mal_io.c monetdb5/modules/mal/mal_mapi.c monetdb5/modules/mal/manifold.c monetdb5/modules/mal/oltp.c monetdb5/modules/mal/pcre.c monetdb5/modules/mal/projectionpath.c monetdb5/modules/mal/querylog.c monetdb5/modules/mal/remote.c monetdb5/modules/mal/sample.c monetdb5/modules/mal/sample.h monetdb5/modules/mal/sysmon.c monetdb5/modules/mal/tablet.c monetdb5/modules/mal/tokenizer.c monetdb5/modules/mal/tokenizer.h monetdb5/modules/mal/tracer.c monetdb5/modules/mal/tracer.h monetdb5/modules/mal/wlc.c monetdb5/optimizer/opt_aliases.c monetdb5/optimizer/opt_candidates.c monetdb5/optimizer/opt_coercion.c monetdb5/optimizer/opt_commonTerms.c monetdb5/optimizer/opt_constants.c monetdb5/optimizer/opt_costModel.c monetdb5/optimizer/opt_dataflow.c monetdb5/optimizer/opt_deadcode.c monetdb5/optimizer/opt_evaluate.c monetdb5/optimizer/opt_garbageCollector.c monetdb5/optimizer/opt_generator.c monetdb5/optimizer/opt_inline.c monetdb5/optimizer/opt_jit.c monetdb5/optimizer/opt_json.c monetdb5/optimizer/opt_macro.c monetdb5/optimizer/opt_matpack.c monetdb5/optimizer/opt_mergetable.c monetdb5/optimizer/opt_mitosis.c monetdb5/optimizer/opt_multiplex.c monetdb5/optimizer/opt_oltp.c monetdb5/optimizer/opt_pipes.c monetdb5/optimizer/opt_postfix.c monetdb5/optimizer/opt_profiler.c monetdb5/optimizer/opt_projectionpath.c monetdb5/optimizer/opt_pushselect.c monetdb5/optimizer/opt_querylog.c monetdb5/optimizer/opt_reduce.c monetdb5/optimizer/opt_remap.c monetdb5/optimizer/opt_remoteQueries.c monetdb5/optimizer/opt_reorder.c monetdb5/optimizer/opt_support.c monetdb5/optimizer/opt_volcano.c monetdb5/optimizer/opt_wlc.c monetdb5/optimizer/opt_wrapper.c monetdb5/optimizer/optimizer.c monetdb5/scheduler/run_memo.c sql/backends/monet5/UDF/capi/capi.c sql/backends/monet5/UDF/capi/cheader.text.h sql/backends/monet5/UDF/pyapi3/convert_loops.h sql/backends/monet5/UDF/pyapi3/emit3.c sql/backends/monet5/UDF/pyapi3/pyapi3.c sql/b
MonetDB: default - Merge with Jun2020 branch.
Changeset: 43197e85a61b for MonetDB URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=43197e85a61b Added Files: sql/test/SQLancer/Tests/sqlancer02.sql sql/test/SQLancer/Tests/sqlancer02.stable.err sql/test/SQLancer/Tests/sqlancer02.stable.out Modified Files: monetdb5/optimizer/opt_emptybind.c sql/backends/monet5/rel_bin.c sql/server/rel_rel.c sql/server/rel_select.c sql/storage/bat/bat_storage.c sql/storage/bat/bat_storage.h sql/test/SQLancer/Tests/All sql/test/subquery/Tests/subquery6.sql Branch: default Log Message: Merge with Jun2020 branch. diffs (truncated from 872 to 300 lines): diff --git a/monetdb5/optimizer/opt_emptybind.c b/monetdb5/optimizer/opt_emptybind.c --- a/monetdb5/optimizer/opt_emptybind.c +++ b/monetdb5/optimizer/opt_emptybind.c @@ -35,6 +35,21 @@ } } while (0) +static int +withoutMitosis(MalBlkPtr mb) +{ + InstrPtr p; + + for(int i = mb->stop-1; i>=0; i--) { + p = mb->stmt[i]; + if (p->token == ENDsymbol) + break; + if (getFunctionId(p) == mitosisRef) + return (p->token == REMsymbol); +} + return 0; +} + str OPTemptybindImplementation(Client cntxt, MalBlkPtr mb, MalStkPtr stk, InstrPtr pci) { @@ -47,6 +62,7 @@ OPTemptybindImplementation(Client cntxt, str sch,tbl; int etop= 0, esize= 256; str msg = MAL_SUCCEED; + int no_mitosis = withoutMitosis(mb); (void) stk; (void) cntxt; @@ -55,11 +71,11 @@ OPTemptybindImplementation(Client cntxt, //if ( optimizerIsApplied(mb,"emptybind") ) //return 0; // use an instruction reference table to keep - + for( i=0; i< mb->stop; i++) if( getFunctionId(getInstrPtr(mb,i)) == emptybindRef || getFunctionId(getInstrPtr(mb,i)) == emptybindidxRef) extras += getInstrPtr(mb,i)->argc; - if( extras == 0) + if (extras == 0) goto wrapup; // track of where 'emptybind' results are produced @@ -74,7 +90,7 @@ OPTemptybindImplementation(Client cntxt, return 0; } - if ( newMalBlkStmt(mb, mb->ssize) < 0) { + if (newMalBlkStmt(mb, mb->ssize) < 0) { GDKfree(empty); GDKfree(updated); throw(MAL,"optimizer.emptybind", SQLSTATE(HY013) MAL_MALLOC_FAIL); @@ -95,12 +111,12 @@ OPTemptybindImplementation(Client cntxt, /* * The bulk of the intelligence lies in inspecting calling -* sequences to filter and replace results +* sequences to filter and replace results */ if ( getModuleId(p) == batRef && getFunctionId(p) == newRef){ empty[getArg(p,0)] = i; continue; - } + } // any of these instructions leave a non-empty BAT behind if(p && getModuleId(p) == sqlRef && isUpdateInstruction(p)){ @@ -116,7 +132,7 @@ OPTemptybindImplementation(Client cntxt, updated[etop++]= p; } - /* restore the naming, dropping the runtime property 'empty' + /* restore the naming, dropping the runtime property 'empty' * Keep the bind operation, because it is cheap, rather focus on their re-use */ @@ -127,7 +143,7 @@ OPTemptybindImplementation(Client cntxt, if( p->retc == 2){ empty[getArg(p,1)] = i; } - // replace the call into a empty bat creation unless the table was updated already in the same query + // replace the call into a empty bat creation unless the table was updated already in the same query sch = getVarConstant(mb,getArg(p,2 + (p->retc==2))).val.sval; tbl = getVarConstant(mb,getArg(p,3 + (p->retc==2))).val.sval; for(j= 0; j< etop; j++){ @@ -159,7 +175,7 @@ OPTemptybindImplementation(Client cntxt, setFunctionId(p,bindidxRef); p->typechk= TYPE_UNKNOWN; empty[getArg(p,0)] = i; - // replace the call into a empty bat creation unless the table was updated already in the same query + // replace the call into a empty bat creation unless the table was updated already in the same query sch = getVarConstant(mb,getArg(p,2 + (p->retc==2))).val.sval; tbl = getVarConstant(mb,getArg(p,3 + (p->retc==2))).val.sval; for(j= 0; j< etop; j++){ @@ -185,14 +201,26 @@ OPTemptybindImplementation(Client cntxt, }
MonetDB: default - Merge with Jun2020 branch.
Changeset: 342c88cc7309 for MonetDB URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=342c88cc7309 Modified Files: sql/backends/monet5/rel_bin.c sql/common/sql_types.c sql/server/rel_select.c sql/server/sql_semantic.c sql/test/SQLancer/Tests/sqlancer01.sql sql/test/analytics/Tests/analytics07.stable.err sql/test/analytics/Tests/analytics07.stable.out Branch: default Log Message: Merge with Jun2020 branch. diffs (247 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 @@ -1107,7 +1107,9 @@ exp_bin(backend *be, sql_exp *e, stmt *l r2 = stmt_project(be, sel, r2); sel = NULL; } - s = stmt_uselect2(be, column(be, l), r, r2, (comp_type)e->flag, sel, is_anti(e)); + if (l->nrcols == 0) + l = stmt_const(be, bin_first_column(be, left), l); + s = stmt_uselect2(be, l, r, r2, (comp_type)e->flag, sel, is_anti(e)); } } else { /* value compare or select */ 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 @@ -419,10 +419,10 @@ subtype2string2(sql_subtype *tpe) //dist switch (tpe->type->eclass) { case EC_SEC: - snprintf(buf, BUFSIZ, "BIGINT"); + snprintf(buf, BUFSIZ, "INTERVAL SECOND"); break; case EC_MONTH: - snprintf(buf, BUFSIZ, "INT"); + snprintf(buf, BUFSIZ, "INTERVAL MONTH"); break; case EC_CHAR: case EC_STRING: diff --git a/sql/server/rel_select.c b/sql/server/rel_select.c --- a/sql/server/rel_select.c +++ b/sql/server/rel_select.c @@ -4698,7 +4698,7 @@ calculate_window_bound(sql_query *query, if (!(bclass == EC_NUM || EC_INTERVAL(bclass) || bclass == EC_DEC || bclass == EC_FLT)) return sql_error(sql, 02, SQLSTATE(42000) "%s offset must be of a countable SQL type", bound_desc); if ((frame_type == FRAME_ROWS || frame_type == FRAME_GROUPS) && bclass != EC_NUM) { - char *err = subtype2string(bt); + char *err = subtype2string2(bt); if (!err) return sql_error(sql, 02, SQLSTATE(HY013) MAL_MALLOC_FAIL); (void) sql_error(sql, 02, SQLSTATE(42000) "Values on %s boundary on %s frame can't be %s type", bound_desc, @@ -4716,7 +4716,7 @@ calculate_window_bound(sql_query *query, if (bclass != EC_DEC && iet->type->eclass == EC_DEC) return sql_error(sql, 02, SQLSTATE(42000) "Values on %s boundary aren't decimals while on input are", bound_desc); if (bclass != EC_SEC && iet->type->eclass == EC_TIME) { - char *err = subtype2string(iet); + char *err = subtype2string2(iet); if (!err) return sql_error(sql, 02, SQLSTATE(HY013) MAL_MALLOC_FAIL); (void) sql_error(sql, 02, SQLSTATE(42000) "For %s input the %s boundary must be an interval type up to the day", err, bound_desc); @@ -4724,7 +4724,7 @@ calculate_window_bound(sql_query *query, return NULL; } if (EC_INTERVAL(bclass) && !EC_TEMP(iet->type->eclass)) { - char *err = subtype2string(iet); + char *err = subtype2string2(iet); if (!err) return sql_error(sql, 02, SQLSTATE(HY013) MAL_MALLOC_FAIL); (void) sql_error(sql, 02, SQLSTATE(42000) "For %s input the %s boundary must be an interval type", err, bound_desc); diff --git a/sql/server/sql_semantic.c b/sql/server/sql_semantic.c --- a/sql/server/sql_semantic.c +++ b/sql/server/sql_semantic.c @@ -344,7 +344,8 @@ symbol2string(mvc *sql, symbol *se, int sname = sql->session->schema->base.name; for (aux = ops; aux; aux = aux->next) nargs++; - inputs = GDKzalloc(nargs * sizeof(char**)); + if (!(inputs = GDKzalloc(nargs * sizeof(char** + return NULL; for (aux = ops; aux; aux = aux->next) { if (!(inputs[i] = symbol
MonetDB: default - Merge with Jun2020 branch.
Changeset: 59f190ddb750 for MonetDB URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=59f190ddb750 Modified Files: sql/backends/monet5/rel_bin.c sql/backends/monet5/sql_upgrades.c sql/test/SQLancer/Tests/sqlancer01.stable.out sql/test/emptydb-upgrade-chain/Tests/upgrade.stable.out.int128 sql/test/emptydb-upgrade-chain/Tests/upgrade.stable.out.ppc64.int128 sql/test/emptydb-upgrade/Tests/upgrade.stable.out.int128 sql/test/testdb-upgrade-chain/Tests/upgrade.stable.out.int128 sql/test/testdb-upgrade/Tests/upgrade.stable.out.int128 Branch: default Log Message: Merge with Jun2020 branch. diffs (truncated from 9969 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 @@ -4246,7 +4246,7 @@ update_check_ukey(backend *be, stmt **up upd = stmt_project(be, tids, stmt_col(be, c->c, dels, dels->partition)); */ } else { - upd = stmt_project(be, tids, stmt_col(be, c->c, dels, dels->partition)); + upd = stmt_col(be, c->c, dels, dels->partition); } /* apply cand list first */ 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 @@ -76,98 +76,66 @@ sql_fix_system_tables(Client c, mvc *sql if (func->base.id >= FUNC_OIDS) continue; - if (func->type == F_AGGR) { - pos += snprintf(buf + pos, bufsize - pos, - "insert into sys.functions values" - " (%d, '%s', '%s', '%s', %d, %d, false," - " %s, %s, %d, %s, %s);\n", - func->base.id, func->base.name, func->imp, - func->mod, (int) FUNC_LANG_INT, (int) func->type, - func->varres ? "true" : "false", - func->vararg ? "true" : "false", - func->s ? func->s->base.id : s->base.id, - func->system ? "true" : "false", - func->semantics ? "true" : "false"); - arg = func->res->h->data; - pos += snprintf(buf + pos, bufsize - pos, - "insert into sys.args values" - " (%d, %d, 'res', '%s', %u, %u, %d, 0);\n", - store_next_oid(), func->base.id, - arg->type.type->sqlname, arg->type.digits, - arg->type.scale, arg->inout); - if (func->ops->h) { - arg = func->ops->h->data; + pos += snprintf(buf + pos, bufsize - pos, + "insert into sys.functions values" + " (%d, '%s', '%s', '%s'," + " %d, %d, %s, %s, %s, %d, %s, %s);\n", + func->base.id, func->base.name, + func->imp, func->mod, (int) FUNC_LANG_INT, + (int) func->type, + func->side_effect ? "true" : "false", + func->varres ? "true" : "false", + func->vararg ? "true" : "false", + func->s ? func->s->base.id : s->base.id, + func->system ? "true" : "false", + func->semantics ? "true" : "false"); + if (func->res) { + for (m = func->res->h; m; m = m->next, number++) { + arg = m->data; pos += snprintf(buf + pos, bufsize - pos, - "insert into sys.args values" - " (%d, %d, 'arg', '%s', %u," - " %u, %d, 1);\n", - store_next_oid(), func->base.id, + "insert into sys.args" + " values" + " (%d, %d, 'res_%d'," + " '%s', %u, %u, %d," + " %d);\n", + store_next_oid(), +
MonetDB: default - Merge with Jun2020 branch.
Changeset: a545a10e87f1 for MonetDB URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=a545a10e87f1 Added Files: sql/test/BugTracker-2020/Tests/select-and.Bug-6878.sql sql/test/BugTracker-2020/Tests/select-and.Bug-6878.stable.err sql/test/BugTracker-2020/Tests/select-and.Bug-6878.stable.out sql/test/Tests/like_tests.sql Removed Files: sql/test/Tests/like_tests.SQL.py sql/test/like_tests.sql Modified Files: MonetDB.spec NT/mksqlwxs.py debian/libmonetdb-dev.install gdk/ChangeLog.Jun2020 gdk/gdk_hash.c gdk/gdk_logger.c gdk/gdk_select.c monetdb5/modules/mal/pcre.c sql/backends/monet5/sql_execute.c sql/test/BugTracker-2020/Tests/All sql/test/Tests/hot_snapshot.py sql/test/emptydb-upgrade-chain/Tests/upgrade.stable.out.powerpc64 sql/test/miscellaneous/Tests/simple_selects.sql sql/test/miscellaneous/Tests/simple_selects.stable.out Branch: default Log Message: Merge with Jun2020 branch. diffs (truncated from 539 to 300 lines): diff --git a/MonetDB.spec b/MonetDB.spec --- a/MonetDB.spec +++ b/MonetDB.spec @@ -201,6 +201,7 @@ functionality of MonetDB. %dir %{_includedir}/monetdb %{_includedir}/monetdb/gdk*.h %{_includedir}/monetdb/matomic.h +%{_includedir}/monetdb/mstring.h %{_includedir}/monetdb/monet*.h %{_libdir}/libbat.so %{_libdir}/pkgconfig/monetdb-gdk.pc diff --git a/NT/mksqlwxs.py b/NT/mksqlwxs.py --- a/NT/mksqlwxs.py +++ b/NT/mksqlwxs.py @@ -158,6 +158,7 @@ def main(): sorted([r'include\monetdb\{}'.format(x) for x in filter(lambda x: (x.startswith('gdk') or x.startswith('monet') or x.startswith('mal')) and x.endswith('.h'), os.listdir(os.path.join(sys.argv[3], 'include', 'monetdb')))] + [r'include\monetdb\mapi.h', r'include\monetdb\matomic.h', + r'include\monetdb\mstring.h', r'include\monetdb\stream.h', r'include\monetdb\stream_socket.h']), vital = 'no') diff --git a/debian/libmonetdb-dev.install b/debian/libmonetdb-dev.install --- a/debian/libmonetdb-dev.install +++ b/debian/libmonetdb-dev.install @@ -1,5 +1,6 @@ debian/tmp/usr/lib/x86_64-linux-gnu/libbat.so usr/lib/x86_64-linux-gnu debian/tmp/usr/include/monetdb/gdk*.h usr/include/monetdb debian/tmp/usr/include/monetdb/matomic.h usr/include/monetdb +debian/tmp/usr/include/monetdb/mstring.h usr/include/monetdb debian/tmp/usr/include/monetdb/monet*.h usr/include/monetdb debian/tmp/usr/lib/x86_64-linux-gnu/pkgconfig/monetdb-gdk.pc usr/lib/x86_64-linux-gnu/pkgconfig diff --git a/gdk/ChangeLog.Jun2020 b/gdk/ChangeLog.Jun2020 --- a/gdk/ChangeLog.Jun2020 +++ b/gdk/ChangeLog.Jun2020 @@ -1,3 +1,8 @@ # ChangeLog file for GDK # This file is updated with Maddlog +* Tue Jun 9 2020 Sjoerd Mullender +- Hash buckets come in variable widths. But if a BAT grows long enough so + that the BAT indexes that are stored in the buckets don't fit anymore, + the buckets need to be widened. This is now fixed. + diff --git a/gdk/gdk_hash.c b/gdk/gdk_hash.c --- a/gdk/gdk_hash.c +++ b/gdk/gdk_hash.c @@ -35,7 +35,7 @@ #include "gdk.h" #include "gdk_private.h" -static int +static uint8_t HASHwidth(BUN hashsize) { if (hashsize <= (BUN) BUN2_NONE) @@ -1007,51 +1007,61 @@ HASHprobe(const Hash *h, const void *v) } } -void -HASHins(BAT *b, BUN i, const void *v) +static void +HASHins_locked(BAT *b, BUN i, const void *v) { - MT_lock_set(&b->batIdxLock); Hash *h = b->thash; if (h == NULL) { - /* nothing to do */ - } else if (h == (Hash *) 1) { - GDKunlink(BBPselectfarm(b->batRole, b->ttype, hashheap), - BATDIR, - BBP_physical(b->batCacheid), - "thash"); + return; + } + if (h == (Hash *) 1) { b->thash = NULL; - } else if ((ATOMsize(b->ttype) > 2 && - HASHgrowbucket(b) != GDK_SUCCEED) || - ((i + 1) * h->width > h->heaplink.size && - HEAPextend(&h->heaplink, - i * h->width + GDK_mmap_pagesize, - true) != GDK_SUCCEED)) { + doHASHdestroy(b, h); + return; + } + if (HASHwidth(i + 1) > h->width && +HASHupgradehashheap(b) != GDK_SUCCEED) { + return; + } + if ((ATOMsize(b->ttype) > 2 && +HASHgrowbucket(b) != GDK_SUCCEED) || + ((i + 1) * h->width > h->heaplink.size && +HEAPextend(&h->heaplink, + i * h->width + GDK_mmap_pagesize, + true) != GDK_SUCCEED)) { b->thash = NULL; HEAPfree(&h->heapbckt, true); HEAPfree(&h->heaplink, true); GDKfree(h); -
MonetDB: default - Merge with Jun2020 branch.
Changeset: 0f82cb5c99fc for MonetDB URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=0f82cb5c99fc Modified Files: monetdb5/modules/mal/pcre.c sql/backends/monet5/sql_upgrades.c sql/server/rel_select.c sql/test/emptydb-upgrade-chain-hge/Tests/upgrade.stable.out.powerpc64.int128 sql/test/emptydb-upgrade-chain/Tests/upgrade.stable.out.int128 sql/test/emptydb-upgrade-chain/Tests/upgrade.stable.out.powerpc64.int128 sql/test/emptydb-upgrade/Tests/upgrade.stable.out.int128 sql/test/miscellaneous/Tests/simple_selects.sql sql/test/miscellaneous/Tests/simple_selects.stable.err sql/test/subquery/Tests/subquery6.sql sql/test/subquery/Tests/subquery6.stable.out sql/test/testdb-upgrade-chain/Tests/upgrade.stable.out.int128 sql/test/testdb-upgrade/Tests/upgrade.stable.out.int128 testing/Mtest.py.in Branch: default Log Message: Merge with Jun2020 branch. diffs (truncated from 583 to 300 lines): 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 @@ -1449,8 +1449,8 @@ sql2pcre(str *r, const char *pat, const if (strlen(esc_str) > 1) throw(MAL, "pcre.sql2pcre", SQLSTATE(22019) ILLEGAL_ARGUMENT ": ESCAPE string must have length 1"); - if (pat == NULL ) - throw(MAL, "pcre.sql2pcre", OPERATION_FAILED); + if (pat == NULL) + throw(MAL, "pcre.sql2pcre", SQLSTATE(22019) ILLEGAL_ARGUMENT ": (I)LIKE pattern must not be NULL"); ppat = GDKmalloc(strlen(pat)*3+3 /* 3 = "^'the translated regexp'$0" */); if (ppat == NULL) throw(MAL, "pcre.sql2pcre", SQLSTATE(HY013) MAL_MALLOC_FAIL); @@ -1511,7 +1511,7 @@ sql2pcre(str *r, const char *pat, const GDKfree(*r); *r = NULL; if (escaped) - throw(MAL, "pcre.sql2pcre", OPERATION_FAILED); + throw(MAL, "pcre.sql2pcre", SQLSTATE(22019) ILLEGAL_ARGUMENT ": (I)LIKE pattern must not end with escape character"); *r = GDKstrdup(str_nil); if (*r == NULL) throw(MAL, "pcre.sql2pcre", SQLSTATE(HY013) MAL_MALLOC_FAIL); 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 @@ -216,15 +216,39 @@ sql_update_hugeint(Client c, mvc *sql, c "create aggregate stddev_samp(val HUGEINT) returns DOUBLE\n" " external name \"aggr\".\"stdev\";\n" "GRANT EXECUTE ON AGGREGATE stddev_samp(HUGEINT) TO PUBLIC;\n" + "create window stddev_samp(val HUGEINT) returns DOUBLE\n" + " external name \"sql\".\"stdev\";\n" + "GRANT EXECUTE ON WINDOW stddev_samp(HUGEINT) TO PUBLIC;\n" "create aggregate stddev_pop(val HUGEINT) returns DOUBLE\n" " external name \"aggr\".\"stdevp\";\n" "GRANT EXECUTE ON AGGREGATE stddev_pop(HUGEINT) TO PUBLIC;\n" + "create window stddev_pop(val HUGEINT) returns DOUBLE\n" + " external name \"sql\".\"stdevp\";\n" + "GRANT EXECUTE ON WINDOW stddev_pop(HUGEINT) TO PUBLIC;\n" "create aggregate var_samp(val HUGEINT) returns DOUBLE\n" " external name \"aggr\".\"variance\";\n" "GRANT EXECUTE ON AGGREGATE var_samp(HUGEINT) TO PUBLIC;\n" + "create window var_samp(val HUGEINT) returns DOUBLE\n" + " external name \"sql\".\"variance\";\n" + "GRANT EXECUTE ON WINDOW var_samp(HUGEINT) TO PUBLIC;\n" + "create aggregate covar_samp(e1 HUGEINT, e2 HUGEINT) returns DOUBLE\n" + " external name \"aggr\".\"covariance\";\n" + "GRANT EXECUTE ON AGGREGATE covar_samp(HUGEINT, HUGEINT) TO PUBLIC;\n" + "create window covar_samp(e1 HUGEINT, e2 HUGEINT) returns DOUBLE\n" + " external name \"sql\".\"covariance\";\n" + "GRANT EXECUTE ON WINDOW covar_samp(HUGEINT, HUGEINT) TO PUBLIC;\n" "create aggregate var_pop(val HUGEINT) returns DOUBLE\n" " external name \"aggr\".\"variancep\";\n" "GRANT EXECUTE ON AGGREGATE var_pop(HUGEINT) TO PUBLIC;\n" + "create window var_pop(val HUGEINT) returns DOUBLE\n" + " external name \"sql\".\"variancep\";\n" + "GRANT EXECUTE ON WINDOW var_pop(HUGEINT) TO PUBLIC;\n" + "create aggregate covar_pop(e1 HUGEINT, e2 HUGEINT) returns DOUBLE\n" +
MonetDB: default - Merge with Jun2020 branch.
Changeset: 9e7cd5cac3b9 for MonetDB URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=9e7cd5cac3b9 Modified Files: sql/server/rel_exp.c sql/server/rel_exp.h sql/server/rel_select.c sql/server/rel_unnest.c sql/test/miscellaneous/Tests/simple_plans.sql sql/test/miscellaneous/Tests/simple_plans.stable.out sql/test/testdb-upgrade-hge/Tests/dump.stable.out.int128 Branch: default Log Message: Merge with Jun2020 branch. diffs (238 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 @@ -1325,6 +1325,19 @@ exp_match_exp( sql_exp *e1, sql_exp *e2) return 0; } +sql_exp * +exps_any_match(list *l, sql_exp *e) +{ + if (!l) + return NULL; + for (node *n = l->h; n ; n = n->next) { + sql_exp *ne = (sql_exp *) n->data; + if (exp_match_exp(ne, e)) + return ne; + } + return NULL; +} + static int exps_are_joins( list *l ) { 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 @@ -131,6 +131,7 @@ extern int exp_refers( sql_exp *p, sql_e extern int exp_match( sql_exp *e1, sql_exp *e2); extern sql_exp* exps_find_exp( list *l, sql_exp *e); extern int exp_match_exp( sql_exp *e1, sql_exp *e2); +extern sql_exp* exps_any_match(list *l, sql_exp *e); /* 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); diff --git a/sql/server/rel_select.c b/sql/server/rel_select.c --- a/sql/server/rel_select.c +++ b/sql/server/rel_select.c @@ -4454,7 +4454,7 @@ rel_order_by_column_exp(sql_query *query { mvc *sql = query->sql; sql_rel *r = *R, *p = NULL; - sql_exp *e = NULL; + sql_exp *e = NULL, *found = NULL; exp_kind ek = {type_value, card_column, FALSE}; if (!r) @@ -4472,15 +4472,19 @@ rel_order_by_column_exp(sql_query *query else if (r) p->l = r; if (e && p) { - e = rel_project_add_exp(sql, p, e); - for (node *n = p->exps->h ; n ; n = n->next) { - sql_exp *ee = n->data; - - if (ee->card > r->card) { - if (exp_name(ee)) - return sql_error(sql, ERR_GROUPBY, SQLSTATE(42000) "SELECT: cannot use non GROUP BY column '%s' in query results without an aggregate function", exp_name(ee)); - else - return sql_error(sql, ERR_GROUPBY, SQLSTATE(42000) "SELECT: cannot use non GROUP BY column in query results without an aggregate function"); + if (is_project(p->op) && (found = exps_any_match(p->exps, e))) { /* if one of the projections matches, return a reference to it */ + e = exp_ref(sql, found); + } else { + e = rel_project_add_exp(sql, p, e); + for (node *n = p->exps->h ; n ; n = n->next) { + sql_exp *ee = n->data; + + if (ee->card > r->card) { + if (exp_name(ee)) + return sql_error(sql, ERR_GROUPBY, SQLSTATE(42000) "SELECT: cannot use non GROUP BY column '%s' in query results without an aggregate function", exp_name(ee)); + else + return sql_error(sql, ERR_GROUPBY, SQLSTATE(42000) "SELECT: cannot use non GROUP BY column in query results without an aggregate function"); + } } } return e; diff --git a/sql/server/rel_unnest.c b/sql/server/rel_unnest.c --- a/sql/server/rel_unnest.c +++ b/sql/server/rel_unnest.c @@ -1640,13 +1640,14 @@ rewrite_empty_project(mvc *sql, sql_rel } static sql_exp * -exp_reset_card(mvc *sql, sql_rel *rel, sql_exp *e, int depth, int *changes) +exp_reset_card_and_freevar(mvc *sql, sql_rel *rel, sql_exp *e, int depth, int *changes) { (void)sql; (void)depth; (void)changes; - if (!e || !rel || !rel->l) + reset_freevar(e); /* unnesting is done, we can remove the freevar flag */ + if (!rel->l) return e; if (is_groupby(rel->op)) { switch(e->type) { @@ -3162,6 +3163,6 @@ rel_unnest(mvc *sql, sql_rel *rel) rel = rel_visitor_bottomup(sql, rel, &rewrite_groupings, &changes); /* transform group combinations into union of group relations */ rel = rel_visitor_bottomup(sql, rel, &rewrite_empty_project, &changes); // needed again! - rel = rel_exp_visitor_bottomup(sql, rel, &exp_reset_card, &changes); + rel = rel_exp_visitor_bo
MonetDB: default - Merge with Jun2020 branch.
Changeset: 19c280814d87 for MonetDB URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=19c280814d87 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 Jun2020 branch. diffs (truncated from 136265 to 300 lines): 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,6400 +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, 3, 2000); -insert into sys.types values (5, 'str', 'varchar', 0, 0, 0, 4, 2000); -insert into sys.types values (6, 'str', 'clob', 0, 0, 0, 4, 2000); -insert into sys.types values (7, 'oid', 'oid', 63, 0, 2, 6, 2000); -insert into sys.types values (8, 'bte', 'tinyint', 8, 1, 2, 7, 2000); -insert into sys.types values (9, 'sht', 'smallint', 16, 1, 2, 7, 2000); -insert into sys.types values (10, 'int', 'int', 32, 1, 2, 7, 2000); -insert into sys.types values (11, 'lng', 'bigint', 64, 1, 2, 7, 2000); -insert into sys.types values (12, 'hge', 'hugeint', 128, 1, 2, 7, 2000); -insert into sys.types values (13, 'bte', 'decimal', 2, 1, 10, 10, 2000); -insert into sys.types values (14, 'sht', 'decimal', 4, 1, 10, 10, 2000); -insert into sys.types values (15, 'int', 'decimal', 9, 1, 10, 10, 2000); -insert into sys.types values (16, 'lng', 'decimal', 18, 1, 10, 10, 2000); -insert into sys.types values (17, 'hge', 'decimal', 38, 1, 10, 10, 2000); -insert into sys.types values (18, 'flt', 'real', 24, 2, 2, 11, 2000); -insert into sys.types values (19, 'dbl', 'double', 53, 2, 2, 11, 2000); -insert into sys.types values (20, 'int', 'month_interval', 32, 0, 2, 8, 2000); -insert into sys.types values (21, 'lng', 'sec_interval', 13, 1, 10, 9, 2000); -insert into sys.types values (22, 'daytime', 'time', 7, 0, 0, 12, 2000); -insert into sys.types values (23, 'daytime', 'timetz', 7, 1, 0, 13, 2000); -insert into sys.types values (24, 'date', 'date', 0, 0, 0, 14, 2000); -insert into sys.types values (25, 'timestamp', 'timestamp', 7, 0, 0, 15, 2000); -insert into sys.types values (26, 'timestamp', 'timestamptz', 7, 1, 0, 16, 2000); -insert into sys.types values (27, 'blob', 'blob', 0, 0, 0, 5, 2000); -insert into sys.types values (30, 'wkb', 'geometry', 0, 0, 0, 17, 2000); -insert into sys.types values (31, 'wkba', 'geometrya', 0, 0, 0, 18, 2000); -insert into sys.types values (32, 'mbr', 'mbr', 0, 0, 0, 18, 2000); -delete from sys.functions where id < 2000; -delete from sys.args where func_id not in (select id from sys.functions); -insert into sys.functions values (28, 'length', 'nitems', 'blob', 0, 1, false, false, false, 2000, true, false); -insert into sys.args values (29782, 28, 'res_0', 'int', 32, 0, 0, 0); -insert into sys.args values (29783, 28, 'arg_1', 'blob', 0, 0, 1, 1); -insert into sys.functions values (29, 'octet_length', 'nitems', 'blob', 0, 1, false, false, false, 2000, true, false); -insert into sys.args values (29784, 29, 'res_0', 'int', 32, 0, 0, 0); -insert into sys.args values (29785, 29, 'arg_1', 'blob', 0, 0, 1, 1); -insert into sys.functions values (33,
MonetDB: default - Merge with Jun2020 branch.
Changeset: dd67a6372eb6 for MonetDB URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=dd67a6372eb6 Removed Files: sql/test/Tests/fsum1.stable.out Modified Files: configure.ag sql/backends/monet5/vaults/lidar/Makefile.ag Branch: default Log Message: Merge with Jun2020 branch. diffs (224 lines): diff --git a/configure.ag b/configure.ag --- a/configure.ag +++ b/configure.ag @@ -1911,7 +1911,7 @@ AM_CONDITIONAL([HAVE_NETCDF], [test x"$h # liblas, only used in lidar module org_have_liblas=auto have_liblas=$org_have_liblas -LIBLAS_INCS='' +LIBLAS_CFLAGS='' LIBLAS_LIBS='' AC_ARG_WITH([liblas], [AS_HELP_STRING([--with-liblas=DIR], @@ -1921,49 +1921,57 @@ AS_CASE([$have_lidar], [yes|auto], [ # liblas >= 1.8.0 required LIBLAS_VERSION_REQUIRED_MIN=1.8.0 - LIBLAS_CONFIG='' - # locate liblas-config - AS_VAR_IF([have_liblas], [no], [], [ - AS_CASE([$have_liblas], - [yes|auto], [XPATH="$PATH"], + PKG_CHECK_MODULES([LIBLAS], + [liblas >= $LIBLAS_VERSION_REQUIRED_MIN], + [have_liblas=yes + # work around bug in Fedora 32's liblas-devel-1.8.1-7 + LIBLAS_CFLAGS=`AS_ECHO(["$LIBLAS_CFLAGS"]) | sed 's|-Iinclude|-I/usr/include|'` + LIBLAS_LIBS=`AS_ECHO(["$LIBLAS_LIBS"]) | sed 's|-Llib|-L/usr/lib|'` + ], [ - XPATH="$have_liblas/bin" - have_liblas=yes]) - AC_PATH_PROG([LIBLAS_CONFIG], [liblas-config], [], [$XPATH]) - AS_VAR_IF([LIBLAS_CONFIG], [], - [AS_VAR_IF([have_liblas], [yes], - [AC_MSG_ERROR([liblas-config not found in $XPATH])], + LIBLAS_CONFIG='' + # locate liblas-config + AS_VAR_IF([have_liblas], [no], [], [ + AS_CASE([$have_liblas], + [yes|auto], [XPATH="$PATH"], + [ + XPATH="$have_liblas/bin" + have_liblas=yes]) + AC_PATH_PROG([LIBLAS_CONFIG], [liblas-config], [], [$XPATH]) + AS_VAR_IF([LIBLAS_CONFIG], [], + [AS_VAR_IF([have_liblas], [yes], + [AC_MSG_ERROR([liblas-config not found in $XPATH])], + [have_liblas=no +why_not_liblas="(liblas-config not found)"])])]) + # check the version of liblas + AS_VAR_IF([have_liblas], [no], [], [ + AC_MSG_CHECKING([for liblas >= $LIBLAS_VERSION_REQUIRED_MIN]) + LIBLAS_VERSION=`$LIBLAS_CONFIG --version` + AC_MSG_RESULT([found $LIBLAS_VERSION]) + AS_VERSION_COMPARE([$LIBLAS_VERSION], [$LIBLAS_VERSION_REQUIRED_MIN], + [AS_VAR_IF([have_liblas], [yes], + [AC_MSG_ERROR([liblas version $LIBLAS_VERSION is too old])], + [have_liblas=no +why_not_liblas="(liblas version $LIBLAS_VERSION is older than required version $LIBLAS_VERSION_REQUIRED_MIN)"])])]) + # read include dirs, libs and cflags + AS_VAR_IF([have_liblas], [no], [], [ + LIBLAS_CFLAGS=`$LIBLAS_CONFIG --includes` + LIBLAS_LIBS=`$LIBLAS_CONFIG --libs`]) + # liblas-config and liblas/capi/liblas.h could be in different + # packages (think Ubuntu) so we need to test for them both + AS_VAR_IF([have_liblas], [no], [], [ + save_CPPFLAGS="$CPPFLAGS" + save_LDFLAGS="$LDFLAGS" + save_LIBS="$LIBS" + CPPFLAGS="$CPPFLAGS $LIBLAS_CFLAGS" + LDFLAGS="$LDFLAGS $LIBLAS_LIBS" + LIBS="" + AC_CHECK_HEADER([liblas/capi/liblas.h], [], [have_liblas=no -why_not_liblas="(liblas-config not found)"])])]) - # check the version if liblas - AS_VAR_IF([have_liblas], [no], [], [ - AC_MSG_CHECKING([for liblas >= $LIBLAS_VERSION_REQUIRED_MIN]) - LIBLAS_VERSION=`$LIBLAS_CONFIG --version` - AC_MSG_RESULT([found $LIBLAS_VERSION]) - AS_VERSION_COMPARE([$LIBLAS_VERSION], [$LIBLAS_VERSION_REQUIRED_MIN], - [AS_VAR_IF([have_liblas], [yes], - [AC_MSG_ERROR([liblas version $LIBLAS_VERSION is too old])], - [have_liblas=no -why_not_liblas="(liblas version $LIBLAS_VERSION is older than required version $LIBLAS_VERSION_REQ
MonetDB: default - Merge with Jun2020 branch, not changing any f...
Changeset: bae2985ac059 for MonetDB URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=bae2985ac059 Modified Files: .bumpversion.cfg 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 Branch: default Log Message: Merge with Jun2020 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 Jun2020 branch.
Changeset: 6da33b435ad7 for MonetDB URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=6da33b435ad7 Modified Files: .hgtags MonetDB.spec debian/changelog libversions Branch: default Log Message: Merge with Jun2020 branch. diffs (55 lines): diff --git a/.hgtags b/.hgtags --- a/.hgtags +++ b/.hgtags @@ -772,3 +772,6 @@ 0d51d6758f2b1f3f1804415545f8551a38da1848 28480e096722b7f76ab021c0d16c68c6949f41b4 Jun2020_5 0d51d6758f2b1f3f1804415545f8551a38da1848 Jun2020_release 28480e096722b7f76ab021c0d16c68c6949f41b4 Jun2020_release +80bd3e89c48032840f493a63d6c4c12ee6273b3d Jun2020_7 +28480e096722b7f76ab021c0d16c68c6949f41b4 Jun2020_release +80bd3e89c48032840f493a63d6c4c12ee6273b3d Jun2020_release diff --git a/MonetDB.spec b/MonetDB.spec --- a/MonetDB.spec +++ b/MonetDB.spec @@ -984,6 +984,9 @@ fi %postun -p /sbin/ldconfig %changelog +* Fri May 29 2020 Sjoerd Mullender - 11.37.7-20200529 +- Rebuilt. + * Tue May 26 2020 Sjoerd Mullender - 11.37.5-20200526 - Rebuilt. - BZ#6864: (I)LIKE with multiple % doen't find matches diff --git a/debian/changelog b/debian/changelog --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +monetdb (11.37.7) unstable; urgency=low + + * Rebuilt. + + -- Sjoerd Mullender Fri, 29 May 2020 12:21:47 +0200 + monetdb (11.37.5) 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=20:2:0 +GDK_VERSION=20:3:0 # version of the MAPI library (subdirectory clients/mapilib) MAPI_VERSION=12:4:0 # version of the MONETDB5 library (subdirectory monetdb5, not including extras or sql) -MONETDB5_VERSION=29:2:0 +MONETDB5_VERSION=29:3:0 # version of the STREAM library (subdirectory common/stream) STREAM_VERSION=13:5:0 ___ checkin-list mailing list checkin-list@monetdb.org https://www.monetdb.org/mailman/listinfo/checkin-list
MonetDB: default - Merge with Jun2020 branch, not changing any f...
Changeset: e59dbcf2c0db for MonetDB URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=e59dbcf2c0db Modified Files: .bumpversion.cfg 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 Branch: default Log Message: Merge with Jun2020 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 Jun2020 branch.
Changeset: 89f98f34c3c8 for MonetDB URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=89f98f34c3c8 Modified Files: .bumpversion.cfg MonetDB.spec Branch: default Log Message: Merge with Jun2020 branch. diffs (12 lines): diff --git a/.bumpversion.cfg b/.bumpversion.cfg --- a/.bumpversion.cfg +++ b/.bumpversion.cfg @@ -6,6 +6,8 @@ tag = False [bumpversion:file:configure.ag] [bumpversion:file:MonetDB.spec] +search = %global version {current_version} +replace = %global version {new_version} [bumpversion:file:NT/rules.msc] ___ checkin-list mailing list checkin-list@monetdb.org https://www.monetdb.org/mailman/listinfo/checkin-list
MonetDB: default - Merge with Jun2020 branch.
Changeset: a01f6a1fe8d7 for MonetDB URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=a01f6a1fe8d7 Modified Files: monetdb5/modules/atoms/mtime.c sql/backends/monet5/sql_user.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/subquery/Tests/subquery6.sql Branch: default Log Message: Merge with Jun2020 branch. diffs (truncated from 332 to 300 lines): diff --git a/monetdb5/modules/atoms/mtime.c b/monetdb5/modules/atoms/mtime.c --- a/monetdb5/modules/atoms/mtime.c +++ b/monetdb5/modules/atoms/mtime.c @@ -768,28 +768,6 @@ MTIMElocal_timezone_msec(lng *ret) return MAL_SUCCEED; } -str -MTIMEstr_to_date(date *ret, const char *const *s, const char *const *format) -{ - struct tm tm = (struct tm) {0}; - time_t t; - - if (strNil(*s) || strNil(*format)) { - *ret = date_nil; - return MAL_SUCCEED; - } - t = time(NULL); - localtime_r(&t, &tm); - tm.tm_sec = tm.tm_min = tm.tm_hour = 0; - if (strptime(*s, *format, &tm) == NULL) - throw(MAL, "mtime.str_to_date", "format '%s', doesn't match date '%s'", - *format, *s); - *ret = date_create(tm.tm_year + 1900, tm.tm_mon + 1, tm.tm_mday); - if (is_date_nil(*ret)) - throw(MAL, "mtime.str_to_date", "bad date '%s'", *s); - return MAL_SUCCEED; -} - static str timestamp_to_str(str *ret, const timestamp *d, const char *const *format, const char *type, const char *malfunc) @@ -825,44 +803,8 @@ timestamp_to_str(str *ret, const timesta return MAL_SUCCEED; } -str -MTIMEdate_to_str(str *ret, const date *d, const char *const *format) -{ - timestamp ts = timestamp_create(*d, timestamp_daytime(timestamp_current())); - return timestamp_to_str(ret, &ts, format, "date", "mtime.date_to_str"); -} - -str -MTIMEstr_to_time(daytime *ret, const char *const *s, const char *const *format) -{ - struct tm tm = (struct tm) {0}; - time_t t; - - if (strNil(*s) || strNil(*format)) { - *ret = daytime_nil; - return MAL_SUCCEED; - } - t = time(NULL); - localtime_r(&t, &tm); - tm.tm_sec = tm.tm_min = tm.tm_hour = 0; - if (strptime(*s, *format, &tm) == NULL) - throw(MAL, "mtime.str_to_time", "format '%s', doesn't match time '%s'", - *format, *s); - *ret = daytime_create(tm.tm_hour, tm.tm_min, tm.tm_sec == 60 ? 59 : tm.tm_sec, 0); - if (is_daytime_nil(*ret)) - throw(MAL, "mtime.str_to_time", "bad time '%s'", *s); - return MAL_SUCCEED; -} - -str -MTIMEtime_to_str(str *ret, const daytime *d, const char *const *format) -{ - timestamp ts = timestamp_create(timestamp_date(timestamp_current()), *d); - return timestamp_to_str(ret, &ts, format, "time", "mtime.time_to_str"); -} - -str -MTIMEstr_to_timestamp(timestamp *ret, const char *const *s, const char *const *format) +static str +str_to_timestamp(timestamp *ret, const char *const *s, const char *const *format, const char *type, const char *malfunc) { struct tm tm = (struct tm) {0}; time_t t; @@ -876,8 +818,8 @@ MTIMEstr_to_timestamp(timestamp *ret, co tm.tm_sec = tm.tm_min = tm.tm_hour = 0; tm.tm_isdst = -1; if (strptime(*s, *format, &tm) == NULL) - throw(MAL, "mtime.str_to_timestamp", - "format '%s', doesn't match timestamp '%s'", *format, *s); + throw(MAL, malfunc, + "format '%s', doesn't match %s '%s'", *format, type, *s); *ret = timestamp_create(date_create(tm.tm_year + 1900, tm.tm_mon + 1, tm.tm_mday), @@ -904,11 +846,53 @@ MTIMEstr_to_timestamp(timestamp *ret, co *ret = timestamp_add_usec(*ret, -tz * LL_CONSTANT(100)); } if (is_timestamp_nil(*ret)) - throw(MAL, "mtime.str_to_timestamp", "bad timestamp '%s'", *s); + throw(MAL, malfunc, "bad %s '%s'", type, *s); + return MAL_SUCCEED
MonetDB: default - Merge with Jun2020 branch.
Changeset: ae8f73750423 for MonetDB URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=ae8f73750423 Modified Files: monetdb5/mal/mal_exception.c Branch: default Log Message: Merge with Jun2020 branch. diffs (12 lines): diff --git a/monetdb5/mal/mal_exception.c b/monetdb5/mal/mal_exception.c --- a/monetdb5/mal/mal_exception.c +++ b/monetdb5/mal/mal_exception.c @@ -89,7 +89,7 @@ str createException(enum malexception type, const char *fcn, const char *format, ...) { va_list ap; - str ret; + str ret = NULL; if (GDKerrbuf && (ret = strstr(format, MAL_MALLOC_FAIL)) != NULL && ___ checkin-list mailing list checkin-list@monetdb.org https://www.monetdb.org/mailman/listinfo/checkin-list
MonetDB: default - Merge with Jun2020 branch.
Changeset: 82ef61dd2d50 for MonetDB URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=82ef61dd2d50 Modified Files: MonetDB.spec NT/rules.msc clients/Tests/MAL-signatures.stable.out clients/examples/perl/sqlsample.pl clients/examples/python/sqlsample.py clients/mapiclient/mclient.c debian/changelog monetdb5/mal/mal_errors.h monetdb5/mal/mal_exception.c monetdb5/modules/atoms/mtime.c monetdb5/modules/mal/mal_mapi.c sql/ChangeLog-Archive sql/backends/monet5/rel_bin.c sql/server/rel_exp.c sql/server/rel_optimizer.c sql/storage/bat/bat_table.c sql/storage/store.c sql/test/BugTracker-2014/Tests/hexadecimal_literals.Bug-3621.stable.out sql/test/BugTracker-2017/Tests/sqlsmith.Bug-6424.stable.out sql/test/BugTracker-2019/Tests/All sql/test/Tests/hot-snapshot-bz2.py sql/test/Tests/hot-snapshot-gz.py sql/test/Tests/hot-snapshot-lz4.py sql/test/Tests/hot-snapshot-xz.py sql/test/bugs/Tests/unicode_varchar-bug-sf-1041324_JdbcClient.stable.out.Windows sql/test/mapi/Tests/perl_dbi.stable.out sql/test/mapi/Tests/python3_dbapi.stable.out sql/test/mergetables/Tests/sqlsmith-exists.stable.out sql/test/miscellaneous/Tests/groupby_error.sql sql/test/miscellaneous/Tests/groupby_error.stable.out sql/test/subquery/Tests/subquery4.sql Branch: default Log Message: Merge with Jun2020 branch. diffs (truncated from 2201 to 300 lines): diff --git a/MonetDB.spec b/MonetDB.spec --- a/MonetDB.spec +++ b/MonetDB.spec @@ -1244,7 +1244,7 @@ fi column version. * Sat Feb 22 2020 Joeri van Ruth - 11.37.1-20200511 -- sql: Added SQL function sys.hot_snapshot() which can be used to write +- sql: Added SQL procedure sys.hot_snapshot() which can be used to write a snapshot of the database to a tar file. For example, sys.hot_snapshot('/tmp/snapshot.tar'). If compression support is compiled in, snapshots can also be compressed ('/tmp/snapshot.tar.gz'). diff --git a/NT/rules.msc b/NT/rules.msc --- a/NT/rules.msc +++ b/NT/rules.msc @@ -303,6 +303,11 @@ create_winconfig_conds_new_py: !ELSE $(ECHO) HAVE_LIBBZ2_FALSE='' >> "$(TOPDIR)\winconfig_conds_new.py" !ENDIF +!IFDEF HAVE_LIBLZ4 + $(ECHO) HAVE_LIBLZ4_FALSE='#' >> "$(TOPDIR)\winconfig_conds_new.py" +!ELSE + $(ECHO) HAVE_LIBLZ4_FALSE='' >> "$(TOPDIR)\winconfig_conds_new.py" +!ENDIF !IFDEF HAVE_LIBLZMA $(ECHO) HAVE_LIBLZMA_FALSE='#' >> "$(TOPDIR)\winconfig_conds_new.py" !ELSE 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 @@ -7596,24 +7596,38 @@ stdout of test 'MAL-signatures` in direc [ "batcalc", "bte", "pattern batcalc.bte(b:bat[:str], r:bat[:bit]):bat[:bte] ", "CMDconvertsignal_bte;","cast from str to bte, signal error on overflow"] [ "batcalc", "bte", "pattern batcalc.bte(b:bat[:str], s:bat[:oid]):bat[:bte] ", "CMDconvertsignal_bte;","cast from str to bte with candidates list, signal error on overflow" ] [ "batcalc", "bte", "pattern batcalc.bte(b:bat[:str], s:bat[:oid], r:bat[:bit]):bat[:bte] ","CMDconvertsignal_bte;","cast from str to bte with candidates list, signal error on overflow" ] +[ "batcalc", "bte", "command batcalc.bte(s1:int, v:bat[:bte], r:bat[:bit]):bat[:bte] ", "batbte_ce_dec2_bte;", "cast decimal(bte) to bte and check for overflow" ] +[ "batcalc", "bte", "command batcalc.bte(s1:int, v:bat[:bte], d2:int, s2:int, r:bat[:bit]):bat[:bte] ", "batbte_ce_dec2dec_bte;", "cast decimal(bte) to decimal(bte) and check for overflow" ] +[ "batcalc", "bte", "command batcalc.bte(v:bat[:bte], digits:int, scale:int, r:bat[:bit]):bat[:bte] ", "batbte_ce_num2dec_bte;", "cast number to decimal(bte) and check for overflow"] [ "batcalc", "bte", "command batcalc.bte(s1:int, v:bat[:bte]):bat[:bte] ", "batbte_dec2_bte;", "cast decimal(bte) to bte and check for overflow" ] [ "batcalc", "bte", "command batcalc.bte(s1:int, v:bat[:bte], d2:int, s2:int):bat[:bte] ", "batbte_dec2dec_bte;", "cast decimal(bte) to decimal(bte) and check for overflow" ] [ "batcalc", "bte", "command batcalc.bte(v:bat[:bte], digits:int, scale:int):bat[:bte] ", "batbte_num2dec_bte;", "cast number to decimal(bte) and check for overflow"] +[ "batcalc", "bte", "command batcalc.bte(v:bat[:dbl], digits:int, scale:int, r:bat[:bit]):bat[:bte] ", "batdbl_ce_num2dec_bte;", "cast number to decimal(bte) and check for overflow"] [ "batcalc", "bte", "command batcalc.bte(v:bat[:dbl], digits:int, scale:int):bat[:bte] ", "batdbl_num2dec_bte;", "cast number to decimal(bte) and check for overflow"] +[ "batcalc", "
MonetDB: default - Merge with Jun2020 branch, not changing any f...
Changeset: 41aae569e610 for MonetDB URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=41aae569e610 Modified Files: .bumpversion.cfg 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 Branch: default Log Message: Merge with Jun2020 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 Jun2020 branch.
Changeset: 937166a632b6 for MonetDB URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=937166a632b6 Modified Files: .hgtags MonetDB.spec debian/changelog libversions Branch: default Log Message: Merge with Jun2020 branch. diffs (58 lines): diff --git a/.hgtags b/.hgtags --- a/.hgtags +++ b/.hgtags @@ -769,3 +769,6 @@ 03ea637c10b5217782acf5db261b4cd71a9afb25 0d51d6758f2b1f3f1804415545f8551a38da1848 Jun2020_3 03ea637c10b5217782acf5db261b4cd71a9afb25 Jun2020_release 0d51d6758f2b1f3f1804415545f8551a38da1848 Jun2020_release +28480e096722b7f76ab021c0d16c68c6949f41b4 Jun2020_5 +0d51d6758f2b1f3f1804415545f8551a38da1848 Jun2020_release +28480e096722b7f76ab021c0d16c68c6949f41b4 Jun2020_release diff --git a/MonetDB.spec b/MonetDB.spec --- a/MonetDB.spec +++ b/MonetDB.spec @@ -984,6 +984,10 @@ fi %postun -p /sbin/ldconfig %changelog +* Tue May 26 2020 Sjoerd Mullender - 11.37.5-20200526 +- Rebuilt. +- BZ#6864: (I)LIKE with multiple % doen't find matches + * Mon May 18 2020 Sjoerd Mullender - 11.37.3-20200518 - Rebuilt. - BZ#6863: thash files not released upon drop table diff --git a/debian/changelog b/debian/changelog --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,10 @@ +monetdb (11.37.5) unstable; urgency=low + + * Rebuilt. + * BZ#6864: (I)LIKE with multiple % doen't find matches + + -- Sjoerd Mullender Tue, 26 May 2020 10:38:30 +0200 + monetdb (11.37.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=20:1:0 +GDK_VERSION=20:2:0 # version of the MAPI library (subdirectory clients/mapilib) MAPI_VERSION=12:4:0 # version of the MONETDB5 library (subdirectory monetdb5, not including extras or sql) -MONETDB5_VERSION=29:1:0 +MONETDB5_VERSION=29:2:0 # version of the STREAM library (subdirectory common/stream) -STREAM_VERSION=13:4:0 +STREAM_VERSION=13:5:0 ___ checkin-list mailing list checkin-list@monetdb.org https://www.monetdb.org/mailman/listinfo/checkin-list
MonetDB: default - Merge with Jun2020 branch, not changing any f...
Changeset: 6d3f2fc9b5bf for MonetDB URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=6d3f2fc9b5bf Modified Files: .bumpversion.cfg 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 Branch: default Log Message: Merge with Jun2020 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 Jun2020 branch.
Changeset: ac2b9356a5e8 for MonetDB URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=ac2b9356a5e8 Modified Files: gdk/gdk_calc.c sql/server/rel_optimizer.c sql/server/rel_rewriter.c sql/server/rel_rewriter.h sql/server/rel_select.c sql/server/rel_unnest.c sql/storage/store.c sql/test/BugTracker-2016/Tests/memory-consumption-query-PLAN-25joins.Bug-3972.stable.out sql/test/Tests/hot_snapshot_compression.py sql/test/miscellaneous/Tests/simple_plans.stable.out sql/test/miscellaneous/Tests/values.stable.err sql/test/miscellaneous/Tests/values.stable.out sql/test/subquery/Tests/subquery6.stable.err sql/test/subquery/Tests/subquery6.stable.out sql/test/testdb/Tests/dump-nogeom.stable.out testing/process.py Branch: default Log Message: Merge with Jun2020 branch. diffs (truncated from 752 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 @@ -102,7 +102,7 @@ checkbats(BAT *b1, BAT *b2, const char * j = x2 * incr2; \ TYPE1 v1 = ((const TYPE1 *) lft)[i];\ TYPE2 v2 = ((const TYPE2 *) rgt)[j];\ - if ((rv != NULL && !rv[i]) || \ + if ((rv != NULL && !rv[k]) || \ is_##TYPE1##_nil(v1) || is_##TYPE2##_nil(v2)) { \ nils++; \ ((TYPE3 *) dst)[k] = TYPE3##_nil; \ @@ -118,7 +118,7 @@ checkbats(BAT *b1, BAT *b2, const char * j = x2 * incr2; \ TYPE1 v1 = ((const TYPE1 *) lft)[i];\ TYPE2 v2 = ((const TYPE2 *) rgt)[j];\ - if ((rv != NULL && !rv[i]) || \ + if ((rv != NULL && !rv[k]) || \ is_##TYPE1##_nil(v1) || is_##TYPE2##_nil(v2)) { \ nils++; \ ((TYPE3 *) dst)[k] = TYPE3##_nil; \ @@ -141,7 +141,7 @@ checkbats(BAT *b1, BAT *b2, const char * j = x2 * incr2; \ TYPE1 v1 = ((const TYPE1 *) lft)[i];\ TYPE2 v2 = ((const TYPE2 *) rgt)[j];\ - if ((rv != NULL && !rv[i]) || \ + if ((rv != NULL && !rv[k]) || \ is_##TYPE1##_nil(v1) || is_##TYPE2##_nil(v2)) { \ ((TYPE3 *) dst)[k] = FUNC(is_##TYPE1##_nil(v1), is_##TYPE2##_nil(v2)); \ } else {\ @@ -156,7 +156,7 @@ checkbats(BAT *b1, BAT *b2, const char * j = x2 * incr2; \ TYPE1 v1 = ((const TYPE1 *) lft)[i];\ TYPE2 v2 = ((const TYPE2 *) rgt)[j];\ - if ((rv != NULL && !rv[i]) || \ + if ((rv != NULL && !rv[k]) || \ is_##TYPE1##_nil(v1) || is_##TYPE2##_nil(v2)) { \ ((TYPE3 *) dst)[k] = FUNC(is_##TYPE1##_nil(v1), is_##TYPE2##_nil(v2)); \ } else {\ @@ -201,7 +201,7 @@ checkbats(BAT *b1, BAT *b2, const char * j = x2 * incr2; \ TYPE1 v1 = ((const TYPE1 *) lft)[i];\ TYPE2 v2 = ((const TYPE2 *) rgt)[j];\ - if ((rv != NULL && !rv[i]) || \ + if ((rv != NULL && !rv[k]) || \ is_##TYPE1##_nil(v1) || is_##TYPE2##_nil(v2)) { \ nils++; \ ((TYPE3 *) dst)[k] = TYPE3##_nil; \ @@ -228,7 +228,7 @@ checkbats(BAT *b1, BAT *b2, const char * j = x2 * incr2; \ TYPE1 v1 = ((const TYPE1 *) lft)[i];\ TYPE2 v2 = ((const TYPE2 *) rgt)[j];\ - if ((rv != NULL && !rv[i]) || \ + if ((rv != NULL && !rv[k]) || \ is_##TYPE1##_nil(v1) || is_##TYPE2##_nil(v2)) { \
MonetDB: default - Merge with Jun2020 branch.
Changeset: b63323e589e3 for MonetDB URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=b63323e589e3 Added Files: sql/test/Tests/hot-snapshot-bz2.py sql/test/Tests/hot-snapshot-bz2.stable.err sql/test/Tests/hot-snapshot-bz2.stable.out sql/test/Tests/hot-snapshot-gz.py sql/test/Tests/hot-snapshot-gz.stable.err sql/test/Tests/hot-snapshot-gz.stable.out sql/test/Tests/hot-snapshot-lz4.py sql/test/Tests/hot-snapshot-lz4.stable.err sql/test/Tests/hot-snapshot-lz4.stable.out sql/test/Tests/hot-snapshot-xz.py sql/test/Tests/hot-snapshot-xz.stable.err sql/test/Tests/hot-snapshot-xz.stable.out sql/test/Tests/hot_snapshot_compression.py Modified Files: common/stream/stream.c sql/server/rel_optimizer.c sql/server/rel_unnest.c sql/storage/store.c sql/test/Tests/All sql/test/mergetables/Tests/sqlsmith-exists2.stable.out Branch: default Log Message: Merge with Jun2020 branch. diffs (truncated from 670 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 @@ -447,6 +447,8 @@ mnstr_write(stream *restrict s, const vo assert(!s->readonly); if (s->errnr) return -1; + if (cnt == 0) + return 0; return s->write(s, buf, elmsize, cnt); } @@ -1766,7 +1768,7 @@ stream_lz4write(stream *restrict s, cons lz4->total_processing += ret; } - if(lz4->total_processing == lz4->ring_buffer_size) { + if (lz4->total_processing > 0) { real_written = fwrite((void *)lz4->ring_buffer, 1, lz4->total_processing, lz4->fp); if (real_written == 0) { s->errnr = MNSTR_WRITE_ERROR; @@ -1780,52 +1782,6 @@ stream_lz4write(stream *restrict s, cons return (ssize_t) (total_written / elmsize); } -static void -stream_lz4close(stream *s) -{ - lz4_stream *lz4 = s->stream_data.p; - - if (lz4) { - if (!s->readonly) { - size_t ret, real_written; - - if (lz4->total_processing > 0 && lz4->total_processing < lz4->ring_buffer_size) { /* compress remaining */ - real_written = fwrite(lz4->ring_buffer, 1, lz4->total_processing, lz4->fp); - if (real_written == 0) { - s->errnr = MNSTR_WRITE_ERROR; - return ; - } - lz4->total_processing = 0; - } /* finish compression */ - ret = LZ4F_compressEnd(lz4->context.comp_context, lz4->ring_buffer, lz4->ring_buffer_size, NULL); - if(LZ4F_isError(ret)) { - s->errnr = MNSTR_WRITE_ERROR; - return ; - } - assert(ret < LZ4DECOMPBUFSIZ); - lz4->total_processing = ret; - - real_written = fwrite(lz4->ring_buffer, 1, lz4->total_processing, lz4->fp); - if (real_written == 0) { - s->errnr = MNSTR_WRITE_ERROR; - return ; - } - lz4->total_processing = 0; - - fflush(lz4->fp); - } - if(!s->readonly) { - (void) LZ4F_freeCompressionContext(lz4->context.comp_context); - } else { - (void) LZ4F_freeDecompressionContext(lz4->context.dec_context); - } - fclose(lz4->fp); - free(lz4->ring_buffer); - free(lz4); - } - s->stream_data.p = NULL; -} - static int stream_lz4flush(stream *s) { @@ -1862,6 +1818,25 @@ stream_lz4flush(stream *s) return 0; } +static void +stream_lz4close(stream *s) +{ + lz4_stream *lz4 = s->stream_data.p; + + if (lz4) { + stream_lz4flush(s); + if(!s->readonly) { + (void) LZ4F_freeCompressionContext(lz4->context.comp_context); + } else { + (void) LZ4F_freeDecompressionContext(lz4->context.dec_context); + } + fclose(lz4->fp); + free(lz4->ring_buffer); + free(lz4); + } + s->stream_data.p = NULL; +} + static stream * open_lz4stream(const char *restrict filename, const char *restrict flags) { 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 @@ -1640,6 +1640,7 @@ rel_push_count_down(mvc *sql, sql_rel *r exp_label(sql->sa, e,
MonetDB: default - Merge with Jun2020 branch.
Changeset: 4ef9695e8f0b for MonetDB URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=4ef9695e8f0b Modified Files: debian/monetdb5-sql.postinst gdk/gdk_bbp.c gdk/gdk_logger.c gdk/gdk_storage.c sql/server/rel_optimizer.c sql/server/rel_select.c sql/server/rel_unnest.c sql/test/mergetables/Tests/sqlsmith-exists2.sql sql/test/mergetables/Tests/sqlsmith-exists2.stable.out sql/test/subquery/Tests/subquery5.stable.out sql/test/subquery/Tests/subquery6.sql sql/test/subquery/Tests/subquery6.stable.err Branch: default Log Message: Merge with Jun2020 branch. diffs (truncated from 545 to 300 lines): diff --git a/debian/monetdb5-sql.postinst b/debian/monetdb5-sql.postinst --- a/debian/monetdb5-sql.postinst +++ b/debian/monetdb5-sql.postinst @@ -14,7 +14,7 @@ case "$1" in chown monetdb:monetdb /var/log/monetdb /run/monetdb chmod ug=rwx,o= /var/log/monetdb chmod ug=rwx,o=rx /run/monetdb - chown monetdb:monetdb /var/monetdb5/dbfarm/.meovingian_* + chown monetdb:monetdb /var/monetdb5/dbfarm/.merovingian_* chmod ug=rw,o=r /var/monetdb5/dbfarm/.merovingian_* ;; diff --git a/gdk/gdk_bbp.c b/gdk/gdk_bbp.c --- a/gdk/gdk_bbp.c +++ b/gdk/gdk_bbp.c @@ -1540,7 +1540,7 @@ BBPdir_subcommit(int cnt, bat *subcommit * replacing the entries for the subcommitted bats */ if ((obbpf = GDKfileopen(0, SUBDIR, "BBP", "dir", "r")) == NULL && (obbpf = GDKfileopen(0, BAKDIR, "BBP", "dir", "r")) == NULL) { - GDKerror("subcommit attempted without backup BBP.dir."); + GDKsyserror("subcommit attempted without backup BBP.dir."); goto bailout; } /* read first three lines */ diff --git a/gdk/gdk_logger.c b/gdk/gdk_logger.c --- a/gdk/gdk_logger.c +++ b/gdk/gdk_logger.c @@ -2170,17 +2170,6 @@ logger_load(int debug, const char *fn, c FILE *fp1; int len, curid; - len = snprintf(cvfile1, sizeof(cvfile1), "%sconvert-date", -lg->dir); - if (len == -1 || len >= FILENAME_MAX) { - GDKerror("Convert-date filename path is too large\n"); - goto error; - } - len = snprintf(bak, sizeof(bak), "%s_date-convert", fn); - if (len == -1 || len >= FILENAME_MAX) { - GDKerror("Convert-date filename path is too large\n"); - goto error; - } /* read the current log id without disturbing * the file pointer */ #ifdef _MSC_VER @@ -2206,6 +2195,17 @@ logger_load(int debug, const char *fn, c if (fsetpos(fp, &off) != 0) goto error; /* should never happen */ #endif + len = snprintf(cvfile1, sizeof(cvfile1), "%sconvert-date", +lg->dir); + if (len == -1 || len >= FILENAME_MAX) { + GDKerror("Convert-date filename path is too large\n"); + goto error; + } + len = snprintf(bak, sizeof(bak), "%s_date-convert", fn); + if (len == -1 || len >= FILENAME_MAX) { + GDKerror("Convert-date filename path is too large\n"); + goto error; + } if ((fp1 = GDKfileopen(0, NULL, bak, NULL, "r")) != NULL) { /* file indicating that we need to do @@ -2227,7 +2227,7 @@ logger_load(int debug, const char *fn, c fsync(fileno(fp1)) < 0 || #endif fclose(fp1) != 0) { - GDKerror("failed to write %s\n", cvfile1); + GDKsyserror("failed to write %s\n", cvfile1); goto error; } /* then remove the unversioned file @@ -2239,6 +2239,9 @@ logger_load(int debug, const char *fn, c } /* set the flag that we need to convert */ lg->convert_date = true; + } else if (errno != ENOENT) { + GDKsyserror("opening file %s failed\n", bak); + goto error; } else if ((fp1 = GDKfileopen(farmid, NULL, cvfile1, NULL, "r")) != NULL) { /* the versioned conversion file * exists: check version */ @@ -2257,6 +2260,9 @@ log
MonetDB: default - Merge with Jun2020 branch.
Changeset: 0aa5ba5e98a7 for MonetDB URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=0aa5ba5e98a7 Added Files: .bumpversion.cfg Removed Files: vertoo.config vertoo.data Modified Files: NT/rules.msc clients/mapilib/mapi.rc clients/odbc/driver/driver.rc clients/odbc/winsetup/setup.rc gdk/libbat.rc monetdb5/tools/libmonetdb5.rc Branch: default Log Message: Merge with Jun2020 branch. diffs (truncated from 310 to 300 lines): diff --git a/.bumpversion.cfg b/.bumpversion.cfg new file mode 100644 --- /dev/null +++ b/.bumpversion.cfg @@ -0,0 +1,32 @@ +[bumpversion] +current_version = 11.38.0 +commit = False +tag = False + +[bumpversion:file:configure.ag] + +[bumpversion:file:MonetDB.spec] + +[bumpversion:file:NT/rules.msc] + +[bumpversion:file:NT/monetdb_config.h.in] + +[bumpversion:file:gdk/libbat.rc] +parse = (?P\d+),(?P\d+),(?P\d+) +serialize = {major},{minor},{patch} + +[bumpversion:file:clients/odbc/winsetup/setup.rc] +parse = (?P\d+),(?P\d+),(?P\d+) +serialize = {major},{minor},{patch} + +[bumpversion:file:clients/odbc/driver/driver.rc] +parse = (?P\d+),(?P\d+),(?P\d+) +serialize = {major},{minor},{patch} + +[bumpversion:file:clients/mapilib/mapi.rc] +parse = (?P\d+),(?P\d+),(?P\d+) +serialize = {major},{minor},{patch} + +[bumpversion:file:monetdb5/tools/libmonetdb5.rc] +parse = (?P\d+),(?P\d+),(?P\d+) +serialize = {major},{minor},{patch} diff --git a/NT/rules.msc b/NT/rules.msc --- a/NT/rules.msc +++ b/NT/rules.msc @@ -7,9 +7,6 @@ # Copyright 1997 - July 2008 CWI, August 2008 - 2020 MonetDB B.V. VERSION=11.38.0 -# ^^ -# Maintained via vertoo. Please don't modify by hand! -# Contact monetdb-develop...@lists.sourceforge.net for details and/or assistance. !IFDEF MAKE_INCLUDEFILE !INCLUDE $(MAKE_INCLUDEFILE) diff --git a/clients/mapilib/mapi.rc b/clients/mapilib/mapi.rc --- a/clients/mapilib/mapi.rc +++ b/clients/mapilib/mapi.rc @@ -2,9 +2,12 @@ LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US +#define version(major,minor,patch) major,minor,patch,1 +#define sversion(major,minor,patch)#major "." #minor "." #patch "\0" + 1 VERSIONINFO - FILEVERSION 11,38,0,1 - PRODUCTVERSION 11,38,0,1 + FILEVERSION version(11,38,0) + PRODUCTVERSION version(11,38,0) FILEFLAGSMASK 0x3fL FILEFLAGS 0 FILEOS VOS_NT_WINDOWS32 @@ -18,20 +21,14 @@ BEGIN VALUE "Comments", "\0" VALUE "CompanyName", "MonetDB B.V.\0" VALUE "FileDescription", "MonetDB Application Interface DLL\0" - VALUE "FileVersion", "11.38.0\0" - // - // Maintained via vertoo. Please don't modify by hand! - // Contact monetdb-develop...@lists.sourceforge.net for details and/or assistance. + VALUE "FileVersion", sversion(11,38,0) VALUE "InternalName", "Mapi\0" - VALUE "LegalCopyright", "Copyright © MonetDB B.V. 2008-2020\0" + VALUE "LegalCopyright", "Copyright (c) MonetDB B.V. 2008-2020\0" VALUE "LegalTrademarks", "\0" VALUE "OriginalFilename", "Mapi.dll\0" VALUE "PrivateBuild", "\0" VALUE "ProductName", "MonetDB Client Libraries\0" - VALUE "ProductVersion", "11.38.0\0" - // - // Maintained via vertoo. Please don't modify by hand! - // Contact monetdb-develop...@lists.sourceforge.net for details and/or assistance. + VALUE "ProductVersion", sversion(11,38,0) VALUE "SpecialBuild", "\0" END END diff --git a/clients/odbc/driver/driver.rc b/clients/odbc/driver/driver.rc --- a/clients/odbc/driver/driver.rc +++ b/clients/odbc/driver/driver.rc @@ -2,9 +2,12 @@ LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US +#define version(major,minor,patch) major,minor,patch,1 +#define sversion(major,minor,patch)#major "." #minor "." #patch "\0" + 1 VERSIONINFO - FILEVERSION 11,38,0,1 - PRODUCTVERSION 11,38,0,1 + FILEVERSION version(11,38,0) + PRODUCTVERSION version(11,38,0) FILEFLAGSMASK 0x3fL FILEFLAGS 0 FILEOS VOS_NT_WINDOWS32 @@ -18,20 +21,14 @@ BEGIN VALUE "Comments", "\0" VALUE "CompanyName", "MonetDB B.V.\0" VALUE "FileDescription", "MonetDB ODBC Driver DLL\0" - VALUE "FileVersion", "11.38.0\0" - // - // Maintained via vertoo. Please don't modify by hand! - // Contact monetdb-develop...@lists.sourceforge.net for details and/or assistance. + VALUE "FileVersion", sversion(11,38,0) VALUE "InternalName", "libMonetODBC\0" - VALUE "LegalCopyright", "Copyright © MonetDB B.V. 2008-2020\0" + VALUE "LegalCopyright", "Copyright (c) MonetDB B.V. 2008-2020\0" VALUE "LegalTrademarks", "\0" VALUE "OriginalFilename", "libMonetODBC.dll\0" VALUE "PrivateBuild", "\0" VALUE "ProductName", "MonetDB SQL Server\0" - VALUE "ProductVersion", "11.38.0\0" - // - // Maintained via vertoo. Please don't modify by hand! -
MonetDB: default - Merge with Jun2020 branch, not changing any f...
Changeset: 00061f64c5c0 for MonetDB URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=00061f64c5c0 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 Jun2020 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 Jun2020 branch.
Changeset: 20aace6789c9 for MonetDB URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=20aace6789c9 Modified Files: .hgtags MonetDB.spec debian/changelog libversions Branch: default Log Message: Merge with Jun2020 branch. diffs (57 lines): diff --git a/.hgtags b/.hgtags --- a/.hgtags +++ b/.hgtags @@ -766,3 +766,6 @@ 179977ed07cd8095f99a6a07968b8e9d1affa753 6b76e1fa9b32421197acf26f63948c858e487d6a Jun2020_root 03ea637c10b5217782acf5db261b4cd71a9afb25 Jun2020_1 03ea637c10b5217782acf5db261b4cd71a9afb25 Jun2020_release +0d51d6758f2b1f3f1804415545f8551a38da1848 Jun2020_3 +03ea637c10b5217782acf5db261b4cd71a9afb25 Jun2020_release +0d51d6758f2b1f3f1804415545f8551a38da1848 Jun2020_release diff --git a/MonetDB.spec b/MonetDB.spec --- a/MonetDB.spec +++ b/MonetDB.spec @@ -984,6 +984,10 @@ fi %postun -p /sbin/ldconfig %changelog +* Mon May 18 2020 Sjoerd Mullender - 11.37.3-20200518 +- Rebuilt. +- BZ#6863: thash files not released upon drop table + * Mon May 11 2020 Sjoerd Mullender - 11.37.1-20200511 - Rebuilt. - BZ#6298: unexpectedly slow execution of SELECT length(fieldname) diff --git a/debian/changelog b/debian/changelog --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,10 @@ +monetdb (11.37.3) unstable; urgency=low + + * Rebuilt. + * BZ#6863: thash files not released upon drop table + + -- Sjoerd Mullender Mon, 18 May 2020 11:29:29 +0200 + monetdb (11.37.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=20:0:0 +GDK_VERSION=20:1:0 # version of the MAPI library (subdirectory clients/mapilib) MAPI_VERSION=12:4:0 # version of the MONETDB5 library (subdirectory monetdb5, not including extras or sql) -MONETDB5_VERSION=29:0:0 +MONETDB5_VERSION=29:1:0 # version of the STREAM library (subdirectory common/stream) STREAM_VERSION=13:4:0 ___ checkin-list mailing list checkin-list@monetdb.org https://www.monetdb.org/mailman/listinfo/checkin-list
MonetDB: default - Merge with Jun2020 branch, not changing any f...
Changeset: 0a35fbebd963 for MonetDB URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=0a35fbebd963 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 Jun2020 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 Jun2020 branch.
Changeset: aa97f95e3c31 for MonetDB URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=aa97f95e3c31 Modified Files: testing/Mfilter.py Branch: default Log Message: Merge with Jun2020 branch. diffs (21 lines): diff --git a/testing/Mfilter.py b/testing/Mfilter.py --- a/testing/Mfilter.py +++ b/testing/Mfilter.py @@ -81,7 +81,7 @@ bbp_dir = re.compile(r'^(-?\d+) (-?\d+) norm_in = re.compile('(?:'+')|(?:'.join([ # id: #groups ### r'^(ERROR = !| *!|)(syntax|parse|parse error: syntax)( error, )(unexpected .* on line |unexpected .* in: )?(.*)\n', # 1: 5 -r'^(ERROR = !| *!|)(syntax|parse|parse error: syntax)( error, )(?:unexpected .* on line |unexpected .* in: )?(?:.*)\n', # 2: 5 +r'^(ERROR = !| *!|)(syntax|parse|parse error: syntax)( error(?:,| in:) )(?:unexpected .* on line |unexpected .* in: )?(?:.*)\n', # 2: 5 r"^(QUERY|ERROR)( =.* connect)( to|)( ')(localhost)(' port )(\d+)( .*)\n", # 3: 8 r"^([Uu]sage: )(/.*/\.libs/|/.*/lt-|)([A-Za-z0-9_]+:?[ \t].*)\n", # 4: 3 r'^(ERROR = !.*Exception:remote\.[^:]*:\(mapi:monetdb://monetdb@)([^/]*)(/mTests_.*\).*)\n', # 5: 4 @@ -102,7 +102,7 @@ norm_in = re.compile('(?:'+')|(?:'.join norm_hint = '# the original non-normalized output was: ' norm_out = ( ### None, 'syntax/parse', None, 'unexpected ... on line/in: ', None, # 1: 5 -None, 'syntax/parse', None, # 2: 5 +None, 'syntax/parse', 'error,', # 2: 5 None, None, None, None, '', None, '', None, # 3: 8 None, '', None, # 4: 3 None, 'localhost', None, # 5: 4 ___ checkin-list mailing list checkin-list@monetdb.org https://www.monetdb.org/mailman/listinfo/checkin-list
MonetDB: default - Merge with Jun2020 branch.
Changeset: 4d9f8b244437 for MonetDB URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=4d9f8b244437 Modified Files: gdk/gdk_join.c geom/monetdb5/geom.c monetdb5/mal/mal_client.c sql/backends/monet5/UDF/pyapi3/pyheader.h sql/server/rel_select.c sql/server/sql_partition.c sql/server/sql_semantic.c sql/storage/bat/bat_storage.c sql/storage/sql_storage.h sql/storage/store.c sql/test/BugTracker-2016/Tests/decimal_vs_integer.Bug-3941.stable.out.single sql/test/wlcr/Tests/wlr110.py sql/test/wlcr/Tests/wlr35.py testing/Mtest.py.in Branch: default Log Message: Merge with Jun2020 branch. diffs (113 lines): diff --git a/gdk/gdk_join.c b/gdk/gdk_join.c --- a/gdk/gdk_join.c +++ b/gdk/gdk_join.c @@ -3162,7 +3162,13 @@ leftjoin(BAT **r1p, BAT **r2p, BAT *l, B /* no hash table, so cost includes time to build the * hash table (single scan) plus the time to do the * lookups (also single scan, we assume some chains) */ - rcost = (double) rci.ncand * 2 + lci.ncand * 1.1; + rcost = lci.ncand * 1.1; +#ifdef PERSISTENTHASH + /* only count the cost of creating the hash for +* non-persistent bats */ + if (rci.ncand != BATcount(r) || !(BBP_status(r->batCacheid) & BBPEXISTING) || r->theap.dirty || GDKinmemory()) +#endif + rcost += rci.ncand * 2.0; } else { if (rci.noids > 0) { /* if we need to do binary search on candidate @@ -3205,7 +3211,13 @@ leftjoin(BAT **r1p, BAT **r2p, BAT *l, B /* no hash table, so cost includes time to build the * hash table (single scan) plus the time to do the * lookups (also single scan, we assume some chains) */ - lcost = (double) lci.ncand * 2 + rci.ncand * 1.1; + lcost = rci.ncand * 1.1; +#ifdef PERSISTENTHASH + /* only count the cost of creating the hash +* for non-persistent bats */ + if (lci.ncand != BATcount(l) || !(BBP_status(l->batCacheid) & BBPEXISTING) || l->theap.dirty || GDKinmemory()) +#endif + lcost += lci.ncand * 2.0; } else { if (lci.noids > 0) { /* if we need to do binary search on candidate @@ -3501,9 +3513,13 @@ BATjoin(BAT **r1p, BAT **r2p, BAT *l, BA /* no hash table, so cost includes time to build the * hash table (single scan) plus the time to do the * lookups (also single scan, we assume some chains) */ - lcost = (double) lci.ncand * 2 + rci.ncand * 1.1; - if (lci.ncand == BATcount(l) && !l->batTransient) - lcost *= 0.8; + lcost = rci.ncand * 1.1; +#ifdef PERSISTENTHASH + /* only count the cost of creating the hash for +* non-persistent bats */ + if (lci.ncand != BATcount(l) || !(BBP_status(l->batCacheid) & BBPEXISTING) || l->theap.dirty || GDKinmemory()) +#endif + lcost += lci.ncand * 2.0; } else { if (lci.noids > 0) { /* if we need to do binary search on candidate @@ -3542,9 +3558,13 @@ BATjoin(BAT **r1p, BAT **r2p, BAT *l, BA /* no hash table, so cost includes time to build the * hash table (single scan) plus the time to do the * lookups (also single scan, we assume some chains) */ - rcost = (double) rci.ncand * 2 + lci.ncand * 1.1; - if (rci.ncand == BATcount(r) && !r->batTransient) - rcost *= 0.8; + rcost = lci.ncand * 1.1; +#ifdef PERSISTENTHASH + /* only count the cost of creating the hash for +* non-persistent bats */ + if (rci.ncand != BATcount(r) || !(BBP_status(r->batCacheid) & BBPEXISTING) || r->theap.dirty || GDKinmemory()) +#endif + rcost += rci.ncand * 2.0; } else { if (rci.noids > 0) { /* if we need to do binary search on candidate diff --git a/monetdb5/mal/mal_client.c b/monetdb5/mal/mal_client.c --- a/monetdb5/mal/mal_client.c +++ b/monetdb5/mal/mal_client.c @@ -133,14 +133,13 @@ static Client MCnewClient(void) { Client c; - MT_lock_set(&mal_contextLock); + for (c = mal_clients; c < mal_clients + MAL_MAXCLIENTS; c++) { if (c->mode == FREECLIENT) { c->mode = RUNCLIENT; break; } } - MT_lock_unset(&mal_contextLock); if (c == mal_clients + MAL_MAXCLIENTS) return NULL; @@ -206,6 +2
MonetDB: default - Merge with Jun2020 branch.
Changeset: d43ebc45a034 for MonetDB URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=d43ebc45a034 Added Files: documentation/source/manual_pages/README Modified Files: documentation/source/manual_pages/monetdb.rst sql/backends/monet5/sql_upgrades.c sql/include/sql_relation.h sql/server/rel_unnest.c sql/storage/bat/bat_logger.c tools/merovingian/client/monetdb.1 Branch: default Log Message: Merge with Jun2020 branch. diffs (truncated from 397 to 300 lines): diff --git a/documentation/source/manual_pages/README b/documentation/source/manual_pages/README new file mode 100644 --- /dev/null +++ b/documentation/source/manual_pages/README @@ -0,0 +1,7 @@ +These files were created using the command + +pandoc --columns=72 $INPUTFILE -f man -t rst -o $OUTPUTFILE + +with some very minor hand editing, where $INPUTFILE and $OUTPUTFILE +refer to the manual page source file (*.1 file) and the corresponding +reStructuredText (*.rst) file. diff --git a/documentation/source/manual_pages/monetdb.rst b/documentation/source/manual_pages/monetdb.rst --- a/documentation/source/manual_pages/monetdb.rst +++ b/documentation/source/manual_pages/monetdb.rst @@ -34,6 +34,9 @@ of *monetdb*. Connect to *hostname* instead of attempting a connection over the local UNIX socket. This allows *monetdb* to connect to a remote *monetdbd*\ (1). The use of this option requires **-P** (see below). + If *hostname* starts with a forward slash (/), *hostname* is assumed + to be the directory where the UNIX sockets are stored. In that case, + the **-P** option is not allowed. **-p** *port* Connects to the given portnumber instead of the default (5). 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 @@ -2865,7 +2865,7 @@ SQLupgrades(Client c, mvc *m) sql_column *col; bool systabfixed = false; - if (!prev_schema) { + if (prev_schema == NULL) { TRC_CRITICAL(SQL_PARSER, "Allocation failure while running SQL upgrades\n"); return -1; } @@ -2877,6 +2877,7 @@ SQLupgrades(Client c, mvc *m) if ((err = sql_update_hugeint(c, m, prev_schema, &systabfixed)) != NULL) { TRC_CRITICAL(SQL_PARSER, "%s\n", err); freeException(err); + GDKfree(prev_schema); return -1; } } @@ -2901,6 +2902,7 @@ SQLupgrades(Client c, mvc *m) if ((err = sql_update_geom(c, m, 1, prev_schema)) != NULL) { TRC_CRITICAL(SQL_PARSER, "%s\n", err); freeException(err); + GDKfree(prev_schema); return -1; } } else if (geomsqlfix_get() != NULL) { @@ -2912,6 +2914,7 @@ SQLupgrades(Client c, mvc *m) if ((err = sql_update_geom(c, m, 0, prev_schema)) != NULL) { TRC_CRITICAL(SQL_PARSER, "%s\n", err); freeException(err); + GDKfree(prev_schema); return -1; } } @@ -2923,6 +2926,7 @@ SQLupgrades(Client c, mvc *m) if ((err = sql_update_mar2018_geom(c, t, prev_schema)) != NULL) { TRC_CRITICAL(SQL_PARSER, "%s\n", err); freeException(err); + GDKfree(prev_schema); return -1; } } @@ -2932,6 +2936,7 @@ SQLupgrades(Client c, mvc *m) if ((err = sql_update_mar2018(c, m, prev_schema, &systabfixed)) != NULL) { TRC_CRITICAL(SQL_PARSER, "%s\n", err); freeException(err); + GDKfree(prev_schema); return -1; } #ifdef HAVE_NETCDF @@ -2939,6 +2944,7 @@ SQLupgrades(Client c, mvc *m) (err = sql_update_mar2018_netcdf(c, prev_schema)) != NULL) { TRC_CRITICAL(SQL_PARSER, "%s\n", err); freeException(err); + GDKfree(prev_schema); return -1; } #endif @@ -2948,6 +2954,7 @@ SQLupgrades(Client c, mvc *m) if ((err = sql_update_mar2018_sp1(c, prev_schema)) != NULL) { TRC_CRITICAL(SQL_PARSER, "%s\n", err); freeException(err); + GDKfree(prev_schema); return -1; } } @@ -2960,6 +2967,7 @@ SQLupgrades(Client c, mvc *m) if (err) { TRC_CRITICAL(SQL_PARSER, "%s\n", err); freeExcepti
MonetDB: default - Merge with Jun2020 branch, not changing any f...
Changeset: 4ffe7e222e53 for MonetDB URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=4ffe7e222e53 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 Jun2020 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 Jun2020 branch.
Changeset: f532905823f7 for MonetDB URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=f532905823f7 Added Files: clients/odbc/ChangeLog-Archive debian/libmonetdb20.install Removed Files: ChangeLog.Nov2019 buildtools/ChangeLog.Nov2019 clients/ChangeLog.Nov2019 clients/mapilib/ChangeLog.Nov2019 common/stream/ChangeLog.Nov2019 debian/libmonetdb19.install gdk/ChangeLog.Nov2019 geom/ChangeLog.Nov2019 monetdb5/ChangeLog.Nov2019 sql/ChangeLog.Nov2019 testing/ChangeLog.Nov2019 tools/merovingian/ChangeLog.Nov2019 Modified Files: .hgtags ChangeLog-Archive ChangeLog.Jun2020 MonetDB.spec buildtools/selinux/ChangeLog-Archive buildtools/selinux/ChangeLog.Jun2020 clients/ChangeLog-Archive clients/ChangeLog.Jun2020 clients/odbc/ChangeLog.Jun2020 debian/changelog debian/control gdk/ChangeLog-Archive gdk/ChangeLog.Jun2020 libversions monetdb5/ChangeLog-Archive monetdb5/ChangeLog.Jun2020 sql/ChangeLog-Archive sql/ChangeLog.Jun2020 tools/merovingian/ChangeLog-Archive tools/merovingian/ChangeLog.Jun2020 Branch: default Log Message: Merge with Jun2020 branch. diffs (truncated from 1472 to 300 lines): diff --git a/.hgtags b/.hgtags --- a/.hgtags +++ b/.hgtags @@ -764,3 +764,5 @@ 179977ed07cd8095f99a6a07968b8e9d1affa753 e1c7c70bceb205cf23b8a35179b628563871f949 Nov2019_SP3_release 179977ed07cd8095f99a6a07968b8e9d1affa753 Nov2019_SP3_release 6b76e1fa9b32421197acf26f63948c858e487d6a Jun2020_root +03ea637c10b5217782acf5db261b4cd71a9afb25 Jun2020_1 +03ea637c10b5217782acf5db261b4cd71a9afb25 Jun2020_release diff --git a/ChangeLog-Archive b/ChangeLog-Archive --- a/ChangeLog-Archive +++ b/ChangeLog-Archive @@ -1,6 +1,27 @@ # DO NOT EDIT THIS FILE -- MAINTAINED AUTOMATICALLY # This file contains past ChangeLog entries +* Mon Apr 20 2020 Sjoerd Mullender - 11.37.1-20200511 +- A new system to deal with debug output has been implemented. There is + now an option --dbtrace to mserver5 that takes a file argument to which + debug output is written. The default value is the file mdbtrace.log + inside the database directory. This option can also be set through + the monetdb program. +- The home directory of the automatically created monetdb user was + changed from /var/MonetDB to /var/lib/monetdb (RPM based systems + only). This home directory is (currently) not used for anything, + though. +- Python 2 support has been removed. There is now only support for + using Python 3. + +* Thu Jan 30 2020 Sjoerd Mullender - 11.37.1-20200511 +- Removed support for bam and sam files. + +* Fri Dec 6 2019 Panagiotis Koutsourakis - 11.37.1-20200511 +- Added mserver5 option (--set raw_strings=true|false) and monetdb + database property (raw_strings=yes|no) to control interpretation + of strings. + * Wed Oct 10 2018 Sjoerd Mullender - 11.31.11-20181011 - Some subtle dependencies between RPMs have been fixed. diff --git a/ChangeLog.Jun2020 b/ChangeLog.Jun2020 --- a/ChangeLog.Jun2020 +++ b/ChangeLog.Jun2020 @@ -1,24 +1,3 @@ # ChangeLog file for devel # This file is updated with Maddlog -* Mon Apr 20 2020 Sjoerd Mullender -- A new system to deal with debug output has been implemented. There is - now an option --dbtrace to mserver5 that takes a file argument to which - debug output is written. The default value is the file mdbtrace.log - inside the database directory. This option can also be set through - the monetdb program. -- The home directory of the automatically created monetdb user was - changed from /var/MonetDB to /var/lib/monetdb (RPM based systems - only). This home directory is (currently) not used for anything, - though. -- Python 2 support has been removed. There is now only support for - using Python 3. - -* Thu Jan 30 2020 Sjoerd Mullender -- Removed support for bam and sam files. - -* Fri Dec 6 2019 Panagiotis Koutsourakis -- Added mserver5 option (--set raw_strings=true|false) and monetdb - database property (raw_strings=yes|no) to control interpretation - of strings. - diff --git a/ChangeLog.Nov2019 b/ChangeLog.Nov2019 deleted file mode 100644 --- a/ChangeLog.Nov2019 +++ /dev/null @@ -1,3 +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 @@ -105,7 +105,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-SP3/%{name}-%{version}.tar.bz2 +Source: https://www.monetdb.org/downloads/sources/Jun2020/%{name}-%{version}.tar.bz2 # The Fedora packaging document says we need systemd-rpm-macros for # the _unitdir and _tmpfilesdir macros to exist; however on RHEL 7 @@ -984,6 +984,280 @@ fi %postun -
MonetDB: default - Merge with Jun2020 branch, not changing any f...
Changeset: 0c022e0d9d67 for MonetDB URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=0c022e0d9d67 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 Jun2020 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 Jun2020 branch.
Changeset: 016e0314d5ab for MonetDB URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=016e0314d5ab Modified Files: sql/server/rel_select.c Branch: default Log Message: Merge with Jun2020 branch. diffs (23 lines): diff --git a/sql/server/rel_select.c b/sql/server/rel_select.c --- a/sql/server/rel_select.c +++ b/sql/server/rel_select.c @@ -2506,11 +2506,17 @@ rel_logical_exp(sql_query *query, sql_re lr = rel_select_copy(sql->sa, lr, sa_list(sql->sa)); lr = rel_logical_exp(query, lr, lo, f); - if (!lr) + if (!lr) { + sql->pushdown = pushdown; return NULL; + } rr = rel_select_copy(sql->sa, rr, sa_list(sql->sa)); rr = rel_logical_exp(query, rr, ro, f); - if (lr && rr && lr->l == rr->l) { + if (!rr) { + sql->pushdown = pushdown; + return NULL; + } + if (lr->l == rr->l) { lexps = lr->exps; lr = lr->l; rexps = rr->exps; ___ checkin-list mailing list checkin-list@monetdb.org https://www.monetdb.org/mailman/listinfo/checkin-list
MonetDB: default - Merge with Jun2020 branch.
Changeset: 24e650d729be for MonetDB URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=24e650d729be Modified Files: clients/ChangeLog.Jun2020 clients/Tests/exports.stable.out clients/mapiclient/mclient.1 clients/mapiclient/msqldump.1 documentation/source/manual_pages/mclient.rst documentation/source/manual_pages/monetdb.rst documentation/source/manual_pages/monetdbd.rst.in documentation/source/manual_pages/mserver5.rst.in documentation/source/manual_pages/msqldump.rst gdk/ChangeLog.Jun2020 gdk/gdk.h gdk/gdk_system.h monetdb5/ChangeLog.Jun2020 monetdb5/mal/mal.h monetdb5/tools/Tests/mserver5--help.stable.err monetdb5/tools/Tests/mserver5--help.stable.err.Windows sql/ChangeLog.Jun2020 sql/backends/monet5/sql_scenario.c sql/storage/store.c tools/merovingian/daemon/monetdbd.1.in tools/mserver/mserver5.1.in tools/mserver/mserver5.c Branch: default Log Message: Merge with Jun2020 branch. diffs (truncated from 951 to 300 lines): diff --git a/clients/ChangeLog.Jun2020 b/clients/ChangeLog.Jun2020 --- a/clients/ChangeLog.Jun2020 +++ b/clients/ChangeLog.Jun2020 @@ -3,7 +3,7 @@ * Mon Apr 20 2020 Sjoerd Mullender - The monetdb-client-tools (Debian/Ubuntu) and MonetDB-client-tools - (Fedora/RHcontaining the stethoscope, tachograph, and tomograph has + (Fedora/RH) containing the stethoscope, tachograph, and tomograph has been removed. A completely new version of stethoscope will be released to replace the old version. @@ -20,6 +20,6 @@ gets tagged with the current session identifier * Thu Oct 24 2019 Martin Kersten -- Allow monetdb user to control session and query time out and selective +- Allow monetdb user to control session and query time out and selectively stopping a client sessions with a soft termination request. diff --git a/clients/Tests/exports.stable.out b/clients/Tests/exports.stable.out --- a/clients/Tests/exports.stable.out +++ b/clients/Tests/exports.stable.out @@ -297,7 +297,6 @@ void GDKreset(int status); void GDKsetdebug(int debug); gdk_return GDKsetenv(const char *name, const char *value); void GDKsetmallocsuccesscount(lng count); -void GDKsetverbose(int verbosity); ssize_t GDKstrFromStr(unsigned char *restrict dst, const unsigned char *restrict src, ssize_t len); str GDKstrdup(const char *s) __attribute__((__malloc__)) __attribute__((__warn_unused_result__)); str GDKstrndup(const char *s, size_t n) __attribute__((__malloc__)) __attribute__((__warn_unused_result__)); @@ -318,7 +317,6 @@ gdk_return GDKtracer_stop(void); size_t GDKuniqueid(size_t offset); gdk_return GDKupgradevarheap(BAT *b, var_t v, bool copyall, bool mayshare) __attribute__((__warn_unused_result__)); lng GDKusec(void); -int GDKverbose; const char *GDKversion(void) __attribute__((__const__)); size_t GDKvm_cursize(void); void *GDKzalloc(size_t size) __attribute__((__malloc__)) __attribute__((__alloc_size__(1))) __attribute__((__warn_unused_result__)); diff --git a/clients/mapiclient/mclient.1 b/clients/mapiclient/mclient.1 --- a/clients/mapiclient/mclient.1 +++ b/clients/mapiclient/mclient.1 @@ -75,6 +75,8 @@ This file can contain defaults for the f .BR database , .BR save_history , .BR format , +.BR host , +.BR port , and .BR width . For example, an entry in a @@ -182,7 +184,11 @@ measured and reported per query. \fB\-\-user\fP\fB=\fP\fIuser\fP (\fB\-u\fP \fIuser\fP) Specify the user to connect as. If this flag is absent, the client will ask for a user name, unless a -default was found in .monetdb file. +default was found in the +.I .monetdb +or +.B $DOTMONETDBFILE +file. .TP \fB\-\-format=\fP\fIformat\fP (\fB\-f\fP \fIformat\fP) Specify the output format. @@ -194,29 +200,34 @@ The possible values are .BR tab , .BR raw , .BR xml , +.BR trash , and -.BR trash . +.BR rowcount . .B csv -is comma-separated values, +is comma-separated values; .B tab -is tab-separated values, +is tab-separated values; .B raw is no special formatting (data is dumped the way the server sends it -to the client), +to the client); .B sql is a pretty format which is meant for human consumption where columns -are clearly shown, +are clearly shown; .B expanded and .B x are synonyms and are another pretty format meant for human consumption -where column values are printed in full and below each other, +where column values are printed in full and below each other; .B xml -is a valid (in the XML sense) document, -and +is a valid (in the XML sense) document; .B trash does not render any output, enabling performance measurements free of any -output rendering/serialization costs. +output rendering/serialization costs; +and +.B rowcount +is a variation on +.B trash +where only the number of affected rows is printed. In addition to plain \fBcsv\fP, two other forms are possible. \fBcsv=\fP\fIc\fP uses \fIc\fP as col
MonetDB: default - Merge with Jun2020 branch.
Changeset: faa1a339a3e0 for MonetDB URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=faa1a339a3e0 Added Files: sql/test/Triggers/Tests/trigger_projection.sql.src sql/test/Triggers/Tests/trigger_projection.stable.err sql/test/Triggers/Tests/trigger_projection.stable.out sql/test/Triggers/trigger_projection.sql Removed Files: sql/test/miscellaneous/Tests/trigger_projection.sql sql/test/miscellaneous/Tests/trigger_projection.stable.err sql/test/miscellaneous/Tests/trigger_projection.stable.out Modified Files: monetdb5/extras/rapi/rapi.c sql/backends/monet5/sql_scenario.c sql/backends/monet5/sql_user.c sql/test/Triggers/Tests/All sql/test/Triggers/run.all sql/test/Users/Tests/createUserRollback.SQL.py sql/test/Users/Tests/createUserRollback.stable.err sql/test/Users/Tests/createUserRollback.stable.out sql/test/miscellaneous/Tests/All testing/Mtest.py.in Branch: default Log Message: Merge with Jun2020 branch. diffs (297 lines): diff --git a/monetdb5/extras/rapi/rapi.c b/monetdb5/extras/rapi/rapi.c --- a/monetdb5/extras/rapi/rapi.c +++ b/monetdb5/extras/rapi/rapi.c @@ -30,6 +30,7 @@ #define USE_RINTERNALS 1 +#include #include #include #include @@ -110,25 +111,34 @@ static char *RAPIinitialize(void) { // set some command line arguments { structRstart rp; - Rstart Rp = &rp; - char *rargv[] = { "R", "--slave", "--vanilla" }; + char *rargv[] = { "R", +#if R_VERSION >= R_Version(4,0,0) + "--no-echo", +#else + "--slave", +#endif + "--vanilla" }; int stat = 0; - R_DefParams(Rp); - Rp->R_Slave = (Rboolean) TRUE; - Rp->R_Quiet = (Rboolean) TRUE; - Rp->R_Interactive = (Rboolean) FALSE; - Rp->R_Verbose = (Rboolean) FALSE; - Rp->LoadSiteFile = (Rboolean) FALSE; - Rp->LoadInitFile = (Rboolean) FALSE; - Rp->RestoreAction = SA_NORESTORE; - Rp->SaveAction = SA_NOSAVE; - Rp->NoRenviron = TRUE; + R_DefParams(&rp); +#if R_VERSION >= R_Version(4,0,0) + rp.R_NoEcho = (Rboolean) TRUE; +#else + rp.R_Slave = (Rboolean) TRUE; +#endif + rp.R_Quiet = (Rboolean) TRUE; + rp.R_Interactive = (Rboolean) FALSE; + rp.R_Verbose = (Rboolean) FALSE; + rp.LoadSiteFile = (Rboolean) FALSE; + rp.LoadInitFile = (Rboolean) FALSE; + rp.RestoreAction = SA_NORESTORE; + rp.SaveAction = SA_NOSAVE; + rp.NoRenviron = TRUE; stat = Rf_initialize_R(2, rargv); if (stat < 0) { return "Rf_initialize failed"; } - R_SetParams(Rp); + R_SetParams(&rp); } /* disable stack checking, because threads will throw it off */ diff --git a/sql/backends/monet5/sql_scenario.c b/sql/backends/monet5/sql_scenario.c --- a/sql/backends/monet5/sql_scenario.c +++ b/sql/backends/monet5/sql_scenario.c @@ -262,25 +262,27 @@ SQLgetquery(Client c) static char* SQLprepareClient(Client c, int login) { - mvc *m; - str schema; - backend *be; + mvc *m = NULL; + backend *be = NULL; + str msg = MAL_SUCCEED; c->getquery = SQLgetquery; if (c->sqlcontext == 0) { m = mvc_create(c->idx, 0, SQLdebug, c->fdin, c->fdout); - if (m == NULL) - throw(SQL,"sql.initClient",SQLSTATE(HY013) MAL_MALLOC_FAIL); + if (m == NULL) { + msg = createException(SQL,"sql.initClient", SQLSTATE(HY013) MAL_MALLOC_FAIL); + goto bailout; + } if (global_variables(m, "monetdb", "sys") < 0) { - mvc_destroy(m); - throw(SQL,"sql.initClient",SQLSTATE(HY013) MAL_MALLOC_FAIL); + msg = createException(SQL,"sql.initClient", SQLSTATE(HY013) MAL_MALLOC_FAIL); + goto bailout; } if (c->scenario && strcmp(c->scenario, "msql") == 0) m->reply_size = -1; be = (void *) backend_create(m, c); if ( be == NULL) { - mvc_destroy(m); - throw(SQL,"sql.initClient", SQLSTATE(HY013) MAL_MALLOC_FAIL); + msg = createException(SQL,"sql.initClient", SQLSTATE(HY013) MAL_MALLOC_FAIL); + goto bailout; } } else { be = c->sqlcontext; @@ -290,21 +292,24 @@ SQLprepareClient(Client
MonetDB: default - Merge with Jun2020 branch.
Changeset: 783db94c9df0 for MonetDB URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=783db94c9df0 Modified Files: monetdb5/modules/mal/mkey.c Branch: default Log Message: Merge with Jun2020 branch. diffs (21 lines): diff --git a/monetdb5/modules/mal/mkey.c b/monetdb5/modules/mal/mkey.c --- a/monetdb5/modules/mal/mkey.c +++ b/monetdb5/modules/mal/mkey.c @@ -483,7 +483,7 @@ MKEYconstbulk_rotate_xor_hash(bat *res, BATiter bi = bat_iterator(b); for (BUN i = 0; i < n; i++) { const char *restrict s = BUNtvar(bi, i); - r[i] = GDK_ROTATE((ulng) *h, lbit, rbit) ^ (lng) ((const BUN *) s)[-1]; + r[i] = GDK_ROTATE((ulng) *h, lbit, rbit) ^ (ulng) ((const BUN *) s)[-1]; } break; } @@ -493,7 +493,7 @@ MKEYconstbulk_rotate_xor_hash(bat *res, BUN (*hash)(const void *) = BATatoms[b->ttype].atomHash; for (BUN i = 0; i < n; i++) - r[i] = GDK_ROTATE((ulng) *h, lbit, rbit) ^ (lng) (*hash)(BUNtail(bi, i)); + r[i] = GDK_ROTATE((ulng) *h, lbit, rbit) ^ (ulng) (*hash)(BUNtail(bi, i)); break; } } ___ checkin-list mailing list checkin-list@monetdb.org https://www.monetdb.org/mailman/listinfo/checkin-list
MonetDB: default - Merge with Jun2020 branch.
Changeset: c4978726b5f7 for MonetDB URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=c4978726b5f7 Modified Files: configure.ag monetdb5/modules/mal/mkey.c Branch: default Log Message: Merge with Jun2020 branch. diffs (truncated from 350 to 300 lines): diff --git a/configure.ag b/configure.ag --- a/configure.ag +++ b/configure.ag @@ -856,7 +856,7 @@ AS_CASE([$enable_optimize], [yes], [ # -finline-functions, -funswitch-loops, # -fpredictive-commoning, -fgcse-after-reload, # -ftree-vectorize and -fipa-cp-clone - CFLAGS="-O3 -fomit-frame-pointer -pipe ${CFLAGS}" + CFLAGS="-O2 -fomit-frame-pointer -pipe ${CFLAGS}" # because we explicitly disable debugging, we can explicitly # enable -fomit-frame-pointer here # notes on -funroll-all-loops: diff --git a/monetdb5/modules/mal/mkey.c b/monetdb5/modules/mal/mkey.c --- a/monetdb5/modules/mal/mkey.c +++ b/monetdb5/modules/mal/mkey.c @@ -17,40 +17,29 @@ #include "monetdb_config.h" #include "mkey.h" -#define MKEYHASH_bte(valp) ((lng) *(const bte*)(valp)) -#define MKEYHASH_sht(valp) ((lng) *(const sht*)(valp)) -#define MKEYHASH_int(valp) ((lng) *(const int*)(valp)) -#define MKEYHASH_lng(valp) ((lng) *(const lng*)(valp)) +#define MKEYHASH_bte(valp) ((ulng) (lng) *(const bte*)(valp)) +#define MKEYHASH_sht(valp) ((ulng) (lng) *(const sht*)(valp)) +#define MKEYHASH_int(valp) ((ulng) (lng) *(const int*)(valp)) +#define MKEYHASH_lng(valp) ((ulng) (lng) *(const lng*)(valp)) #ifdef HAVE_HGE -#define MKEYHASH_hge(valp) (((const lng*)(valp))[0] ^ ((const lng*)(valp))[1]) +#define MKEYHASH_hge(valp) ((ulng) (*(const uhge *)(valp) >> 64) ^ \ +(ulng) *(const uhge *)(valp)) #endif -static inline lng -GDK_ROTATE(lng x, int y, int z) +static inline ulng +GDK_ROTATE(ulng x, int y, int z) { - return (lng) (((ulng) x << y) | ((ulng) x >> z)); + return (x << y) | (x >> z); } /* TODO: nil handling. however; we do not want to lose time in bulk_rotate_xor_hash with that */ str MKEYrotate(lng *res, const lng *val, const int *n) { - *res = GDK_ROTATE(*val, *n, (sizeof(lng)*8) - *n); + *res = (lng) GDK_ROTATE((ulng) *val, *n, (sizeof(lng)*8) - *n); return MAL_SUCCEED; } -#if defined(__GNUC__) && __GNUC__ == 10 -/* There is a bug in GCC 10.0.1 (at least 10.0.1-0.13) where the loops - * where this function is inserted is optimized incorrectly, resulting - * in incorrect results. By adding a call to what is in essence a - * dummy function we force the optimizer to simplify its optimization - * and we get the correct results. */ -#define WORK_AROUND_GNUC_BUG() GDKclrerr() -#else -/* no need to do this thing of not gcc 10 */ -#define WORK_AROUND_GNUC_BUG() ((void) 0) -#endif - str MKEYhash(Client cntxt, MalBlkPtr mb, MalStkPtr stk, InstrPtr p) { @@ -70,29 +59,29 @@ MKEYhash(Client cntxt, MalBlkPtr mb, Mal // illegal types, avoid falling into the default case. assert(0); case TYPE_bte: - *res = MKEYHASH_bte(val); + *res = (lng) MKEYHASH_bte(val); break; case TYPE_sht: - *res = MKEYHASH_sht(val); + *res = (lng) MKEYHASH_sht(val); break; case TYPE_int: case TYPE_flt: - *res = MKEYHASH_int(val); + *res = (lng) MKEYHASH_int(val); break; case TYPE_lng: case TYPE_dbl: - *res = MKEYHASH_lng(val); + *res = (lng) MKEYHASH_lng(val); break; #ifdef HAVE_HGE case TYPE_hge: - *res = MKEYHASH_hge(val); + *res = (lng) MKEYHASH_hge(val); break; #endif default: if (ATOMextern(tpe)) - *res = ATOMhash(tpe, *(ptr*)val); + *res = (lng) ATOMhash(tpe, *(ptr*)val); else - *res = ATOMhash(tpe, val); + *res = (lng) ATOMhash(tpe, val); break; } return MAL_SUCCEED; @@ -102,7 +91,7 @@ str MKEYbathash(bat *res, const bat *bid) { BAT *b, *dst; - lng *restrict r; + ulng *restrict r; BUN n; if ((b = BATdescriptor(*bid)) == NULL) @@ -116,14 +105,14 @@ MKEYbathash(bat *res, const bat *bid) } BATsetcount(dst, n); - r = (lng *) Tloc(dst, 0); + r = (ulng *) Tloc(dst, 0); switch (ATOMstorage(b->ttype)) { case TYPE_void: { oid o = b->tseqbase; if (is_oid_nil(o)) for (BUN i = 0; i < n; i++) - r[i] = lng_nil; + r[i] =
MonetDB: default - Merge with Jun2020 branch.
Changeset: c6efc22e6551 for MonetDB URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=c6efc22e6551 Modified Files: sql/backends/monet5/sql_upgrades.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.SQL.py sql/test/emptydb/Tests/check.stable.out sql/test/emptydb/Tests/check.stable.out.32bit sql/test/emptydb/Tests/check.stable.out.int128 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 Jun2020 branch. diffs (truncated from 737 to 300 lines): diff --git a/sql/backends/monet5/sql_upgrades.c b/sql/backends/monet5/sql_upgrades.c --- a/sql/backends/monet5/sql_upgrades.c +++ b/sql/backends/monet5/sql_upgrades.c @@ -2093,6 +2093,18 @@ sql_update_jun2020(Client c, mvc *sql, c * see also function load_func() in store.c */ pos += snprintf(buf + pos, bufsize - pos, "update sys.functions set language = language - 2 where language in (8, 9);\n"); + sql_subtype tp; + sql_find_subtype(&tp, "varchar", 0, 0); + sql_subfunc *f = sql_bind_func(sql->sa, sys, "listagg", &tp, &tp, F_AGGR); + pos += snprintf(buf + pos, bufsize - pos, + "insert into sys.args values" + " (%d, %d, 'arg_2', 'varchar', 0, 0, %d, 2);\n", + store_next_oid(), f->func->base.id, ARG_IN); + + pos += snprintf(buf + pos, bufsize - pos, + "update sys.args set name = name || '_' || cast(number as string) where name in ('arg', 'res') and func_id in (select id from sys.functions f where f.system);\n"); + pos += snprintf(buf + pos, bufsize - pos, + "insert into sys.dependencies values ((select id from sys.functions where name = 'ms_round' and schema_id = (select id from sys.schemas where name = 'sys')), (select id from sys.functions where name = 'ms_trunc' and schema_id = (select id from sys.schemas where name = 'sys')), (select dependency_type_id from sys.dependency_types where dependency_type_name = 'FUNCTION'));\n"); /* 12_url */ pos += snprintf(buf + pos, bufsize - pos, 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 @@ -5905,6 +5905,9 @@ set schema "sys"; Running database upgrade commands: set schema "sys"; update sys.functions set language = language - 2 where language in (8, 9); +insert into sys.args values (34148, 147, 'arg_2', 'varchar', 0, 0, 1, 2); +update sys.args set name = name || '_' || cast(number as string) where name in ('arg', 'res') and func_id in (select id from sys.functions f where f.system); +insert into sys.dependencies values ((select id from sys.functions where name = 'ms_round' and schema_id = (select id from sys.schemas where name = 'sys')), (select id from sys.functions where name = 'ms_trunc' and schema_id = (select id from sys.schemas where name = 'sys')), (select dependency_type_id from sys.dependency_types where dependency_type_name = 'FUNCTION')); drop function isaURL(url); CREATE function isaURL(theUrl string) RETURNS BOOL EXTERNAL NAME url."isaURL"; 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 @@ -5905,6 +5905,9 @@ set schema "sys"; Running database upgrade commands: s
MonetDB: default - Merge with Jun2020 branch.
Changeset: 1d55cb92dd25 for MonetDB URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=1d55cb92dd25 Added Files: sql/test/miscellaneous/Tests/trigger_projection.sql sql/test/miscellaneous/Tests/trigger_projection.stable.err sql/test/miscellaneous/Tests/trigger_projection.stable.out Modified Files: MonetDB.spec buildtools/selinux/monetdb.te clients/Tests/MAL-signatures.stable.out clients/Tests/MAL-signatures.stable.out.int128 clients/Tests/exports.stable.out clients/mapiclient/mclient.c gdk/ChangeLog.Jun2020 gdk/gdk.h gdk/gdk_calc.c gdk/gdk_cross.c gdk/gdk_heap.c monetdb5/ChangeLog.Jun2020 monetdb5/modules/kernel/algebra.c monetdb5/modules/kernel/algebra.h monetdb5/modules/kernel/algebra.mal monetdb5/modules/mal/mkey.c monetdb5/optimizer/opt_mergetable.c sql/backends/monet5/rel_bin.c sql/backends/monet5/sql_statement.c sql/backends/monet5/sql_statement.h sql/benchmarks/tpcds/Tests/alter.timeout sql/include/sql_relation.h sql/server/rel_dump.c sql/server/rel_exp.c sql/server/rel_optimizer.c sql/server/rel_psm.c sql/server/rel_rel.c sql/server/rel_rel.h sql/server/rel_select.c sql/server/rel_unnest.c sql/server/rel_updates.c sql/test/BugDay_2005-12-19_2.9.3/Tests/subselect_cardinality.SF-1240701.1242164.stable.err sql/test/BugTracker-2008/Tests/is_distinct_broken.SF-2430201.stable.err sql/test/BugTracker-2008/Tests/sql_command_kills_db.SF-2233677.stable.err sql/test/BugTracker-2013/Tests/pivot.Bug-3339.stable.err sql/test/BugTracker-2015/Tests/crash.Bug-3736.stable.out sql/test/BugTracker-2017/Tests/exist-bigint-missing.Bug-6315.stable.err sql/test/BugTracker-2017/Tests/lateral.Bug-6310.stable.err sql/test/BugTracker-2017/Tests/side-effect.Bug-6397.stable.out sql/test/BugTracker-2017/Tests/side-effect.Bug-6397.stable.out.single sql/test/BugTracker-2017/Tests/type-resolution-error.Bugs-6313.stable.err sql/test/BugTracker-2018/Tests/alter-sequence-subquery.Bug-6657.stable.err sql/test/BugTracker/Tests/bug_in_selection.SF-1892413.stable.err sql/test/BugTracker/Tests/insert_values.SF-1578838.stable.err sql/test/analytics/Tests/analytics11.stable.err sql/test/miscellaneous/Tests/All sql/test/subquery/Tests/all.stable.out sql/test/subquery/Tests/any.stable.out sql/test/subquery/Tests/any_all.stable.out sql/test/subquery/Tests/correlated.stable.err sql/test/subquery/Tests/correlated.stable.out sql/test/subquery/Tests/exists.stable.out sql/test/subquery/Tests/scalar.stable.out sql/test/subquery/Tests/subquery.stable.err sql/test/subquery/Tests/subquery.stable.out sql/test/subquery/Tests/subquery2.stable.err sql/test/subquery/Tests/subquery2.stable.out sql/test/subquery/Tests/subquery3.stable.err sql/test/subquery/Tests/subquery3.stable.out sql/test/subquery/Tests/subquery4.stable.err sql/test/subquery/Tests/subquery4.stable.out sql/test/subquery/Tests/subquery5.sql sql/test/subquery/Tests/subquery5.stable.err sql/test/subquery/Tests/subquery5.stable.out Branch: default Log Message: Merge with Jun2020 branch. diffs (truncated from 4397 to 300 lines): diff --git a/MonetDB.spec b/MonetDB.spec --- a/MonetDB.spec +++ b/MonetDB.spec @@ -510,6 +510,9 @@ Suggests: %{name}-client%{?_isa} = %{ver %endif # versions up to 1.0.5 don't accept the queryid field in the result set Conflicts: python-pymonetdb < 1.0.6 +%if %{?rhel:0}%{!?rhel:1} || 0%{?rhel} >= 7 +Requires(pre): systemd +%endif %description -n MonetDB5-server MonetDB is a database management system that is developed from a @@ -522,12 +525,14 @@ package if you want to use the MonetDB d to use the SQL front end, you also need %{name}-SQL-server5. %pre -n MonetDB5-server +%{?sysusers_create_package:echo 'u monetdb - "MonetDB Server" /var/lib/monetdb' | systemd-sysusers --replace=%_sysusersdir/monetdb.conf -} + getent group monetdb >/dev/null || groupadd --system monetdb if getent passwd monetdb >/dev/null; then case $(getent passwd monetdb | cut -d: -f6) in %{_localstatedir}/MonetDB) # old value # change home directory, but not using usermod - # usermod requires there not to be any running processes owned by the user + # usermod requires there to not be any running processes owned by the user EDITOR='sed -i "/^monetdb:/s|:%{_localstatedir}/MonetDB:|:%{_localstatedir}/lib/monetdb:|"' unset VISUAL export EDITOR @@ -542,6 +547,9 @@ exit 0 %files -n MonetDB5-server %defattr(-,root,root) +%if %{?rhel:0}%{!?rhel:1} || 0%{?rhel} >= 7 +%{_sysusersdir}/monetdb.conf +
MonetDB: default - Merge with Jun2020 branch.
Changeset: b84d124f1905 for MonetDB URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=b84d124f1905 Modified Files: gdk/gdk_aggr.c gdk/gdk_analytic_func.c monetdb5/modules/kernel/algebra.c sql/test/analytics/Tests/analytics16.sql sql/test/analytics/Tests/analytics16.stable.err sql/test/analytics/Tests/analytics16.stable.out sql/test/miscellaneous/Tests/simple_selects.sql sql/test/miscellaneous/Tests/simple_selects.stable.err Branch: default Log Message: Merge with Jun2020 branch. diffs (truncated from 412 to 300 lines): diff --git a/gdk/gdk_aggr.c b/gdk/gdk_aggr.c --- a/gdk/gdk_aggr.c +++ b/gdk/gdk_aggr.c @@ -3135,6 +3135,8 @@ BATgroupquantile_avg(BAT *b, BAT *g, BAT delta = (dbl) x - mean; \ mean += delta / n; \ m2 += delta * ((dbl) x - mean); \ + if (isinf(m2)) \ + goto overflow; \ } \ } while (0) @@ -3182,6 +3184,9 @@ calcvariance(dbl *restrict avgp, const v if (avgp) *avgp = mean; return m2 / (n - issample); + overflow: + GDKerror("22003!overflow in calculation.\n"); + return dbl_nil; } dbl @@ -3250,6 +3255,8 @@ BATcalcvariance_sample(dbl *avgp, BAT *b delta2 = (dbl) y - mean2; \ mean2 += delta2 / n;\ m2 += delta1 * ((dbl) y - mean2); \ + if (isinf(m2)) \ + goto overflow; \ } \ } while (0) @@ -3290,6 +3297,9 @@ calccovariance(const void *v1, const voi if (n <= (BUN) issample) return dbl_nil; return m2 / (n - issample); + overflow: + GDKerror("22003!overflow in calculation.\n"); + return dbl_nil; } dbl @@ -3335,6 +3345,8 @@ BATcalccovariance_sample(BAT *b1, BAT *b up += delta1 * aux; \ down1 += delta1 * ((dbl) x - mean1);\ down2 += delta2 * aux; \ + if (isinf(up) || isinf(down1) || isinf(down2)) \ + goto overflow; \ } \ } while (0) @@ -3385,6 +3397,9 @@ BATcalccorrelation(BAT *b1, BAT *b2) TRC_DEBUG(ALGO, "b1=" ALGOBATFMT ",b2=" ALGOBATFMT " (" LLFMT " usec)\n", ALGOBATPAR(b1), ALGOBATPAR(b2), GDKusec() - t0); return aux; + overflow: + GDKerror("22003!overflow in calculation.\n"); + return dbl_nil; } #define AGGR_STDEV(TYPE) \ @@ -3418,6 +3433,8 @@ BATcalccorrelation(BAT *b1, BAT *b2) } else if (cnts[i] == 1) { \ dbls[i] = issample ? dbl_nil : 0; \ nils2++;\ + } else if (isinf(m2[i])) { \ + goto overflow; \ } else if (variance) { \ dbls[i] = m2[i] / (cnts[i] - issample); \ } else {\ @@ -3588,7 +3605,8 @@ dogroupstdev(BAT **avgb, BAT *b, BAT *g, ALGOOPTBATPAR(bn), ALGOOPTBATPAR(an), func, GDKusec() - t0); return bn; - + overflow: + GDKerror("22003!overflow in calculation.\n"); alloc_fail: if (an) BBPreclaim(an); @@ -3670,6 +3688,8 @@ BATgroupvariance_population(BAT *b, BAT } else if (cnts[i] == 1) { \ dbls[i] = issample ? dbl_nil : 0; \ nils2++;\ + } else if (isinf(m2[i])) { \ + goto overflow; \ } else {\ dbls[i] = m2[i] / (cnts[i] - issample); \ } \ @@ -3808,6 +3828,8 @@ dogroupcovariance(BAT *b1, BAT *b2, BAT ALGOOPTBATPAR(bn), func, GDKusec() - t0); return bn; + overflow: + GDKerror("22003!overflow in calculation.\n"); alloc_fail: BBPreclaim(bn); GDKfree(mean1); @@ -3868,6 +3890,8 @@ BATgroupcovariance_population(BAT *b1, B
MonetDB: default - Merge with Jun2020 branch.
Changeset: 69cfe8a9891c for MonetDB URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=69cfe8a9891c Modified Files: sql/server/rel_select.c sql/server/rel_updates.c tools/merovingian/client/monetdb.c tools/merovingian/daemon/merovingian.c tools/merovingian/utils/control.c tools/merovingian/utils/control.h tools/merovingian/utils/properties.c tools/merovingian/utils/utils.c tools/merovingian/utils/utils.h Branch: default Log Message: Merge with Jun2020 branch. diffs (truncated from 566 to 300 lines): diff --git a/sql/server/rel_select.c b/sql/server/rel_select.c --- a/sql/server/rel_select.c +++ b/sql/server/rel_select.c @@ -1714,7 +1714,8 @@ rel_compare_exp_(sql_query *query, sql_r return NULL; e = exp_compare_func(sql, ls, rs, rs2, compare_func((comp_type)type, quantifier?0:anti), quantifier); if (anti && quantifier) - e = rel_unop_(sql, NULL, e, NULL, "not", card_value); + if (!(e = rel_unop_(sql, NULL, e, NULL, "not", card_value))) + return NULL; } return rel_select(sql->sa, rel, e); } else if (!rs2) { @@ -2178,11 +2179,11 @@ rel_logical_value_exp(sql_query *query, { symbol *lo = sc->data.lval->h->data.sym; symbol *ro = sc->data.lval->h->next->data.sym; - - sql_exp *ls = rel_logical_value_exp(query, rel, lo, f, ek); - sql_exp *rs = rel_logical_value_exp(query, rel, ro, f, ek); - - if (!ls || !rs) + sql_exp *ls, *rs; + + if (!(ls = rel_logical_value_exp(query, rel, lo, f, ek))) + return NULL; + if (!(rs = rel_logical_value_exp(query, rel, ro, f, ek))) return NULL; if (sc->token == SQL_OR) return rel_binop_(sql, rel ? *rel : NULL, ls, rs, NULL, "or", card_value); @@ -2303,8 +2304,7 @@ rel_logical_value_exp(sql_query *query, int insensitive = sc->data.lval->h->next->next->data.i_val; int anti = (sc->token == SQL_NOT_LIKE) != (sc->data.lval->h->next->next->next->data.i_val != 0); sql_subtype *st = sql_bind_localtype("str"); - sql_exp *le = rel_value_exp(query, rel, lo, f, ek); - sql_exp *re, *ee = NULL; + sql_exp *le = rel_value_exp(query, rel, lo, f, ek), *re, *ee = NULL; char *like = insensitive ? (anti ? "not_ilike" : "ilike") : (anti ? "not_like" : "like"); sql_schema *sys = mvc_bind_schema(sql, "sys"); @@ -2339,14 +2339,15 @@ rel_logical_value_exp(sql_query *query, int symmetric = sc->data.lval->h->next->data.i_val; symbol *ro1 = sc->data.lval->h->next->next->data.sym; symbol *ro2 = sc->data.lval->h->next->next->next->data.sym; - sql_exp *le = rel_value_exp(query, rel, lo, f, ek); - sql_exp *re1 = rel_value_exp(query, rel, ro1, f, ek); - sql_exp *re2 = rel_value_exp(query, rel, ro2, f, ek); sql_subtype *t1, *t2, *t3; - sql_exp *e1 = NULL, *e2 = NULL; - + sql_exp *le, *re1, *re2, *e1 = NULL, *e2 = NULL; assert(sc->data.lval->h->next->type == type_int); - if (!le || !re1 || !re2) + + if (!(le = rel_value_exp(query, rel, lo, f, ek))) + return NULL; + if (!(re1 = rel_value_exp(query, rel, ro1, f, ek))) + return NULL; + if (!(re2 = rel_value_exp(query, rel, ro2, f, ek))) return NULL; t1 = exp_subtype(le); @@ -2380,14 +2381,17 @@ rel_logical_value_exp(sql_query *query, } if (sc->token == SQL_NOT_BETWEEN) { - e1 = rel_binop_(sql, rel ? *rel : NULL, le, re1, NULL, "<", card_value); - e2 = rel_binop_(sql, rel ? *rel : NULL, le, re2, NULL, ">", card_value); + if (!(e1 = rel_binop_(sql, rel ? *rel : NULL, le, re1, NULL, "<", card_value))) + return NULL; + if (!(e2 = rel_binop_(sql, rel ? *rel : NULL, le, re2, NULL, ">", card_value))) + return NULL; } else { - e1 = rel_binop_(sql, rel ? *rel : NULL, le, re1, NULL, ">=", card_value); - e2 = rel_binop_(sql, rel ? *rel : NULL, le, re2, NULL, "<=", card_value); + if (!(e1 = rel_binop_(sql, rel ? *rel : NULL, le, re1, NULL, ">=", card_value))) + return NULL; + if (!(e2 = rel_binop_(sql, rel ? *rel : NULL, le, re2, NULL, "<=", car
MonetDB: default - Merge with Jun2020 branch.
Changeset: 559d6a0fc55a for MonetDB URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=559d6a0fc55a Added Files: sql/test/miscellaneous/Tests/simple_plans.sql sql/test/miscellaneous/Tests/simple_plans.stable.err sql/test/miscellaneous/Tests/simple_plans.stable.out Modified Files: clients/mapiclient/dump.c clients/mapiclient/mhelp.c gdk/gdk_bat.c gdk/gdk_batop.c gdk/gdk_bbp.c monetdb5/mal/mal_import.c monetdb5/optimizer/opt_mergetable.c sql/ChangeLog.Jun2020 sql/backends/monet5/sql.c sql/backends/monet5/sql_upgrades.c sql/scripts/25_debug.sql sql/server/rel_dump.c sql/server/rel_exp.c sql/server/rel_optimizer.c sql/server/rel_propagate.c sql/server/rel_rel.c sql/server/rel_rel.h sql/server/rel_rewriter.c sql/server/rel_rewriter.h sql/server/rel_schema.c sql/server/rel_select.c sql/server/rel_unnest.c sql/server/rel_unnest.h sql/storage/store.c sql/test/BugTracker-2016/Tests/memory-consumption-query-PLAN-25joins.Bug-3972.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/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-exists2.sql sql/test/mergetables/Tests/sqlsmith-exists2.stable.out sql/test/miscellaneous/Tests/All sql/test/miscellaneous/Tests/column_aliases.sql sql/test/miscellaneous/Tests/column_aliases.stable.err sql/test/miscellaneous/Tests/simple_selects.sql sql/test/miscellaneous/Tests/simple_selects.stable.err sql/test/subquery/Tests/subquery3.sql sql/test/subquery/Tests/subquery3.stable.err sql/test/subquery/Tests/subquery3.stable.out sql/test/subquery/Tests/subquery5.sql sql/test/subquery/Tests/subquery5.stable.err sql/test/subquery/Tests/subquery5.stable.out sql/test/sys-schema/Tests/systemfunctions.stable.out sql/test/sys-schema/Tests/systemfunctions.stable.out.int128 sql/test/testdb-reload/Tests/reload.stable.out 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 sql/test/testdb/Tests/dump.stable.out sql/test/testdb/Tests/load.sql Branch: default Log Message: Merge with Jun2020 branch. diffs (truncated from 5918 to 300 lines): diff --git a/clients/mapiclient/dump.c b/clients/mapiclient/dump.c --- a/clients/mapiclient/dump.c +++ b/clients/mapiclient/dump.c @@ -2018,12 +2018,20 @@ dump_function(Mapi mid, stream *toConsol sep = ""; while (mapi_fetch_row(hdl) != 0) { const char *aname = mapi_fetch_field(hdl, 0); - char *atype = strdup(mapi_fetch_field(hdl, 1)); - char *adigs = strdup(mapi_fetch_field(hdl, 2)); - char *ascal = strdup(mapi_fetch_field(hdl, 3)); + char *atype = mapi_fetch_field(hdl, 1); + char *adigs = mapi_fetch_field(hdl, 2); + char *ascal = mapi_fetch_field(hdl, 3); const char *ainou = mapi_fetch_field(hdl, 4); - if (!atype || !adigs || !ascal) { + if (strcmp(ainou, "0") == 0) { + /* end of arguments */ + break; + } + + atype = strdup(atype); + adigs = strdup(adigs); + ascal = strdup(ascal); + if (atype == NULL || adigs == NULL || ascal == NULL) {
MonetDB: default - Merge with Jun2020 branch.
Changeset: dbe4c3b28685 for MonetDB URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=dbe4c3b28685 Modified Files: gdk/gdk_aggr.c gdk/gdk_bat.c gdk/gdk_batop.c gdk/gdk_cand.c gdk/gdk_firstn.c gdk/gdk_group.c gdk/gdk_join.c gdk/gdk_project.c gdk/gdk_select.c gdk/gdk_tracer.c gdk/gdk_unique.c sql/backends/monet5/rel_bin.c sql/backends/monet5/sql.c sql/backends/monet5/sql_execute.c sql/common/sql_changeset.c sql/common/sql_hash.c sql/common/sql_keyword.c sql/common/sql_list.c sql/common/sql_mem.c sql/common/sql_stack.c sql/include/sql_mem.h sql/rel.txt sql/server/rel_distribute.c sql/server/rel_dump.c sql/server/rel_exp.c sql/server/rel_optimizer.c sql/server/rel_partition.c sql/server/rel_prop.c sql/server/rel_propagate.c sql/server/rel_rel.c sql/server/rel_select.c sql/server/sql_partition.c sql/server/sql_qc.c sql/storage/store_sequence.c sql/test/BugTracker-2010/Tests/ORDER_BY_over_UNION_EXCEPT_INTERSECT.Bug-2606.stable.out sql/test/BugTracker-2016/Tests/rename_exps.Bug-3974.stable.out tools/merovingian/client/monetdb.c Branch: default Log Message: Merge with Jun2020 branch. diffs (truncated from 4761 to 300 lines): diff --git a/gdk/gdk_aggr.c b/gdk/gdk_aggr.c --- a/gdk/gdk_aggr.c +++ b/gdk/gdk_aggr.c @@ -892,7 +892,9 @@ BATgroupsum(BAT *b, BAT *g, BAT *e, BAT BUN ncand; const char *err; const char *algo = NULL; - lng t0 = GDKusec(); + lng t0 = 0; + + TRC_DEBUG_IF(ALGO) t0 = GDKusec(); if ((err = BATgroupaggrinit(b, g, e, s, &min, &max, &ngrp, &ci, &ncand)) != NULL) { GDKerror("%s\n", err); @@ -943,14 +945,12 @@ BATgroupsum(BAT *b, BAT *g, BAT *e, BAT bn = NULL; } - TRC_DEBUG(ALGO, "%s(b=" ALGOBATFMT ",g=" ALGOOPTBATFMT "," - "e=" ALGOOPTBATFMT ",s=" ALGOOPTBATFMT ")=" ALGOOPTBATFMT ":" - " %s; start " OIDFMT ", count " BUNFMT " (" LLFMT " usec)\n", - __func__, + TRC_DEBUG(ALGO, "b=" ALGOBATFMT ",g=" ALGOOPTBATFMT "," + "e=" ALGOOPTBATFMT ",s=" ALGOOPTBATFMT " -> " ALGOOPTBATFMT + "; start " OIDFMT ", count " BUNFMT " (%s -- " LLFMT " usec)\n", ALGOBATPAR(b), ALGOOPTBATPAR(g), ALGOOPTBATPAR(e), ALGOOPTBATPAR(s), ALGOOPTBATPAR(bn), - algo ? algo : "", - ci.seq, ncand, GDKusec() - t0); + ci.seq, ncand, algo ? algo : "", GDKusec() - t0); return bn; } @@ -964,7 +964,9 @@ BATsum(void *res, int tp, BAT *b, BAT *s BUN ncand; const char *err; const char *algo = NULL; - lng t0 = GDKusec(); + lng t0 = 0; + + TRC_DEBUG_IF(ALGO) t0 = GDKusec(); if ((err = BATgroupaggrinit(b, NULL, NULL, s, &min, &max, &ngrp, &ci, &ncand)) != NULL) { GDKerror("%s\n", err); @@ -1066,12 +1068,10 @@ BATsum(void *res, int tp, BAT *b, BAT *s nils = dosum(Tloc(b, 0), b->tnonil, b->hseqbase, &ci, ncand, res, true, b->ttype, tp, &min, min, max, skip_nils, abort_on_error, nil_if_empty, __func__, &algo); - TRC_DEBUG(ALGO, "%s(b="ALGOBATFMT",s="ALGOOPTBATFMT"): %s; " - "start " OIDFMT ", count " BUNFMT " (" LLFMT " usec)\n", - __func__, + TRC_DEBUG(ALGO, "b=" ALGOBATFMT ",s=" ALGOOPTBATFMT "; " + "start " OIDFMT ", count " BUNFMT " (%s -- " LLFMT " usec)\n", ALGOBATPAR(b), ALGOOPTBATPAR(s), - algo ? algo : "", - ci.seq, ncand, GDKusec() - t0); + ci.seq, ncand, algo ? algo : "", GDKusec() - t0); return nils < BUN_NONE ? GDK_SUCCEED : GDK_FAIL; } @@ -1468,6 +1468,9 @@ BATgroupprod(BAT *b, BAT *g, BAT *e, BAT struct canditer ci; BUN ncand; const char *err; + lng t0 = 0; + + TRC_DEBUG_IF(ALGO) t0 = GDKusec(); if ((err = BATgroupaggrinit(b, g, e, s, &min, &max, &ngrp, &ci, &ncand)) != NULL) { GDKerror("%s\n", err); @@ -1518,6 +1521,13 @@ BATgroupprod(BAT *b, BAT *g, BAT *e, BAT bn = NULL; } + TRC_DEBUG(ALGO, "b=" ALGOBATFMT ",g=" ALGOOPTBATFMT "," + "e=" ALGOOPTBATFMT ",s=" ALGOOPTBATFMT " -> " ALGOOPTBATFMT + "; start " OIDFMT ", count " BUNFMT " (" LLFMT " usec)\n", + ALGOBATPAR(b), ALGOOPTBATPAR(g), ALGOOPTBATPAR(e), + ALGOOPTBATPAR(s), ALGOOPTBATPAR(bn), + ci.seq, ncand, GDKusec() - t0); + return bn; } @@ -1530,6 +1540,9 @@ BATprod(void *res, int tp, BAT *b, BAT * struct canditer ci; BUN ncand; const char
MonetDB: default - Merge with Jun2020 branch.
Changeset: bc7371be67ed for MonetDB URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=bc7371be67ed Modified Files: ChangeLog.Jun2020 clients/ChangeLog.Jun2020 monetdb5/ChangeLog.Jun2020 sql/ChangeLog.Jun2020 sql/backends/monet5/sql_upgrades.c sql/scripts/51_sys_schema_extension.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/emptydb/Tests/check.SQL.py sql/test/emptydb/Tests/check.stable.out sql/test/emptydb/Tests/check.stable.out.32bit sql/test/emptydb/Tests/check.stable.out.int128 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 Jun2020 branch. diffs (truncated from 27078 to 300 lines): diff --git a/ChangeLog.Jun2020 b/ChangeLog.Jun2020 --- a/ChangeLog.Jun2020 +++ b/ChangeLog.Jun2020 @@ -14,13 +14,6 @@ - Python 2 support has been removed. There is now only support for using Python 3. -* Tue Feb 18 2020 Thodoris Zois -- Added mserver5 option (--dbtrace=) in order to be able to - specify the output file any produced traces. - -* Thu Feb 6 2020 Panagiotis Koutsourakis -- Add port and host as fields in the .monetdb file. - * Thu Jan 30 2020 Sjoerd Mullender - Removed support for bam and sam files. @@ -29,24 +22,3 @@ database property (raw_strings=yes|no) to control interpretation of strings. -* Fri Nov 29 2019 Panagiotis Koutsourakis -- Added support for raw strings using the syntax r'' or R''. This means - that C-like escapes will remain uninterpreted within those strings. For - instance SELECT r'\"' returns a string of length two. The user needs - to escape single quotes by doubling them: SELECT r. - -* Fri Oct 25 2019 Joeri van Ruth -- Added SQL function sys.hot_snapshot() which can be used to write - a snapshot of the database to a tar file. For example, - sys.hot_snapshot('/tmp/snapshot.tar'). If compression support is - compiled in, snapshots can also be compressed ('/tmp/snapshot.tar.gz'). - The tar file expands to a single directory with the same name as the - database that was snapshotted. This directory can be passed directly - as the --dbpath argument of mserver5 or it can be copied into an - existing dbfarm and started from monetdbd. - -* Sat Oct 12 2019 Martin Kersten -- The MAL profiler now assigns the SQL TRACE output to the client record - thereby avoiding the interaction with other queries, but loosing - insight of competing queries. The stethoscope should be used for that. - diff --git a/clients/ChangeLog.Jun2020 b/clients/ChangeLog.Jun2020 --- a/clients/ChangeLog.Jun2020 +++ b/clients/ChangeLog.Jun2020 @@ -12,6 +12,9 @@ purposes. It was never actively used but was there as an option. Now the option has been removed. +* Thu Feb 6 2020 Panagiotis Koutsourakis +- Add port and host as fields in the .monetdb file. + * Fri Oct 25 2019 Pedro Ferreira - Added 'sessionid' column to system function sys.queue(), so each query gets tagged with the current session identifier diff --git a/monetdb5/ChangeLog.Jun2020 b/monetdb5/ChangeLog.Jun2020 --- a/monetdb5/ChangeLog.Jun2020 +++ b/monetdb5/ChangeLog.Jun2020 @@ -5,6 +5,10 @@ - The example module opt_sql_append is not installed in the binary packages anymore. +* Tue Feb 18 2020 Thodoris Zois +- Added mserver5 option (--dbtrace=) in order to be able to + specify the output file any produced traces. + * Tue Dec 3 2019 Sjoerd Mullender - Removed function bat.setKey(). @@ -27,3 +31,8 @@ column. The column that is returned is the left column of the two column version. +* Sat Oct 12 2019 Martin Kersten +- The MAL profiler now assigns the SQL TRACE output to the client record + thereby avoiding the interaction with other queries, but loosing + insigh
MonetDB: default - Merge with Jun2020 branch.
Changeset: 210001e7782e for MonetDB URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=210001e7782e Added Files: clients/odbc/ChangeLog.Jun2020 Modified Files: ChangeLog.Jun2020 clients/ChangeLog.Jun2020 clients/odbc/driver/ODBCUtil.c clients/odbc/driver/SQLColumnPrivileges.c clients/odbc/driver/SQLColumns.c clients/odbc/driver/SQLForeignKeys.c clients/odbc/driver/SQLPrepare.c clients/odbc/driver/SQLPrimaryKeys.c clients/odbc/driver/SQLProcedureColumns.c clients/odbc/driver/SQLProcedures.c clients/odbc/driver/SQLSpecialColumns.c clients/odbc/driver/SQLStatistics.c clients/odbc/driver/SQLTablePrivileges.c clients/odbc/driver/SQLTables.c gdk/ChangeLog.Jun2020 monetdb5/ChangeLog.Jun2020 sql/backends/monet5/sql_upgrades.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 Jun2020 branch. diffs (truncated from 2058 to 300 lines): diff --git a/ChangeLog.Jun2020 b/ChangeLog.Jun2020 --- a/ChangeLog.Jun2020 +++ b/ChangeLog.Jun2020 @@ -1,9 +1,22 @@ # ChangeLog file for devel # This file is updated with Maddlog +* Mon Apr 20 2020 Sjoerd Mullender +- A new system to deal with debug output has been implemented. There is + now an option --dbtrace to mserver5 that takes a file argument to which + debug output is written. The default value is the file mdbtrace.log + inside the database directory. This option can also be set through + the monetdb program. +- The home directory of the automatically created monetdb user was + changed from /var/MonetDB to /var/lib/monetdb (RPM based systems + only). This home directory is (currently) not used for anything, + though. +- Python 2 support has been removed. There is now only support for + using Python 3. + * Tue Feb 18 2020 Thodoris Zois - Added mserver5 option (--dbtrace=) in order to be able to - specify the output directory of the produced traces. + specify the output file any produced traces. * Thu Feb 6 2020 Panagiotis Koutsourakis - Add port and host as fields in the .monetdb file. diff --git a/clients/ChangeLog.Jun2020 b/clients/ChangeLog.Jun2020 --- a/clients/ChangeLog.Jun2020 +++ b/clients/ChangeLog.Jun2020 @@ -1,6 +1,12 @@ # ChangeLog file for clients # This file is updated with Maddlog +* Mon Apr 20 2020 Sjoerd Mullender +- The monetdb-client-tools (Debian/Ubuntu) and MonetDB-client-tools + (Fedora/RHcontaining the stethoscope, tachograph, and tomograph has + been removed. A completely new version of stethoscope will be released + to replace the old version. + * Thu Apr 16 2020 Sjoerd Mullender - Removed the possibility of using the MD5 checksum for authentication purposes. It was never actively used but was there as an option. diff --git a/clients/odbc/ChangeLog.Jun2020 b/clients/odbc/ChangeLog.Jun2020 new file mode 100644 --- /dev/null +++ b/clients/odbc/ChangeLog.Jun2020 @@ -0,0 +1,9 @@ +# ChangeLog file for odbc +# This file is updated with Maddlog + +* Mon Apr 20 2020 Sjoerd Mullender +- The NUMERIC and FLOAT types are now handled fully. Before only DECIMAL, + FLOAT, and DOUBLE were handled fully. +- Some bugs were fixed in the passing back and forth between application + and server of values of type GUID (UUID). + diff --git a/clients/odbc/driver/ODBCUtil.c b/clients/odbc/driver/ODBCUtil.c --- a/clients/odbc/driver/ODBCUtil.c +++ b/clients/odbc/driver/ODBCUtil.c @@ -335,127 +335,548 @@ static struct scalars { int nargs; const char *repl; } scalars[] = { - {"abs", 1, "sys.\"abs\"(\1)", }, - {"acos", 1, "sys.\"acos\"(\1)", }, - {"ascii", 1, "sys.\"ascii\"(\1)",
MonetDB: default - Merge with Jun2020 branch.
Changeset: 857d5095c02a for MonetDB URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=857d5095c02a Added Files: sql/test/analytics/Tests/analytics18.sql sql/test/analytics/Tests/analytics18.stable.err sql/test/analytics/Tests/analytics18.stable.out Modified Files: clients/ChangeLog.Jun2020 clients/Tests/MAL-signatures.stable.out clients/Tests/MAL-signatures.stable.out.int128 clients/mapilib/mapi.c common/utils/mcrypt.c common/utils/mcrypt.h configure.ag gdk/gdk_calc.c monetdb5/mal/mal_authorize.c monetdb5/mal/mal_client.c monetdb5/mal/mal_runtime.c monetdb5/modules/mal/querylog.c monetdb5/optimizer/opt_mitosis.c sql/ChangeLog.Jun2020 sql/backends/monet5/sql.c sql/backends/monet5/sql.mal sql/backends/monet5/sql_execute.c sql/backends/monet5/sql_gencode.c sql/backends/monet5/sql_orderidx.c sql/backends/monet5/sql_result.c sql/backends/monet5/sql_session.mal sql/backends/monet5/sql_statistics.c sql/backends/monet5/sql_transaction.mal sql/backends/monet5/sql_upgrades.c sql/backends/monet5/sql_upgrades.h sql/scripts/25_debug.sql sql/scripts/58_hot_snapshot.sql sql/server/rel_dump.c sql/server/rel_exp.c sql/server/rel_exp.h sql/server/rel_optimizer.c sql/server/rel_partition.c sql/server/rel_propagate.c sql/server/rel_psm.c sql/server/rel_rel.c sql/server/rel_schema.c sql/server/rel_select.c sql/server/rel_select.h sql/server/rel_sequence.c sql/server/rel_unnest.c sql/server/rel_updates.c sql/server/rel_updates.h sql/test/BugTracker-2010/Tests/LIMIT_OFFSET_big-endian.Bug-2622.stable.out sql/test/analytics/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/emptydb/Tests/check.stable.out sql/test/emptydb/Tests/check.stable.out.32bit sql/test/emptydb/Tests/check.stable.out.int128 sql/test/sample/Tests/sample.15.stable.out sql/test/subquery/Tests/subquery5.sql sql/test/subquery/Tests/subquery5.stable.out sql/test/testdb-upgrade-chain-hge/Tests/upgrade.stable.out.int128 sql/test/testdb-upgrade-chain/Tests/upgrade.stable.out sql/test/testdb-upgrade-chain/Tests/upgrade.stable.out.32bit sql/test/testdb-upgrade-chain/Tests/upgrade.stable.out.int128 sql/test/testdb-upgrade-hge/Tests/upgrade.stable.out.int128 sql/test/testdb-upgrade/Tests/upgrade.stable.out sql/test/testdb-upgrade/Tests/upgrade.stable.out.32bit sql/test/testdb-upgrade/Tests/upgrade.stable.out.int128 testing/Mtest.py.in tools/merovingian/daemon/argvcmds.c tools/merovingian/utils/control.c Branch: default Log Message: Merge with Jun2020 branch. diffs (truncated from 7407 to 300 lines): diff --git a/clients/ChangeLog.Jun2020 b/clients/ChangeLog.Jun2020 --- a/clients/ChangeLog.Jun2020 +++ b/clients/ChangeLog.Jun2020 @@ -1,6 +1,11 @@ # ChangeLog file for clients # This file is updated with Maddlog +* Thu Apr 16 2020 Sjoerd Mullender +- Removed the possibility of using the MD5 checksum for authentication + purposes. It was never actively used but was there as an option. + Now the option has been removed. + * Fri Oct 25 2019 Pedro Ferreira - Added 'sessionid' column to system function sys.queue(), so each query gets tagged with the current session identifier 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 @@ -11357,9 +11357,9 @@ stdout of test 'MAL-signatures` in direc [ "batsql","lead", "pattern batsql.lead(b:bat[:any_1], p:any_3, o:any_4):bat[:any_1] ","SQLlead;", "return the value in the next row in the partition or NULL if non existent" ] [ "batsql","max", "pattern batsql.max(b:bat[:any_1], s:bat[:lng], e:bat[:lng]):bat[:any_1] ", "SQLmax;", "return the maximum of groups" ] [ "batsql","min", "pattern batsql.min(b:bat[:a
MonetDB: default - Merge with Jun2020 branch.
Changeset: b0b0a5cfd24f for MonetDB URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=b0b0a5cfd24f Modified Files: NT/makelibdef.py NT/mkodbcwxs.py NT/mksqlwxs.py NT/winconfig.py buildtools/autogen/autogen.py buildtools/autogen/autogen/am.py buildtools/autogen/autogen/codegen.py buildtools/autogen/autogen/msc.py buildtools/conf/fixlicense.py clients/examples/python/basics.py clients/examples/python/sqlsample.py clients/mapiclient/dotfile.py monetdb5/tools/Tests/mserver5-ipv6.py sql/backends/monet5/Tests/dbextra_lock_test.py sql/backends/monet5/Tests/shutdown.py sql/benchmarks/hist-uva/ground/create.py sql/benchmarks/ssbm/Tests/explain.SQL.py sql/benchmarks/ssbm/Tests/load.SQL.py sql/benchmarks/ssbm/Tests/plan.SQL.py sql/benchmarks/tpch/LOCKED/Tests/load.SQL.py sql/benchmarks/tpch/Tests/explain.SQL.py sql/benchmarks/tpch/Tests/load.SQL.py sql/benchmarks/tpch/Tests/plan.SQL.py sql/test/BugDay_2005-10-06_2.8/Tests/MapiClient-dump.SF-905851.SQL.py sql/test/BugTracker-2008/Tests/insert-null-byte.SF-2233581.SQL.py sql/test/BugTracker-2009/Tests/create_on_ro_db_crash.SF-2830238.SQL.py sql/test/BugTracker-2009/Tests/dumping_tables.SF-2776908.SQL.py sql/test/BugTracker-2009/Tests/lost_update.SF-2790020.SQL.py sql/test/BugTracker-2009/Tests/parallel_bulk-load.SF-2771052.unpack_csv.py sql/test/BugTracker-2009/Tests/set_history_and_drop_table.SF-2607045.SQL.py sql/test/BugTracker-2010/Tests/new-readonly-db.Bug-2695.SQL.py sql/test/BugTracker-2010/Tests/operation-successful.Bug-2589.SQL.py sql/test/BugTracker-2011/Tests/interrupted-initialization.Bug-2875.SQL.py sql/test/BugTracker-2011/Tests/many-connects-cache.Bug-2904.SQL.py sql/test/BugTracker-2011/Tests/python-connections-Bug.2901.SQL.py sql/test/BugTracker-2011/Tests/user_create_temp_table.Bug-2916.SQL.py sql/test/BugTracker-2012/Tests/currenttime.Bug-2781.SQL.py sql/test/BugTracker-2012/Tests/day-of-month-localization.Bug-2962.SQL.py sql/test/BugTracker-2013/Tests/binary_copy_into.Bug-3345.SQL.py sql/test/BugTracker-2013/Tests/binary_copy_into.Bug-3345.stable.err sql/test/BugTracker-2013/Tests/corrupt-after-restart.Bug-3282.SQL.py sql/test/BugTracker-2013/Tests/empty-strings.Bug-3261.SQL.py sql/test/BugTracker-2013/Tests/psm_functions_and_accessrights.Bug-3300.SQL.py sql/test/BugTracker-2014/Tests/acidity-fail.Bug-3635.py sql/test/BugTracker-2014/Tests/copy-into.Bug-3481.SQL.py sql/test/BugTracker-2014/Tests/python-microseconds.Bug-3439.SQL.py sql/test/BugTracker-2014/Tests/utf8bom.Bug-3436.SQL.py sql/test/BugTracker-2015/Tests/acidity2-fail.Bug-3635.SQL.py sql/test/BugTracker-2015/Tests/concurrent-queries.Bug-3848.SQL.py sql/test/BugTracker-2015/Tests/local-remotetable-crash.Bug-3754.SQL.py sql/test/BugTracker-2015/Tests/schemadiff.Bug-3778.SQL.py sql/test/BugTracker-2017/Tests/shutdown.Bug-6182.SQL.py sql/test/BugTracker-2018/Tests/dependency_column_on_sequence.Bug-6618.SQL.py sql/test/BugTracker-2018/Tests/grant-role-not-idempotent.Bug-6660.SQL.py sql/test/BugTracker-2018/Tests/local_replica_table_not_detected.Bug-6620.py sql/test/BugTracker-2018/Tests/remote-table-where-is-null.Bug-6601.py sql/test/BugTracker-2018/Tests/remote-table-where-not-equal.Bug-6621.py sql/test/BugTracker-2019/Tests/alter_table_drop_column.Bug-6749.py sql/test/BugTracker-2019/Tests/grant-select-column.Bug-6765.py sql/test/BugTracker-2019/Tests/msqldump-mapi-cache.Bug-6777.py sql/test/BugTracker-2019/Tests/python-loader-string.Bug-6759.py sql/test/BugTracker-2019/Tests/remote-table-non-existent-column.Bug-6750.py sql/test/BugTracker-2020/Tests/alter-table-add-column.Bug-6816.py sql/test/BugTracker-2020/Tests/functions-not-persist.Bug-6819.SQL.py sql/test/BugTracker/Tests/auto_commit.SF-1724151.SQL.py sql/test/BugTracker/Tests/connect_crash.SF-1436626.SQL.py sql/test/BugTracker/Tests/local_temp_table.SF-1865953.SQL.py sql/test/BugTracker/Tests/mdb_starts_with_sql_debug_64.SF-1999354.SQL.py sql/test/BugTracker/Tests/python_escape.SF-1916844.SQL.py sql/test/BugTracker/Tests/set_a_new_user_password.SF-1844050.SQL.py sql/test/BugTracker/Tests/set_sql_debug_64__breaking_the_DB.SF-1906287.SQL.py sql/test/Dependencies/Tests/Dependencies.SQL.py sql/test/Dump/Tests/dump-again.SQL.py sql/test/Dump/Tests/dump.SQL.py sql/test/Dump/Tests/reload-again.SQL.py sql/test/Dump/Tests/reload.SQL.py sql/test/Skyserver/Tests/Skyserver.SQL.py sql/test/Skyserver/Tests/Skyserver_v6.
MonetDB: default - Merge with Jun2020 branch.
Changeset: b0a1b3dc38a1 for MonetDB URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=b0a1b3dc38a1 Modified Files: gdk/gdk_bat.c Branch: default Log Message: Merge with Jun2020 branch. diffs (12 lines): diff --git a/gdk/gdk_bat.c b/gdk/gdk_bat.c --- a/gdk/gdk_bat.c +++ b/gdk/gdk_bat.c @@ -2100,7 +2100,7 @@ BATmode(BAT *b, bool transient) #ifdef NDEBUG /* assertions are disabled, turn failing tests into a message */ #undef assert -#define assert(test) ((void) ((test) || TRC_CRITICAL_ENDIF(BAT_, "Assertion `%s' failed\n", #test))) +#define assert(test) ((void) ((test) || (TRC_CRITICAL_ENDIF(BAT_, "Assertion `%s' failed\n", #test), 0))) #endif /* Assert that properties are set correctly. ___ checkin-list mailing list checkin-list@monetdb.org https://www.monetdb.org/mailman/listinfo/checkin-list
MonetDB: default - Merge with Jun2020 branch.
Changeset: 4246c76eb4ca for MonetDB URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=4246c76eb4ca Modified Files: gdk/gdk_private.h gdk/gdk_system_private.h Branch: default Log Message: Merge with Jun2020 branch. diffs (45 lines): diff --git a/gdk/gdk_private.h b/gdk/gdk_private.h --- a/gdk/gdk_private.h +++ b/gdk/gdk_private.h @@ -168,20 +168,6 @@ gdk_return GDKssort(void *restrict h, vo __attribute__((__visibility__("hidden"))); gdk_return GDKunlink(int farmid, const char *dir, const char *nme, const char *extension) __attribute__((__visibility__("hidden"))); -#ifdef NATIVE_WIN32 -#define GDKwinerror(format, ...) \ - do {\ - char _osmsgbuf[128];\ - FormatMessage(FORMAT_MESSAGE_FROM_SYSTEM, NULL, \ - GetLastError(), \ - MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), \ - (LPTSTR) _osmsgbuf, sizeof(_osmsgbuf),\ - NULL);\ - GDKtracer_log(__FILE__, __func__, __LINE__, M_CRITICAL, \ - GDK, _osmsgbuf, format, ##__VA_ARGS__); \ - SetLastError(0);\ - } while (0) -#endif void HASHfree(BAT *b) __attribute__((__visibility__("hidden"))); bool HASHgonebad(BAT *b, const void *v) diff --git a/gdk/gdk_system_private.h b/gdk/gdk_system_private.h --- a/gdk/gdk_system_private.h +++ b/gdk/gdk_system_private.h @@ -20,3 +20,17 @@ int MT_kill_thread(MT_Id t) __attribute__((__visibility__("hidden"))); bool MT_thread_override_limits(void) __attribute__((__visibility__("hidden"))); +#ifdef NATIVE_WIN32 +#define GDKwinerror(format, ...) \ + do {\ + char _osmsgbuf[128];\ + FormatMessage(FORMAT_MESSAGE_FROM_SYSTEM, NULL, \ + GetLastError(), \ + MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), \ + (LPTSTR) _osmsgbuf, sizeof(_osmsgbuf),\ + NULL);\ + GDKtracer_log(__FILE__, __func__, __LINE__, M_CRITICAL, \ + GDK, _osmsgbuf, format, ##__VA_ARGS__); \ + SetLastError(0);\ + } while (0) +#endif ___ checkin-list mailing list checkin-list@monetdb.org https://www.monetdb.org/mailman/listinfo/checkin-list
MonetDB: default - Merge with Jun2020 branch.
Changeset: 6623f5d20ea3 for MonetDB URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=6623f5d20ea3 Modified Files: NT/monetdb_config.h.in clients/Tests/exports.stable.out clients/examples/C/smack00.c clients/examples/C/smack01.c clients/mapiclient/mclient.c clients/odbc/samples/arraytest.c clients/odbc/samples/odbcsample1.c clients/odbc/samples/testStmtAttr.c clients/odbc/samples/testgetinfo.c gdk/gdk.h gdk/gdk_aggr.c gdk/gdk_align.c gdk/gdk_analytic_bounds.c gdk/gdk_analytic_func.c gdk/gdk_atoms.c gdk/gdk_bat.c gdk/gdk_batop.c gdk/gdk_bbp.c gdk/gdk_calc.c gdk/gdk_calc_compare.h gdk/gdk_cand.c gdk/gdk_group.c gdk/gdk_hash.c gdk/gdk_heap.c gdk/gdk_imprints.c gdk/gdk_join.c gdk/gdk_logger.c gdk/gdk_orderidx.c gdk/gdk_posix.c gdk/gdk_private.h gdk/gdk_project.c gdk/gdk_sample.c gdk/gdk_select.c gdk/gdk_storage.c gdk/gdk_string.c gdk/gdk_system.c gdk/gdk_tm.c gdk/gdk_tracer.c gdk/gdk_tracer.h gdk/gdk_unique.c gdk/gdk_utils.c geom/lib/libgeom.c monetdb5/mal/mal_dataflow.c monetdb5/mal/mal_exception.c monetdb5/mal/mal_instruction.c monetdb5/mal/mal_linker.c monetdb5/modules/atoms/blob.c monetdb5/modules/atoms/xml.c monetdb5/modules/kernel/algebra.c monetdb5/modules/kernel/microbenchmark.c monetdb5/modules/mal/mal_mapi.c monetdb5/modules/mal/tablet.c monetdb5/optimizer/opt_multiplex.c sql/backends/monet5/rel_bin.c sql/backends/monet5/sql_statement.c sql/backends/monet5/sql_statement.h sql/common/sql_mem.c sql/server/rel_select.c sql/server/rel_unnest.c sql/server/sql_query.c sql/server/sql_query.h sql/storage/store.c sql/test/BugTracker-2010/Tests/new-readonly-db.Bug-2695.stable.err sql/test/BugTracker-2014/Tests/inet_error_handling.Bug-3624.stable.err sql/test/BugTracker-2015/Tests/float-space-parse.Bug-3691.stable.err sql/test/BugTracker-2019/Tests/rank-nan.Bug-6780.sql sql/test/BugTracker-2019/Tests/rank-nan.Bug-6780.stable.out sql/test/VOC/Tests/VOC.stable.out sql/test/analytics/Tests/analytics13.sql sql/test/analytics/Tests/analytics13.stable.out sql/test/pg_regress/Tests/inet.stable.err sql/test/subquery/Tests/subquery5.sql sql/test/subquery/Tests/subquery5.stable.err sql/test/subquery/Tests/subquery5.stable.out Branch: default Log Message: Merge with Jun2020 branch. diffs (truncated from 6817 to 300 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 @@ -808,6 +808,10 @@ /* #undef size_t */ #if defined(_MSC_VER) && _MSC_VER < 1900 +/* the Visual Studio 2015 version of snprintf is C99 standard + * compliant and different from _snprintf, in older versions, the + * functions are the same and return -1 when the buffer is too + * small */ #define snprintf c99_snprintf #define vsnprintf c99_vsnprintf diff --git a/clients/Tests/exports.stable.out b/clients/Tests/exports.stable.out --- a/clients/Tests/exports.stable.out +++ b/clients/Tests/exports.stable.out @@ -253,7 +253,6 @@ gdk_return GDKcopyenv(BAT **key, BAT **v gdk_return GDKcreatedir(const char *nme); gdk_return GDKcreatesem(int id, int count, int *semid); int GDKdebug; -void GDKerror(_In_z_ _Printf_format_string_ const char *format, ...) __attribute__((__format__(__printf__, 1, 2))); _Noreturn void GDKexit(int status); void GDKexit(int status); bool GDKexiting(void); @@ -301,10 +300,9 @@ void GDKsetverbose(int verbosity); ssize_t GDKstrFromStr(unsigned char *restrict dst, const unsigned char *restrict src, ssize_t len); str GDKstrdup(const char *s) __attribute__((__warn_unused_result__)); str GDKstrndup(const char *s, size_t n) __attribute__((__warn_unused_result__)); -void GDKsyserror(_In_z_ _Printf_format_string_ const char *format, ...) __attribute__((__format__(__printf__, 1, 2))); gdk_return GDKtracer_fill_comp_info(BAT *id, BAT *component, BAT *log_level); gdk_return GDKtracer_flush_buffer(void); -gdk_return GDKtracer_log(const char *file, const char *func, int lineno, log_level_t lvl, component_t comp, const char *format, ...) __attribute__((__format__(__printf__, 6, 7))); +void GDKtracer_log(const char *file, const char *func, int lineno, log_level_t lvl, component_t comp, const char *syserr, _In_z_ _Printf_format_string_ const char *format, ...) __attribute__((__format__(__printf__, 7, 8))); void GDKtracer_reinit_basic(int sig); gdk_return GDKtracer_reset_adapter(void); gdk_return GDKtracer_reset_component_level(const char *comp); diff --git a/client
MonetDB: default - Merge with Jun2020 branch.
Changeset: 274eb9789490 for MonetDB URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=274eb9789490 Modified Files: clients/mapiclient/mclient.1 gdk/gdk_bat.c gdk/gdk_tracer.c monetdb5/mal/mal.c monetdb5/mal/mal_parser.c monetdb5/tools/Tests/mserver5--help.stable.err monetdb5/tools/Tests/mserver5--help.stable.err.Windows tools/merovingian/client/monetdb.1 tools/merovingian/daemon/monetdbd.1.in tools/mserver/mserver5.1.in tools/mserver/mserver5.c Branch: default Log Message: Merge with Jun2020 branch. diffs (281 lines): diff --git a/clients/mapiclient/mclient.1 b/clients/mapiclient/mclient.1 --- a/clients/mapiclient/mclient.1 +++ b/clients/mapiclient/mclient.1 @@ -169,8 +169,12 @@ All timings are reported on stderr. .br \fBNote\fP that the client-measured wall-clock time is reported per query \fBonly\fP when options \fB\-\-interactive\fP or \fB\-\-echo\fP are used, -because only then does mclient send individual lines (statements) of the SQL -script to the server. Otherwise, when mclient sends the SQL script in +because only then does +.I mclient +send individual lines (statements) of the SQL +script to the server. Otherwise, when +.I mclient +sends the SQL script in large(r) batch(es), only the total wall-clock time per batch is measured and reported. The server-measured detailed performance timings are always measured and reported per query. @@ -454,7 +458,9 @@ is the name of the database. mclient \-d $db \-s \(dqCOPY INTO $table FROM '$file' USING DELIMITERS ',',E'\e\en','\e\(dq'\(dq .PP Efficiently import data from a CSV file into a table when the file is -to be read by mclient (e.g. the server has no access to the file). +to be read by +.I mclient +(e.g. the server has no access to the file). .I $file is the (absolute or relative) path name of the file, .I $table diff --git a/gdk/gdk_bat.c b/gdk/gdk_bat.c --- a/gdk/gdk_bat.c +++ b/gdk/gdk_bat.c @@ -2363,13 +2363,16 @@ BATassertProps(BAT *b) BUN mask; if ((hs = GDKzalloc(sizeof(Hash))) == NULL) { - TRC_ERROR(BAT_, "Cannot allocate hash table\n"); + TRC_WARNING(BAT_, "Cannot allocate hash table\n"); goto abort_check; } if (snprintf(hs->heaplink.filename, sizeof(hs->heaplink.filename), "%s.thshprpl%x", nme, (unsigned) THRgettid()) >= (int) sizeof(hs->heaplink.filename) || snprintf(hs->heapbckt.filename, sizeof(hs->heapbckt.filename), "%s.thshprpb%x", nme, (unsigned) THRgettid()) >= (int) sizeof(hs->heapbckt.filename)) { + /* cannot happen, see comment in gdk.h +* about sizes near definition of +* BBPINIT */ GDKfree(hs); - TRC_ERROR(BAT_, "Heap filename is too large\n"); + TRC_CRITICAL(BAT_, "Heap filename is too large\n"); goto abort_check; } if (ATOMsize(b->ttype) == 1) @@ -2385,7 +2388,7 @@ BATassertProps(BAT *b) HASHnew(hs, b->ttype, BUNlast(b), mask, BUN_NONE, false) != GDK_SUCCEED) { GDKfree(hs); - TRC_ERROR(BAT_, "Cannot allocate hash table\n"); + TRC_WARNING(BAT_, "Cannot allocate hash table\n"); goto abort_check; } BATloop(b, p, q) { diff --git a/gdk/gdk_tracer.c b/gdk/gdk_tracer.c --- a/gdk/gdk_tracer.c +++ b/gdk/gdk_tracer.c @@ -104,14 +104,24 @@ static gdk_return const char *trace_path; trace_path = GDKgetenv("gdk_dbtrace"); - if (trace_path == NULL) + if (trace_path == NULL) { trace_path = GDKgetenv("gdk_dbpath"); - if (trace_path == NULL) { - active_tracer = stderr; - return GDK_SUCCEED; + if (trace_path == NULL) { + active_tracer = stderr; + return GDK_SUCCEED; + } + if (strconcat_len(file_name, sizeof(file_name), + trace_path, DIR_SEP_STR, FILE_NAME, NULL) + >= sizeof(file_name)) { + goto too_long; + } + } else { + if (strcpy_len(file_name, trace_path, sizeof(file_name)) + >= sizeof(file_name)) { + goto too_long; + } } - snprintf(file_name, sizeof(file_name), "%s%c%s", trace_path, DIR_SEP, FILE_NAME); active_tracer = fopen(file_name, "a"); if (active_trace
MonetDB: default - Merge with Jun2020 branch.
Changeset: 8623df89c4eb for MonetDB URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=8623df89c4eb Modified Files: gdk/gdk_project.c monetdb5/modules/kernel/algebra.c sql/backends/monet5/sql.c sql/test/merge-partitions/Tests/mergepart23.SQL.py sql/test/merge-partitions/Tests/mergepart23.stable.err sql/test/merge-partitions/Tests/mergepart23.stable.out Branch: default Log Message: Merge with Jun2020 branch. diffs (truncated from 723 to 300 lines): diff --git a/gdk/gdk_project.c b/gdk/gdk_project.c --- a/gdk/gdk_project.c +++ b/gdk/gdk_project.c @@ -373,13 +373,9 @@ BATproject2(BAT *restrict l, BAT *restri bn->tnil = false; if (r2) { bn->tnonil = l->tnonil & r1->tnonil & r2->tnonil; - bn->tsorted = l->batCount <= 1 - || (l->tsorted & r1->tsorted & r2->tsorted) - || (l->trevsorted & r1->trevsorted & r2->trevsorted); - bn->trevsorted = l->batCount <= 1 - || (l->tsorted & r1->trevsorted & r2->trevsorted) - || (l->trevsorted & r1->tsorted & r2->tsorted); - bn->tkey = l->batCount <= 1 || (l->tkey & r1->tkey & r2->tkey); + bn->tsorted = l->batCount <= 1; + bn->trevsorted = l->batCount <= 1; + bn->tkey = l->batCount <= 1; } else { bn->tnonil = l->tnonil & r1->tnonil; bn->tsorted = l->batCount <= 1 diff --git a/monetdb5/modules/kernel/algebra.c b/monetdb5/modules/kernel/algebra.c --- a/monetdb5/modules/kernel/algebra.c +++ b/monetdb5/modules/kernel/algebra.c @@ -693,28 +693,6 @@ ALGunary(bat *result, const bat *bid, BA return MAL_SUCCEED; } -static str -ALGbinary(bat *result, const bat *lid, const bat *rid, BAT *(*func)(BAT *, BAT *), const char *name) -{ - BAT *left, *right,*bn= NULL; - - if ((left = BATdescriptor(*lid)) == NULL) { - throw(MAL, name, SQLSTATE(HY002) RUNTIME_OBJECT_MISSING); - } - if ((right = BATdescriptor(*rid)) == NULL) { - BBPunfix(left->batCacheid); - throw(MAL, name, SQLSTATE(HY002) RUNTIME_OBJECT_MISSING); - } - bn = (*func)(left, right); - BBPunfix(left->batCacheid); - BBPunfix(right->batCacheid); - if (bn == NULL) - throw(MAL, name, GDK_EXCEPTION); - *result = bn->batCacheid; - BBPkeepref(*result); - return MAL_SUCCEED; -} - static BAT * BATwcopy(BAT *b) { @@ -782,7 +760,23 @@ ALGcrossproduct2( bat *l, bat *r, const str ALGprojection(bat *result, const bat *lid, const bat *rid) { - return ALGbinary(result, lid, rid, BATproject, "algebra.projection"); + BAT *left, *right,*bn= NULL; + + if ((left = BATdescriptor(*lid)) == NULL) { + throw(MAL, "algebra.projection", SQLSTATE(HY002) RUNTIME_OBJECT_MISSING); + } + if ((right = BATdescriptor(*rid)) == NULL) { + BBPunfix(left->batCacheid); + throw(MAL, "algebra.projection", SQLSTATE(HY002) RUNTIME_OBJECT_MISSING); + } + bn = BATproject(left, right); + BBPunfix(left->batCacheid); + BBPunfix(right->batCacheid); + if (bn == NULL) + throw(MAL, "algebra.projection", GDK_EXCEPTION); + *result = bn->batCacheid; + BBPkeepref(*result); + return MAL_SUCCEED; } str 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 @@ -2153,26 +2153,17 @@ DELTAproject(bat *result, const bat *sub if (BATcount(c) == 0) { res = i; i = c; + tres = BATproject(s, res); } else { - if ((res = COLcopy(c, c->ttype, true, TRANSIENT)) == NULL) { - BBPunfix(s->batCacheid); - BBPunfix(i->batCacheid); - BBPunfix(c->batCacheid); - throw(MAL, "sql.projectdelta", SQLSTATE(HY013) MAL_MALLOC_FAIL); - } - BBPunfix(c->batCacheid); - if (BATappend(res, i, NULL, false) != GDK_SUCCEED) { - BBPunfix(s->batCacheid); - BBPunfix(i->batCacheid); - throw(MAL, "sql.projectdelta", SQLSTATE(HY013) MAL_MALLOC_FAIL); - } + tres = BATproject2(s, c, i); } + } else { + tres = BATproject(s, res); } if (i) BBPunfix(i->batCacheid); - - tres = BATproject(s, res); BBPunfix(res->batCacheid); + if (tres == NULL) { BBPunfix(s->batCacheid); throw(MAL, "sql.projectdelta", SQLSTATE(HY013) MAL_MALLOC_FAIL);
MonetDB: default - Merge with Jun2020 branch.
Changeset: 77b631f254a5 for MonetDB URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=77b631f254a5 Added Files: sql/test/merge-partitions/Tests/mergepart30.sql sql/test/merge-partitions/Tests/mergepart30.stable.err sql/test/merge-partitions/Tests/mergepart30.stable.out Modified Files: clients/Tests/MAL-signatures.stable.out clients/Tests/MAL-signatures.stable.out.int128 clients/Tests/exports.stable.out clients/mapiclient/dump.c clients/mapiclient/mclient.c clients/odbc/winsetup/setup.c common/options/getopt.c common/options/getopt1.c common/stream/stream.c common/utils/muuid.c gdk/ChangeLog.Jun2020 gdk/gdk.h gdk/gdk_aggr.c gdk/gdk_analytic_func.c gdk/gdk_batop.c gdk/gdk_delta.h gdk/gdk_posix.c gdk/gdk_posix.h gdk/gdk_private.h gdk/gdk_project.c gdk/gdk_tracer.c gdk/gdk_tracer.h gdk/gdk_utils.h monetdb5/mal/mal_function.c monetdb5/mal/mal_function.h monetdb5/mal/mal_listing.c monetdb5/mal/mal_listing.h monetdb5/modules/kernel/algebra.c monetdb5/modules/kernel/algebra.h monetdb5/modules/kernel/algebra.mal monetdb5/modules/mal/mal_io.c monetdb5/modules/mal/mal_mapi.c monetdb5/modules/mal/wlc.mal monetdb5/optimizer/opt_mergetable.c monetdb5/optimizer/opt_pushselect.c monetdb5/optimizer/opt_remap.c monetdb5/tools/Tests/mserver5-ipv6.py sql/ChangeLog.Jun2020 sql/backends/monet5/Tests/dbextra_lock_test.py sql/backends/monet5/rel_bin.c sql/backends/monet5/sql_cat.c sql/backends/monet5/sql_execute.c sql/backends/monet5/sql_gencode.c sql/backends/monet5/sql_statement.c sql/backends/monet5/sql_statement.h sql/backends/monet5/sqlcatalog.mal sql/backends/monet5/wlr.mal sql/include/sql_catalog.h sql/server/rel_optimizer.c sql/server/rel_propagate.c sql/server/rel_propagate.h sql/server/rel_psm.c sql/server/rel_schema.c sql/server/rel_select.c sql/server/rel_updates.c sql/server/rel_xml.c sql/server/sql_mvc.c sql/server/sql_partition.c sql/server/sql_privileges.c sql/server/sql_semantic.c sql/storage/bat/bat_storage.c sql/storage/sql_catalog.c sql/storage/sql_storage.h sql/storage/store.c sql/test/BugDay_2005-11-09_2.9.3/Tests/grant_public.SF-1114580.stable.err sql/test/BugTracker-2009/Tests/create_on_ro_db_crash.SF-2830238.SQL.py sql/test/BugTracker-2009/Tests/lost_update.SF-2790020.SQL.py sql/test/BugTracker-2009/Tests/use_order_column_first.SF-2686008.stable.out sql/test/BugTracker-2010/Tests/new-readonly-db.Bug-2695.SQL.py sql/test/BugTracker-2011/Tests/interrupted-initialization.Bug-2875.SQL.py sql/test/BugTracker-2012/Tests/rewrite_like_into_likesubselect.Bug-3179.stable.out sql/test/BugTracker-2013/Tests/corrupt-after-restart.Bug-3282.SQL.py sql/test/BugTracker-2014/Tests/acidity-fail.Bug-3635.py sql/test/BugTracker-2014/Tests/manifold.Bug-3556.stable.out sql/test/BugTracker-2015/Tests/schemadiff.Bug-3778.SQL.py sql/test/BugTracker-2017/Tests/shutdown.Bug-6182.SQL.py sql/test/BugTracker-2017/Tests/wrong_aggregation_count.Bug-6257.stable.out sql/test/BugTracker-2018/Tests/grant-role-not-idempotent.Bug-6660.stable.err sql/test/BugTracker-2018/Tests/grant-role-not-idempotent.Bug-6660.stable.out sql/test/BugTracker-2018/Tests/local_replica_table_not_detected.Bug-6620.py sql/test/BugTracker-2018/Tests/remote-table-where-is-null.Bug-6601.py sql/test/BugTracker-2018/Tests/remote-table-where-not-equal.Bug-6621.py sql/test/BugTracker-2019/Tests/alter_table_drop_column.Bug-6749.py sql/test/BugTracker-2019/Tests/remote-table-non-existent-column.Bug-6750.py sql/test/BugTracker-2020/Tests/functions-not-persist.Bug-6819.SQL.py sql/test/BugTracker/Tests/coalesce_equal_coalesce.SF-1907905.stable.err sql/test/BugTracker/Tests/explain.SF-1739353.stable.out sql/test/BugTracker/Tests/jdbc_no_debug.SF-1739356.stable.out sql/test/BugTracker/Tests/mdb_starts_with_sql_debug_64.SF-1999354.SQL.py sql/test/BugTracker/Tests/revoke_role.SF-1691646.stable.err sql/test/BugTracker/Tests/set_a_new_user_password.SF-1844050.SQL.py sql/test/BugTracker/Tests/set_sql_debug_64__breaking_the_DB.SF-1906287.SQL.py sql/test/Tests/create_in_schema.stable.err sql/test/Tests/create_in_schema.stable.out sql/test/Users/Tests/grantPrivilegesNonDefaultRole.Bug-3365.stable.err sql/test/group-concat/Tests/groupconcat05.sql sql/test/group-concat/Tests/groupconcat
MonetDB: default - Merge with Jun2020 branch.
Changeset: 63fffbda5706 for MonetDB URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=63fffbda5706 Added Files: sql/test/subquery/Tests/subquery5.stable.err sql/test/subquery/Tests/subquery5.stable.out Modified Files: clients/Tests/exports.stable.out clients/mapiclient/mclient.c common/stream/stream.c common/stream/stream.h common/utils/mcrypt.h common/utils/mutils.h configure.ag gdk/gdk.h gdk/gdk_bat.c gdk/gdk_batop.c gdk/gdk_group.c gdk/gdk_join.c gdk/gdk_private.h gdk/gdk_time.h gdk/gdk_unique.c gdk/gdk_utils.h monetdb5/modules/atoms/json.c sql/backends/monet5/UDF/pyapi3/conversion3.c sql/backends/monet5/rel_bin.c sql/backends/monet5/sql_gencode.c sql/server/rel_exp.c sql/server/rel_schema.c sql/server/rel_select.c sql/server/rel_unnest.c sql/server/sql_query.c sql/server/sql_query.h sql/storage/store.c sql/test/BugTracker-2017/Tests/side-effect.Bug-6397.stable.out.single sql/test/miscellaneous/Tests/groupby_error.stable.out sql/test/subquery/Tests/subquery3.sql sql/test/subquery/Tests/subquery3.stable.err sql/test/subquery/Tests/subquery3.stable.out sql/test/subquery/Tests/subquery5.sql tools/merovingian/daemon/handlers.h Branch: default Log Message: Merge with Jun2020 branch. diffs (truncated from 1449 to 300 lines): diff --git a/clients/Tests/exports.stable.out b/clients/Tests/exports.stable.out --- a/clients/Tests/exports.stable.out +++ b/clients/Tests/exports.stable.out @@ -9,7 +9,7 @@ stdout of test 'exports` in directory 'c int ALIGNsynced(BAT *b1, BAT *b2); int ATOMallocate(const char *nme); void *ATOMdup(int id, const void *val); -uint8_t ATOMelmshift(int sz); +uint8_t ATOMelmshift(int sz) __attribute__((__const__)); char *ATOMformat(int id, const void *val); int ATOMindex(const char *nme); size_t ATOMlen(int id, const void *v); @@ -319,7 +319,7 @@ size_t GDKuniqueid(size_t offset); gdk_return GDKupgradevarheap(BAT *b, var_t v, bool copyall, bool mayshare) __attribute__((__warn_unused_result__)); lng GDKusec(void); int GDKverbose; -const char *GDKversion(void); +const char *GDKversion(void) __attribute__((__const__)); size_t GDKvm_cursize(void); void *GDKzalloc(size_t size) __attribute__((__malloc__)) __attribute__((__alloc_size__(1))) __attribute__((__warn_unused_result__)); void HASHdestroy(BAT *b); @@ -441,33 +441,33 @@ BAT *canditer_slice(struct canditer *ci, BAT *canditer_slice2(struct canditer *ci, BUN lo1, BUN hi1, BUN lo2, BUN hi2); int closedir(DIR *dir); char *ctime_r(const time_t *restrict, char *restrict); -date date_add_day(date dt, int days); -date date_add_month(date dt, int months); -int date_century(date dt); -date date_create(int year, int month, int day); -int date_day(date dt); -int date_dayofweek(date dt); -int date_dayofyear(date dt); -int date_decade(date dt); -int date_diff(date d1, date d2); +date date_add_day(date dt, int days) __attribute__((__const__)); +date date_add_month(date dt, int months) __attribute__((__const__)); +int date_century(date dt) __attribute__((__const__)); +date date_create(int year, int month, int day) __attribute__((__const__)); +int date_day(date dt) __attribute__((__const__)); +int date_dayofweek(date dt) __attribute__((__const__)); +int date_dayofyear(date dt) __attribute__((__const__)); +int date_decade(date dt) __attribute__((__const__)); +int date_diff(date d1, date d2) __attribute__((__const__)); ssize_t date_fromstr(const char *buf, size_t *len, date **d, bool external); -int date_month(date dt); -int date_quarter(date dt); +int date_month(date dt) __attribute__((__const__)); +int date_quarter(date dt) __attribute__((__const__)); ssize_t date_tostr(str *buf, size_t *len, const date *val, bool external); -int date_weekofyear(date dt); -int date_year(date dt); -daytime daytime_add_usec(daytime tm, lng usec); -daytime daytime_add_usec_modulo(daytime tm, lng usec); -daytime daytime_create(int hour, int minute, int second, int usec); +int date_weekofyear(date dt) __attribute__((__const__)); +int date_year(date dt) __attribute__((__const__)); +daytime daytime_add_usec(daytime tm, lng usec) __attribute__((__const__)); +daytime daytime_add_usec_modulo(daytime tm, lng usec) __attribute__((__const__)); +daytime daytime_create(int hour, int minute, int second, int usec) __attribute__((__const__)); ssize_t daytime_fromstr(const char *buf, size_t *len, daytime **d, bool external); -int daytime_hour(daytime tm); -int daytime_min(daytime tm); +int daytime_hour(daytime tm) __attribute__((__const__)); +int daytime_min(daytime tm) __attribute__((__const__)); ssize_t daytime_precision_tostr(str *buf, size_t *len, const daytime dt, int precision, bool external); -int daytime_sec(daytime tm); -int daytime_sec_usec(daytime tm); +int daytim
MonetDB: default - Merge with Jun2020 branch.
Changeset: f1b26b696ff0 for MonetDB URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=f1b26b696ff0 Added Files: sql/test/subquery/Tests/subquery5.sql Modified Files: clients/Tests/MAL-signatures.stable.out clients/Tests/MAL-signatures.stable.out.int128 clients/Tests/exports.stable.out monetdb5/mal/Tests/performanceTests/tst901a.malC monetdb5/mal/Tests/tst1206.malC monetdb5/mal/Tests/tst770.malC monetdb5/mal/Tests/tst890.malC monetdb5/mal/Tests/tst890.stable.out monetdb5/mal/Tests/tst901.malC monetdb5/mal/Tests/tst901.stable.out monetdb5/mal/Tests/tst901a.malC monetdb5/mal/Tests/tst901a.stable.out monetdb5/mal/Tests/tst903.malC monetdb5/mal/Tests/tst903.stable.out monetdb5/mal/Tests/tst906.malC monetdb5/mal/Tests/tst906.stable.out monetdb5/mal/Tests/tst908.malC monetdb5/mal/Tests/tst960.malC monetdb5/mal/Tests/tst960.stable.out monetdb5/modules/mal/00_batcalc_hge.mal monetdb5/modules/mal/00_batcalc_hge.mal.sh monetdb5/modules/mal/01_batcalc.mal monetdb5/modules/mal/01_batcalc.mal.sh monetdb5/modules/mal/batmtime.mal monetdb5/optimizer/Tests/inline02.stable.out monetdb5/optimizer/Tests/inline03.stable.out monetdb5/optimizer/Tests/inline04.stable.out monetdb5/optimizer/Tests/inline07.stable.out monetdb5/optimizer/Tests/inline09.stable.out monetdb5/optimizer/Tests/inline10.stable.out monetdb5/optimizer/Tests/inline12.stable.out monetdb5/optimizer/Tests/remap.stable.out monetdb5/optimizer/opt_coercion.c monetdb5/optimizer/opt_mergetable.c monetdb5/optimizer/opt_prelude.c monetdb5/optimizer/opt_prelude.h monetdb5/optimizer/opt_remap.c sql/backends/monet5/rel_bin.c sql/backends/monet5/sql_statement.c sql/server/rel_select.c sql/server/rel_unnest.c sql/test/BugTracker-2014/Tests/manifold.Bug-3556.stable.out sql/test/BugTracker-2017/Tests/side-effect.Bug-6397.stable.out sql/test/miscellaneous/Tests/groupby_error.sql sql/test/miscellaneous/Tests/groupby_error.stable.out sql/test/subquery/Tests/All sql/test/subquery/Tests/subquery4.sql sql/test/subquery/Tests/subquery4.stable.err testing/sqllogictest.py Branch: default Log Message: Merge with Jun2020 branch. diffs (truncated from 67810 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 @@ -1501,14 +1501,6 @@ stdout of test 'MAL-signatures` in direc [ "batcalc", "!=", "pattern batcalc.!=(v:timestamp, b:bat[:timestamp], nil_matches:bit):bat[:bit] ", "CMDbatNE;","Return V != B" ] [ "batcalc", "!=", "pattern batcalc.!=(v:timestamp, b:bat[:timestamp], s:bat[:oid]):bat[:bit] ", "CMDbatNE;","Return V != B with candidates list"] [ "batcalc", "!=", "pattern batcalc.!=(v:timestamp, b:bat[:timestamp], s:bat[:oid], nil_matches:bit):bat[:bit] ", "CMDbatNE;","Return V != B with candidates list"] -[ "batcalc", "%","pattern batcalc.%(b1:bat[:bte], b2:bat[:bte]):bat[:bte] ", "CMDbatMODsignal;", "Return B1 % B2, signal error on divide by zero"] -[ "batcalc", "%","pattern batcalc.%(b1:bat[:bte], b2:bat[:bte]):bat[:int] ", "CMDbatMODsignal;", "Return B1 % B2, signal error on divide by zero"] -[ "batcalc", "%","pattern batcalc.%(b1:bat[:bte], b2:bat[:bte]):bat[:lng] ", "CMDbatMODsignal;", "Return B1 % B2, signal error on divide by zero"] -[ "batcalc", "%","pattern batcalc.%(b1:bat[:bte], b2:bat[:bte]):bat[:sht] ", "CMDbatMODsignal;", "Return B1 % B2, signal error on divide by zero"] -[ "batcalc", "%","pattern batcalc.%(b1:bat[:bte], b2:bat[:bte], r:bat[:bit]):bat[:bte] ","CMDbatMODsignal;", "Return B1 % B2, signal error on divide by zero"] -[ "batcalc", "%","pattern batcalc.%(b1:bat[:bte], b2:bat[:bte], r:bat[:bit]):bat[:int] ","CMDbatMODsignal;", "Return B1 % B2, signal error on divide by zero"] -[ "batcalc", "%","pattern batcalc.%(b1:bat[:bte], b2:bat[:bte], r:bat[:bit]):bat[:lng] ","CMDbatMODsignal;", "Return B1 % B2, signal error on divide by zero"] -[ "batcalc", "%","pattern batcalc.%(b1:bat[:bte], b2:bat[:bte], r:bat[:bit]):bat[:sht] ","CMDbatMODsignal;", "Return B1 % B2, signal error on divide by zero"] [ "batcalc", "%","pattern batcalc.%(b1:bat[:bte], b2:bat[:bte], s1:bat[:oid], s2:bat[:oid]):bat[:bte] ", "CMDbatMODsignal;", "Return B1 % B2 with candidates list, signal error on divide by zero" ] [ "batcalc", "%","pattern batcalc.%(b1:bat[:bte], b2:bat[
MonetDB: default - Merge with Jun2020 branch.
Changeset: c3dd0afe489a for MonetDB URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=c3dd0afe489a Modified Files: gdk/gdk_bbp.c sql/server/rel_psm.c sql/test/subquery/Tests/subquery4.sql sql/test/subquery/Tests/subquery4.stable.err Branch: default Log Message: Merge with Jun2020 branch. diffs (156 lines): diff --git a/gdk/gdk_bbp.c b/gdk/gdk_bbp.c --- a/gdk/gdk_bbp.c +++ b/gdk/gdk_bbp.c @@ -997,8 +997,8 @@ BBPcheckbats(void) if (path == NULL) return GDK_FAIL; if (stat(path, &statb) < 0) { - GDKsyserror("BBPcheckbats: cannot stat file %s\n", - path); + GDKsyserror("BBPcheckbats: cannot stat file %s (expected size %zu)\n", + path, b->theap.free); GDKfree(path); return GDK_FAIL; } @@ -1460,7 +1460,7 @@ vheap_entry(FILE *fp, Heap *h) } static gdk_return -new_bbpentry(FILE *fp, bat i, const char *prefix) +new_bbpentry(FILE *fp, bat i) { #ifndef NDEBUG assert(i > 0); @@ -1476,10 +1476,9 @@ new_bbpentry(FILE *fp, bat i, const char } #endif - if (fprintf(fp, "%s%zd %u %s %s %d " BUNFMT " " - BUNFMT " " OIDFMT, prefix, + if (fprintf(fp, "%d %u %s %s %d " BUNFMT " " BUNFMT " " OIDFMT, /* BAT info */ - (ssize_t) i, + (int) i, BBP_status(i) & BBPPERSISTENT, BBP_logical(i), BBP_physical(i), @@ -1489,24 +1488,11 @@ new_bbpentry(FILE *fp, bat i, const char BBP_desc(i)->hseqbase) < 0 || heap_entry(fp, BBP_desc(i)) < 0 || vheap_entry(fp, BBP_desc(i)->tvheap) < 0 || - (BBP_options(i) && -fprintf(fp, " %s", BBP_options(i)) < 0) || + (BBP_options(i) && fprintf(fp, " %s", BBP_options(i)) < 0) || fprintf(fp, "\n") < 0) { GDKsyserror("new_bbpentry: Writing BBP.dir entry failed\n"); return GDK_FAIL; } - TRC_DEBUG(IO_, "%s%zd %u %s %s %d " BUNFMT " " - BUNFMT " " OIDFMT " %s\n", prefix, - /* BAT info */ - (ssize_t) i, - BBP_status(i) & BBPPERSISTENT, - BBP_logical(i), - BBP_physical(i), - BBP_desc(i)->batRestricted << 1, - BBP_desc(i)->batCount, - BBP_desc(i)->batCapacity, - BBP_desc(i)->hseqbase, - BBP_options(i) ? BBP_options(i) : ""); return GDK_SUCCEED; } @@ -1592,7 +1578,7 @@ BBPdir_subcommit(int cnt, bat *subcommit bat i = subcommit[j]; /* BBP.dir consists of all persistent bats only */ if (BBP_status(i) & BBPPERSISTENT) { - if (new_bbpentry(nbbpf, i, "") != GDK_SUCCEED) { + if (new_bbpentry(nbbpf, i) != GDK_SUCCEED) { goto bailout; } } @@ -1664,7 +1650,7 @@ BBPdir(int cnt, bat *subcommit) /* write the entry * BBP.dir consists of all persistent bats */ if (BBP_status(i) & BBPPERSISTENT) { - if (new_bbpentry(fp, i, "") != GDK_SUCCEED) { + if (new_bbpentry(fp, i) != GDK_SUCCEED) { goto bailout; } } diff --git a/sql/server/rel_psm.c b/sql/server/rel_psm.c --- a/sql/server/rel_psm.c +++ b/sql/server/rel_psm.c @@ -96,7 +96,7 @@ psm_set_exp(sql_query *query, dnode *n) res = exp_set(sql->sa, name, e, level); } else { /* multi assignment */ - exp_kind ek = {type_value, card_relation, FALSE}; + exp_kind ek = {type_relation, card_value, FALSE}; sql_rel *rel_val = rel_subquery(query, NULL, val, ek); dlist *vars = n->data.lval; dnode *m; @@ -547,7 +547,7 @@ rel_select_into( sql_query *query, symbo extern sql_rel * rel_select_with_into(sql_query *query, symbol *sq) { - exp_kind ek = {type_value, card_row, TRUE}; + exp_kind ek = {type_relation, card_value, TRUE}; list *reslist = rel_select_into(query, sq, ek); if (!reslist) return NULL; diff --git a/sql/test/subquery/Tests/subquery4.sql b/sql/test/subquery/Tests/subquery4.sql --- a/sql/test/subquery/Tests/subquery4.sql +++ b/sql/test/subquery/Tests/subquery4.sql @@ -192,6 +192,9 @@ SELECT i1.i, i2.i FROM integers i1, inte SELECT 1 IN ((SELECT MIN(col2)), (SELECT SUM(col4))) FROM another_t; -- False +SELECT 1 FROM another_t WHERE (1,col1) IN ((SELECT MIN(i1.i), SUM(i1.i) FROM integers i1))
MonetDB: default - Merge with Jun2020 branch.
Changeset: 0bcd8eb11a87 for MonetDB URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=0bcd8eb11a87 Added Files: sql/test/BugTracker-2016/Tests/decimal_vs_integer.Bug-3941.stable.out.single Modified Files: common/utils/msabaoth.c monetdb5/optimizer/opt_mergetable.c sql/test/BugTracker-2016/Tests/decimal_vs_integer.Bug-3941.stable.out sql/test/subquery/Tests/subquery4.sql tools/merovingian/daemon/client.c tools/merovingian/daemon/controlrunner.c tools/merovingian/daemon/forkmserver.c tools/merovingian/daemon/handlers.c tools/merovingian/daemon/merovingian.c tools/merovingian/daemon/merovingian.h tools/merovingian/daemon/multiplex-funnel.c Branch: default Log Message: Merge with Jun2020 branch. diffs (truncated from 1392 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 @@ -617,7 +617,7 @@ msab_getSingleStatus(const char *pathbuf */ snprintf(buf, sizeof(buf), "%s/%s/%s", pathbuf, dbname, _sabaoth_internal_uuid); - if (stat(buf, &statbuf) != -1) { + if (stat(buf, &statbuf) == 0) { /* database has the same process signature as ours, which * means, it must be us, rely on the uplog state */ snprintf(log, sizeof(log), "%s/%s/%s", pathbuf, dbname, UPLOGFILE); @@ -641,7 +641,7 @@ msab_getSingleStatus(const char *pathbuf (void)fclose(f); } } else if (snprintf(buf, sizeof(buf), "%s/%s/%s", pathbuf, dbname, ".gdk_lock"), - ((fd = MT_lockf(buf, F_TEST)) == -2)) { + ((fd = MT_lockf(buf, F_TLOCK)) == -2)) { /* Locking failed; this can be because the lockfile couldn't * be created. Probably there is no Mserver running for * that case also. @@ -650,15 +650,18 @@ msab_getSingleStatus(const char *pathbuf } else if (fd == -1) { /* file is locked, so mserver is running, see if the database * has finished starting */ - snprintf(buf, sizeof(buf), "%s/%s/%s", -pathbuf, dbname, STARTEDFILE); + snprintf(buf, sizeof(buf), "%s/%s/%s", pathbuf, dbname, STARTEDFILE); if (stat(buf, &statbuf) == -1) { sdb->state = SABdbStarting; } else { sdb->state = SABdbRunning; } } else { - /* file is not locked, check for a crash in the uplog */ + /* file was not locked (we just locked it), check for a crash +* in the uplog */ + snprintf(log, sizeof(log), "%s/%s/%s", pathbuf, dbname, STARTEDFILE); + /* just to be sure, remove the .started file */ + (void) remove(log); /* may fail, that's fine */ snprintf(log, sizeof(log), "%s/%s/%s", pathbuf, dbname, UPLOGFILE); if ((f = fopen(log, "r")) != NULL) { (void)fseek(f, -1, SEEK_END); @@ -675,28 +678,27 @@ msab_getSingleStatus(const char *pathbuf /* no uplog, so presumably never started */ sdb->state = SABdbInactive; } + MT_lockf(buf, F_ULOCK); + close(fd); } snprintf(buf, sizeof(buf), "%s/%s/%s", pathbuf, dbname, MAINTENANCEFILE); - sdb->locked = stat(buf, &statbuf) != -1; + sdb->locked = stat(buf, &statbuf) == 0; /* add scenarios that are supported */ sdb->scens = NULL; snprintf(buf, sizeof(buf), "%s/%s/%s", pathbuf, dbname, SCENARIOFILE); if ((f = fopen(buf, "r")) != NULL) { sablist* np = NULL; - while (fgets(data, 8095, f) != NULL) { + while (fgets(data, (int) sizeof(data), f) != NULL) { if (*data != '\0' && data[strlen(data) - 1] == '\n') data[strlen(data) - 1] = '\0'; if (sdb->scens == NULL) { - sdb->scens = malloc(sizeof(sablist)); - sdb->scens->val = strdup(data); - sdb->scens->next = NULL; - np = sdb->scens; + np = sdb->scens = malloc(sizeof(sablist)); } else { np = np->next = malloc(sizeof(sablist)); - np->val = strdup(data); - np->next = NULL; } + np->val = strdup(data); + np->next = NULL; } (void)fclose(f); } @@ -706,19 +708,16 @@ msab_getSingleStatus(const
MonetDB: default - Merge with Jun2020 branch.
Changeset: c75a65435b81 for MonetDB URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=c75a65435b81 Modified Files: gdk/gdk_join.c sql/server/rel_select.c sql/server/rel_unnest.c sql/storage/store.c sql/test/BugTracker-2009/Tests/assert_in_update.SF-2807336.stable.err sql/test/BugTracker-2009/Tests/assert_in_update.SF-2807336.stable.out sql/test/BugTracker-2015/Tests/All sql/test/miscellaneous/Tests/simple_selects.sql sql/test/miscellaneous/Tests/simple_selects.stable.out sql/test/subquery/Tests/subquery4.stable.out Branch: default Log Message: Merge with Jun2020 branch. diffs (242 lines): diff --git a/gdk/gdk_join.c b/gdk/gdk_join.c --- a/gdk/gdk_join.c +++ b/gdk/gdk_join.c @@ -3940,7 +3940,7 @@ BATjoin(BAT **r1p, BAT **r2p, BAT *l, BA swap = (lcost < rcost); if ((BATordered(r) || BATordered_rev(r)) && - (lci.ncand * (log2(rci.ncand) + 1) < (swap ? lcost : rcost))) { + (lci.ncand * (log2((double) rci.ncand) + 1) < (swap ? lcost : rcost))) { /* r is sorted and it is cheaper to do multiple binary * searches than it is to use a hash */ return mergejoin(r1p, r2p, l, r, &lci, &rci, @@ -3948,7 +3948,7 @@ BATjoin(BAT **r1p, BAT **r2p, BAT *l, BA estimate, t0, false, __func__); } if ((BATordered(l) || BATordered_rev(l)) && - (rci.ncand * (log2(lci.ncand) + 1) < (swap ? lcost : rcost))) { + (rci.ncand * (log2((double) lci.ncand) + 1) < (swap ? lcost : rcost))) { /* l is sorted and it is cheaper to do multiple binary * searches than it is to use a hash */ rc = mergejoin(r2p ? r2p : &r2, r1p, r, l, &rci, &lci, diff --git a/sql/server/rel_select.c b/sql/server/rel_select.c --- a/sql/server/rel_select.c +++ b/sql/server/rel_select.c @@ -5585,6 +5585,7 @@ rel_query(sql_query *query, sql_rel *rel res = rel_crossproduct(sql->sa, res, fnd, op_join); if (lateral) set_dependent(res); + res = rel_select(sql->sa, res, NULL); } else { res = fnd; } diff --git a/sql/server/rel_unnest.c b/sql/server/rel_unnest.c --- a/sql/server/rel_unnest.c +++ b/sql/server/rel_unnest.c @@ -2012,6 +2012,8 @@ rewrite_anyequal(mvc *sql, sql_rel *rel, sql_rel *sq = lsq; sql_subfunc *ea = sql_bind_func(sql->sa, sql->session->schema, is_anyequal(sf)?"anyequal":"allnotequal", exp_subtype(re), NULL, F_AGGR); + /* we introduced extra selects */ + assert(is_project(rel->op) || is_select(rel->op)); rsq = rel_add_identity2(sql, rsq, &rid); rid = exp_ref(sql->sa, rid); diff --git a/sql/storage/store.c b/sql/storage/store.c --- a/sql/storage/store.c +++ b/sql/storage/store.c @@ -5131,24 +5131,15 @@ sys_drop_statistics(sql_trans *tr, sql_c } static int -sys_drop_column(sql_trans *tr, sql_column *col, int drop_action) -{ - str seq_pos = NULL; +sys_drop_default_object(sql_trans *tr, sql_column *col, int drop_action) +{ + char *seq_pos = NULL; const char *next_value_for = "next value for \"sys\".\"seq_"; sql_schema *syss = find_sql_schema(tr, isGlobal(col->t)?"sys":"tmp"); - sql_table *syscolumn = find_sql_table(syss, "_columns"); - oid rid = table_funcs.column_find_row(tr, find_sql_column(syscolumn, "id"), - &col->base.id, NULL); - - if (is_oid_nil(rid)) - return 0; - table_funcs.table_delete(tr, syscolumn, rid); - sql_trans_drop_dependencies(tr, col->base.id); - sql_trans_drop_any_comment(tr, col->base.id); - sql_trans_drop_obj_priv(tr, col->base.id); - + + /* Drop sequence for generated column if it's the case */ if (col->def && (seq_pos = strstr(col->def, next_value_for))) { - sql_sequence * seq = NULL; + sql_sequence *seq = NULL; char *seq_name = _STRDUP(seq_pos + (strlen(next_value_for) - strlen("seq_"))); node *n = NULL; @@ -5164,6 +5155,25 @@ sys_drop_column(sql_trans *tr, sql_colum } _DELETE(seq_name); } + return 0; +} + +static int +sys_drop_column(sql_trans *tr, sql_column *col, int drop_action) +{ + sql_schema *syss = find_sql_schema(tr, isGlobal(col->t)?"sys":"tmp"); + sql_table *syscolumn = find_sql_table(syss, "_columns"); + oid rid = table_funcs.column_find_row(tr, find_sql_column(syscolumn, "id"), + &col->base.id, NULL); + + if (is_oid_nil(rid)) +