MonetDB: Aug2024 - reduce error statement to just error code! Be...
Changeset: 7eb5a7a19c80 for MonetDB URL: https://dev.monetdb.org/hg/MonetDB/rev/7eb5a7a19c80 Modified Files: sql/test/subquery/Tests/subquery3.test Branch: Aug2024 Log Message: reduce error statement to just error code! Because bison changes the order a bit diffs (27 lines): diff --git a/sql/test/subquery/Tests/subquery3.test b/sql/test/subquery/Tests/subquery3.test --- a/sql/test/subquery/Tests/subquery3.test +++ b/sql/test/subquery/Tests/subquery3.test @@ -624,19 +624,19 @@ query I rowsort SELECT col1 FROM another_T WHERE (col2, col3) IN (SELECT 1,2) -statement error 42000!syntax error, unexpected sqlINT, expecting SELECT or '(' or VALUES or WITH in: "select (1,2) in (1" +statement error 42000! SELECT (1,2) IN (1,2) -statement error 42000!syntax error, unexpected sqlINT, expecting SELECT or '(' or VALUES or WITH in: "select (1,2) in (1" +statement error 42000! SELECT (1,2) IN (1) statement error 42000!Subquery has too few columns SELECT (col1, col2) IN (VALUES (1)) FROM another_T -statement error 42000!syntax error, unexpected sqlINT, expecting SELECT or '(' or VALUES or WITH in: "select (col1, col2) in (1" +statement error 42000! SELECT (col1, col2) IN (1) FROM another_T -statement error 42000!syntax error, unexpected sqlINT, expecting SELECT or '(' or VALUES or WITH in: "select col1 from another_t where (col2, col3) in (1" +statement error 42000! SELECT col1 FROM another_T WHERE (col2, col3) IN (1,2,3) statement error 42000!Subquery has too few columns ___ checkin-list mailing list -- checkin-list@monetdb.org To unsubscribe send an email to checkin-list-le...@monetdb.org
MonetDB: Aug2024 - backport or/and handling and added brackets f...
Changeset: 4800f138bea5 for MonetDB URL: https://dev.monetdb.org/hg/MonetDB/rev/4800f138bea5 Modified Files: sql/server/rel_dump.c Branch: Aug2024 Log Message: backport or/and handling and added brackets for nested infix operators in exp2sql. diffs (63 lines): diff --git a/sql/server/rel_dump.c b/sql/server/rel_dump.c --- a/sql/server/rel_dump.c +++ b/sql/server/rel_dump.c @@ -2521,6 +2521,11 @@ is_infix(sql_func *f) return true; if (f->base.name[0] == '|' && f->base.name[1] == '|') return true; + if (f->base.name[0] == 'o' && f->base.name[1] == 'r') + return true; + } else if (strlen(f->base.name) == 3) { + if (f->base.name[0] == 'a' && f->base.name[1] == 'n' && f->base.name[2] == 'd') + return true; } return false; } @@ -2550,21 +2555,25 @@ exp2sql_dquoted(stream *fout, const char /* only simple expressions, ie recursive no psm */ static void -exp2sql_print(mvc *sql, stream *fout, sql_exp *e) +exp2sql_print(mvc *sql, stream *fout, sql_exp *e, int depth) { switch (e->type) { case e_func: { sql_subfunc *sf = e->f; list *args = e->l; if (list_length(args) == 2 && is_infix(sf->func)) { - exp2sql_print(sql, fout, args->h->data); + if (depth) + mnstr_printf(fout, "( " ); + exp2sql_print(sql, fout, args->h->data, depth+1); mnstr_printf(fout, " %s ", sf->func->base.name); - exp2sql_print(sql, fout, args->h->next->data); + exp2sql_print(sql, fout, args->h->next->data, depth+1); + if (depth) + mnstr_printf(fout, " )" ); } else { exp2sql_dquoted(fout, NULL, sf->func->base.name, "("); if (args) for (node *n = args->h; n; n = n->next) { - exp2sql_print(sql, fout, n->data); + exp2sql_print(sql, fout, n->data, depth+1); if (n->next) mnstr_printf(fout, ", "); } @@ -2576,7 +2585,7 @@ exp2sql_print(mvc *sql, stream *fout, sq break; case e_convert: mnstr_printf(fout, "CAST (" ); - exp2sql_print(sql, fout, e->l); + exp2sql_print(sql, fout, e->l, depth+1); mnstr_printf(fout, "AS %s)", sql_subtype_string(sql->sa, exp_subtype(e))); break; case e_atom: @@ -2604,7 +2613,7 @@ exp2sql( mvc *sql, sql_exp *exp) if(s == NULL) goto cleanup; - exp2sql_print(sql, s, exp); + exp2sql_print(sql, s, exp, 0); res = buffer_get_buf(b); ___ checkin-list mailing list -- checkin-list@monetdb.org To unsubscribe send an email to checkin-list-le...@monetdb.org
MonetDB: default - merged with aug2024
Changeset: a207071d3ec8 for MonetDB URL: https://dev.monetdb.org/hg/MonetDB/rev/a207071d3ec8 Modified Files: sql/server/rel_dump.c Branch: default Log Message: merged with aug2024 diffs (78 lines): diff --git a/sql/server/rel_dump.c b/sql/server/rel_dump.c --- a/sql/server/rel_dump.c +++ b/sql/server/rel_dump.c @@ -2555,21 +2555,25 @@ exp2sql_dquoted(stream *fout, const char /* only simple expressions, ie recursive no psm */ static void -exp2sql_print(mvc *sql, stream *fout, sql_exp *e) +exp2sql_print(mvc *sql, stream *fout, sql_exp *e, int depth) { switch (e->type) { case e_func: { sql_subfunc *sf = e->f; list *args = e->l; if (list_length(args) == 2 && is_infix(sf->func)) { - exp2sql_print(sql, fout, args->h->data); + if (depth) + mnstr_printf(fout, "( " ); + exp2sql_print(sql, fout, args->h->data, depth+1); mnstr_printf(fout, " %s ", sf->func->base.name); - exp2sql_print(sql, fout, args->h->next->data); + exp2sql_print(sql, fout, args->h->next->data, depth+1); + if (depth) + mnstr_printf(fout, " )" ); } else { exp2sql_dquoted(fout, NULL, sf->func->base.name, "("); if (args) for (node *n = args->h; n; n = n->next) { - exp2sql_print(sql, fout, n->data); + exp2sql_print(sql, fout, n->data, depth+1); if (n->next) mnstr_printf(fout, ", "); } @@ -2581,7 +2585,7 @@ exp2sql_print(mvc *sql, stream *fout, sq break; case e_convert: mnstr_printf(fout, "CAST (" ); - exp2sql_print(sql, fout, e->l); + exp2sql_print(sql, fout, e->l, depth+1); mnstr_printf(fout, "AS %s)", sql_subtype_string(sql->sa, exp_subtype(e))); break; case e_atom: @@ -2609,7 +2613,7 @@ exp2sql( mvc *sql, sql_exp *exp) if(s == NULL) goto cleanup; - exp2sql_print(sql, s, exp); + exp2sql_print(sql, s, exp, 0); res = buffer_get_buf(b); diff --git a/sql/test/subquery/Tests/subquery3.test b/sql/test/subquery/Tests/subquery3.test --- a/sql/test/subquery/Tests/subquery3.test +++ b/sql/test/subquery/Tests/subquery3.test @@ -624,19 +624,19 @@ query I rowsort SELECT col1 FROM another_T WHERE (col2, col3) IN (SELECT 1,2) -statement error 42000!syntax error, unexpected sqlINT, expecting SELECT or '(' or VALUES or WITH in: "select (1,2) in (1" +statement error 42000! SELECT (1,2) IN (1,2) -statement error 42000!syntax error, unexpected sqlINT, expecting SELECT or '(' or VALUES or WITH in: "select (1,2) in (1" +statement error 42000! SELECT (1,2) IN (1) statement error 42000!Subquery has too few columns SELECT (col1, col2) IN (VALUES (1)) FROM another_T -statement error 42000!syntax error, unexpected sqlINT, expecting SELECT or '(' or VALUES or WITH in: "select (col1, col2) in (1" +statement error 42000! SELECT (col1, col2) IN (1) FROM another_T -statement error 42000!syntax error, unexpected sqlINT, expecting SELECT or '(' or VALUES or WITH in: "select col1 from another_t where (col2, col3) in (1" +statement error 42000! SELECT col1 FROM another_T WHERE (col2, col3) IN (1,2,3) statement error 42000!Subquery has too few columns ___ checkin-list mailing list -- checkin-list@monetdb.org To unsubscribe send an email to checkin-list-le...@monetdb.org
MonetDB: Aug2024 - add test for issue #7535
Changeset: e7db29291532 for MonetDB URL: https://dev.monetdb.org/hg/MonetDB/rev/e7db29291532 Added Files: sql/test/BugTracker-2024/Tests/7535-create-view-groupby-func.test Modified Files: sql/server/rel_select.c sql/test/BugTracker-2024/Tests/All Branch: Aug2024 Log Message: add test for issue #7535 fixed assert. diffs (32 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 @@ -1337,9 +1337,8 @@ bool group_by_pk_project_uk_cond(mvc* sq if (pki && pki->columns->cnt == 1 && inner->r && ((list*) inner->r)->cnt == 1) { /* for now only check simple case where primary key and group by expression is a single column*/ sql_exp* gbe = ((list*) inner->r)->h->data; - assert(gbe->type == e_column); sql_column* pkc = ((sql_kc *)pki->columns->h->data)->c; - if (strcmp(gbe->alias.name, pkc->base.name) == 0) { + if (gbe->type == e_column && strcmp(gbe->alias.name, pkc->base.name) == 0) { node *n; for (n = ukil->h; n; n = n->next){ sql_idx* uki = n->data; diff --git a/sql/test/BugTracker-2024/Tests/7535-create-view-groupby-func.test b/sql/test/BugTracker-2024/Tests/7535-create-view-groupby-func.test new file mode 100644 --- /dev/null +++ b/sql/test/BugTracker-2024/Tests/7535-create-view-groupby-func.test @@ -0,0 +1,5 @@ +statement ok +CREATE TABLE t0(c0 VARCHAR, c1 INTEGER, PRIMARY KEY(c0)) + +statement error 42000!SELECT: cannot use non GROUP BY column 't0.c0' in query results without an aggregate function +CREATE VIEW v0(c0) AS SELECT ('a'||t0.c0) FROM t0 GROUP BY (CASE t0.c1 WHEN t0.c1 THEN 'a' END ) diff --git a/sql/test/BugTracker-2024/Tests/All b/sql/test/BugTracker-2024/Tests/All --- a/sql/test/BugTracker-2024/Tests/All +++ b/sql/test/BugTracker-2024/Tests/All @@ -61,3 +61,4 @@ 7513-uri-authority-parse-issue 7514-wrong-window-function 7524-right-outer-join 7528-jarowinkler-null +7535-create-view-groupby-func ___ checkin-list mailing list -- checkin-list@monetdb.org To unsubscribe send an email to checkin-list-le...@monetdb.org
MonetDB: default - merged with aug2024
Changeset: d48164e0e4d4 for MonetDB URL: https://dev.monetdb.org/hg/MonetDB/rev/d48164e0e4d4 Modified Files: sql/server/rel_select.c Branch: default Log Message: merged with aug2024 diffs (32 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 @@ -1337,9 +1337,8 @@ bool group_by_pk_project_uk_cond(mvc* sq if (pki && pki->columns->cnt == 1 && inner->r && ((list*) inner->r)->cnt == 1) { /* for now only check simple case where primary key and group by expression is a single column*/ sql_exp* gbe = ((list*) inner->r)->h->data; - assert(gbe->type == e_column); sql_column* pkc = ((sql_kc *)pki->columns->h->data)->c; - if (strcmp(gbe->alias.name, pkc->base.name) == 0) { + if (gbe->type == e_column && strcmp(gbe->alias.name, pkc->base.name) == 0) { node *n; for (n = ukil->h; n; n = n->next){ sql_idx* uki = n->data; diff --git a/sql/test/BugTracker-2024/Tests/7535-create-view-groupby-func.test b/sql/test/BugTracker-2024/Tests/7535-create-view-groupby-func.test new file mode 100644 --- /dev/null +++ b/sql/test/BugTracker-2024/Tests/7535-create-view-groupby-func.test @@ -0,0 +1,5 @@ +statement ok +CREATE TABLE t0(c0 VARCHAR, c1 INTEGER, PRIMARY KEY(c0)) + +statement error 42000!SELECT: cannot use non GROUP BY column 't0.c0' in query results without an aggregate function +CREATE VIEW v0(c0) AS SELECT ('a'||t0.c0) FROM t0 GROUP BY (CASE t0.c1 WHEN t0.c1 THEN 'a' END ) diff --git a/sql/test/BugTracker-2024/Tests/All b/sql/test/BugTracker-2024/Tests/All --- a/sql/test/BugTracker-2024/Tests/All +++ b/sql/test/BugTracker-2024/Tests/All @@ -61,3 +61,4 @@ 7513-uri-authority-parse-issue 7514-wrong-window-function 7524-right-outer-join 7528-jarowinkler-null +7535-create-view-groupby-func ___ checkin-list mailing list -- checkin-list@monetdb.org To unsubscribe send an email to checkin-list-le...@monetdb.org
MonetDB: nilmask - merged with default
Changeset: 9fbf6dda9468 for MonetDB URL: https://dev.monetdb.org/hg/MonetDB/rev/9fbf6dda9468 Modified Files: clients/Tests/MAL-signatures-hge.test clients/Tests/MAL-signatures.test clients/Tests/exports.stable.out clients/odbc/tests/ODBCmetadata.c monetdb5/modules/atoms/CMakeLists.txt monetdb5/modules/mal/tablet.c sql/backends/monet5/rel_bin.c sql/backends/monet5/sql.c sql/backends/monet5/sql_statement.c sql/backends/monet5/sql_statement.h sql/storage/bat/bat_storage.c sql/storage/store.c Branch: nilmask Log Message: merged with default diffs (truncated from 18988 to 300 lines): diff --git a/.bumpversion.cfg b/.bumpversion.cfg --- a/.bumpversion.cfg +++ b/.bumpversion.cfg @@ -1,5 +1,5 @@ [bumpversion] -current_version = 11.50.0 +current_version = 11.52.0 commit = False tag = False diff --git a/.hgignore b/.hgignore --- a/.hgignore +++ b/.hgignore @@ -44,6 +44,7 @@ GPATH GRTAGS TAGS tags +cscope.* *.pyo *.rej *.orig diff --git a/.hgtags b/.hgtags --- a/.hgtags +++ b/.hgtags @@ -827,3 +827,4 @@ d656785f49ee62c19705722aa6b7c171904c64d5 d656785f49ee62c19705722aa6b7c171904c64d5 Dec2023_SP2_release 9a694c41042503a22d6c92aeab5bc4ca1912b62e Dec2023_9 9a694c41042503a22d6c92aeab5bc4ca1912b62e Dec2023_SP3_release +e1e9e22bf3d734dc50b56151c657a57c18f56561 Aug2024_root diff --git a/CMakeLists.txt b/CMakeLists.txt --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -118,8 +118,14 @@ if(WIN32) ${CMAKE_CURRENT_BINARY_DIR}/unistd.h) endif() -add_library(monetdb_config_header - INTERFACE) +add_library(monetdb_config_header INTERFACE) + +if (CTAGS_PATH) + add_dependencies(monetdb_config_header tags) +endif() +if (CSCOPE_PATH) + add_dependencies(monetdb_config_header cscope) +endif() target_include_directories(monetdb_config_header INTERFACE diff --git a/ChangeLog b/ChangeLog --- a/ChangeLog +++ b/ChangeLog @@ -1,14 +1,3 @@ # ChangeLog file for devel # This file is updated with Maddlog -* Wed May 8 2024 Sjoerd Mullender -- The shared library (.dll aka .so files) now have the version number - as part of the name. This should allow the building of compatibility - versions that can be installed in parallel to the latest version. -- Some of the Debian/Ubuntu packages have been renamed. The old monetdb5 - names have been changed to plain monetdb, and libmonetdb5-server-* - packages have been renamed monetdb-*. -- The names of some of the provided RPM files have been changed. - References to the old MonetDB5 name have been removed. All packages - are now just MonetDB. - diff --git a/ChangeLog b/ChangeLog.Aug2024 copy from ChangeLog copy to ChangeLog.Aug2024 diff --git a/MonetDB.spec b/MonetDB.spec --- a/MonetDB.spec +++ b/MonetDB.spec @@ -8,7 +8,7 @@ # Copyright August 2008 - 2023 MonetDB B.V.; # Copyright 1997 - July 2008 CWI. -%global version 11.50.0 +%global version 11.52.0 %bcond_with compat @@ -417,6 +417,7 @@ developer. %{_bindir}/arraytest %{_bindir}/bincopydata %{_bindir}/murltest +%{_bindir}/odbcconnect %{_bindir}/odbcsample1 %{_bindir}/sample0 %{_bindir}/sample1 @@ -914,62 +915,62 @@ sed -i 's/1\.2/1.1/' misc/selinux/monetd %cmake3_build %install -mkdir -p "%{buildroot}/usr" -for d in etc var; do mkdir "%{buildroot}/$d"; ln -s ../$d "%{buildroot}/usr/$d"; done +mkdir -p "${RPM_BUILD_ROOT}"/usr +for d in etc var; do mkdir "${RPM_BUILD_ROOT}"/$d; ln -s ../$d "${RPM_BUILD_ROOT}"/usr/$d; done %cmake3_install -rm "%{buildroot}/usr/var" "%{buildroot}/usr/etc" +rm "${RPM_BUILD_ROOT}"/usr/var "${RPM_BUILD_ROOT}"/usr/etc # move file to correct location -mkdir -p %{buildroot}%{_tmpfilesdir} %{buildroot}%{_sysusersdir} -mv %{buildroot}%{_sysconfdir}/tmpfiles.d/monetdbd.conf %{buildroot}%{_tmpfilesdir} -cat > %{buildroot}%{_sysusersdir}/monetdb.conf << EOF +mkdir -p "${RPM_BUILD_ROOT}"%{_tmpfilesdir} "${RPM_BUILD_ROOT}"%{_sysusersdir} +mv "${RPM_BUILD_ROOT}"%{_sysconfdir}/tmpfiles.d/monetdbd.conf "${RPM_BUILD_ROOT}"%{_tmpfilesdir} +cat > "${RPM_BUILD_ROOT}"%{_sysusersdir}/monetdb.conf << EOF u monetdb - "MonetDB Server" /var/lib/monetdb EOF -rmdir %{buildroot}%{_sysconfdir}/tmpfiles.d +rmdir "${RPM_BUILD_ROOT}"%{_sysconfdir}/tmpfiles.d -install -d -m 0750 %{buildroot}%{_localstatedir}/lib/monetdb -install -d -m 0770 %{buildroot}%{_localstatedir}/monetdb5/dbfarm -install -d -m 0775 %{buildroot}%{_localstatedir}/log/monetdb -install -d -m 0775 %{buildroot}%{_rundir}/monetdb +install -d -m 0750 "${RPM_BUILD_ROOT}"%{_localstatedir}/lib/monetdb +install -d -m 0770 "${RPM_BUILD_ROOT}"%{_localstatedir}/monetdb5/dbfarm +install -d -m 0775 "${RPM_BUILD_ROOT}"%{_localstatedir}/log/monetdb +install -d -m 0775 "${RPM_BUILD_ROOT}"%{_rundir}/monetdb # remove unwanted stuff -rm -f %{buildroot}%{_libdir}/monetdb5*/lib_opt_sql_append.so -rm -f %{buildroot}%{_libdir}/monetdb5*/lib_microbenchmark*.so -rm -f %{buildroot}%{_libdir}/monetdb5*/lib_udf*.so -rm -f %{buildroot}%{_bindir}/m