MonetDB: default - Approve output.
Changeset: 3824f6537ff9 for MonetDB URL: https://dev.monetdb.org/hg/MonetDB/rev/3824f6537ff9 Modified Files: sql/test/rel-optimizers/Tests/merge-ors-multi-col-eq-to-cmp_in.test Branch: default Log Message: Approve output. diffs (27 lines): diff --git a/sql/test/rel-optimizers/Tests/merge-ors-multi-col-eq-to-cmp_in.test b/sql/test/rel-optimizers/Tests/merge-ors-multi-col-eq-to-cmp_in.test --- a/sql/test/rel-optimizers/Tests/merge-ors-multi-col-eq-to-cmp_in.test +++ b/sql/test/rel-optimizers/Tests/merge-ors-multi-col-eq-to-cmp_in.test @@ -114,9 +114,9 @@ plan select * from b where (m = 40 and k project ( | select ( -| | table("sys"."b") [ "b"."n", "b"."m", "b"."k" UNIQUE ] -| ) [ (( [ "b"."m", "b"."k" UNIQUE ]) in ( [ int(8) "20", int(11) "200" ], [ int(8) "60", int(11) "600" ])) or (("b"."m") = (int(8) "40"), ("b"."k" UNIQUE) > (int(11) "0")) ] -) [ "b"."n", "b"."m", "b"."k" UNIQUE ] +| | table("sys"."b") [ "b"."n" NOT NULL, "b"."m" NOT NULL, "b"."k" NOT NULL ] +| ) [ (( [ "b"."m" NOT NULL, "b"."k" NOT NULL ]) in ( [ int(8) "20", int(11) "200" ], [ int(8) "60", int(11) "600" ])) or (("b"."m" NOT NULL) = (int(8) "40"), ("b"."k" NOT NULL) > (int(11) "0")) ] +) [ "b"."n" NOT NULL, "b"."m" NOT NULL, "b"."k" NOT NULL ] query II rowsort select m, k from b where (m = 40) or (m = 20 and k = 200) or (m = 0) or (m = 60 and k = 600) or (m = 180) @@ -148,7 +148,7 @@ plan select m, k from b where (m = 40) o project ( | select ( -| | table("sys"."b") [ "b"."m", "b"."k" UNIQUE ] -| ) [ (("b"."m") in (int(8) "40", int(8) "0", int(8) "180")) or (( [ "b"."m", "b"."k" UNIQUE ]) in ( [ int(8) "20", int(11) "200" ], [ int(8) "60", int(11) "600" ])) ] -) [ "b"."m", "b"."k" UNIQUE ] +| | table("sys"."b") [ "b"."m" NOT NULL, "b"."k" NOT NULL ] +| ) [ (("b"."m" NOT NULL) in (int(8) "40", int(8) "0", int(8) "180")) or (( [ "b"."m" NOT NULL, "b"."k" NOT NULL ]) in ( [ int(8) "20", int(11) "200" ], [ int(8) "60", int(11) "600" ])) ] +) [ "b"."m" NOT NULL, "b"."k" NOT NULL ] ___ checkin-list mailing list -- checkin-list@monetdb.org To unsubscribe send an email to checkin-list-le...@monetdb.org
MonetDB: default - Backed out changeset 901f41751361: somehow in...
Changeset: 937990369e60 for MonetDB URL: https://dev.monetdb.org/hg/MonetDB/rev/937990369e60 Modified Files: sql/test/rel-optimizers/Tests/groupby-cse.test sql/test/rel-optimizers/Tests/join-merge-remote-replica-plan.test sql/test/rel-optimizers/Tests/local-replica.test sql/test/rel-optimizers/Tests/merge-ors-multi-col-eq-to-cmp_in.test sql/test/rel-optimizers/Tests/merge-ors-single-col-eq-to-cmp_in.test sql/test/rel-optimizers/Tests/merge-unions.test sql/test/rel-optimizers/Tests/replicas-join-plan.test Branch: default Log Message: Backed out changeset 901f41751361: somehow incorrectly approved. diffs (truncated from 704 to 300 lines): diff --git a/sql/test/rel-optimizers/Tests/groupby-cse.test b/sql/test/rel-optimizers/Tests/groupby-cse.test --- a/sql/test/rel-optimizers/Tests/groupby-cse.test +++ b/sql/test/rel-optimizers/Tests/groupby-cse.test @@ -41,9 +41,9 @@ GROUP BY project ( | group by ( -| | table("sys"."foo") [ "foo"."c1", "foo"."c3" ] -| ) [ "foo"."c1" ] [ "foo"."c1", "sys"."count" no nil ("foo"."c3") NOT NULL as "%1"."%1" ] -) [ "foo"."c1" UNIQUE, "foo"."c1" UNIQUE, "%1"."%1" NOT NULL ] +| | table("sys"."foo") [ "foo"."c1" NOT NULL ] +| ) [ "foo"."c1" NOT NULL ] [ "foo"."c1" NOT NULL, "sys"."count"() NOT NULL as "%1"."%1" ] +) [ "foo"."c1" NOT NULL UNIQUE, "foo"."c1" NOT NULL UNIQUE, "%1"."%1" NOT NULL ] query III rowsort SELECT @@ -78,9 +78,9 @@ GROUP BY project ( | group by ( -| | table("sys"."foo") [ "foo"."c1", "foo"."c3" ] -| ) [ "foo"."c1" as "c1_alias1" ] [ "c1_alias1", "c1_alias1" as "c1_alias2", "sys"."count" no nil ("foo"."c3") NOT NULL as "%1"."%1" ] -) [ "c1_alias1" UNIQUE, "c1_alias2", "%1"."%1" NOT NULL ] +| | table("sys"."foo") [ "foo"."c1" NOT NULL ] +| ) [ "foo"."c1" NOT NULL as "c1_alias1" ] [ "c1_alias1" NOT NULL, "c1_alias1" NOT NULL as "c1_alias2", "sys"."count"() NOT NULL as "%1"."%1" ] +) [ "c1_alias1" NOT NULL UNIQUE, "c1_alias2" NOT NULL, "%1"."%1" NOT NULL ] query III rowsort gb-over-bt SELECT @@ -126,10 +126,10 @@ GROUP BY project ( | group by ( | | project ( -| | | table("sys"."foo") [ "foo"."c1", "foo"."c3" ] -| | ) [ "foo"."c1" as "%1"."a1", "foo"."c3" as "%1"."a3" ] -| ) [ "%1"."a1" ] [ "%1"."a1", "sys"."count" no nil ("%1"."a3") NOT NULL as "%2"."%2" ] -) [ "%1"."a1" UNIQUE, "%1"."a1" UNIQUE, "%2"."%2" NOT NULL ] +| | | table("sys"."foo") [ "foo"."c1" NOT NULL, "foo"."c3" NOT NULL ] +| | ) [ "foo"."c1" NOT NULL as "%1"."a1", "foo"."c3" NOT NULL as "%1"."a3" ] +| ) [ "%1"."a1" NOT NULL ] [ "%1"."a1" NOT NULL, "sys"."count" no nil ("%1"."a3" NOT NULL) NOT NULL as "%2"."%2" ] +) [ "%1"."a1" NOT NULL UNIQUE, "%1"."a1" NOT NULL UNIQUE, "%2"."%2" NOT NULL ] query III rowsort SELECT @@ -177,10 +177,10 @@ GROUP BY project ( | group by ( | | project ( -| | | table("sys"."foo") [ "foo"."c1", "foo"."c2" ] -| | ) [ "foo"."c1" as "sq"."c1_alias1", "sq"."c1_alias1" as "sq"."c1_alias2", "foo"."c2" as "sq"."c2" ] -| ) [ "sq"."c1_alias1", "sq"."c2" ] [ "sq"."c1_alias1", "sq"."c1_alias1" as "sq"."c1_alias2", "sq"."c2", "sys"."count" no nil ("sq"."c1_alias2") NOT NULL as "%1"."%1" ] -) [ "sq"."c1_alias1", "sq"."c1_alias2", "sq"."c2", "%1"."%1" NOT NULL ] +| | | table("sys"."foo") [ "foo"."c1" NOT NULL, "foo"."c2" NOT NULL ] +| | ) [ "foo"."c1" NOT NULL as "sq"."c1_alias1", "foo"."c2" NOT NULL as "sq"."c2" ] +| ) [ "sq"."c1_alias1" NOT NULL, "sq"."c2" NOT NULL ] [ "sq"."c1_alias1" NOT NULL, "sq"."c1_alias1" NOT NULL as "sq"."c1_alias2", "sq"."c2" NOT NULL, "sys"."count"() NOT NULL as "%1"."%1" ] +) [ "sq"."c1_alias1" NOT NULL, "sq"."c1_alias2" NOT NULL, "sq"."c2" NOT NULL, "%1"."%1" NOT NULL ] query III rowsort gb-over-pr SELECT @@ -233,10 +233,10 @@ GROUP BY project ( | group by ( | | project ( -| | | table("sys"."foo") [ "foo"."c1", "foo"."c2", "foo"."c3" ] -| | ) [ "foo"."c1" as "sq"."c1", "foo"."c2" as "sq"."c2", "foo"."c3" as "sq"."c3" ] -| ) [ "sq"."c1" as "c1_alias_1", "sq"."c2" ] [ "c1_alias_1", "c1_alias_1" as "c1_alias_2", "sys"."count" no nil ("sq"."c3") NOT NULL as "%1"."%1" ] -) [ "c1_alias_1", "c1_alias_2", "%1"."%1" NOT NULL ] +| | | table("sys"."foo") [ "foo"."c1" NOT NULL, "foo"."c2" NOT NULL ] +| | ) [ "foo"."c1" NOT NULL as "sq"."c1", "foo"."c2" NOT NULL as "sq"."c2" ] +| ) [ "sq"."c1" NOT NULL as "c1_alias_1", "sq"."c2" NOT NULL ] [ "c1_alias_1" NOT NULL, "c1_alias_1" NOT NULL as "c1_alias_2", "sys"."count"() NOT NULL as "%1"."%1" ] +) [ "c1_alias_1" NOT NULL, "c1_alias_2" NOT NULL, "%1"."%1" NOT NULL ] query III rowsort gb-over-pr SELECT @@ -291,10 +291,10 @@ GROUP BY project ( | group by ( | | project ( -| | | table("sys"."foo") [ "foo"."c1", "foo"."c2", "foo"."c3" ] -| | ) [ "foo"."c1" as "sq"."c1_in_alias_1", "foo"."c2" as "sq"."c2", "foo"."c3" as "sq"."c3" ] -| ) [ "sq"."c1_in_alias_1" as "c1_out_alias_1", "sq"."c2" ] [ "c1_out_alias_1", "c1_out_alias_1" as "c1_out_alias_2", "sys"."count" no nil ("sq"."c3") NOT NULL as "%1"."%1"
MonetDB: Aug2024 - Fix cleanup in very unlikely error.
Changeset: 23c0e02b47bb for MonetDB URL: https://dev.monetdb.org/hg/MonetDB/rev/23c0e02b47bb Modified Files: gdk/gdk_logger.c Branch: Aug2024 Log Message: Fix cleanup in very unlikely error. diffs (20 lines): diff --git a/gdk/gdk_logger.c b/gdk/gdk_logger.c --- a/gdk/gdk_logger.c +++ b/gdk/gdk_logger.c @@ -2429,6 +2429,8 @@ do_flush_range_cleanup(logger *lg) logged_range *frange = lg->flush_ranges; logged_range *first = frange; + if (frange == NULL) + return NULL; while (frange->next) { if (ATOMIC_GET(&frange->refcount) > 1) break; @@ -2532,6 +2534,7 @@ log_create(int debug, const char *fn, co }; lg->current = &dummy; if (log_open_output(lg) != GDK_SUCCEED) { + lg->current = NULL; log_destroy(lg); return NULL; } ___ checkin-list mailing list -- checkin-list@monetdb.org To unsubscribe send an email to checkin-list-le...@monetdb.org
MonetDB: default - Implemented Python version check in Mtest.
Changeset: 6b1ab89eaf67 for MonetDB URL: https://dev.monetdb.org/hg/MonetDB/rev/6b1ab89eaf67 Modified Files: sql/test/Tests/All testing/Mtest.py.in Branch: default Log Message: Implemented Python version check in Mtest. diffs (51 lines): diff --git a/sql/test/Tests/All b/sql/test/Tests/All --- a/sql/test/Tests/All +++ b/sql/test/Tests/All @@ -130,7 +130,7 @@ HAVE_LIBBZ2&!NOWAL?hot_snapshot_bz2 HAVE_LIBLZMA&!NOWAL?hot_snapshot_xz HAVE_PYTHON_LZ4&HAVE_LIBLZ4&!NOWAL?hot_snapshot_lz4 !HAVE_PYTHON_LZ4&HAVE_LIBLZ4&!NOWAL?hot_snapshot_lz4_lite -HAVE_PYTHON_LZ4&HAVE_LIBLZ4?hot_snapshot_huge_file +HAVE_PYTHON_LZ4&HAVE_LIBLZ4&PYTHON_VERSION>=3.7?hot_snapshot_huge_file # The following tests are some old tests moved from sql/test ## FOREIGN KEY reference to the same table diff --git a/testing/Mtest.py.in b/testing/Mtest.py.in --- a/testing/Mtest.py.in +++ b/testing/Mtest.py.in @@ -2116,6 +2116,35 @@ def RunTest(env, TST, COND, oktests, len elem = SkipTest(env, TST, EXT, reason, length) if reason is not None: break +elif cond.startswith('PYTHON_VERSION>='): +req_vers = cond[16:].split('.') +if not negate: +for i in range(3): +if i >= len(req_vers): +break +if int(sys.version_info[i]) > int(req_vers[i]): +break +if int(sys.version_info[i]) < int(req_vers[i]): +reason = "Python version too low" +elem = SkipTest(env, TST, EXT, reason, length) +break +else: +for i in range(3): +if i >= len(req_vers): +reason = "Python version too high" +elem = SkipTest(env, TST, EXT, reason, length) +break +if int(sys.version_info[i]) < int(req_vers[i]): +break +if int(sys.version_info[i]) > int(req_vers[i]): +reason = "Python version too high" +elem = SkipTest(env, TST, EXT, reason, length) +break +else: +reason = "Python version too high" +elem = SkipTest(env, TST, EXT, reason, length) +if reason is not None: +break elif cond.startswith('R_VERSION>='): rversion = os.path.join('@LIBR_INCLUDE_DIRS@', 'Rversion.h') if os.path.exists(rversion): ___ checkin-list mailing list -- checkin-list@monetdb.org To unsubscribe send an email to checkin-list-le...@monetdb.org
MonetDB: default - Approve updated plans (NOT NULL properties).
Changeset: 901f41751361 for MonetDB URL: https://dev.monetdb.org/hg/MonetDB/rev/901f41751361 Modified Files: sql/test/rel-optimizers/Tests/groupby-cse.test sql/test/rel-optimizers/Tests/join-merge-remote-replica-plan.test sql/test/rel-optimizers/Tests/local-replica.test sql/test/rel-optimizers/Tests/merge-ors-multi-col-eq-to-cmp_in.test sql/test/rel-optimizers/Tests/merge-ors-single-col-eq-to-cmp_in.test sql/test/rel-optimizers/Tests/merge-unions.test sql/test/rel-optimizers/Tests/replicas-join-plan.test Branch: default Log Message: Approve updated plans (NOT NULL properties). diffs (truncated from 704 to 300 lines): diff --git a/sql/test/rel-optimizers/Tests/groupby-cse.test b/sql/test/rel-optimizers/Tests/groupby-cse.test --- a/sql/test/rel-optimizers/Tests/groupby-cse.test +++ b/sql/test/rel-optimizers/Tests/groupby-cse.test @@ -41,9 +41,9 @@ GROUP BY project ( | group by ( -| | table("sys"."foo") [ "foo"."c1" NOT NULL ] -| ) [ "foo"."c1" NOT NULL ] [ "foo"."c1" NOT NULL, "sys"."count"() NOT NULL as "%1"."%1" ] -) [ "foo"."c1" NOT NULL UNIQUE, "foo"."c1" NOT NULL UNIQUE, "%1"."%1" NOT NULL ] +| | table("sys"."foo") [ "foo"."c1", "foo"."c3" ] +| ) [ "foo"."c1" ] [ "foo"."c1", "sys"."count" no nil ("foo"."c3") NOT NULL as "%1"."%1" ] +) [ "foo"."c1" UNIQUE, "foo"."c1" UNIQUE, "%1"."%1" NOT NULL ] query III rowsort SELECT @@ -78,9 +78,9 @@ GROUP BY project ( | group by ( -| | table("sys"."foo") [ "foo"."c1" NOT NULL ] -| ) [ "foo"."c1" NOT NULL as "c1_alias1" ] [ "c1_alias1" NOT NULL, "c1_alias1" NOT NULL as "c1_alias2", "sys"."count"() NOT NULL as "%1"."%1" ] -) [ "c1_alias1" NOT NULL UNIQUE, "c1_alias2" NOT NULL, "%1"."%1" NOT NULL ] +| | table("sys"."foo") [ "foo"."c1", "foo"."c3" ] +| ) [ "foo"."c1" as "c1_alias1" ] [ "c1_alias1", "c1_alias1" as "c1_alias2", "sys"."count" no nil ("foo"."c3") NOT NULL as "%1"."%1" ] +) [ "c1_alias1" UNIQUE, "c1_alias2", "%1"."%1" NOT NULL ] query III rowsort gb-over-bt SELECT @@ -126,10 +126,10 @@ GROUP BY project ( | group by ( | | project ( -| | | table("sys"."foo") [ "foo"."c1" NOT NULL, "foo"."c3" NOT NULL ] -| | ) [ "foo"."c1" NOT NULL as "%1"."a1", "foo"."c3" NOT NULL as "%1"."a3" ] -| ) [ "%1"."a1" NOT NULL ] [ "%1"."a1" NOT NULL, "sys"."count" no nil ("%1"."a3" NOT NULL) NOT NULL as "%2"."%2" ] -) [ "%1"."a1" NOT NULL UNIQUE, "%1"."a1" NOT NULL UNIQUE, "%2"."%2" NOT NULL ] +| | | table("sys"."foo") [ "foo"."c1", "foo"."c3" ] +| | ) [ "foo"."c1" as "%1"."a1", "foo"."c3" as "%1"."a3" ] +| ) [ "%1"."a1" ] [ "%1"."a1", "sys"."count" no nil ("%1"."a3") NOT NULL as "%2"."%2" ] +) [ "%1"."a1" UNIQUE, "%1"."a1" UNIQUE, "%2"."%2" NOT NULL ] query III rowsort SELECT @@ -177,10 +177,10 @@ GROUP BY project ( | group by ( | | project ( -| | | table("sys"."foo") [ "foo"."c1" NOT NULL, "foo"."c2" NOT NULL ] -| | ) [ "foo"."c1" NOT NULL as "sq"."c1_alias1", "foo"."c2" NOT NULL as "sq"."c2" ] -| ) [ "sq"."c1_alias1" NOT NULL, "sq"."c2" NOT NULL ] [ "sq"."c1_alias1" NOT NULL, "sq"."c1_alias1" NOT NULL as "sq"."c1_alias2", "sq"."c2" NOT NULL, "sys"."count"() NOT NULL as "%1"."%1" ] -) [ "sq"."c1_alias1" NOT NULL, "sq"."c1_alias2" NOT NULL, "sq"."c2" NOT NULL, "%1"."%1" NOT NULL ] +| | | table("sys"."foo") [ "foo"."c1", "foo"."c2" ] +| | ) [ "foo"."c1" as "sq"."c1_alias1", "sq"."c1_alias1" as "sq"."c1_alias2", "foo"."c2" as "sq"."c2" ] +| ) [ "sq"."c1_alias1", "sq"."c2" ] [ "sq"."c1_alias1", "sq"."c1_alias1" as "sq"."c1_alias2", "sq"."c2", "sys"."count" no nil ("sq"."c1_alias2") NOT NULL as "%1"."%1" ] +) [ "sq"."c1_alias1", "sq"."c1_alias2", "sq"."c2", "%1"."%1" NOT NULL ] query III rowsort gb-over-pr SELECT @@ -233,10 +233,10 @@ GROUP BY project ( | group by ( | | project ( -| | | table("sys"."foo") [ "foo"."c1" NOT NULL, "foo"."c2" NOT NULL ] -| | ) [ "foo"."c1" NOT NULL as "sq"."c1", "foo"."c2" NOT NULL as "sq"."c2" ] -| ) [ "sq"."c1" NOT NULL as "c1_alias_1", "sq"."c2" NOT NULL ] [ "c1_alias_1" NOT NULL, "c1_alias_1" NOT NULL as "c1_alias_2", "sys"."count"() NOT NULL as "%1"."%1" ] -) [ "c1_alias_1" NOT NULL, "c1_alias_2" NOT NULL, "%1"."%1" NOT NULL ] +| | | table("sys"."foo") [ "foo"."c1", "foo"."c2", "foo"."c3" ] +| | ) [ "foo"."c1" as "sq"."c1", "foo"."c2" as "sq"."c2", "foo"."c3" as "sq"."c3" ] +| ) [ "sq"."c1" as "c1_alias_1", "sq"."c2" ] [ "c1_alias_1", "c1_alias_1" as "c1_alias_2", "sys"."count" no nil ("sq"."c3") NOT NULL as "%1"."%1" ] +) [ "c1_alias_1", "c1_alias_2", "%1"."%1" NOT NULL ] query III rowsort gb-over-pr SELECT @@ -291,10 +291,10 @@ GROUP BY project ( | group by ( | | project ( -| | | table("sys"."foo") [ "foo"."c1" NOT NULL, "foo"."c2" NOT NULL ] -| | ) [ "foo"."c1" NOT NULL as "sq"."c1_in_alias_1", "foo"."c2" NOT NULL as "sq"."c2" ] -| ) [ "sq"."c1_in_alias_1" NOT NULL as "c1_out_alias_1", "sq"."c2" NOT NULL ] [ "c1_out_alias_1" NOT NULL, "c1_out_alias_1" NOT NULL as "c1_out_alias_2", "sys"."count"() NOT NULL as "%1"."%1" ]
MonetDB: default - Remove duplicate test (already in sql/test/Te...
Changeset: b3898269f775 for MonetDB URL: https://dev.monetdb.org/hg/MonetDB/rev/b3898269f775 Modified Files: sql/test/BugTracker-2023/Tests/orderby-debug-crash-7416.test sql/test/BugTracker/Tests/variables.SF-1508160.test Branch: default Log Message: Remove duplicate test (already in sql/test/Tests/session_vars.test). diffs (27 lines): diff --git a/sql/test/BugTracker-2023/Tests/orderby-debug-crash-7416.test b/sql/test/BugTracker-2023/Tests/orderby-debug-crash-7416.test --- a/sql/test/BugTracker-2023/Tests/orderby-debug-crash-7416.test +++ b/sql/test/BugTracker-2023/Tests/orderby-debug-crash-7416.test @@ -4,11 +4,6 @@ SELECT 0 , 827 ORDER BY 1 0 827 -query I nosort -SELECT debug - -0 - statement error 42000!SELECT: the order by column number (0) is not in the number of projections range (2) SELECT 0 , 827 ORDER BY 0 diff --git a/sql/test/BugTracker/Tests/variables.SF-1508160.test b/sql/test/BugTracker/Tests/variables.SF-1508160.test --- a/sql/test/BugTracker/Tests/variables.SF-1508160.test +++ b/sql/test/BugTracker/Tests/variables.SF-1508160.test @@ -1,8 +1,3 @@ -query I rowsort -select debug - -0 - statement error select @debug ___ checkin-list mailing list -- checkin-list@monetdb.org To unsubscribe send an email to checkin-list-le...@monetdb.org
MonetDB: default - Deal with NOWAL testing: sys.debug = 128 in t...
Changeset: 5f11ed0d4997 for MonetDB URL: https://dev.monetdb.org/hg/MonetDB/rev/5f11ed0d4997 Modified Files: sql/test/Tests/session_vars.test Branch: default Log Message: Deal with NOWAL testing: sys.debug = 128 in that case. diffs (19 lines): diff --git a/sql/test/Tests/session_vars.test b/sql/test/Tests/session_vars.test --- a/sql/test/Tests/session_vars.test +++ b/sql/test/Tests/session_vars.test @@ -1,5 +1,5 @@ query I rowsort -select debug +select debug & 127 0 @@ -46,7 +46,7 @@ statement error select test_boolean query I rowsort -select sys.debug +select sys.debug & 127 0 ___ checkin-list mailing list -- checkin-list@monetdb.org To unsubscribe send an email to checkin-list-le...@monetdb.org
MonetDB: default - Merge with Aug2024 branch.
Changeset: 3de392a1e09b for MonetDB URL: https://dev.monetdb.org/hg/MonetDB/rev/3de392a1e09b Branch: default Log Message: Merge with Aug2024 branch. diffs (66 lines): diff --git a/gdk/gdk_logger.c b/gdk/gdk_logger.c --- a/gdk/gdk_logger.c +++ b/gdk/gdk_logger.c @@ -1168,6 +1168,8 @@ log_open_output(logger *lg) return GDK_FAIL; } GDKfree(filename); + } else { + new_range->output_log = NULL; } ATOMIC_INIT(&new_range->refcount, 1); ATOMIC_INIT(&new_range->last_ts, 0); @@ -3530,7 +3532,8 @@ log_printinfo(logger *lg) lg->catalog_bid->batCount, lg->dcatalog->batCount); for (logged_range *p = lg->pending; p; p = p->next) { char buf[32]; - if (p->output_log == NULL || + if ((lg->debug & 128 || lg->inmemory) || + p->output_log == NULL || snprintf(buf, sizeof(buf), ", file size %"PRIu64, (uint64_t) getfilepos(getFile(lg->current->output_log))) >= (int) sizeof(buf)) buf[0] = 0; printf("pending range "ULLFMT": drops %"PRIu64", last_ts %"PRIu64", flushed_ts %"PRIu64", refcount %"PRIu64"%s%s\n", p->id, (uint64_t) ATOMIC_GET(&p->drops), (uint64_t) ATOMIC_GET(&p->last_ts), (uint64_t) ATOMIC_GET(&p->flushed_ts), (uint64_t) ATOMIC_GET(&p->refcount), buf, p == lg->current ? " (current)" : ""); diff --git a/sql/backends/monet5/sql_bincopyconvert.c b/sql/backends/monet5/sql_bincopyconvert.c --- a/sql/backends/monet5/sql_bincopyconvert.c +++ b/sql/backends/monet5/sql_bincopyconvert.c @@ -368,25 +368,25 @@ load_zero_terminated_text(BAT *bat, stre goto end; } if (tpe == TYPE_str) { - if (width > 0) { - int w = UTF8_strlen(start); - if (w > width) { - msg = createException(SQL, "sql.importColumn", "string too wide for column"); - goto end; - } + if (width > 0 && !strNil(start)) { + int w = UTF8_strlen(start); + if (w > width) { + msg = createException(SQL, "sql.importColumn", "string too wide for column"); + goto end; } - value = start; + } + value = start; } else { - ssize_t n = ATOMfromstr(tpe, &buffer, &buffer_len, start, false); - if (n <= 0) { - msg = createException(SQL, "sql.importColumn", GDK_EXCEPTION); - goto end; - } - value = buffer; + ssize_t n = ATOMfromstr(tpe, &buffer, &buffer_len, start, false); + if (n <= 0) { + msg = createException(SQL, "sql.importColumn", GDK_EXCEPTION); + goto end; + } + value = buffer; } if (BUNappend(bat, value, false) != GDK_SUCCEED) { - msg = createException(SQL, "sql.importColumn", GDK_EXCEPTION); - goto end; + msg = createException(SQL, "sql.importColumn", GDK_EXCEPTION); + goto end; } } bs->pos = start - buf_start; ___ checkin-list mailing list -- checkin-list@monetdb.org To unsubscribe send an email to checkin-list-le...@monetdb.org
MonetDB: Aug2024 - Initialize output_log field if WAL disabled; ...
Changeset: 99ab98dad82b for MonetDB URL: https://dev.monetdb.org/hg/MonetDB/rev/99ab98dad82b Modified Files: gdk/gdk_logger.c Branch: Aug2024 Log Message: Initialize output_log field if WAL disabled; better check in log_printinfo. diffs (22 lines): diff --git a/gdk/gdk_logger.c b/gdk/gdk_logger.c --- a/gdk/gdk_logger.c +++ b/gdk/gdk_logger.c @@ -1168,6 +1168,8 @@ log_open_output(logger *lg) return GDK_FAIL; } GDKfree(filename); + } else { + new_range->output_log = NULL; } ATOMIC_INIT(&new_range->refcount, 1); ATOMIC_INIT(&new_range->last_ts, 0); @@ -3530,7 +3532,8 @@ log_printinfo(logger *lg) lg->catalog_bid->batCount, lg->dcatalog->batCount); for (logged_range *p = lg->pending; p; p = p->next) { char buf[32]; - if (p->output_log == NULL || + if ((lg->debug & 128 || lg->inmemory) || + p->output_log == NULL || snprintf(buf, sizeof(buf), ", file size %"PRIu64, (uint64_t) getfilepos(getFile(lg->current->output_log))) >= (int) sizeof(buf)) buf[0] = 0; printf("pending range "ULLFMT": drops %"PRIu64", last_ts %"PRIu64", flushed_ts %"PRIu64", refcount %"PRIu64"%s%s\n", p->id, (uint64_t) ATOMIC_GET(&p->drops), (uint64_t) ATOMIC_GET(&p->last_ts), (uint64_t) ATOMIC_GET(&p->flushed_ts), (uint64_t) ATOMIC_GET(&p->refcount), buf, p == lg->current ? " (current)" : ""); ___ checkin-list mailing list -- checkin-list@monetdb.org To unsubscribe send an email to checkin-list-le...@monetdb.org
MonetDB: Aug2024 - Don't check width of nil: it fits always.
Changeset: 56d4b61c2a05 for MonetDB URL: https://dev.monetdb.org/hg/MonetDB/rev/56d4b61c2a05 Modified Files: sql/backends/monet5/sql_bincopyconvert.c Branch: Aug2024 Log Message: Don't check width of nil: it fits always. diffs (44 lines): diff --git a/sql/backends/monet5/sql_bincopyconvert.c b/sql/backends/monet5/sql_bincopyconvert.c --- a/sql/backends/monet5/sql_bincopyconvert.c +++ b/sql/backends/monet5/sql_bincopyconvert.c @@ -368,25 +368,25 @@ load_zero_terminated_text(BAT *bat, stre goto end; } if (tpe == TYPE_str) { - if (width > 0) { - int w = UTF8_strlen(start); - if (w > width) { - msg = createException(SQL, "sql.importColumn", "string too wide for column"); - goto end; - } + if (width > 0 && !strNil(start)) { + int w = UTF8_strlen(start); + if (w > width) { + msg = createException(SQL, "sql.importColumn", "string too wide for column"); + goto end; } - value = start; + } + value = start; } else { - ssize_t n = ATOMfromstr(tpe, &buffer, &buffer_len, start, false); - if (n <= 0) { - msg = createException(SQL, "sql.importColumn", GDK_EXCEPTION); - goto end; - } - value = buffer; + ssize_t n = ATOMfromstr(tpe, &buffer, &buffer_len, start, false); + if (n <= 0) { + msg = createException(SQL, "sql.importColumn", GDK_EXCEPTION); + goto end; + } + value = buffer; } if (BUNappend(bat, value, false) != GDK_SUCCEED) { - msg = createException(SQL, "sql.importColumn", GDK_EXCEPTION); - goto end; + msg = createException(SQL, "sql.importColumn", GDK_EXCEPTION); + goto end; } } bs->pos = start - buf_start; ___ checkin-list mailing list -- checkin-list@monetdb.org To unsubscribe send an email to checkin-list-le...@monetdb.org
MonetDB: default - Merge with Aug2024 branch.
Changeset: ec24bba60912 for MonetDB URL: https://dev.monetdb.org/hg/MonetDB/rev/ec24bba60912 Modified Files: sql/backends/monet5/sql.c sql/test/emptydb/Tests/check.stable.out.int128 Branch: default Log Message: Merge with Aug2024 branch. diffs (81 lines): diff --git a/clients/mapiclient/msqldump.1 b/clients/mapiclient/msqldump.1 --- a/clients/mapiclient/msqldump.1 +++ b/clients/mapiclient/msqldump.1 @@ -90,13 +90,15 @@ When dumping the table data, use INSERT COPY INTO + CSV values. INSERT INTO statements are more portable, and necessary when the load of the dump is processed by e.g. a JDBC application. +When the dump is to be used to feed back into MonetDB, COPY +INTO is preferred since that is processed more efficiently. .TP \fB\-\-noescape\fP (\fB\-e\fP) When dumping the table data, use the NO ESCAPE option on the COPY INTO query. .TP \fB\-\-functions\fP (\fB\-f\fP) -Only dump functions definitions. +Only dump function definitions. .TP \fB\-\-table=[\fIschema\fP\fB.\fP]\fItable\fP (\fB\-t\fP [\fIschema\fP\fB.\fP]\fItable\fP) Only dump the specified table. diff --git a/documentation/source/manual_pages/msqldump.rst b/documentation/source/manual_pages/msqldump.rst --- a/documentation/source/manual_pages/msqldump.rst +++ b/documentation/source/manual_pages/msqldump.rst @@ -64,14 +64,15 @@ OPTIONS When dumping the table data, use INSERT INTO statements, rather than COPY INTO + CSV values. INSERT INTO statements are more portable, and necessary when the load of the dump is processed by e.g. a JDBC - application. + application. When the dump is to be used to feed back into MonetDB, + COPY INTO is preferred since that is processed more efficiently. **--noescape** (**-e**) When dumping the table data, use the NO ESCAPE option on the COPY INTO query. **--functions** (**-f**) - Only dump functions definitions. + Only dump function definitions. **--table=**\ [\ *schema*\ **.**\ ]\ *table* (**-t** [\ *schema*\ **.**]\ *table*\ ) Only dump the specified table. If *schema* is not specified, the 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 @@ -5524,7 +5524,11 @@ SQLcheck(Client cntxt, MalBlkPtr mb, Mal int pos = 0; sql_rel *rel = rel_basetable(m, k->t, k->t->base.name); sql_exp *exp = exp_read(m, rel, NULL, NULL, sa_strdup(m->sa, k->check), &pos, 0); - if (!(*r = GDKstrdup(exp2sql(m, exp + if (exp->comment) + *r = GDKstrdup(exp->comment); + else + *r = GDKstrdup(exp2sql(m, exp)); + if (*r == NULL) throw(SQL, "SQLcheck", SQLSTATE(HY013) MAL_MALLOC_FAIL); return MAL_SUCCEED; } diff --git a/sql/test/testdb-upgrade-hge/Tests/dump.stable.out b/sql/test/testdb-upgrade-hge/Tests/dump.stable.out --- a/sql/test/testdb-upgrade-hge/Tests/dump.stable.out +++ b/sql/test/testdb-upgrade-hge/Tests/dump.stable.out @@ -101198,7 +101198,7 @@ CREATE TABLE "testschema"."nulls_not_dis CONSTRAINT "nulls_not_distinct_id_pkey" PRIMARY KEY ("id"), CONSTRAINT "nulls_not_distinct_unique1_unique" UNIQUE ("unique1"), CONSTRAINT "nulls_not_distinct_unique2_nndunique" UNIQUE NULLS NOT DISTINCT ("unique2"), - CONSTRAINT "nulls_not_distinct_check1_check" CHECK (check1 > 0) + CONSTRAINT "nulls_not_distinct_check1_check" CHECK ("check1" > 0) ); COPY 1 RECORDS INTO "testschema"."nulls_not_distinct" FROM stdin USING DELIMITERS E'\t',E'\n','"'; 1 1 1 1 diff --git a/sql/test/testdb-upgrade/Tests/dump.stable.out b/sql/test/testdb-upgrade/Tests/dump.stable.out --- a/sql/test/testdb-upgrade/Tests/dump.stable.out +++ b/sql/test/testdb-upgrade/Tests/dump.stable.out @@ -101198,7 +101198,7 @@ CREATE TABLE "testschema"."nulls_not_dis CONSTRAINT "nulls_not_distinct_id_pkey" PRIMARY KEY ("id"), CONSTRAINT "nulls_not_distinct_unique1_unique" UNIQUE ("unique1"), CONSTRAINT "nulls_not_distinct_unique2_nndunique" UNIQUE NULLS NOT DISTINCT ("unique2"), - CONSTRAINT "nulls_not_distinct_check1_check" CHECK (check1 > 0) + CONSTRAINT "nulls_not_distinct_check1_check" CHECK ("check1" > 0) ); COPY 1 RECORDS INTO "testschema"."nulls_not_distinct" FROM stdin USING DELIMITERS E'\t',E'\n','"'; 1 1 1 1 ___ checkin-list mailing list -- checkin-list@monetdb.org To unsubscribe send an email to checkin-list-le...@monetdb.org
MonetDB: Aug2024 - We need to be able to read old databases.
Changeset: 9dbd1e297384 for MonetDB URL: https://dev.monetdb.org/hg/MonetDB/rev/9dbd1e297384 Modified Files: sql/backends/monet5/sql.c sql/test/emptydb/Tests/check.stable.out.int128 sql/test/testdb-upgrade-hge/Tests/dump.stable.out sql/test/testdb-upgrade/Tests/dump.stable.out Branch: Aug2024 Log Message: We need to be able to read old databases. I.e. upgrade from an Aug2024 release database with an "old" CHECK constraint needs to be possible. diffs (truncated from 574 to 300 lines): diff --git a/sql/backends/monet5/sql.c b/sql/backends/monet5/sql.c --- a/sql/backends/monet5/sql.c +++ b/sql/backends/monet5/sql.c @@ -5501,9 +5501,12 @@ SQLcheck(Client cntxt, MalBlkPtr mb, Mal int pos = 0; sql_rel *rel = rel_basetable(m, k->t, k->t->base.name); sql_exp *exp = exp_read(m, rel, NULL, NULL, sa_strdup(m->sa, k->check), &pos, 0); - if (!(*r = GDKstrdup(exp->comment))) + if (exp->comment) + *r = GDKstrdup(exp->comment); + else + *r = GDKstrdup(exp2sql(m, exp)); + if (*r == NULL) throw(SQL, "SQLcheck", SQLSTATE(HY013) MAL_MALLOC_FAIL); - // *r = GDKstrdup(exp2sql(m, exp)); return MAL_SUCCEED; } } diff --git a/sql/test/emptydb/Tests/check.stable.out.int128 b/sql/test/emptydb/Tests/check.stable.out.int128 --- a/sql/test/emptydb/Tests/check.stable.out.int128 +++ b/sql/test/emptydb/Tests/check.stable.out.int128 @@ -6424,131 +6424,131 @@ select 'null in fkeys.delete_action', de % %10, delete_action_id, id, table_id, type, name, rkey, update_action_id, update_action, delete_action_id, delete_action # name % varchar, smallint, int,int,int,varchar,int, smallint, varchar,smallint, varchar # type % 0, 1, 1, 1, 1, 0, 1, 1, 0, 1, 0 # length -% .%1, sys._columns, sys._columns, sys._columns, sys._columns, sys._columns, sys._columns, sys._columns, sys._columns, sys._columns, sys._columns, sys._columns # table_name +% .%1, ._columns, ._columns, ._columns, ._columns, ._columns, ._columns, ._columns, ._columns, ._columns, ._columns, ._columns # table_name % %1, id, id, name, type, type_digits,type_scale, table_id, default,null, number, storage # name % varchar, int,int,varchar,varchar,int,int, int,varchar,boolean,int,varchar # type % 0, 1, 1, 0, 0, 1, 1, 1, 0, 5, 1, 0 # length -% .%1, sys._columns, sys._columns, sys._columns, sys._columns, sys._columns, sys._columns, sys._columns, sys._columns, sys._columns, sys._columns, sys._columns # table_name +% .%1, ._columns, ._columns, ._columns, ._columns, ._columns, ._columns, ._columns, ._columns, ._columns, ._columns, ._columns # table_name % %1, name, id, name, type, type_digits,type_scale, table_id, default,null, number, storage # name % varchar, varchar,int,varchar,varchar,int, int,int,varchar,boolean,int,varchar # type % 0, 0, 1, 0, 0, 1, 1, 1, 0, 5, 1, 0 # length -% .%1, sys._columns, sys._columns, sys._columns, sys._columns, sys._columns, sys._columns, sys._columns, sys._columns, sys._columns, sys._columns, sys._columns # table_name +% .%1, ._columns, ._columns, ._columns, ._columns, ._columns, ._columns, ._columns, ._columns, ._columns, ._columns, ._columns # table_name % %1, type, id, name, type, type_digits,type_scale, table_id, default,null, number, storage # name % varchar, varchar,int,varchar,varchar,int, int,int,varchar,boolean,int,varchar # type % 0, 0, 1, 0, 0, 1, 1, 1, 0, 5, 1, 0 # length -% .%1, sys._columns, sys._columns, sys._columns, sys._columns, sys._columns, sys._columns, sys._columns, sys._columns, sys._columns, sys._columns, sys._columns # table_name +% .%1, ._columns, ._columns, ._columns, ._columns, ._columns, ._columns, ._columns, ._columns, ._columns, ._columns, ._columns # table_name % %1, type_digits,id, name, type, type_digits,type_scale, table_id, default,null, number, storage
MonetDB: Aug2024 - Small clarification.
Changeset: ee78bb8310b5 for MonetDB URL: https://dev.monetdb.org/hg/MonetDB/rev/ee78bb8310b5 Modified Files: clients/mapiclient/msqldump.1 documentation/source/manual_pages/msqldump.rst Branch: Aug2024 Log Message: Small clarification. diffs (41 lines): diff --git a/clients/mapiclient/msqldump.1 b/clients/mapiclient/msqldump.1 --- a/clients/mapiclient/msqldump.1 +++ b/clients/mapiclient/msqldump.1 @@ -90,13 +90,15 @@ When dumping the table data, use INSERT COPY INTO + CSV values. INSERT INTO statements are more portable, and necessary when the load of the dump is processed by e.g. a JDBC application. +When the dump is to be used to feed back into MonetDB, COPY +INTO is preferred since that is processed more efficiently. .TP \fB\-\-noescape\fP (\fB\-e\fP) When dumping the table data, use the NO ESCAPE option on the COPY INTO query. .TP \fB\-\-functions\fP (\fB\-f\fP) -Only dump functions definitions. +Only dump function definitions. .TP \fB\-\-table=[\fIschema\fP\fB.\fP]\fItable\fP (\fB\-t\fP [\fIschema\fP\fB.\fP]\fItable\fP) Only dump the specified table. diff --git a/documentation/source/manual_pages/msqldump.rst b/documentation/source/manual_pages/msqldump.rst --- a/documentation/source/manual_pages/msqldump.rst +++ b/documentation/source/manual_pages/msqldump.rst @@ -64,14 +64,15 @@ OPTIONS When dumping the table data, use INSERT INTO statements, rather than COPY INTO + CSV values. INSERT INTO statements are more portable, and necessary when the load of the dump is processed by e.g. a JDBC - application. + application. When the dump is to be used to feed back into MonetDB, + COPY INTO is preferred since that is processed more efficiently. **--noescape** (**-e**) When dumping the table data, use the NO ESCAPE option on the COPY INTO query. **--functions** (**-f**) - Only dump functions definitions. + Only dump function definitions. **--table=**\ [\ *schema*\ **.**\ ]\ *table* (**-t** [\ *schema*\ **.**]\ *table*\ ) Only dump the specified table. If *schema* is not specified, the ___ checkin-list mailing list -- checkin-list@monetdb.org To unsubscribe send an email to checkin-list-le...@monetdb.org
MonetDB: default - Merge with Aug2024 branch.
Changeset: bc282972de56 for MonetDB URL: https://dev.monetdb.org/hg/MonetDB/rev/bc282972de56 Modified Files: sql/backends/monet5/sql.c sql/server/rel_dump.c sql/server/rel_schema.c sql/server/sql_parser.y Branch: default Log Message: Merge with Aug2024 branch. diffs (truncated from 442 to 300 lines): diff --git a/clients/mapiclient/mhelp.c b/clients/mapiclient/mhelp.c --- a/clients/mapiclient/mhelp.c +++ b/clients/mapiclient/mhelp.c @@ -61,9 +61,9 @@ SQLhelp sqlhelp1[] = { "See also https://www.monetdb.org/documentation/user-guide/sql-manual/data-definition/schema-definitions/"}, {"ALTER SEQUENCE", "", -"ALTER SEQUENCE qname [ AS seq_int_datatype] [ RESTART [WITH intval]] [INCREMENT BY intval]\n" -"[MINVALUE intval | NO MINVALUE] [MAXVALUE intval | NO MAXVALUE] [CACHE intval] [[NO] CYCLE]", -"seq_int_datatype,intval", +"ALTER SEQUENCE qname [AS seq_int_datatype] [RESTART [WITH {bigint|subquery}] ] [INCREMENT BY bigint]\n" +" [MINVALUE bigint | NO MINVALUE] [MAXVALUE bigint | NO MAXVALUE] [CACHE bigint] [[NO] CYCLE]", +"seq_int_datatype", "See also https://www.monetdb.org/documentation/user-guide/sql-manual/data-types/serial-types/"}, {"ALTER TABLE", "", @@ -226,9 +226,9 @@ SQLhelp sqlhelp1[] = { "See also https://www.monetdb.org/documentation/user-guide/sql-manual/data-definition/schema-definitions/"}, {"CREATE SEQUENCE", "Define a new integer number sequence generator", -"CREATE SEQUENCE qname [ AS seq_int_datatype] [ START [WITH intval]] [INCREMENT BY intval]\n" -"[MINVALUE intval | NO MINVALUE] [MAXVALUE intval | NO MAXVALUE] [CACHE intval] [[NO] CYCLE]", -"seq_int_datatype,intval", +"CREATE SEQUENCE qname [AS seq_int_datatype] [START WITH bigint] [INCREMENT BY bigint]\n" +" [MINVALUE bigint | NO MINVALUE] [MAXVALUE bigint | NO MAXVALUE] [CACHE bigint] [[NO] CYCLE]", +"seq_int_datatype", "See also https://www.monetdb.org/documentation/user-guide/sql-manual/data-types/serial-types/"}, {"CREATE TABLE", "Create a new table", @@ -622,9 +622,10 @@ SQLhelp sqlhelp2[] = { NULL}, {"column_constraint", NULL, -"[ CONSTRAINT ident ] { NOT NULL | NULL | UNIQUE | PRIMARY KEY | CHECK '(' search_condition ')' |\n" -"REFERENCES qname [ column_list ] [ match_options ] [ reference_action ] }\n", -"column_list,search_condition,match_options,reference_action", +"[ CONSTRAINT ident ] { NOT NULL | NULL | CHECK '(' search_condition ')' |\n" +"PRIMARY KEY | UNIQUE | UNIQUE NULLS [ NOT ] DISTINCT |\n" +"REFERENCES qname [ column_list ] [ match_option ] [ reference_actions ] }", +"column_list,search_condition,reference_actions,match_option", "See also https://www.monetdb.org/documentation/user-guide/sql-manual/data-definition/table-elements/"}, {"control_statement", NULL, @@ -675,8 +676,9 @@ SQLhelp sqlhelp2[] = { NULL}, {"generated_column", NULL, -"AUTO_INCREMENT | GENERATED { ALWAYS | BY DEFAULT } AS IDENTITY [ '(' [ AS seq_int_datatype] [ START [WITH start]]\n" -" [INCREMENT BY increment] [MINVALUE minvalue | NO MINVALUE] [MAXVALUE maxvalue | NO MAXVALUE] [CACHE cachevalue] [[NO] CYCLE] ')' ]", +"AUTO_INCREMENT | GENERATED { ALWAYS | BY DEFAULT } AS IDENTITY [ '('\n" +" [AS seq_int_datatype] [START WITH bigint] [INCREMENT BY bigint]\n" +" [MINVALUE bigint | NO MINVALUE] [MAXVALUE bigint | NO MAXVALUE] [CACHE bigint] [[NO] CYCLE] ')' ]", "seq_int_datatype", "See also https://www.monetdb.org/documentation/user-guide/sql-manual/data-types/serial-types/"}, {"global_privileges", @@ -733,11 +735,6 @@ SQLhelp sqlhelp2[] = { "INTERVAL { YEAR | MONTH | DAY | HOUR | MINUTE | SECOND [time_precision] | start_field TO end_field }", "time_precision,start_field,end_field", NULL}, - {"intval", -"Integer value", -NULL, -NULL, -NULL}, {"isolevel", NULL, "READ UNCOMMITTED | READ COMMITTED | REPEATABLE READ | SERIALIZABLE", @@ -748,9 +745,9 @@ SQLhelp sqlhelp2[] = { "C | CPP | R | PYTHON | PYTHON3", NULL, NULL}, - {"match_options", + {"match_option", NULL, -"MATCH { FULL | PARTIAL | SIMPLE }", +"MATCH [ FULL | PARTIAL | SIMPLE ]", NULL, NULL}, {"merge_list", @@ -868,9 +865,24 @@ SQLhelp sqlhelp2[] = { "ident [ '.' ident ['.' ident]]", NULL, NULL}, - {"reference_action", + {"ref_action", +NULL, +"RESTRICT | CASCADE | NO ACTION | SET NULL | SET DEFAULT", +NULL, +NULL}, + {"ref_on_delete", +NULL, +"ON DELETE ref_a
MonetDB: Aug2024 - Typo.
Changeset: d567ef75eb3f for MonetDB URL: https://dev.monetdb.org/hg/MonetDB/rev/d567ef75eb3f Modified Files: clients/mapiclient/msqldump.1 documentation/source/manual_pages/msqldump.rst Branch: Aug2024 Log Message: Typo. diffs (35 lines): diff --git a/clients/mapiclient/msqldump.1 b/clients/mapiclient/msqldump.1 --- a/clients/mapiclient/msqldump.1 +++ b/clients/mapiclient/msqldump.1 @@ -135,7 +135,7 @@ option are specified, the last one is us The .B \-\-outputdir option is not compatible with the -\B \-\-inserts +.B \-\-inserts option. .TP \fB\-\-compression=\fP\fIextension\fP (\fB\-x\fP \fIextension\fP) diff --git a/documentation/source/manual_pages/msqldump.rst b/documentation/source/manual_pages/msqldump.rst --- a/documentation/source/manual_pages/msqldump.rst +++ b/documentation/source/manual_pages/msqldump.rst @@ -48,7 +48,7 @@ OPTIONS **--host=**\ *hostname* (**-h** *hostname*) Specify the name of the host on which the server runs (default: - localhost). + **localhost**). **--port=**\ *portnr* (**-p** *portnr*) Specify the portnumber of the server (default: 5). @@ -91,8 +91,8 @@ OPTIONS **--compression** option is used, the CSV files will be compressed using the specified compression scheme. If both the **--outputdir** option and the **--output** option are specified, the last one is - used. The **--outputdir** option is not compatible with the --inserts - option. + used. The **--outputdir** option is not compatible with the + **--inserts** option. **--compression=**\ *extension* (**-x** *extension*\ ) Compress the CSV files produced with the **--outputdir** option using ___ checkin-list mailing list -- checkin-list@monetdb.org To unsubscribe send an email to checkin-list-le...@monetdb.org
MonetDB: default - Removed imprints on numeric columns.
rints; -(empty) -bat -imprints -command bat.imprints(X_0:bat[:sht]):void -CMDBATimprints; -(empty) -bat -imprintsize -command bat.imprintsize(X_0:bat[:bte]):lng -CMDBATimprintsize; -(empty) -bat -imprintsize -command bat.imprintsize(X_0:bat[:dbl]):lng -CMDBATimprintsize; -Return the storage size of the imprints index structure. -bat -imprintsize -command bat.imprintsize(X_0:bat[:flt]):lng -CMDBATimprintsize; -(empty) -bat -imprintsize -command bat.imprintsize(X_0:bat[:int]):lng -CMDBATimprintsize; -(empty) -bat -imprintsize -command bat.imprintsize(X_0:bat[:lng]):lng -CMDBATimprintsize; -(empty) -bat -imprintsize -command bat.imprintsize(X_0:bat[:sht]):lng -CMDBATimprintsize; -(empty) -bat info command bat.info(X_0:bat[:any_1]) (X_1:bat[:str], X_2:bat[:str]) BKCinfo; @@ -3444,11 +3384,6 @@ command bat.setHash(X_0:bat[:any_1]):bit BKCsetHash; Create a hash structure on the column bat -setImprints -command bat.setImprints(X_0:bat[:any_1]):bit -BKCsetImprints; -Create an imprints structure on the column -bat setName command bat.setName(X_0:bat[:any_1], X_1:str):void BKCsetName; 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 @@ -153,7 +153,6 @@ BUN BATguess_uniques(BAT *b, struct cand gdk_return BAThash(BAT *b); bool BAThasstrimps(BAT *b); void BAThseqbase(BAT *b, oid o); -gdk_return BATimprints(BAT *b); BAT *BATintersect(BAT *l, BAT *r, BAT *sl, BAT *sr, bool nil_matches, bool max_one, BUN estimate); BAT *BATintersectcand(BAT *a, BAT *b); gdk_return BATjoin(BAT **r1p, BAT **r2p, BAT *l, BAT *r, BAT *sl, BAT *sr, bool nil_matches, BUN estimate) __attribute__((__warn_unused_result__)); @@ -360,8 +359,6 @@ gdk_return HEAPextend(Heap *h, size_t si void HEAPincref(Heap *h); size_t HEAPmemsize(Heap *h); size_t HEAPvmsize(Heap *h); -void IMPSdestroy(BAT *b); -lng IMPSimprintsize(BAT *b); int MT_access(const char *pathname, int mode); gdk_return MT_alloc_tls(MT_TLS_t *newkey); int MT_check_nr_cores(void); diff --git a/gdk/CMakeLists.txt b/gdk/CMakeLists.txt --- a/gdk/CMakeLists.txt +++ b/gdk/CMakeLists.txt @@ -77,7 +77,6 @@ target_sources(bat gdk_private.h gdk_system_private.h gdk_group.c - gdk_imprints.c gdk_imprints.h gdk_join.c gdk_project.c gdk_time.c gdk_time.h diff --git a/gdk/ChangeLog b/gdk/ChangeLog --- a/gdk/ChangeLog +++ b/gdk/ChangeLog @@ -1,3 +1,8 @@ # ChangeLog file for GDK # This file is updated with Maddlog +* Fri Sep 13 2024 Sjoerd Mullender +- The implementation for the imprints index on numeric columns has + been removed. It hasn't been used in years, and when it is enabled, + it doesn't really make queries go faster. + diff --git a/gdk/gdk.h b/gdk/gdk.h --- a/gdk/gdk.h +++ b/gdk/gdk.h @@ -565,7 +565,6 @@ typedef struct { } Heap; typedef struct Hash Hash; -typedef struct Imprints Imprints; typedef struct Strimps Strimps; #ifdef HAVE_RTREE @@ -688,7 +687,6 @@ gdk_export bool VALisnil(const ValRecord * inttloc; // byte-offset in BUN for tail elements * Heap *theap; // heap for varsized tail values * Hash *thash; // linear chained hash table on tail - * Imprints *timprints; // column imprints index on tail * orderidx torderidx; // order oid index on tail * } BAT; * @end verbatim @@ -735,7 +733,6 @@ typedef struct { #ifdef HAVE_RTREE RTree *rtree; /* rtree geometric index */ #endif - Imprints *imprints; /* column imprints index */ Heap *orderidx; /* order oid index */ Strimps *strimps; /* string imprint index */ @@ -804,7 +801,6 @@ typedef struct BAT { MT_Lock theaplock; /* lock protecting heap reference changes */ MT_RWLock thashlock;/* lock specifically for hash management */ MT_Lock batIdxLock; /* lock to manipulate other indexes/properties */ - MT_Sema imprsema; /* semaphore to synchronize imprints creation */ Heap *oldtail; /* old tail heap, to be destroyed after commit */ } BAT; @@ -830,7 +826,6 @@ typedef struct BAT { #define tbaseoff T.baseoff #define tvheap T.vheap #define thash T.hash -#define timprints T.imprints #define tprops T.props #define tstrimps T.strimps #ifdef HAVE_RTREE @@ -1877,23 +1872,6 @@ bunfastapp_nocheckVAR(BAT *b, const void return rc; } -/* - * @- Column Imprints Functions - * - * @multitable @columnfractions 0.08 0.7 - * @item BAT* - * @tab - * BATimprints (BAT *b) - * @end multitable - * - * The column imprints index structure. - * - */ - -gdk_export gdk_return BATimprints(BAT *b); -gdk_export void IMPSdestroy(BAT *b); -gdk_export lng IMPSimprintsize(BAT *b); - /* Strimps exported functions */ ___ checkin-list mailing list -- checkin-list@monetdb.org
MonetDB: default - Fix BATcheckimprints.
Changeset: 1b543c91e286 for MonetDB URL: https://dev.monetdb.org/hg/MonetDB/rev/1b543c91e286 Modified Files: gdk/gdk_imprints.c Branch: default Log Message: Fix BATcheckimprints. diffs (30 lines): diff --git a/gdk/gdk_imprints.c b/gdk/gdk_imprints.c --- a/gdk/gdk_imprints.c +++ b/gdk/gdk_imprints.c @@ -305,7 +305,7 @@ BATcheckimprints(BAT *b) if (VIEWtparent(b)) { assert(b->timprints == NULL); - b = BATdescriptor(VIEWtparent(b)); + b = BBP_desc(VIEWtparent(b)); if (b == NULL) { return false; } @@ -364,8 +364,6 @@ BATcheckimprints(BAT *b) b->timprints = imprints; TRC_DEBUG(ACCELERATOR, ALGOBATFMT " reusing persisted imprints\n", ALGOBATPAR(b)); MT_lock_unset(&b->batIdxLock); - if (bi.b != b) - BBPunfix(b->batCacheid); bat_iterator_end(&bi); return true; } @@ -379,8 +377,6 @@ BATcheckimprints(BAT *b) GDKclrerr();/* we're not currently interested in errors */ } MT_lock_unset(&b->batIdxLock); - if (bi.b != b) - BBPunfix(b->batCacheid); bat_iterator_end(&bi); ret = b->timprints != NULL; if( ret) ___ checkin-list mailing list -- checkin-list@monetdb.org To unsubscribe send an email to checkin-list-le...@monetdb.org
MonetDB: default - Approve output now that imprints have again b...
Changeset: 99f781b19c21 for MonetDB URL: https://dev.monetdb.org/hg/MonetDB/rev/99f781b19c21 Modified Files: sql/test/BugTracker-2016/Tests/storagemodel.test Branch: default Log Message: Approve output now that imprints have again been disabled. diffs (12 lines): diff --git a/sql/test/BugTracker-2016/Tests/storagemodel.test b/sql/test/BugTracker-2016/Tests/storagemodel.test --- a/sql/test/BugTracker-2016/Tests/storagemodel.test +++ b/sql/test/BugTracker-2016/Tests/storagemodel.test @@ -173,7 +173,7 @@ smallint writable 2 0 -1 +0 statement ok call sys.storagemodelinit() ___ checkin-list mailing list -- checkin-list@monetdb.org To unsubscribe send an email to checkin-list-le...@monetdb.org
MonetDB: default - Delay initializing bat iterator so that we do...
Changeset: 364d7e0a5972 for MonetDB URL: https://dev.monetdb.org/hg/MonetDB/rev/364d7e0a5972 Modified Files: gdk/gdk_imprints.c Branch: default Log Message: Delay initializing bat iterator so that we do it on the right bat. diffs (22 lines): diff --git a/gdk/gdk_imprints.c b/gdk/gdk_imprints.c --- a/gdk/gdk_imprints.c +++ b/gdk/gdk_imprints.c @@ -302,17 +302,16 @@ bool BATcheckimprints(BAT *b) { bool ret; - BATiter bi = bat_iterator(b); if (VIEWtparent(b)) { assert(b->timprints == NULL); b = BATdescriptor(VIEWtparent(b)); if (b == NULL) { - bat_iterator_end(&bi); return false; } } + BATiter bi = bat_iterator(b); MT_lock_set(&b->batIdxLock); if (b->timprints == (Imprints *) 1) { Imprints *imprints; ___ checkin-list mailing list -- checkin-list@monetdb.org To unsubscribe send an email to checkin-list-le...@monetdb.org
MonetDB: default - Disable imprints. Creating them is far too e...
Changeset: d7c48815954a for MonetDB URL: https://dev.monetdb.org/hg/MonetDB/rev/d7c48815954a Modified Files: gdk/gdk_select.c Branch: default Log Message: Disable imprints. Creating them is far too expensive. diffs (19 lines): diff --git a/gdk/gdk_select.c b/gdk/gdk_select.c --- a/gdk/gdk_select.c +++ b/gdk/gdk_select.c @@ -2335,6 +2335,7 @@ BATselect(BAT *b, BAT *s, const void *tl */ Imprints *imprints = NULL; if (!equi && + /* DISABLES CODE */ (0) && imprintable(bi.type) && (!bi.transient || (pb != NULL && !pbi.transient)) && @@ -2699,6 +2700,7 @@ rangejoin(BAT *r1, BAT *r2, BAT *l, BAT cnt = BATcount(r1); assert(r2 == NULL || BATcount(r1) == BATcount(r2)); } else if (!anti && !symmetric && + /* DISABLES CODE */ (0) && imprintable(li.type) && (BATcount(rl) > 2 || !li.transient || ___ checkin-list mailing list -- checkin-list@monetdb.org To unsubscribe send an email to checkin-list-le...@monetdb.org
MonetDB: Aug2024 - Update single-threaded output.
Changeset: 46052c18de46 for MonetDB URL: https://dev.monetdb.org/hg/MonetDB/rev/46052c18de46 Modified Files: sql/test/miscellaneous/Tests/groupby_error.test Branch: Aug2024 Log Message: Update single-threaded output. diffs (14 lines): diff --git a/sql/test/miscellaneous/Tests/groupby_error.test b/sql/test/miscellaneous/Tests/groupby_error.test --- a/sql/test/miscellaneous/Tests/groupby_error.test +++ b/sql/test/miscellaneous/Tests/groupby_error.test @@ -114,8 +114,8 @@ query T nosort PLAN SELECT DISTINCT col0, col1, col2, col0 FROM tab0 group by ( -| table("sys"."tab0") [ "tab0"."col0", "tab0"."col1", "tab0"."col2" ] -) [ "tab0"."col2", "tab0"."col0", "tab0"."col1" ] [ "tab0"."col0", "tab0"."col1", "tab0"."col2", "tab0"."col0" ] +| table("sys"."tab0") [ "tab0"."col0" NOT NULL, "tab0"."col1" NOT NULL, "tab0"."col2" NOT NULL ] +) [ "tab0"."col2" NOT NULL, "tab0"."col0" NOT NULL, "tab0"."col1" NOT NULL ] [ "tab0"."col0" NOT NULL, "tab0"."col1" NOT NULL, "tab0"."col2" NOT NULL, "tab0"."col0" NOT NULL ] query rowsort SELECT DISTINCT col0, col1, col2, col0 FROM tab0 ___ checkin-list mailing list -- checkin-list@monetdb.org To unsubscribe send an email to checkin-list-le...@monetdb.org
MonetDB: Aug2024 - Typo.
Changeset: 6d9aefb21f3f for MonetDB URL: https://dev.monetdb.org/hg/MonetDB/rev/6d9aefb21f3f Modified Files: monetdb5/mal/mal.h Branch: Aug2024 Log Message: Typo. diffs (12 lines): diff --git a/monetdb5/mal/mal.h b/monetdb5/mal/mal.h --- a/monetdb5/mal/mal.h +++ b/monetdb5/mal/mal.h @@ -216,7 +216,7 @@ typedef struct MALSTK { * for use in profiling instructions. */ struct timeval clock; /* time this stack was created */ - char status;/* srunning 'R' suspended 'S', quitting 'Q' */ + char status;/* running 'R' suspended 'S', quitting 'Q' */ int pcup; /* saved pc upon a recursive all */ oid tag;/* unique invocation call tag */ lng memory; /* Actual memory claims for highwater mark */ ___ checkin-list mailing list -- checkin-list@monetdb.org To unsubscribe send an email to checkin-list-le...@monetdb.org
MonetDB: default - Merge with Aug2024 branch.
Changeset: 577b502bb38a for MonetDB URL: https://dev.monetdb.org/hg/MonetDB/rev/577b502bb38a Modified Files: gdk/gdk_bat.c gdk/gdk_select.c monetdb5/modules/kernel/algebra.c sql/test/2024/Tests/nextafter.test sql/test/BugTracker-2019/Tests/duplicates-not-eliminated-long-CASE-stmt.Bug-6697.test sql/test/miscellaneous/Tests/simple_plans.test sql/test/rel-optimizers/Tests/merge-ors-base.test sql/test/rel-optimizers/Tests/merge-ors-multi-col-eq-to-cmp_in.test sql/test/rel-optimizers/Tests/merge-ors-single-col-eq-to-cmp_in.test sql/test/rel-optimizers/Tests/merge-unions.test testing/Mtest.py.in Branch: default Log Message: Merge with Aug2024 branch. diffs (truncated from 3372 to 300 lines): diff --git a/gdk/gdk_bat.c b/gdk/gdk_bat.c --- a/gdk/gdk_bat.c +++ b/gdk/gdk_bat.c @@ -1203,6 +1203,9 @@ BUNappendmulti(BAT *b, const void *value maxvalp = t; } } + } else { + b->tnil = true; + b->tnonil = false; } p++; } @@ -1222,6 +1225,8 @@ BUNappendmulti(BAT *b, const void *value } else if (ATOMstorage(b->ttype) == TYPE_msk) { bi.minpos = bi.maxpos = BUN_NONE; minvalp = maxvalp = NULL; + b->tnil = false; + b->tnonil = true; for (BUN i = 0; i < count; i++) { t = (void *) ((char *) values + (i << b->tshift)); mskSetVal(b, p, *(msk *) t); @@ -1258,12 +1263,16 @@ BUNappendmulti(BAT *b, const void *value maxvalp = t; } } + } else { + b->tnil = true; + b->tnonil = false; } p++; } nunique = b->thash ? b->thash->nunique : 0; } } else { + /* inserting nils, unless it's msk */ for (BUN i = 0; i < count; i++) { gdk_return rc = tfastins_nocheck(b, p, t); if (rc != GDK_SUCCEED) { @@ -1276,6 +1285,8 @@ BUNappendmulti(BAT *b, const void *value p++; } nunique = b->thash ? b->thash->nunique : 0; + b->tnil = b->ttype != TYPE_msk; + b->tnonil = false; } MT_lock_set(&b->theaplock); b->tminpos = bi.minpos; @@ -1286,8 +1297,6 @@ BUNappendmulti(BAT *b, const void *value if (b->ttype == TYPE_oid) { /* spend extra effort on oid (possible candidate list) */ if (values == NULL || is_oid_nil(((oid *) values)[0])) { - b->tnil = true; - b->tnonil = false; b->tsorted = false; b->trevsorted = false; b->tkey = false; @@ -1298,8 +1307,6 @@ BUNappendmulti(BAT *b, const void *value b->trevsorted = true; b->tkey = true; b->tseqbase = count == 1 ? ((oid *) values)[0] : oid_nil; - b->tnil = false; - b->tnonil = true; } else { if (!is_oid_nil(b->tseqbase) && (count > 1 || @@ -1328,8 +1335,6 @@ BUNappendmulti(BAT *b, const void *value } for (BUN i = 1; i < count; i++) { if (is_oid_nil(((oid *) values)[i])) { - b->tnil = true; - b->tnonil = false; b->tsorted = false; b->trevsorted = false; b->tkey = false; @@ -1360,18 +1365,14 @@ BUNappendmulti(BAT *b, const void *value } } } else if (!ATOMlinear(b->ttype)) { - b->tnil = b->tnonil = false; b->tsorted = b->trevsorted = b->tkey = false; } else if (b->batCount == 0) { if (values == NULL) { b->tsorted = b->trevsorted = true; b->tkey = count == 1; - b->tnil = true; - b->tnonil = fal
MonetDB: Aug2024 - Better maintain tnil/tnonil properties when a...
Changeset: 23052201fcbe for MonetDB URL: https://dev.monetdb.org/hg/MonetDB/rev/23052201fcbe Modified Files: gdk/gdk_bat.c monetdb5/mal/Tests/dataflow01.maltest monetdb5/mal/Tests/tst901a.maltest monetdb5/modules/mal/Tests/bigsum.maltest monetdb5/modules/mal/Tests/imprints.maltest monetdb5/modules/mal/Tests/manifold.maltest monetdb5/modules/mal/Tests/manifoldstr.maltest sql/test/BugTracker-2009/Tests/use_order_column_first.SF-2686008.test sql/test/BugTracker-2010/Tests/LIMIT_OFFSET_big-endian.Bug-2622.test sql/test/BugTracker-2011/Tests/crash_on_alias.Bug-2798.test sql/test/BugTracker-2015/Tests/large_join.Bug-3809.test sql/test/BugTracker-2016/Tests/merge_project.Bug-3955.test sql/test/BugTracker-2018/Tests/count_from_commented_function_signatures.Bug-6542.test sql/test/BugTracker-2021/Tests/plan-not-optimal-view.Bug-7140.test sql/test/BugTracker-2023/Tests/join-on-row_number-over-7403.test sql/test/BugTracker/Tests/explain.SF-1739353.test sql/test/FeatureRequests/Tests/foreign_key_outer_join_dead_code_elimination-plan-1join-query.test sql/test/FeatureRequests/Tests/foreign_key_outer_join_dead_code_elimination-plan-1join-view.test sql/test/FeatureRequests/Tests/foreign_key_outer_join_dead_code_elimination-plan-2join-query.test sql/test/FeatureRequests/Tests/foreign_key_outer_join_dead_code_elimination-plan-2join-view.test sql/test/FeatureRequests/Tests/foreign_key_outer_join_dead_code_elimination-plan-3join-query.test sql/test/Tests/keys.test sql/test/merge-partitions/Tests/mergepart31.test sql/test/miscellaneous/Tests/groupby_error.test sql/test/miscellaneous/Tests/groupby_expressions.test sql/test/miscellaneous/Tests/simple_plans.test sql/test/miscellaneous/Tests/unique_keys.test sql/test/out2in/Tests/out2in.test sql/test/rel-optimizers/Tests/groupby-cse.test sql/test/rel-optimizers/Tests/join-merge-remote-replica-plan.test sql/test/rel-optimizers/Tests/local-replica.test sql/test/rel-optimizers/Tests/merge-unions.test sql/test/rel-optimizers/Tests/replicas-join-plan.test sql/test/sysmon/timeout/Tests/timeout_aggr.maltest sql/test/sysmon/timeout/Tests/timeout_join.maltest Branch: Aug2024 Log Message: Better maintain tnil/tnonil properties when appending data. diffs (truncated from 2721 to 300 lines): diff --git a/gdk/gdk_bat.c b/gdk/gdk_bat.c --- a/gdk/gdk_bat.c +++ b/gdk/gdk_bat.c @@ -1200,6 +1200,9 @@ BUNappendmulti(BAT *b, const void *value maxvalp = t; } } + } else { + b->tnil = true; + b->tnonil = false; } p++; } @@ -1219,6 +1222,8 @@ BUNappendmulti(BAT *b, const void *value } else if (ATOMstorage(b->ttype) == TYPE_msk) { bi.minpos = bi.maxpos = BUN_NONE; minvalp = maxvalp = NULL; + b->tnil = false; + b->tnonil = true; for (BUN i = 0; i < count; i++) { t = (void *) ((char *) values + (i << b->tshift)); mskSetVal(b, p, *(msk *) t); @@ -1255,12 +1260,16 @@ BUNappendmulti(BAT *b, const void *value maxvalp = t; } } + } else { + b->tnil = true; + b->tnonil = false; } p++; } nunique = b->thash ? b->thash->nunique : 0; } } else { + /* inserting nils, unless it's msk */ for (BUN i = 0; i < count; i++) { gdk_return rc = tfastins_nocheck(b, p, t); if (rc != GDK_SUCCEED) { @@ -1273,6 +1282,8 @@ BUNappendmulti(BAT *b, const void *value p++; } nunique = b->thash ? b->thash->nunique : 0; + b->tnil = b->ttype != TYPE_msk; + b->tnonil = false; } MT_lock_set(&b->theaplock); b->tminpos = bi.minpos; @@ -1283,8 +1294,6 @@ BUNappendmulti(BAT *b, const void *value if (b->ttype == TYPE_oid) { /* spend extra effort on oid (possible candidate list) */ if (values == NULL || is_oid_nil(((oid *) values)[0])) { -
MonetDB: Aug2024 - Use binary search instead of hash on sorted b...
Changeset: 237093560788 for MonetDB URL: https://dev.monetdb.org/hg/MonetDB/rev/237093560788 Modified Files: gdk/gdk_select.c Branch: Aug2024 Log Message: Use binary search instead of hash on sorted bat with available hash table. It turns out, even with large bats, binary search is faster than using a hash, even if the hash chain has length 1. diffs (30 lines): diff --git a/gdk/gdk_select.c b/gdk/gdk_select.c --- a/gdk/gdk_select.c +++ b/gdk/gdk_select.c @@ -1873,11 +1873,12 @@ BATselect(BAT *b, BAT *s, const void *tl else pb = NULL; pbi = bat_iterator(pb); - /* use hash only for equi-join, and then only if b or its -* parent already has a hash, or if b or its parent is -* persistent and the total size wouldn't be too large; check -* for existence of hash last since that may involve I/O */ - if (equi || antiequi) { + /* use hash only for equi-join if the bat is not sorted, but +* only if b or its parent already has a hash, or if b or its +* parent is persistent and the total size wouldn't be too +* large; check for existence of hash last since that may +* involve I/O */ + if ((equi || antiequi) && !bi.sorted && !bi.revsorted) { double cost = joincost(b, 1, &ci, &havehash, &phash, NULL); if (cost > 0 && cost < ci.ncand) { wanthash = true; @@ -1980,7 +1981,7 @@ BATselect(BAT *b, BAT *s, const void *tl } } - if (!havehash && (bi.sorted || bi.revsorted || oidxh != NULL)) { + if (bi.sorted || bi.revsorted || (!havehash && oidxh != NULL)) { BUN low = 0; BUN high = bi.count; ___ checkin-list mailing list -- checkin-list@monetdb.org To unsubscribe send an email to checkin-list-le...@monetdb.org
MonetDB: Aug2024 - Not all errors are malloc errors.
Changeset: 86a34c6a2e80 for MonetDB URL: https://dev.monetdb.org/hg/MonetDB/rev/86a34c6a2e80 Modified Files: monetdb5/modules/kernel/algebra.c Branch: Aug2024 Log Message: Not all errors are malloc errors. diffs (12 lines): 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 @@ -1003,7 +1003,7 @@ ALGfirstn(Client cntxt, MalBlkPtr mb, Ma BBPreclaim(s); BBPreclaim(g); if (rc != GDK_SUCCEED) - throw(MAL, "algebra.firstn", SQLSTATE(HY013) MAL_MALLOC_FAIL); + throw(MAL, "algebra.firstn", GDK_EXCEPTION); *ret1 = bn->batCacheid; BBPkeepref(bn); if (ret2) { ___ checkin-list mailing list -- checkin-list@monetdb.org To unsubscribe send an email to checkin-list-le...@monetdb.org
MonetDB: Aug2024 - For sorted bats we can easily find how it ove...
Changeset: f142a60fef9d for MonetDB URL: https://dev.monetdb.org/hg/MonetDB/rev/f142a60fef9d Modified Files: gdk/gdk_select.c Branch: Aug2024 Log Message: For sorted bats we can easily find how it overlaps with a search range. diffs (27 lines): diff --git a/gdk/gdk_select.c b/gdk/gdk_select.c --- a/gdk/gdk_select.c +++ b/gdk/gdk_select.c @@ -1379,11 +1379,21 @@ BATrange(BATiter *bi, const void *tl, co /* keep locked while we look at the property values */ MT_lock_set(&bi->b->theaplock); - if (bi->minpos != BUN_NONE) + if (bi->sorted && (bi->nonil || atomcmp(BUNtail(*bi, 0), ATOMnilptr(bi->type)) != 0)) + minval = BUNtail(*bi, 0); + else if (bi->revsorted && (bi->nonil || atomcmp(BUNtail(*bi, bi->count - 1), ATOMnilptr(bi->type)) != 0)) + minval = BUNtail(*bi, bi->count - 1); + else if (bi->minpos != BUN_NONE) minval = BUNtail(*bi, bi->minpos); else if ((minprop = BATgetprop_nolock(bi->b, GDK_MIN_BOUND)) != NULL) minval = VALptr(minprop); - if (bi->maxpos != BUN_NONE) { + if (bi->sorted && (bi->nonil || atomcmp(BUNtail(bi2, bi->count - 1), ATOMnilptr(bi->type)) != 0)) { + maxval = BUNtail(bi2, bi->count - 1); + maxincl = true; + } else if (bi->revsorted && (bi->nonil || atomcmp(BUNtail(bi2, 0), ATOMnilptr(bi->type)) != 0)) { + maxval = BUNtail(bi2, 0); + maxincl = true; + } else if (bi->maxpos != BUN_NONE) { maxval = BUNtail(bi2, bi->maxpos); maxincl = true; } else if ((maxprop = BATgetprop_nolock(bi->b, GDK_MAX_BOUND)) != NULL) { ___ checkin-list mailing list -- checkin-list@monetdb.org To unsubscribe send an email to checkin-list-le...@monetdb.org
MonetDB: Aug2024 - We're interested in whether we have a min/max...
Changeset: 3da51ea01918 for MonetDB URL: https://dev.monetdb.org/hg/MonetDB/rev/3da51ea01918 Modified Files: gdk/gdk_select.c Branch: Aug2024 Log Message: We're interested in whether we have a min/max value, not the property. diffs (89 lines): diff --git a/gdk/gdk_select.c b/gdk/gdk_select.c --- a/gdk/gdk_select.c +++ b/gdk/gdk_select.c @@ -1390,14 +1390,14 @@ BATrange(BATiter *bi, const void *tl, co maxincl = false; } bool keep = false; /* keep lock on parent bat? */ - if (minprop == NULL || maxprop == NULL) { + if (minval == NULL || maxval == NULL) { if (pb != NULL) { MT_lock_set(&pb->theaplock); - if (minprop == NULL && (minprop = BATgetprop_nolock(pb, GDK_MIN_BOUND)) != NULL) { + if (minval == NULL && (minprop = BATgetprop_nolock(pb, GDK_MIN_BOUND)) != NULL) { keep = true; minval = VALptr(minprop); } - if (maxprop == NULL && (maxprop = BATgetprop_nolock(pb, GDK_MAX_BOUND)) != NULL) { + if (maxval == NULL && (maxprop = BATgetprop_nolock(pb, GDK_MAX_BOUND)) != NULL) { keep = true; maxval = VALptr(maxprop); maxincl = true; @@ -1408,20 +1408,20 @@ BATrange(BATiter *bi, const void *tl, co } } - if (minprop == NULL && maxprop == NULL) { + if (minval == NULL && maxval == NULL) { range = range_inside; /* strictly: unknown */ - } else if (maxprop && + } else if (maxval && tl && ((c = atomcmp(tl, maxval)) > 0 || ((!maxincl || !li) && c == 0))) { range = range_after; - } else if (minprop && + } else if (minval && th && ((c = atomcmp(th, minval)) < 0 || (!hi && c == 0))) { range = range_before; } else if (tl == NULL) { - if (minprop == NULL) { + if (minval == NULL) { c = atomcmp(th, maxval); if (c < 0 || ((maxincl || !hi) && c == 0)) range = range_atstart; @@ -1431,7 +1431,7 @@ BATrange(BATiter *bi, const void *tl, co c = atomcmp(th, minval); if (c < 0 || (!hi && c == 0)) range = range_before; - else if (maxprop == NULL) + else if (maxval == NULL) range = range_atstart; else { c = atomcmp(th, maxval); @@ -1442,7 +1442,7 @@ BATrange(BATiter *bi, const void *tl, co } } } else if (th == NULL) { - if (maxprop == NULL) { + if (maxval == NULL) { c = atomcmp(tl, minval); if (c >= 0) range = range_atend; @@ -1452,7 +1452,7 @@ BATrange(BATiter *bi, const void *tl, co c = atomcmp(tl, maxval); if (c > 0 || ((!maxincl || !li) && c == 0)) range = range_after; - else if (minprop == NULL) + else if (minval == NULL) range = range_atend; else { c = atomcmp(tl, minval); @@ -1462,13 +1462,13 @@ BATrange(BATiter *bi, const void *tl, co range = range_contains; } } - } else if (minprop == NULL) { + } else if (minval == NULL) { c = atomcmp(th, maxval); if (c < 0 || ((maxincl || !hi) && c == 0)) range = range_inside; else range = range_atend; - } else if (maxprop == NULL) { + } else if (maxval == NULL) { c = atomcmp(tl, minval); if (c >= 0) range = range_inside; ___ checkin-list mailing list -- checkin-list@monetdb.org To unsubscribe send an email to checkin-list-le...@monetdb.org
MonetDB: Aug2024 - Don't use same iterator for two different val...
Changeset: b07e9b4b7faf for MonetDB URL: https://dev.monetdb.org/hg/MonetDB/rev/b07e9b4b7faf Modified Files: gdk/gdk_select.c Branch: Aug2024 Log Message: Don't use same iterator for two different values at the same time. diffs (20 lines): diff --git a/gdk/gdk_select.c b/gdk/gdk_select.c --- a/gdk/gdk_select.c +++ b/gdk/gdk_select.c @@ -1365,6 +1365,7 @@ BATrange(BATiter *bi, const void *tl, co BAT *pb = NULL; int c; int (*atomcmp) (const void *, const void *) = ATOMcompare(bi->type); + BATiter bi2 = *bi; if (tl && (*atomcmp)(tl, ATOMnilptr(bi->type)) == 0) tl = NULL; @@ -1383,7 +1384,7 @@ BATrange(BATiter *bi, const void *tl, co else if ((minprop = BATgetprop_nolock(bi->b, GDK_MIN_BOUND)) != NULL) minval = VALptr(minprop); if (bi->maxpos != BUN_NONE) { - maxval = BUNtail(*bi, bi->maxpos); + maxval = BUNtail(bi2, bi->maxpos); maxincl = true; } else if ((maxprop = BATgetprop_nolock(bi->b, GDK_MAX_BOUND)) != NULL) { maxval = VALptr(maxprop); ___ checkin-list mailing list -- checkin-list@monetdb.org To unsubscribe send an email to checkin-list-le...@monetdb.org
MonetDB: Aug2024 - Don't trust BAT properties when updating a BA...
Changeset: 64c616a622d9 for MonetDB URL: https://dev.monetdb.org/hg/MonetDB/rev/64c616a622d9 Modified Files: gdk/gdk_logger.c Branch: Aug2024 Log Message: Don't trust BAT properties when updating a BAT from the WAL. Fixed #7575. diffs (22 lines): diff --git a/gdk/gdk_logger.c b/gdk/gdk_logger.c --- a/gdk/gdk_logger.c +++ b/gdk/gdk_logger.c @@ -767,6 +767,18 @@ la_bat_updates(logger *lg, logaction *la const void *t = BUNtail(vi, p); if (q < cnt) { + if (b->tnosorted == q) + b->tnosorted = 0; + if (b->tnorevsorted == q) + b->tnorevsorted = 0; + if (b->tnokey[0] == q || + b->tnokey[1] == q) { + b->tnokey[0] = 0; + b->tnokey[1] = 0; + } + b->tkey = false; + b->tsorted = false; + b->tkey = false; if (BUNreplace(b, q, t, true) != GDK_SUCCEED) { logbat_destroy(b); bat_iterator_end(&vi); ___ checkin-list mailing list -- checkin-list@monetdb.org To unsubscribe send an email to checkin-list-le...@monetdb.org
MonetDB: Aug2024 - New Mtest.py option --skip-test-with-timeout ...
Changeset: 51ee55852f8d for MonetDB URL: https://dev.monetdb.org/hg/MonetDB/rev/51ee55852f8d Modified Files: testing/Mtest.py.in Branch: Aug2024 Log Message: New Mtest.py option --skip-test-with-timeout to skip tests with a .timeout file. diffs (38 lines): diff --git a/testing/Mtest.py.in b/testing/Mtest.py.in --- a/testing/Mtest.py.in +++ b/testing/Mtest.py.in @@ -52,6 +52,7 @@ single_in_memory = False restart = False produce_html = True ignore_conditions = False +skip_timeout = False # extra mserver5 options mserver5_opts = [] @@ -2162,6 +2163,9 @@ def RunTest(env, TST, COND, oktests, len elif MissingMods: reason = "as modules '%s` are missing." % str(MissingMods) elem = SkipTest(env, TST, EXT, reason, length) +elif skip_timeout and os.path.isfile(os.path.join(TSTSRCDIR, TST+".timeout")): +reason = "test with timeout" +elem = SkipTest(env, TST, EXT, reason, length) else: test = re.compile("^"+TST+r"((_[sp][0-9][0-9])?\..*)?$", re.MULTILINE) for f in listdir(RELSRCDIR): @@ -3565,6 +3569,7 @@ def main(argv) : parser.add_argument('--single-in-memory', action='store_true', dest='single_in_memory', help='use --in-memory for SingleServer directories') parser.add_argument('--approve', action='store_true', help='produce .newtest file in testing directory with calculated content') parser.add_argument('--ignore-conditions', action='store_true', dest='ignore_conditions', help='ignore conditions in All file') +parser.add_argument('--skip-test-with-timeout', action='store_true', help='skip tests that have a .timeout file') parser.add_argument('--stop-at-crash', action='store_true', dest='stop_crash', help='stop testing when the server crashes') parser.add_argument('--ci', action='store_true', dest='ci', help='special handling for continuous integration (no error return unless serious problem)') global produce_html @@ -3590,6 +3595,8 @@ def main(argv) : stop_crash = opts.stop_crash global ignore_conditions ignore_conditions = opts.ignore_conditions +global skip_timeout +skip_timeout = opts.skip_test_with_timeout produce_html = opts.produce_html addreqs = False testweb = opts.testweb ___ checkin-list mailing list -- checkin-list@monetdb.org To unsubscribe send an email to checkin-list-le...@monetdb.org
MonetDB: default - Merge with Aug2024 branch.
Changeset: 3fda2c6a1d4a for MonetDB URL: https://dev.monetdb.org/hg/MonetDB/rev/3fda2c6a1d4a Branch: default Log Message: Merge with Aug2024 branch. diffs (truncated from 27312 to 300 lines): diff --git a/sql/test/SQLite_regress/sqllogictest/Tests/select3.test b/sql/test/SQLite_regress/sqllogictest/Tests/select3.test --- a/sql/test/SQLite_regress/sqllogictest/Tests/select3.test +++ b/sql/test/SQLite_regress/sqllogictest/Tests/select3.test @@ -99,12 +99,12 @@ SELECT CASE WHEN c>(SELECT avg(c) FROM t 30 values hashing to efdbaa4d180e7867bec1c4d897bd25b9 -query I nosort x0 +query I rowsort x0 SELECT CASE WHEN c>(SELECT avg(c) FROM t1) THEN a*2 ELSE b*10 END FROM t1 ORDER BY 1 -30 values hashing to 89034ce300947389af564589af8a89f1 +30 values hashing to efdbaa4d180e7867bec1c4d897bd25b9 query II rowsort x1 SELECT a+b*2+c*3+d*4+e*5, @@ -113,13 +113,13 @@ SELECT a+b*2+c*3+d*4+e*5, 60 values hashing to f5182c92f97475673097a499ce82ae64 -query II nosort x1 -SELECT a+b*2+c*3+d*4+e*5, - (a+b+c+d+e)/5 - FROM t1 - ORDER BY 1,2 - -60 values hashing to 25594adb22d44ca00690acfe1602b943 +query II rowsort x1 +SELECT a+b*2+c*3+d*4+e*5, + (a+b+c+d+e)/5 + FROM t1 + ORDER BY 1,2 + +60 values hashing to f5182c92f97475673097a499ce82ae64 query I rowsort x2 SELECT a+b*2+c*3+d*4+e*5, @@ -135,7 +135,7 @@ SELECT a+b*2+c*3+d*4+e*5, 55 values hashing to 625899fde153a4e776b22705ac30f7fb -query I nosort x2 +query I rowsort x2 SELECT a+b*2+c*3+d*4+e*5, CASE WHEN ae ORDER BY 3,2,5,1,4 -55 values hashing to 6a9135783ae80346b9ea72e72ffafdf5 +55 values hashing to 625899fde153a4e776b22705ac30f7fb query I rowsort x2 SELECT a+b*2+c*3+d*4+e*5, @@ -193,7 +193,7 @@ SELECT a+b*2+c*3+d*4+e*5, 55 values hashing to 625899fde153a4e776b22705ac30f7fb -query I nosort x2 +query I rowsort x2 SELECT a+b*2+c*3+d*4+e*5, CASE WHEN ac -query nosort x5 +query rowsort x5 SELECT b, a+b*2+c*3, c-d, @@ -287,7 +287,7 @@ SELECT b, AND (a>b-2 AND ac -query nosort x5 +query rowsort x5 SELECT b, a+b*2+c*3, c-d, @@ -337,7 +337,7 @@ SELECT b, AND (e>a AND e(SELECT avg(c) FROM t1) THEN a*2 ELSE b*10 END, @@ -373,7 +373,7 @@ SELECT e, OR d>e ORDER BY 3,1,5,2,4 -80 values hashing to 9ae0fc404535bae2320bf2ee02f3a111 +80 values hashing to 1165928153cf03fadf7d270e4efc8a8b query I rowsort x6 SELECT e, @@ -387,7 +387,7 @@ SELECT e, 80 values hashing to 1165928153cf03fadf7d270e4efc8a8b -query I nosort x6 +query I rowsort x6 SELECT e, a, CASE WHEN c>(SELECT avg(c) FROM t1) THEN a*2 ELSE b*10 END, @@ -398,7 +398,7 @@ SELECT e, OR (c<=d-2 OR c>=d+2) ORDER BY 4,1,5,3,2 -80 values hashing to f6c0b3d0c02c63b20f754ae7f36dd622 +80 values hashing to 1165928153cf03fadf7d270e4efc8a8b query I rowsort x7 SELECT a+b*2+c*3+d*4+e*5 @@ -406,12 +406,12 @@ SELECT a+b*2+c*3+d*4+e*5 30 values hashing to f54b614acd4cb798dba29ba05152f26d -query I nosort x7 +query I rowsort x7 SELECT a+b*2+c*3+d*4+e*5 FROM t1 ORDER BY 1 -30 values hashing to 5f0b79903fb989964b2be6f4df7a +30 values hashing to f54b614acd4cb798dba29ba05152f26d query I rowsort x8 SELECT d-e @@ -421,14 +421,14 @@ SELECT d-e 24 values hashing to b60e9de3a50740f40cca35b98a056b8c -query I nosort x8 +query I rowsort x8 SELECT d-e FROM t1 WHERE b>c OR a>b ORDER BY 1 -24 values hashing to 76a711ba9d533ba8f6ab138b4ac63241 +24 values hashing to b60e9de3a50740f40cca35b98a056b8c query I rowsort x9 SELECT d @@ -438,14 +438,14 @@ SELECT d 22 values hashing to 785796b507b0f3998ec9b04e74fa565b -query I nosort x9 +query I rowsort x9 SELECT d FROM t1 WHERE a>b OR d>e ORDER BY 1 -22 values hashing to 82b4fb525b221666886bfe76e269415b +22 values hashing to 785796b507b0f3998ec9b04e74fa565b query I rowsort x9 SELECT d @@ -455,14 +455,14 @@ SELECT d 22 values hashing to 785796b507b0f3998ec9b04e74fa565b -query I nosort x9 +query I rowsort x9 SELECT d FROM t1 WHERE d>e OR a>b ORDER BY 1 -22 values hashing to 82b4fb525b221666886bfe76e269415b +22 values hashing to 785796b507b0f3998ec9b04e74fa565b query III rowsort x10 SELECT abs(a), @@ -477,7 +477,7 @@ SELECT abs(a), 119 values hashing to de49937f8a76d58e90ee610d71c5d209 -query III nosort x10 +query III rowsort x10 SELECT abs(a), (a+b+c+d+e)/5, a+b*2+c*3+d*4, @@ -489,7 +489,7 @@ SELECT abs(a), WHERE a>b ORDER BY 7,3,5,1,6 -119 values hashing to 3039f2cda202d621e12f9671b0bbe87e +119 values hashing to de49937f8a76d58e90ee610d71c5d209 query III rowsort x11 SELECT d, @@ -499,14 +499,14 @@ SELECT d, 90 values hashing to df4215319598e8101abcb5c7509649e8 -query III nosort x11 +query III rowsort x11 SELECT d, a, a+b*2+c*3+d*4+e*5 FROM t1 ORDER BY
MonetDB: Aug2024 - Revert test from sqllogictest.
Changeset: e6ea8bdbfbd7 for MonetDB URL: https://dev.monetdb.org/hg/MonetDB/rev/e6ea8bdbfbd7 Modified Files: sql/test/SQLite_regress/sqllogictest/Tests/select3.test Branch: Aug2024 Log Message: Revert test from sqllogictest. diffs (truncated from 27312 to 300 lines): diff --git a/sql/test/SQLite_regress/sqllogictest/Tests/select3.test b/sql/test/SQLite_regress/sqllogictest/Tests/select3.test --- a/sql/test/SQLite_regress/sqllogictest/Tests/select3.test +++ b/sql/test/SQLite_regress/sqllogictest/Tests/select3.test @@ -99,12 +99,12 @@ SELECT CASE WHEN c>(SELECT avg(c) FROM t 30 values hashing to efdbaa4d180e7867bec1c4d897bd25b9 -query I nosort x0 +query I rowsort x0 SELECT CASE WHEN c>(SELECT avg(c) FROM t1) THEN a*2 ELSE b*10 END FROM t1 ORDER BY 1 -30 values hashing to 89034ce300947389af564589af8a89f1 +30 values hashing to efdbaa4d180e7867bec1c4d897bd25b9 query II rowsort x1 SELECT a+b*2+c*3+d*4+e*5, @@ -113,13 +113,13 @@ SELECT a+b*2+c*3+d*4+e*5, 60 values hashing to f5182c92f97475673097a499ce82ae64 -query II nosort x1 -SELECT a+b*2+c*3+d*4+e*5, - (a+b+c+d+e)/5 - FROM t1 - ORDER BY 1,2 - -60 values hashing to 25594adb22d44ca00690acfe1602b943 +query II rowsort x1 +SELECT a+b*2+c*3+d*4+e*5, + (a+b+c+d+e)/5 + FROM t1 + ORDER BY 1,2 + +60 values hashing to f5182c92f97475673097a499ce82ae64 query I rowsort x2 SELECT a+b*2+c*3+d*4+e*5, @@ -135,7 +135,7 @@ SELECT a+b*2+c*3+d*4+e*5, 55 values hashing to 625899fde153a4e776b22705ac30f7fb -query I nosort x2 +query I rowsort x2 SELECT a+b*2+c*3+d*4+e*5, CASE WHEN ae ORDER BY 3,2,5,1,4 -55 values hashing to 6a9135783ae80346b9ea72e72ffafdf5 +55 values hashing to 625899fde153a4e776b22705ac30f7fb query I rowsort x2 SELECT a+b*2+c*3+d*4+e*5, @@ -193,7 +193,7 @@ SELECT a+b*2+c*3+d*4+e*5, 55 values hashing to 625899fde153a4e776b22705ac30f7fb -query I nosort x2 +query I rowsort x2 SELECT a+b*2+c*3+d*4+e*5, CASE WHEN ac -query nosort x5 +query rowsort x5 SELECT b, a+b*2+c*3, c-d, @@ -287,7 +287,7 @@ SELECT b, AND (a>b-2 AND ac -query nosort x5 +query rowsort x5 SELECT b, a+b*2+c*3, c-d, @@ -337,7 +337,7 @@ SELECT b, AND (e>a AND e(SELECT avg(c) FROM t1) THEN a*2 ELSE b*10 END, @@ -373,7 +373,7 @@ SELECT e, OR d>e ORDER BY 3,1,5,2,4 -80 values hashing to 9ae0fc404535bae2320bf2ee02f3a111 +80 values hashing to 1165928153cf03fadf7d270e4efc8a8b query I rowsort x6 SELECT e, @@ -387,7 +387,7 @@ SELECT e, 80 values hashing to 1165928153cf03fadf7d270e4efc8a8b -query I nosort x6 +query I rowsort x6 SELECT e, a, CASE WHEN c>(SELECT avg(c) FROM t1) THEN a*2 ELSE b*10 END, @@ -398,7 +398,7 @@ SELECT e, OR (c<=d-2 OR c>=d+2) ORDER BY 4,1,5,3,2 -80 values hashing to f6c0b3d0c02c63b20f754ae7f36dd622 +80 values hashing to 1165928153cf03fadf7d270e4efc8a8b query I rowsort x7 SELECT a+b*2+c*3+d*4+e*5 @@ -406,12 +406,12 @@ SELECT a+b*2+c*3+d*4+e*5 30 values hashing to f54b614acd4cb798dba29ba05152f26d -query I nosort x7 +query I rowsort x7 SELECT a+b*2+c*3+d*4+e*5 FROM t1 ORDER BY 1 -30 values hashing to 5f0b79903fb989964b2be6f4df7a +30 values hashing to f54b614acd4cb798dba29ba05152f26d query I rowsort x8 SELECT d-e @@ -421,14 +421,14 @@ SELECT d-e 24 values hashing to b60e9de3a50740f40cca35b98a056b8c -query I nosort x8 +query I rowsort x8 SELECT d-e FROM t1 WHERE b>c OR a>b ORDER BY 1 -24 values hashing to 76a711ba9d533ba8f6ab138b4ac63241 +24 values hashing to b60e9de3a50740f40cca35b98a056b8c query I rowsort x9 SELECT d @@ -438,14 +438,14 @@ SELECT d 22 values hashing to 785796b507b0f3998ec9b04e74fa565b -query I nosort x9 +query I rowsort x9 SELECT d FROM t1 WHERE a>b OR d>e ORDER BY 1 -22 values hashing to 82b4fb525b221666886bfe76e269415b +22 values hashing to 785796b507b0f3998ec9b04e74fa565b query I rowsort x9 SELECT d @@ -455,14 +455,14 @@ SELECT d 22 values hashing to 785796b507b0f3998ec9b04e74fa565b -query I nosort x9 +query I rowsort x9 SELECT d FROM t1 WHERE d>e OR a>b ORDER BY 1 -22 values hashing to 82b4fb525b221666886bfe76e269415b +22 values hashing to 785796b507b0f3998ec9b04e74fa565b query III rowsort x10 SELECT abs(a), @@ -477,7 +477,7 @@ SELECT abs(a), 119 values hashing to de49937f8a76d58e90ee610d71c5d209 -query III nosort x10 +query III rowsort x10 SELECT abs(a), (a+b+c+d+e)/5, a+b*2+c*3+d*4, @@ -489,7 +489,7 @@ SELECT abs(a), WHERE a>b ORDER BY 7,3,5,1,6 -119 values hashing to 3039f2cda202d621e12f9671b0bbe87e +119 values hashing to de49937f8a76d58e90ee610d71c5d209 query III rowsort x11 SELECT d, @@ -499,14 +499,14 @@ SELECT d, 90 values hashing to df4215319598e8101abcb5c7509649e8 -query III nosort x11 +query I
MonetDB: default - Merge with Aug2024 branch.
Changeset: 194efa151ae6 for MonetDB URL: https://dev.monetdb.org/hg/MonetDB/rev/194efa151ae6 Modified Files: gdk/gdk_join.c sql/test/miscellaneous/Tests/simple_plans.test Branch: default Log Message: Merge with Aug2024 branch. diffs (truncated from 54727 to 300 lines): diff --git a/clients/mapiclient/mhelp.c b/clients/mapiclient/mhelp.c --- a/clients/mapiclient/mhelp.c +++ b/clients/mapiclient/mhelp.c @@ -68,7 +68,7 @@ SQLhelp sqlhelp1[] = { {"ALTER TABLE", "", "ALTER TABLE [ IF EXISTS ] qname ADD [ COLUMN ] column_def\n" -"ALTER TABLE [ IF EXISTS ] qname ADD table_constraint\n" +"ALTER TABLE [ IF EXISTS ] qname ADD [ CONSTRAINT ident ] table_constraint\n" "ALTER TABLE [ IF EXISTS ] qname ALTER [ COLUMN ] ident SET DEFAULT value\n" "ALTER TABLE [ IF EXISTS ] qname ALTER [ COLUMN ] ident SET [NOT] NULL\n" "ALTER TABLE [ IF EXISTS ] qname ALTER [ COLUMN ] ident DROP DEFAULT\n" @@ -910,9 +910,10 @@ SQLhelp sqlhelp2[] = { NULL,}, {"table_constraint", NULL, -"[ CONSTRAINT ident ] { PRIMARY KEY column_list | UNIQUE column_list |\n" +"[ CONSTRAINT ident ] { CHECK '(' search_condition ')' |\n" +"PRIMARY KEY column_list | UNIQUE column_list |\n" "FOREIGN KEY column_list REFERENCES qname [ column_list ] [ match_options ] [ reference_action ] }", -"column_list,match_options,reference_action", +"column_list,search_condition,match_options,reference_action", "See also https://www.monetdb.org/documentation/user-guide/sql-manual/data-definition/table-elements/"}, {"table_element", NULL, diff --git a/gdk/gdk_join.c b/gdk/gdk_join.c --- a/gdk/gdk_join.c +++ b/gdk/gdk_join.c @@ -4212,7 +4212,7 @@ leftjoin(BAT **r1p, BAT **r2p, BAT **r3p /* maybe do a hash join on the swapped operands; if we * do, we need to sort the output, so we take that into * account as well */ - bool lhash, plhash, lcand; + bool lhash, plhash, lcand, rkey = r->tkey; double lcost; lcost = joincost(l, rci.ncand, &lci, &lhash, &plhash, &lcand); @@ -4220,7 +4220,7 @@ leftjoin(BAT **r1p, BAT **r2p, BAT **r3p rc = GDK_FAIL; goto doreturn; } - if (semi) + if (semi && !rkey) lcost += rci.ncand; /* cost of BATunique(r) */ /* add cost of sorting; obviously we don't know the * size, so we guess that the size of the output is @@ -4229,7 +4229,7 @@ leftjoin(BAT **r1p, BAT **r2p, BAT **r3p if (lcost < rcost) { BAT *tmp = sr; BAT *r1, *r2; - if (semi) { + if (semi && !rkey) { sr = BATunique(r, sr); if (sr == NULL) { rc = GDK_FAIL; @@ -4240,7 +4240,7 @@ leftjoin(BAT **r1p, BAT **r2p, BAT **r3p rc = hashjoin(&r2, &r1, NULL, r, l, &rci, &lci, nil_matches, false, false, false, false, false, false, estimate, t0, true, lhash, plhash, lcand, func); - if (semi) + if (semi && !rkey) BBPunfix(sr->batCacheid); if (rc != GDK_SUCCEED) goto doreturn; diff --git a/geom/sql/conformance/Tests/T1.test b/geom/sql/conformance/Tests/T1.test --- a/geom/sql/conformance/Tests/T1.test +++ b/geom/sql/conformance/Tests/T1.test @@ -1,4 +1,4 @@ -query T rowsort +query T nosort SELECT f_table_name FROM geometry_columns ORDER BY f_table_name bridges diff --git a/sql/backends/monet5/Tests/rapi05.test b/sql/backends/monet5/Tests/rapi05.test --- a/sql/backends/monet5/Tests/rapi05.test +++ b/sql/backends/monet5/Tests/rapi05.test @@ -11,7 +11,7 @@ statement ok CREATE FUNCTION kmeans(data float, ncluster integer) returns integer language R {kmeans(data,ncluster)$cluster} -query I rowsort +query I nosort SELECT cluster FROM (SELECT MIN(x) AS minx, MAX(x) AS maxx, kmeans(x,5) AS cluster FROM xdata GROUP BY cluster) as cdata ORDER BY cluster diff --git a/sql/backends/monet5/generator/Tests/joins00.test b/sql/backends/monet5/generator/Tests/joins00.test --- a/sql/backends/monet5/generator/Tests/joins00.test +++ b/sql/backends/monet5/generator/Tests/joins00.test @@ -98,14 +98,14 @@ create table tmp(i tinyint) statement ok insert into tmp values(3),(4),(5) -query I rowsort +query I nosort select * from tmp order by i 3 4 5 -query II rowsort +query II nosort select * from generate_series(9,0,-2) X, tmp Y where X.value = Y.i order by X.value, Y.i 3 @@ -113,7 +113,
MonetDB: Aug2024 - If the query already has ORDER BY, we don't n...
Changeset: 34f9a29bda02 for MonetDB URL: https://dev.monetdb.org/hg/MonetDB/rev/34f9a29bda02 Modified Files: geom/sql/conformance/Tests/T1.test sql/backends/monet5/Tests/rapi05.test sql/backends/monet5/generator/Tests/joins00.test sql/backends/monet5/generator/Tests/joins01.test sql/benchmarks/ATIS/Tests/one.test.in sql/benchmarks/arno/Tests/one.test sql/benchmarks/moa/Tests/one.test sql/benchmarks/nobench/Tests/nobench.test sql/benchmarks/ssbm/Tests/01-13.test sql/benchmarks/ssbm/Tests/one.test.in sql/benchmarks/tpcds/Tests/one.test.in sql/benchmarks/tpch/Tests/one.test.in sql/benchmarks/viam/Tests/viam.test sql/test/2023/Tests/any_value.test sql/test/ADT2006/Tests/benesamo.test sql/test/ADT2006/Tests/bram.test sql/test/ADT2006/Tests/slam.test sql/test/ADT2006/Tests/woud.test sql/test/BugDay_2005-10-06_2.9.3/Tests/BATpropcheck_error.SF-1012739.test sql/test/BugDay_2005-10-06_2.9.3/Tests/CrashMe_SQL_server_crash-2.SF-921673.test sql/test/BugDay_2005-10-06_2.9.3/Tests/UNION_JOIN_vs_plain_set_UNION-2.SF-920585.test sql/test/BugDay_2005-10-06_2.9.3/Tests/jdbc_crashes_on_getTables.SF_944316.test sql/test/BugDay_2005-10-06_2.9.3/Tests/not_null.SF-933194.test sql/test/BugDay_2005-10-06_2.9.3/Tests/simple_union.SF-1005596.test sql/test/BugDay_2005-10-06_2.9.3/Tests/type_dump_test.SF-989257.test sql/test/BugDay_2005-11-09_2.8/Tests/ORDER_BY_evaluation_error.SF-1023658.test sql/test/BugDay_2005-11-09_2.9.3/Tests/or_select.SF-1114540.test sql/test/BugDay_2005-12-19_2.9.3/Tests/subselect_cardinality.SF-1240701.1242164.test sql/test/BugTracker-2008/Tests/view_reply_incorrect.SF-2075097.test sql/test/BugTracker-2009/Tests/count_bug.SF-2604583.test sql/test/BugTracker-2009/Tests/join_topn.SF-2654133.test sql/test/BugTracker-2009/Tests/old_views_incorrectly_reused.SF-2863804.view1.test sql/test/BugTracker-2009/Tests/old_views_incorrectly_reused.SF-2863804.view2.test sql/test/BugTracker-2009/Tests/order_by_column_position.test sql/test/BugTracker-2009/Tests/order_by_column_position_rel_name_bug.test sql/test/BugTracker-2009/Tests/orderby_with_row_number.SF-2895791.test sql/test/BugTracker-2009/Tests/push_select_down_crash.test sql/test/BugTracker-2009/Tests/subtraction_between_two_columns.SF-2582389.test sql/test/BugTracker-2010/Tests/LIMIT_OFFSET_big-endian.Bug-2622.test sql/test/BugTracker-2010/Tests/ORDER_BY_over_UNION_EXCEPT_INTERSECT.Bug-2606.test sql/test/BugTracker-2010/Tests/between-timestamp.Bug-2718.test sql/test/BugTracker-2010/Tests/crash_on_complex_join_exp.Bug-2353.test sql/test/BugTracker-2010/Tests/distinct-order-by-limit.Bug-2691.test sql/test/BugTracker-2010/Tests/join_problem.Bug-2694.test sql/test/BugTracker-2010/Tests/multiple-common-table-expressions.Bug-2664.test sql/test/BugTracker-2010/Tests/multiple-updates-in-transaction.Bug-2543.test sql/test/BugTracker-2010/Tests/order_by_on_single_row_view.SF-2950453.test sql/test/BugTracker-2010/Tests/orderby-limit.Bug-2634.test sql/test/BugTracker-2010/Tests/rank-over-crash.SF-2926454.test sql/test/BugTracker-2010/Tests/select-distinct-limit.Bug-2676.test sql/test/BugTracker-2010/Tests/slow-query.Bug-2671.test sql/test/BugTracker-2010/Tests/vacuum.test sql/test/BugTracker-2010/Tests/with_row_number_crash.Bug-2631.test sql/test/BugTracker-2011/Tests/bulk_rotate_xor_hash-error.Bug-2734.test sql/test/BugTracker-2011/Tests/case-overflow.Bug-2239.test sql/test/BugTracker-2011/Tests/cast-crash.Bug-2678.test sql/test/BugTracker-2011/Tests/groupby_primary_key.Bug-2807.test sql/test/BugTracker-2011/Tests/mclient-lsql-d.Bug-2861.test sql/test/BugTracker-2011/Tests/missing_refine_reverse.Bug-2898.test sql/test/BugTracker-2011/Tests/multiple-joins.Bug-2879.test sql/test/BugTracker-2011/Tests/predicate.Bug-2908.test sql/test/BugTracker-2011/Tests/sqltables.Bug-2921.test sql/test/BugTracker-2012/Tests/correlated_groupby_in_selection.Bug-3011.test sql/test/BugTracker-2012/Tests/inet-casts.Bug-3205.test sql/test/BugTracker-2012/Tests/join_over_multitable_using_index.Bug-3181.test sql/test/BugTracker-2012/Tests/leftjoin-Bug.3041.test sql/test/BugTracker-2012/Tests/order_by_on_column_exp.Bug-3193.test sql/test/BugTracker-2012/Tests/row_number_does_not_work_in_complex_query.Bug-2805.test sql/test/BugTracker-2012/Tests/scalar_subquery_with_alias.Bug-3093.test sql/test/BugTracker-2012/Tests/set_operation.Bug-3059.test sql/test/BugTracker-2012/Tests/with_and_exists.Bug-3099.test sql/test/BugTracke
MonetDB: default - Just always use ordered index if available (w...
Changeset: 47492881fa7a for MonetDB URL: https://dev.monetdb.org/hg/MonetDB/rev/47492881fa7a Modified Files: gdk/gdk_select.c Branch: default Log Message: Just always use ordered index if available (which is rare). It's kind of silly to do two binary searches to figure out whether to do two binary searches. diffs (54 lines): diff --git a/gdk/gdk_select.c b/gdk/gdk_select.c --- a/gdk/gdk_select.c +++ b/gdk/gdk_select.c @@ -1986,30 +1986,27 @@ BATselect(BAT *b, BAT *s, const void *tl MT_lock_unset(&pb->batIdxLock); } if (oidxh) { - /* Is query selective enough to use the ordered index ? */ - /* TODO: Test if this heuristic works in practice */ - /*if ((ORDERfnd(b, th) - ORDERfnd(b, tl)) < ((BUN)1000 < bi.count/1000 ? (BUN)1000: bi.count/1000))*/ - if ((ORDERfnd(b, oidxh, th) - ORDERfnd(b, oidxh, tl)) < bi.count/3) { - if (view) { - bat_iterator_end(&bi); - bi = bat_iterator(b); - poidx = true; /* using parent oidx */ - vwo = (lng) (view->tbaseoff - bi.baseoff); - vwl = b->hseqbase + (oid) vwo + ci.seq - view->hseqbase; - vwh = vwl + canditer_last(&ci) - ci.seq; - vwo = (lng) view->hseqbase - (lng) b->hseqbase - vwo; - TRC_DEBUG(ALGO, "Switch from " ALGOBATFMT " to " ALGOBATFMT " " OIDFMT "-" OIDFMT " hseq " LLFMT "\n", ALGOBATPAR(view), ALGOBATPAR(b), vwl, vwh, vwo); - } else { - vwl = ci.seq; - vwh = canditer_last(&ci); - } + /* Is query selective enough to use the ordered +* index? Finding the boundaries is 2*log(n) +* where n is the size of the bat, sorting is +* N*log(N) where N is the number of results. +* If the sum is less than n (cost of scan), +* it's cheaper. However, to find out how large +* N is, we'd have to do the two boundary +* searches. If we do that, we might as well do +* it all. */ + if (view) { + bat_iterator_end(&bi); + bi = bat_iterator(b); + poidx = true; /* using parent oidx */ + vwo = (lng) (view->tbaseoff - bi.baseoff); + vwl = b->hseqbase + (oid) vwo + ci.seq - view->hseqbase; + vwh = vwl + canditer_last(&ci) - ci.seq; + vwo = (lng) view->hseqbase - (lng) b->hseqbase - vwo; + TRC_DEBUG(ALGO, "Switch from " ALGOBATFMT " to " ALGOBATFMT " " OIDFMT "-" OIDFMT " hseq " LLFMT "\n", ALGOBATPAR(view), ALGOBATPAR(b), vwl, vwh, vwo); } else { - if (view) { - b = view; - view = NULL; - } - HEAPdecref(oidxh, false); - oidxh = NULL; + vwl = ci.seq; + vwh = canditer_last(&ci); } } } ___ checkin-list mailing list -- checkin-list@monetdb.org To unsubscribe send an email to checkin-list-le...@monetdb.org
MonetDB: default - Another test that differs for single threads.
Changeset: 00eb4ddcfd48 for MonetDB URL: https://dev.monetdb.org/hg/MonetDB/rev/00eb4ddcfd48 Modified Files: sql/test/rel-optimizers/Tests/merge-ors-multi-col-eq-to-cmp_in.test Branch: default Log Message: Another test that differs for single threads. diffs (21 lines): diff --git a/sql/test/rel-optimizers/Tests/merge-ors-multi-col-eq-to-cmp_in.test b/sql/test/rel-optimizers/Tests/merge-ors-multi-col-eq-to-cmp_in.test --- a/sql/test/rel-optimizers/Tests/merge-ors-multi-col-eq-to-cmp_in.test +++ b/sql/test/rel-optimizers/Tests/merge-ors-multi-col-eq-to-cmp_in.test @@ -132,6 +132,17 @@ 400 60 600 +skipif threads=1 +query T nosort single-col-3-val-2-col-2-val +plan select m, k from b where (m = 40) or (m = 20 and k = 200) or (m = 0) or (m = 60 and k = 600) or (m = 180) + +project ( +| select ( +| | table("sys"."b") [ "b"."m", "b"."k" ] +| ) [ (("b"."m") in (int(8) "40", int(8) "0", int(8) "180")) or (( [ "b"."m", "b"."k" ]) in ( [ int(8) "20", int(11) "200" ], [ int(8) "60", int(11) "600" ])) ] +) [ "b"."m", "b"."k" ] + +onlyif threads=1 query T nosort single-col-3-val-2-col-2-val plan select m, k from b where (m = 40) or (m = 20 and k = 200) or (m = 0) or (m = 60 and k = 600) or (m = 180) ___ checkin-list mailing list -- checkin-list@monetdb.org To unsubscribe send an email to checkin-list-le...@monetdb.org
MonetDB: default - Single-threaded we seem to have more informat...
Changeset: 68c5d6630ca3 for MonetDB URL: https://dev.monetdb.org/hg/MonetDB/rev/68c5d6630ca3 Modified Files: sql/test/rel-optimizers/Tests/merge-ors-multi-col-eq-to-cmp_in.test Branch: default Log Message: Single-threaded we seem to have more information about the tables. diffs (39 lines): diff --git a/sql/test/rel-optimizers/Tests/merge-ors-multi-col-eq-to-cmp_in.test b/sql/test/rel-optimizers/Tests/merge-ors-multi-col-eq-to-cmp_in.test --- a/sql/test/rel-optimizers/Tests/merge-ors-multi-col-eq-to-cmp_in.test +++ b/sql/test/rel-optimizers/Tests/merge-ors-multi-col-eq-to-cmp_in.test @@ -98,6 +98,7 @@ 3 60 600 +skipif threads=1 query T nosort plan select * from b where (m = 40 and k > 0) or (m = 20 and k = 200) or (m = 60 and k = 600) @@ -107,6 +108,16 @@ project ( | ) [ (( [ "b"."m", "b"."k" ]) in ( [ int(8) "20", int(11) "200" ], [ int(8) "60", int(11) "600" ])) or (("b"."m") = (int(8) "40"), ("b"."k") > (int(11) "0")) ] ) [ "b"."n", "b"."m", "b"."k" ] +onlyif threads=1 +query T nosort +plan select * from b where (m = 40 and k > 0) or (m = 20 and k = 200) or (m = 60 and k = 600) + +project ( +| select ( +| | table("sys"."b") [ "b"."n", "b"."m", "b"."k" UNIQUE ] +| ) [ (( [ "b"."m", "b"."k" UNIQUE ]) in ( [ int(8) "20", int(11) "200" ], [ int(8) "60", int(11) "600" ])) or (("b"."m") = (int(8) "40"), ("b"."k" UNIQUE) > (int(11) "0")) ] +) [ "b"."n", "b"."m", "b"."k" UNIQUE ] + query II rowsort select m, k from b where (m = 40) or (m = 20 and k = 200) or (m = 0) or (m = 60 and k = 600) or (m = 180) @@ -126,7 +137,7 @@ plan select m, k from b where (m = 40) o project ( | select ( -| | table("sys"."b") [ "b"."m", "b"."k" ] -| ) [ (("b"."m") in (int(8) "40", int(8) "0", int(8) "180")) or (( [ "b"."m", "b"."k" ]) in ( [ int(8) "20", int(11) "200" ], [ int(8) "60", int(11) "600" ])) ] -) [ "b"."m", "b"."k" ] +| | table("sys"."b") [ "b"."m", "b"."k" UNIQUE ] +| ) [ (("b"."m") in (int(8) "40", int(8) "0", int(8) "180")) or (( [ "b"."m", "b"."k" UNIQUE ]) in ( [ int(8) "20", int(11) "200" ], [ int(8) "60", int(11) "600" ])) ] +) [ "b"."m", "b"."k" UNIQUE ] ___ checkin-list mailing list -- checkin-list@monetdb.org To unsubscribe send an email to checkin-list-le...@monetdb.org
MonetDB: default - Enable the use of imprints in range select.
Changeset: b462c6b2160e for MonetDB URL: https://dev.monetdb.org/hg/MonetDB/rev/b462c6b2160e Modified Files: gdk/gdk.h gdk/gdk_align.c gdk/gdk_bat.c gdk/gdk_bbp.c gdk/gdk_imprints.c gdk/gdk_select.c sql/test/BugTracker-2016/Tests/storagemodel.test Branch: default Log Message: Enable the use of imprints in range select. Also, when multiple threads all want to do a select on a slice of the same bat, only one of the threads creates the index and the others wait on a semaphore (before, they all created an index, and the first one to finish got to keep the index and the others would throw theirs away). diffs (186 lines): diff --git a/gdk/gdk.h b/gdk/gdk.h --- a/gdk/gdk.h +++ b/gdk/gdk.h @@ -804,6 +804,7 @@ typedef struct BAT { MT_Lock theaplock; /* lock protecting heap reference changes */ MT_RWLock thashlock;/* lock specifically for hash management */ MT_Lock batIdxLock; /* lock to manipulate other indexes/properties */ + MT_Sema imprsema; /* semaphore to synchronize imprints creation */ Heap *oldtail; /* old tail heap, to be destroyed after commit */ } BAT; diff --git a/gdk/gdk_align.c b/gdk/gdk_align.c --- a/gdk/gdk_align.c +++ b/gdk/gdk_align.c @@ -209,6 +209,7 @@ VIEWcreate(oid seq, BAT *b, BUN l, BUN h MT_lock_destroy(&bn->theaplock); MT_lock_destroy(&bn->batIdxLock); MT_rwlock_destroy(&bn->thashlock); + MT_sema_destroy(&bn->imprsema); GDKfree(bn); return NULL; } diff --git a/gdk/gdk_bat.c b/gdk/gdk_bat.c --- a/gdk/gdk_bat.c +++ b/gdk/gdk_bat.c @@ -144,6 +144,8 @@ BATcreatedesc(oid hseq, int tt, bool hea MT_lock_init(&bn->batIdxLock, name); snprintf(name, sizeof(name), "hashlock%d", bn->batCacheid); /* fits */ MT_rwlock_init(&bn->thashlock, name); + snprintf(name, sizeof(name), "imprsema%d", bn->batCacheid); /* fits */ + MT_sema_init(&bn->imprsema, 1, name); return bn; } @@ -715,6 +717,7 @@ BATdestroy(BAT *b) MT_lock_destroy(&b->theaplock); MT_lock_destroy(&b->batIdxLock); MT_rwlock_destroy(&b->thashlock); + MT_sema_destroy(&b->imprsema); if (b->theap) { GDKfree(b->theap); } diff --git a/gdk/gdk_bbp.c b/gdk/gdk_bbp.c --- a/gdk/gdk_bbp.c +++ b/gdk/gdk_bbp.c @@ -831,6 +831,8 @@ BBPreadEntries(FILE *fp, unsigned bbpver MT_lock_init(&bn->batIdxLock, name); snprintf(name, sizeof(name), "hashlock%d", bn->batCacheid); /* fits */ MT_rwlock_init(&bn->thashlock, name); + snprintf(name, sizeof(name), "imprsema%d", bn->batCacheid); /* fits */ + MT_sema_init(&bn->imprsema, 1, name); ATOMIC_INIT(&bn->theap->refs, 1); if (snprintf(BBP_bak(b.batCacheid), sizeof(BBP_bak(b.batCacheid)), "tmp_%o", (unsigned) b.batCacheid) >= (int) sizeof(BBP_bak(b.batCacheid))) { diff --git a/gdk/gdk_imprints.c b/gdk/gdk_imprints.c --- a/gdk/gdk_imprints.c +++ b/gdk/gdk_imprints.c @@ -492,6 +492,23 @@ BATimprints(BAT *b) size_t pages; MT_lock_unset(&b->batIdxLock); + /* in case there are multiple threads that all want to +* create imprints on slices of the same bat, we use a +* semaphore so that one thread can pass and do the work +* while the other threads wait until the first one is +* done; so when a subsequent thread passes, first check +* whether the work has already been done */ + MT_sema_down(&b->imprsema); + MT_lock_set(&b->batIdxLock); + if (b->timprints != NULL) { + bat_iterator_end(&bi); + if (unfix) + BBPunfix(unfix); + MT_sema_up(&b->imprsema); + MT_lock_unset(&b->batIdxLock); + return GDK_SUCCEED; + } + MT_lock_unset(&b->batIdxLock); MT_thread_setalgorithm("create imprints"); if (s2) @@ -511,6 +528,7 @@ BATimprints(BAT *b) bat_iterator_end(&bi); if (unfix) BBPunfix(unfix); + MT_sema_up(&b->imprsema); return GDK_FAIL; } strconcat_len(imprints->imprints.filename, @@ -528,6 +546,7 @@ BATimprints(BAT *b) bat_iterator_end(&bi); if (unfix) BBPunfix(unfix); + MT_sema_up(&b->imprsema); return GDK_FAIL; } s2 = BATunique(b, s1); @@ -537,6 +556,7 @@ BATimprints(BAT *b) bat_iterator_end(&bi);
MonetDB: Aug2024 - Slight improvement in semijoin: if r is uniqu...
Changeset: a4af77b5e0e3 for MonetDB URL: https://dev.monetdb.org/hg/MonetDB/rev/a4af77b5e0e3 Modified Files: gdk/gdk_join.c Branch: Aug2024 Log Message: Slight improvement in semijoin: if r is unique, use that information. diffs (39 lines): diff --git a/gdk/gdk_join.c b/gdk/gdk_join.c --- a/gdk/gdk_join.c +++ b/gdk/gdk_join.c @@ -4213,7 +4213,7 @@ leftjoin(BAT **r1p, BAT **r2p, BAT **r3p /* maybe do a hash join on the swapped operands; if we * do, we need to sort the output, so we take that into * account as well */ - bool lhash, plhash, lcand; + bool lhash, plhash, lcand, rkey = r->tkey; double lcost; lcost = joincost(l, rci.ncand, &lci, &lhash, &plhash, &lcand); @@ -4221,7 +4221,7 @@ leftjoin(BAT **r1p, BAT **r2p, BAT **r3p rc = GDK_FAIL; goto doreturn; } - if (semi) + if (semi && !rkey) lcost += rci.ncand; /* cost of BATunique(r) */ /* add cost of sorting; obviously we don't know the * size, so we guess that the size of the output is @@ -4230,7 +4230,7 @@ leftjoin(BAT **r1p, BAT **r2p, BAT **r3p if (lcost < rcost) { BAT *tmp = sr; BAT *r1, *r2; - if (semi) { + if (semi && !rkey) { sr = BATunique(r, sr); if (sr == NULL) { rc = GDK_FAIL; @@ -4241,7 +4241,7 @@ leftjoin(BAT **r1p, BAT **r2p, BAT **r3p rc = hashjoin(&r2, &r1, NULL, r, l, &rci, &lci, nil_matches, false, false, false, false, false, false, estimate, t0, true, lhash, plhash, lcand, func); - if (semi) + if (semi && !rkey) BBPunfix(sr->batCacheid); if (rc != GDK_SUCCEED) goto doreturn; ___ checkin-list mailing list -- checkin-list@monetdb.org To unsubscribe send an email to checkin-list-le...@monetdb.org
MonetDB: default - Merge with Aug2024 branch.
Changeset: b460ee6a1a41 for MonetDB URL: https://dev.monetdb.org/hg/MonetDB/rev/b460ee6a1a41 Modified Files: gdk/gdk_select.c sql/storage/store.c Branch: default Log Message: Merge with Aug2024 branch. diffs (266 lines): diff --git a/documentation/source/manual_pages/mclient.rst b/documentation/source/manual_pages/mclient.rst --- a/documentation/source/manual_pages/mclient.rst +++ b/documentation/source/manual_pages/mclient.rst @@ -52,6 +52,9 @@ for *mclient* to mal looks like this: ** reading the *.monetdb* file, set the variable **DOTMONETDBFILE** to the empty string in the environment. +When working interactively, an interrupt (usually control-C) will clear +any query being edited and will stop any running query. + OPTIONS === diff --git a/documentation/source/manual_pages/mserver5.rst.in b/documentation/source/manual_pages/mserver5.rst.in --- a/documentation/source/manual_pages/mserver5.rst.in +++ b/documentation/source/manual_pages/mserver5.rst.in @@ -84,6 +84,12 @@ MSERVER5 OPTIONS file) which should be located in the lib/monetdb5 directory. This option can be repeated for different modules. +**--without-geom** + Start the server without *geom* support, even if it is available. + Normally the server will refuse to start if *geom* is loaded, but the + database was created by a server without *geom* support. With this + option it is possible to start the server anyway. + **--help** Print list of options. diff --git a/documentation/source/manual_pages/msqldump.rst b/documentation/source/manual_pages/msqldump.rst --- a/documentation/source/manual_pages/msqldump.rst +++ b/documentation/source/manual_pages/msqldump.rst @@ -73,8 +73,32 @@ OPTIONS **--functions** (**-f**) Only dump functions definitions. -**--table=**\ *table* (**-t** *table*) - Only dump the specified *table*. +**--table=**\ [\ *schema*\ **.**\ ]\ *table* (**-t** [\ *schema*\ **.**]\ *table*\ ) + Only dump the specified table. If *schema* is not specified, the + user's current schema is used. When either *schema* or *table* + contains percent characters, all tables matching the (SQL) search + pattern are dumped. + +**--output=**\ *filename* (**-o** *filename*\ ) + Write the dump to the specified file. If *filename* contains a + recognized compression scheme suffix, the file will be compressed + using that scheme. + +**--outputdir=**\ *directory* (**-O** *directory*\ ) + Write the dump to the file **dump.sql** in the specified directory + which is created if it does not exist. The data of the tables will be + stored in separate CSV files in the directory. If the + **--compression** option is used, the CSV files will be compressed + using the specified compression scheme. If both the **--outputdir** + option and the **--output** option are specified, the last one is + used. The **--outputdir** option is not compatible with the --inserts + option. + +**--compression=**\ *extension* (**-x** *extension*\ ) + Compress the CSV files produced with the **--outputdir** option using + the specified compression scheme. Depending on how the program is + compiled, the following compression schemes are recognized: **gz**, + **bz2**, **xz**, and **lz4**. **--quiet** (**-q**) Don't print the welcome message. diff --git a/gdk/gdk_imprints.c b/gdk/gdk_imprints.c --- a/gdk/gdk_imprints.c +++ b/gdk/gdk_imprints.c @@ -140,9 +140,8 @@ #define GETBIN(Z,X,B) \ do {\ - int _i; \ Z = 0; \ - for (_i = 1; _i < B; _i++) \ + for (int _i = 1; _i < B; _i++) \ Z += ((X) >= bins[_i]); \ } while (0) diff --git a/gdk/gdk_select.c b/gdk/gdk_select.c --- a/gdk/gdk_select.c +++ b/gdk/gdk_select.c @@ -110,6 +110,7 @@ hashselect(BATiter *bi, struct canditer oid seq; int (*cmp)(const void *, const void *); BAT *b2 = NULL; + BATiter pbi = {0}; size_t counter = 0; QryCtx *qry_ctx = MT_thread_get_qry_ctx(); @@ -130,14 +131,18 @@ hashselect(BATiter *bi, struct canditer d = bi->baseoff - b2->tbaseoff; l += d; h += d; - bat_iterator_end(bi); - *bi = bat_iterator(b2); + pbi = bat_iterator(b2); + bi = &pbi; + } else { + phash = false; } if (!havehash) { if (BAThash(bi->b) != GDK_SUCCEED) { BBPreclaim(bn); BBPreclaim(b2); + if (phash) + bat_iterator_end(&pbi); return NULL; } MT_rwlock_rdlock(&bi->b->thashlock); @@ -200,10 +205,14 @@ hashselect(BATiter *bi, struct canditer bn->tsorted = true;
MonetDB: Aug2024 - Check that queries return results.
Changeset: 5f826bc18fa9 for MonetDB URL: https://dev.monetdb.org/hg/MonetDB/rev/5f826bc18fa9 Modified Files: sql/test/remote/Tests/partition_elim.test testing/sqllogictest.py Branch: Aug2024 Log Message: Check that queries return results. diffs (65 lines): diff --git a/sql/test/remote/Tests/partition_elim.test b/sql/test/remote/Tests/partition_elim.test --- a/sql/test/remote/Tests/partition_elim.test +++ b/sql/test/remote/Tests/partition_elim.test @@ -93,21 +93,17 @@ query R rowsort select y from test4 where y between 0 and -1 -query R rowsort +statement ok analyze sys.test1 - -query R rowsort +statement ok analyze sys.test2 - -query R rowsort +statement ok analyze sys.test3 - -query R rowsort +statement ok analyze sys.test4 - query T python .explain.function_histogram explain select x,y from test where x between 4.0 and 6.0 diff --git a/testing/sqllogictest.py b/testing/sqllogictest.py --- a/testing/sqllogictest.py +++ b/testing/sqllogictest.py @@ -408,6 +408,7 @@ class SQLLogic: def exec_query(self, query, columns, sorting, pyscript, hashlabel, nresult, hash, expected, conn=None, verbose=False) -> bool: err = False crs = conn.cursor() if conn else self.crs +crs.description = None try: if verbose: print(f'Executing:\n{query}') @@ -421,6 +422,10 @@ class SQLLogic: tpe, value, traceback = sys.exc_info() self.query_error(query, 'unexpected error from pymonetdb', str(value)) return ['statement', 'error'], [] +if crs.description is None: +# it's not a query, it's a statement +self.query_error(query, 'query without results') +return ['statement', 'ok'], [] try: data = crs.fetchall() except KeyboardInterrupt: @@ -906,9 +911,10 @@ class SQLLogic: self.writeline(' '.join(result1)) for line in query: self.writeline(line.rstrip(), replace=True) -self.writeline('') -for line in result2: -self.writeline(line) +if result1[0] == 'query': +self.writeline('') +for line in result2: +self.writeline(line) else: self.writeline(qrline.rstrip()) for line in query: ___ checkin-list mailing list -- checkin-list@monetdb.org To unsubscribe send an email to checkin-list-le...@monetdb.org
MonetDB: Aug2024 - Some fixes for imprints.
Changeset: 69e9cf5d27da for MonetDB URL: https://dev.monetdb.org/hg/MonetDB/rev/69e9cf5d27da Modified Files: gdk/gdk_imprints.c gdk/gdk_select.c Branch: Aug2024 Log Message: Some fixes for imprints. diffs (78 lines): diff --git a/gdk/gdk_imprints.c b/gdk/gdk_imprints.c --- a/gdk/gdk_imprints.c +++ b/gdk/gdk_imprints.c @@ -140,9 +140,8 @@ #define GETBIN(Z,X,B) \ do {\ - int _i; \ Z = 0; \ - for (_i = 1; _i < B; _i++) \ + for (int _i = 1; _i < B; _i++) \ Z += ((X) >= bins[_i]); \ } while (0) diff --git a/gdk/gdk_select.c b/gdk/gdk_select.c --- a/gdk/gdk_select.c +++ b/gdk/gdk_select.c @@ -348,8 +348,8 @@ quickins(oid *dst, BUN cnt, oid o, BAT * const uint##B##_t *restrict im = (uint##B##_t *) imprints->imps; \ uint##B##_t mask = 0, innermask;\ const int tpe = ATOMbasetype(bi->type); \ - const int lbin = IMPSgetbin(tpe, imprints->bits, imprints->bins, tl); \ - const int hbin = IMPSgetbin(tpe, imprints->bits, imprints->bins, th); \ + const int lbin = IMPSgetbin(tpe, imprints->bits, imprints->bins, &vl); \ + const int hbin = IMPSgetbin(tpe, imprints->bits, imprints->bins, &vh); \ /* note: (1stats[64+B-1-ii]]; \ + } \ + for (BUN ii = B; ii != 0; ii--) { \ + if (is_##TYPE##_nil(imp_max) && imp_cnt[ii-1]) { \ + imp_max = basesrc[imprints->stats[64+ii-1]]; \ + break; \ } \ } \ assert(!is_##TYPE##_nil(imp_min) && \ @@ -2286,16 +2290,12 @@ BATselect(BAT *b, BAT *s, const void *tl imprints = pb->timprints; if (imprints != NULL) IMPSincref(imprints); - else - imprints = NULL; MT_lock_unset(&pb->batIdxLock); } else { MT_lock_set(&b->batIdxLock); imprints = b->timprints; if (imprints != NULL) IMPSincref(imprints); - else - imprints = NULL; MT_lock_unset(&b->batIdxLock); } } @@ -2660,16 +2660,12 @@ rangejoin(BAT *r1, BAT *r2, BAT *l, BAT imprints = tmp->timprints; if (imprints != NULL) IMPSincref(imprints); - else - imprints = NULL; MT_lock_unset(&tmp->batIdxLock); } else { MT_lock_set(&l->batIdxLock); imprints = l->timprints; if (imprints != NULL) IMPSincref(imprints); - else - imprints = NULL; MT_lock_unset(&l->batIdxLock); } /* in the unlikely case that the imprints were removed ___ checkin-list mailing list -- checkin-list@monetdb.org To unsubscribe send an email to checkin-list-le...@monetdb.org
MonetDB: Aug2024 - Fix anti-equi select on view when using hashs...
Changeset: ecbd9c7bdd82 for MonetDB URL: https://dev.monetdb.org/hg/MonetDB/rev/ecbd9c7bdd82 Modified Files: gdk/gdk_select.c Branch: Aug2024 Log Message: Fix anti-equi select on view when using hashselect. diffs (47 lines): diff --git a/gdk/gdk_select.c b/gdk/gdk_select.c --- a/gdk/gdk_select.c +++ b/gdk/gdk_select.c @@ -110,6 +110,7 @@ hashselect(BATiter *bi, struct canditer oid seq; int (*cmp)(const void *, const void *); BAT *b2 = NULL; + BATiter pbi = {0}; size_t counter = 0; QryCtx *qry_ctx = MT_thread_get_qry_ctx(); @@ -130,14 +131,18 @@ hashselect(BATiter *bi, struct canditer d = bi->baseoff - b2->tbaseoff; l += d; h += d; - bat_iterator_end(bi); - *bi = bat_iterator(b2); + pbi = bat_iterator(b2); + bi = &pbi; + } else { + phash = false; } if (!havehash) { if (BAThash(bi->b) != GDK_SUCCEED) { BBPreclaim(bn); BBPreclaim(b2); + if (phash) + bat_iterator_end(&pbi); return NULL; } MT_rwlock_rdlock(&bi->b->thashlock); @@ -200,10 +205,14 @@ hashselect(BATiter *bi, struct canditer bn->tsorted = true; bn->trevsorted = bn->batCount <= 1; bn->tseqbase = bn->batCount == 0 ? 0 : bn->batCount == 1 ? *dst : oid_nil; + if (phash) + bat_iterator_end(&pbi); return bn; bailout: MT_rwlock_rdunlock(&bi->b->thashlock); + if (phash) + bat_iterator_end(&pbi); BBPreclaim(b2); BBPreclaim(bn); return NULL; ___ checkin-list mailing list -- checkin-list@monetdb.org To unsubscribe send an email to checkin-list-le...@monetdb.org
MonetDB: default - Change BATnegcands interface: add argument fo...
Changeset: 96111b28e6c7 for MonetDB URL: https://dev.monetdb.org/hg/MonetDB/rev/96111b28e6c7 Modified Files: clients/Tests/exports.stable.out gdk/gdk_cand.c gdk/gdk_cand.h gdk/gdk_private.h gdk/gdk_select.c monetdb5/modules/atoms/str.c monetdb5/modules/mal/pcre.c Branch: default Log Message: Change BATnegcands interface: add argument for tseqbase. diffs (108 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 @@ -167,7 +167,7 @@ BAT *BATmergecand(BAT *a, BAT *b); void *BATmin(BAT *b, void *aggr); void *BATmin_skipnil(BAT *b, void *aggr, bit skipnil); gdk_return BATmode(BAT *b, bool transient); -BAT *BATnegcands(BUN nr, BAT *odels); +BAT *BATnegcands(oid tseq, BUN nr, BAT *odels); BAT *BATnil_grp(BAT *l, BAT *g, BAT *e, BAT *s); bool BATordered(BAT *b); bool BATordered_rev(BAT *b); diff --git a/gdk/gdk_cand.c b/gdk/gdk_cand.c --- a/gdk/gdk_cand.c +++ b/gdk/gdk_cand.c @@ -1293,7 +1293,7 @@ canditer_slice2val(const struct canditer } BAT * -BATnegcands2(oid tseq, BUN nr, BAT *odels) +BATnegcands(oid tseq, BUN nr, BAT *odels) { const char *nme; Heap *dels; @@ -1363,12 +1363,6 @@ BATnegcands2(oid tseq, BUN nr, BAT *odel } BAT * -BATnegcands(BUN nr, BAT *odels) -{ - return BATnegcands2(0, nr, odels); -} - -BAT * BATmaskedcands(oid hseq, BUN nr, BAT *masked, bool selected) { const char *nme; diff --git a/gdk/gdk_cand.h b/gdk/gdk_cand.h --- a/gdk/gdk_cand.h +++ b/gdk/gdk_cand.h @@ -228,7 +228,7 @@ gdk_export BAT *canditer_slice(const str gdk_export BAT *canditer_sliceval(const struct canditer *ci, oid lo, oid hi); gdk_export BAT *canditer_slice2(const struct canditer *ci, BUN lo1, BUN hi1, BUN lo2, BUN hi2); gdk_export BAT *canditer_slice2val(const struct canditer *ci, oid lo1, oid hi1, oid lo2, oid hi2); -gdk_export BAT *BATnegcands(BUN nr, BAT *odels); +gdk_export BAT *BATnegcands(oid tseq, BUN nr, BAT *odels); gdk_export BAT *BATmaskedcands(oid hseq, BUN nr, BAT *masked, bool selected); gdk_export BAT *BATunmask(BAT *b); diff --git a/gdk/gdk_private.h b/gdk/gdk_private.h --- a/gdk/gdk_private.h +++ b/gdk/gdk_private.h @@ -78,8 +78,6 @@ BAT *BATload_intern(bat bid, bool lock) gdk_return BATmaterialize(BAT *b, BUN cap) __attribute__((__warn_unused_result__)) __attribute__((__visibility__("hidden"))); -BAT *BATnegcands2(oid hseq, BUN nr, BAT *odels) - __attribute__((__visibility__("hidden"))); gdk_return BATsave_iter(BAT *bd, BATiter *bi, BUN size) __attribute__((__visibility__("hidden"))); void BATsetdims(BAT *b, uint16_t width) diff --git a/gdk/gdk_select.c b/gdk/gdk_select.c --- a/gdk/gdk_select.c +++ b/gdk/gdk_select.c @@ -1742,7 +1742,7 @@ BATselect(BAT *b, BAT *s, const void *tl if (s) { bn2 = BATdiffcand(s, bn); } else { - bn2 = BATnegcands2(ci.seq, bi.count, bn); + bn2 = BATnegcands(ci.seq, bi.count, bn); } bat_iterator_end(&bi); BBPreclaim(bn); @@ -2288,7 +2288,7 @@ BATselect(BAT *b, BAT *s, const void *tl if (s) { bn2 = BATdiffcand(s, bn); } else { - bn2 = BATnegcands2(ci.seq, bi.count, bn); + bn2 = BATnegcands(ci.seq, bi.count, bn); } BBPreclaim(bn); bn = bn2; diff --git a/monetdb5/modules/atoms/str.c b/monetdb5/modules/atoms/str.c --- a/monetdb5/modules/atoms/str.c +++ b/monetdb5/modules/atoms/str.c @@ -1959,7 +1959,7 @@ STRselect(MalStkPtr stk, InstrPtr pci, assert(rev->batCount == old_s->batCount - bn->batCount); #endif } else - rev = BATnegcands(b->batCount, bn); + rev = BATnegcands(0, b->batCount, bn); BBPreclaim(bn); bn = rev; 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 @@ -1623,8 +1623,8 @@ PCRElikeselect(bat *ret, const bat *bid, } else - rev = BATnegcands(b->batCount, bn); - /* BAT *rev = BATnegcands(b->batCount, bn); */ + rev = BATnegcands(0, b->batCount, bn); + /* BAT *rev = BATnegcands(0, b->batCount, bn); */ BBPunfix(bn->batCacheid); bn = rev; } ___ check
MonetDB: Aug2024 - Updated manual pages.
Changeset: 06d10c8d5ab4 for MonetDB URL: https://dev.monetdb.org/hg/MonetDB/rev/06d10c8d5ab4 Modified Files: documentation/source/manual_pages/mclient.rst documentation/source/manual_pages/mserver5.rst.in documentation/source/manual_pages/msqldump.rst Branch: Aug2024 Log Message: Updated manual pages. diffs (67 lines): diff --git a/documentation/source/manual_pages/mclient.rst b/documentation/source/manual_pages/mclient.rst --- a/documentation/source/manual_pages/mclient.rst +++ b/documentation/source/manual_pages/mclient.rst @@ -52,6 +52,9 @@ for *mclient* to mal looks like this: ** reading the *.monetdb* file, set the variable **DOTMONETDBFILE** to the empty string in the environment. +When working interactively, an interrupt (usually control-C) will clear +any query being edited and will stop any running query. + OPTIONS === diff --git a/documentation/source/manual_pages/mserver5.rst.in b/documentation/source/manual_pages/mserver5.rst.in --- a/documentation/source/manual_pages/mserver5.rst.in +++ b/documentation/source/manual_pages/mserver5.rst.in @@ -84,6 +84,12 @@ MSERVER5 OPTIONS file) which should be located in the lib/monetdb5 directory. This option can be repeated for different modules. +**--without-geom** + Start the server without *geom* support, even if it is available. + Normally the server will refuse to start if *geom* is loaded, but the + database was created by a server without *geom* support. With this + option it is possible to start the server anyway. + **--help** Print list of options. diff --git a/documentation/source/manual_pages/msqldump.rst b/documentation/source/manual_pages/msqldump.rst --- a/documentation/source/manual_pages/msqldump.rst +++ b/documentation/source/manual_pages/msqldump.rst @@ -73,8 +73,32 @@ OPTIONS **--functions** (**-f**) Only dump functions definitions. -**--table=**\ *table* (**-t** *table*) - Only dump the specified *table*. +**--table=**\ [\ *schema*\ **.**\ ]\ *table* (**-t** [\ *schema*\ **.**]\ *table*\ ) + Only dump the specified table. If *schema* is not specified, the + user's current schema is used. When either *schema* or *table* + contains percent characters, all tables matching the (SQL) search + pattern are dumped. + +**--output=**\ *filename* (**-o** *filename*\ ) + Write the dump to the specified file. If *filename* contains a + recognized compression scheme suffix, the file will be compressed + using that scheme. + +**--outputdir=**\ *directory* (**-O** *directory*\ ) + Write the dump to the file **dump.sql** in the specified directory + which is created if it does not exist. The data of the tables will be + stored in separate CSV files in the directory. If the + **--compression** option is used, the CSV files will be compressed + using the specified compression scheme. If both the **--outputdir** + option and the **--output** option are specified, the last one is + used. The **--outputdir** option is not compatible with the --inserts + option. + +**--compression=**\ *extension* (**-x** *extension*\ ) + Compress the CSV files produced with the **--outputdir** option using + the specified compression scheme. Depending on how the program is + compiled, the following compression schemes are recognized: **gz**, + **bz2**, **xz**, and **lz4**. **--quiet** (**-q**) Don't print the welcome message. ___ checkin-list mailing list -- checkin-list@monetdb.org To unsubscribe send an email to checkin-list-le...@monetdb.org
MonetDB: default - Merge with Aug2024 branch.
Changeset: 9f060761fbbf for MonetDB URL: https://dev.monetdb.org/hg/MonetDB/rev/9f060761fbbf Modified Files: MonetDB.spec clients/Tests/MAL-signatures-hge.test clients/Tests/MAL-signatures.test clients/mapilib/Tests/tlssecurity.py clients/mapilib/mapi_intern.h gdk/gdk.h gdk/gdk_bbp.c gdk/gdk_group.c monetdb5/modules/kernel/algebra.c monetdb5/modules/kernel/mmath.c monetdb5/modules/mal/mat.c monetdb5/optimizer/opt_generator.c sql/backends/monet5/generator/generator.c sql/backends/monet5/rel_bin.c sql/backends/monet5/sql.c sql/backends/monet5/sql_gencode.c sql/backends/monet5/sql_statement.c sql/backends/monet5/sql_upgrades.c sql/common/sql_types.c sql/server/rel_exp.c sql/server/rel_optimize_sel.c sql/server/rel_schema.c sql/server/rel_select.c sql/storage/bat/bat_storage.c sql/storage/bat/bat_storage.h sql/storage/sql_storage.h sql/storage/store.c testing/Mtest.py.in Branch: default Log Message: Merge with Aug2024 branch. diffs (truncated from 5412 to 300 lines): diff --git a/CMakeLists.txt b/CMakeLists.txt --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -57,7 +57,7 @@ monetdb_default_compiler_options() include(monetdb-defines) -# required for symbol existance tests +# required for symbol existence tests if(${CMAKE_SYSTEM_NAME} STREQUAL "Linux") add_definitions(-D_XOPEN_SOURCE -D_GNU_SOURCE) set(CMAKE_REQUIRED_DEFINITIONS "${CMAKE_REQUIRED_DEFINITIONS} -D_GNU_SOURCE") diff --git a/MonetDB.spec b/MonetDB.spec --- a/MonetDB.spec +++ b/MonetDB.spec @@ -36,7 +36,7 @@ # for Enterprise Linux (EPEL) repository is not available, you can # disable its use by providing rpmbuild or mock with the "--without # epel" option. -# If the EPEL repository is availabe, or if building for Fedora, most +# If the EPEL repository is available, or if building for Fedora, most # optional sub packages can be built. We indicate that here by # setting the macro fedpkgs to 1. If the EPEL repository is not # available and we are not building for Fedora, we set fedpkgs to 0. diff --git a/clients/ChangeLog-Archive b/clients/ChangeLog-Archive --- a/clients/ChangeLog-Archive +++ b/clients/ChangeLog-Archive @@ -242,7 +242,7 @@ - The tool mnc was removed from installations * Wed Nov 7 2012 Sjoerd Mullender - 11.15.1-20130212 -- msqldump: Implmented an option (--table/-t) to dump a single table. +- msqldump: Implemented an option (--table/-t) to dump a single table. - Changed msqdump's trace option to be in line with mclient. In both cases, the long option is --Xdebug and the short option is -X. @@ -251,7 +251,7 @@ * Thu Jul 19 2012 Gijs Molenaar - 11.13.1-20121010 - all strings returned by python2 are unicode, removed use_unicode option -- python2 and 3 type convertion speed improvements +- python2 and 3 type conversion speed improvements - python2 uses new styl objects now (bug #3104) - split python2 and python3 @@ -260,7 +260,7 @@ returned by the SQL-server. * Fri Jun 29 2012 Sjoerd Mullender - 11.11.1-20120706 -- ODBC: Fixed a bug where SQLNativeSql expected a statment handle instead +- ODBC: Fixed a bug where SQLNativeSql expected a statement handle instead of a connection handle. * Wed May 23 2012 Fabian Groffen - 11.9.7-20120607 @@ -411,7 +411,7 @@ * Mon Apr 18 2011 Fabian Groffen - 11.5.1-20110907 - When the first non-option argument of mclient does not refer to an - exising file, it now is taken as database name. This allows to simply + existing file, it now is taken as database name. This allows to simply do `mclient mydb`. * Fri Jul 1 2011 Fabian Groffen - 11.3.5-20110720 @@ -490,7 +490,7 @@ * Tue Sep 14 2010 Sjoerd Mullender - 1.40.1-20101029 - The \d and \D commands now require a space if they are followed by a - table name. This is to accomodate future expansion where \d and \D + table name. This is to accommodate future expansion where \d and \D could be immediately followed by another letter to indicate the type of object of interest. - Implemented dumping of "external" functions. This fixes bug 2546. diff --git a/clients/Tests/MAL-signatures-hge.test b/clients/Tests/MAL-signatures-hge.test --- a/clients/Tests/MAL-signatures-hge.test +++ b/clients/Tests/MAL-signatures-hge.test @@ -3332,17 +3332,17 @@ aggr zero_or_one command aggr.zero_or_one(X_0:bat[:any_1]):any_1 zero_or_one; -if col contains exactly one value return this. Incase of more raise an exception else return nil +if col contains exactly one value return this. In case of more raise an exception else return nil aggr zero_or_one command aggr.zero_or_one(X_0:bat[:any_1], X_1:bit):any_1 zero_or_one_error; -if col contains exactly one value return this. Incase of more raise an exception if err is true else
MonetDB: Aug2024 - English. Ran codespell and fixed a lot of wh...
/storage/sql_storage.h sql/storage/store.c sql/test/BugTracker-2009/Tests/All sql/test/miscellaneous/Tests/select_groupby.sql testing/Mconvert.py.in testing/Mtest.py.in testing/SQLogicConvertNotes testing/helpers.py testing/malmapi.py testing/mapicursor.py testing/sqltest.py tools/merovingian/ChangeLog-Archive tools/merovingian/client/monetdb.c tools/merovingian/daemon/argvcmds.c tools/merovingian/daemon/client.c tools/merovingian/daemon/controlrunner.c tools/merovingian/daemon/merovingian.c tools/merovingian/daemon/monetdbd.1.in tools/merovingian/daemon/multiplex-funnel.c tools/merovingian/daemon/snapshot.c tools/merovingian/utils/control.c tools/merovingian/utils/utils.c tools/mserver/mserver5.1.in Branch: Aug2024 Log Message: English. Ran codespell and fixed a lot of what it reported. diffs (truncated from 5761 to 300 lines): diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md --- a/.github/ISSUE_TEMPLATE/bug_report.md +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -1,6 +1,6 @@ --- name: Bug report -about: Create a report to help us improve the sytem +about: Create a report to help us improve the system title: '' labels: '' assignees: '' diff --git a/CMakeLists.txt b/CMakeLists.txt --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -57,7 +57,7 @@ monetdb_default_compiler_options() include(monetdb-defines) -# required for symbol existance tests +# required for symbol existence tests if(${CMAKE_SYSTEM_NAME} STREQUAL "Linux") add_definitions(-D_XOPEN_SOURCE -D_GNU_SOURCE) set(CMAKE_REQUIRED_DEFINITIONS "${CMAKE_REQUIRED_DEFINITIONS} -D_GNU_SOURCE") diff --git a/MonetDB.spec b/MonetDB.spec --- a/MonetDB.spec +++ b/MonetDB.spec @@ -36,7 +36,7 @@ # for Enterprise Linux (EPEL) repository is not available, you can # disable its use by providing rpmbuild or mock with the "--without # epel" option. -# If the EPEL repository is availabe, or if building for Fedora, most +# If the EPEL repository is available, or if building for Fedora, most # optional sub packages can be built. We indicate that here by # setting the macro fedpkgs to 1. If the EPEL repository is not # available and we are not building for Fedora, we set fedpkgs to 0. diff --git a/clients/ChangeLog-Archive b/clients/ChangeLog-Archive --- a/clients/ChangeLog-Archive +++ b/clients/ChangeLog-Archive @@ -242,7 +242,7 @@ - The tool mnc was removed from installations * Wed Nov 7 2012 Sjoerd Mullender - 11.15.1-20130212 -- msqldump: Implmented an option (--table/-t) to dump a single table. +- msqldump: Implemented an option (--table/-t) to dump a single table. - Changed msqdump's trace option to be in line with mclient. In both cases, the long option is --Xdebug and the short option is -X. @@ -251,7 +251,7 @@ * Thu Jul 19 2012 Gijs Molenaar - 11.13.1-20121010 - all strings returned by python2 are unicode, removed use_unicode option -- python2 and 3 type convertion speed improvements +- python2 and 3 type conversion speed improvements - python2 uses new styl objects now (bug #3104) - split python2 and python3 @@ -260,7 +260,7 @@ returned by the SQL-server. * Fri Jun 29 2012 Sjoerd Mullender - 11.11.1-20120706 -- ODBC: Fixed a bug where SQLNativeSql expected a statment handle instead +- ODBC: Fixed a bug where SQLNativeSql expected a statement handle instead of a connection handle. * Wed May 23 2012 Fabian Groffen - 11.9.7-20120607 @@ -411,7 +411,7 @@ * Mon Apr 18 2011 Fabian Groffen - 11.5.1-20110907 - When the first non-option argument of mclient does not refer to an - exising file, it now is taken as database name. This allows to simply + existing file, it now is taken as database name. This allows to simply do `mclient mydb`. * Fri Jul 1 2011 Fabian Groffen - 11.3.5-20110720 @@ -490,7 +490,7 @@ * Tue Sep 14 2010 Sjoerd Mullender - 1.40.1-20101029 - The \d and \D commands now require a space if they are followed by a - table name. This is to accomodate future expansion where \d and \D + table name. This is to accommodate future expansion where \d and \D could be immediately followed by another letter to indicate the type of object of interest. - Implemented dumping of "external" functions. This fixes bug 2546. diff --git a/clients/Tests/MAL-signatures-hge.test b/clients/Tests/MAL-signatures-hge.test --- a/clients/Tests/MAL-signatures-hge.test +++ b/clients/Tests/MAL-signatures-hge.test @@ -3332,17 +3332,17 @@ aggr zero_or_one command aggr.zero_or_one(X_0:bat[:any_1]):any_1 zero_or_one; -if col contains exactly one value return this. Incase of more raise an exception else return nil +if col contains exactly one value return this. In case of more raise an exception else retur
MonetDB: Aug2024 - Be explicit about which schemas/tables/functi...
Changeset: 9ddd8d1a41e9 for MonetDB URL: https://dev.monetdb.org/hg/MonetDB/rev/9ddd8d1a41e9 Modified Files: sql/backends/monet5/sql_scenario.c Branch: Aug2024 Log Message: Be explicit about which schemas/tables/functions belong to the system. Only the sys, tmp, json, profiler, logging, and information_schema shemas are system schemas; only tables/functions in system schemas are system tables/functions. Fixes #7281. diffs (30 lines): 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 @@ -754,16 +754,18 @@ SQLinit(Client c, const char *initpasswd const char *createdb_inline = "create trigger system_update_schemas after update on sys.schemas for each statement call sys_update_schemas();\n" //"create trigger system_update_tables after update on sys._tables for each statement call sys_update_tables();\n" - /* only system functions until now */ - "update sys.functions set system = true;\n" - /* only system tables until now */ - "update sys._tables set system = true;\n" - /* only system schemas until now */ - "update sys.schemas set system = true;\n" + /* set "system" attribute for all system schemas; be +* explicit about which ones they are (id 2000 is sys, +* 2114 is tmp; these values are immutable) */ + "update sys.schemas set system = true where id in (2000, 2114) or name in ('json', 'profiler', 'logging', 'information_schema');\n" /* correct invalid FK schema ids, set them to schema id 2000 * (the "sys" schema) */ - "update sys.types set schema_id = 2000 where schema_id = 0 and schema_id not in (select id from sys.schemas);\n" - "update sys.functions set schema_id = 2000 where schema_id = 0 and schema_id not in (select id from sys.schemas);\n"; + "update sys.types set schema_id = 2000 where schema_id = 0;\n" + "update sys.functions set schema_id = 2000 where schema_id = 0;\n" + /* set system attribute for all system tables and +* functions (i.e. ones in system schemas) */ + "update sys.functions set system = true where schema_id in (select id from sys.schemas s where s.system);\n" + "update sys._tables set system = true where schema_id in (select id from sys.schemas s where s.system);\n"; msg = SQLstatementIntern(c, createdb_inline, "sql.init", TRUE, FALSE, NULL); if (m->sa) sa_destroy(m->sa); ___ checkin-list mailing list -- checkin-list@monetdb.org To unsubscribe send an email to checkin-list-le...@monetdb.org
MonetDB: default - Merge with Aug2024 branch.
Changeset: 43c2b593fb5f for MonetDB URL: https://dev.monetdb.org/hg/MonetDB/rev/43c2b593fb5f Modified Files: MonetDB.spec Branch: default Log Message: Merge with Aug2024 branch. diffs (25 lines): diff --git a/.hgeol b/.hgeol --- a/.hgeol +++ b/.hgeol @@ -13,8 +13,10 @@ **.gz = BIN **.ico = BIN **.jpg = BIN +**.lz4 = BIN **.pdf = BIN **.png = BIN +**.xz = BIN **.zip = BIN # all the rest is text diff --git a/MonetDB.spec b/MonetDB.spec --- a/MonetDB.spec +++ b/MonetDB.spec @@ -975,6 +975,7 @@ fi rm "${RPM_BUILD_ROOT}"%{_bindir}/{M{convert.py,test.py,z.py},bincopydata,example_proxy,m{alsample.pl,client,ktest.py,onetdb{,d},s{erver5,qldump},urltest},s{ample{0,1,4},hutdowntest,mack0{0,1},ql{logictest.py,sample.p{hp,l}},treamcat},testcondvar} rm -r "${RPM_BUILD_ROOT}"%{_datadir}/doc/MonetDB* rm "${RPM_BUILD_ROOT}"%{_datadir}/selinux/*/monetdb.pp +rm -r "${RPM_BUILD_ROOT}"%{_datadir}/monetdb rm -r "${RPM_BUILD_ROOT}"%{_includedir}/monetdb rm "${RPM_BUILD_ROOT}"%{_libdir}/*.so "${RPM_BUILD_ROOT}"%{_libdir}/libmonetdbe.so.* rm -r "${RPM_BUILD_ROOT}"%{_libdir}/pkgconfig ___ checkin-list mailing list -- checkin-list@monetdb.org To unsubscribe send an email to checkin-list-le...@monetdb.org
MonetDB: Aug2024 - Remove cmake directory when building compat r...
Changeset: 99d30dbdd82f for MonetDB URL: https://dev.monetdb.org/hg/MonetDB/rev/99d30dbdd82f Modified Files: MonetDB.spec Branch: Aug2024 Log Message: Remove cmake directory when building compat rpms. diffs (11 lines): diff --git a/MonetDB.spec b/MonetDB.spec --- a/MonetDB.spec +++ b/MonetDB.spec @@ -976,6 +976,7 @@ fi rm "${RPM_BUILD_ROOT}"%{_bindir}/{M{convert.py,test.py,z.py},bincopydata,example_proxy,m{alsample.pl,client,ktest.py,onetdb{,d},s{erver5,qldump},urltest},s{ample{0,1,4},hutdowntest,mack0{0,1},ql{logictest.py,sample.p{hp,l}},treamcat},testcondvar} rm -r "${RPM_BUILD_ROOT}"%{_datadir}/doc/MonetDB* rm "${RPM_BUILD_ROOT}"%{_datadir}/selinux/*/monetdb.pp +rm -r "${RPM_BUILD_ROOT}"%{_datadir}/monetdb rm -r "${RPM_BUILD_ROOT}"%{_includedir}/monetdb rm "${RPM_BUILD_ROOT}"%{_libdir}/*.so "${RPM_BUILD_ROOT}"%{_libdir}/libmonetdbe.so.* rm -r "${RPM_BUILD_ROOT}"%{_libdir}/pkgconfig ___ checkin-list mailing list -- checkin-list@monetdb.org To unsubscribe send an email to checkin-list-le...@monetdb.org
MonetDB: Aug2024 - Two more binary extensions.
Changeset: b356c0d43bbc for MonetDB URL: https://dev.monetdb.org/hg/MonetDB/rev/b356c0d43bbc Modified Files: .hgeol Branch: Aug2024 Log Message: Two more binary extensions. diffs (14 lines): diff --git a/.hgeol b/.hgeol --- a/.hgeol +++ b/.hgeol @@ -13,8 +13,10 @@ **.gz = BIN **.ico = BIN **.jpg = BIN +**.lz4 = BIN **.pdf = BIN **.png = BIN +**.xz = BIN **.zip = BIN # all the rest is text ___ checkin-list mailing list -- checkin-list@monetdb.org To unsubscribe send an email to checkin-list-le...@monetdb.org
MonetDB: default - Cleanup: remove rpm/deb/wix building from cma...
Changeset: 0dad8d6e8d60 for MonetDB URL: https://dev.monetdb.org/hg/MonetDB/rev/0dad8d6e8d60 Removed Files: cmake/Modules/FindCandle.cmake cmake/Modules/FindCreaterepo.cmake cmake/Modules/FindDpkgBuildpackage.cmake cmake/Modules/FindReprepro.cmake cmake/Modules/FindRpmbuild.cmake cmake/monetdb-deb-packages.cmake cmake/monetdb-rpm-packages.cmake cmake/monetdb-wix-packages.cmake misc/packages/deb/changelog misc/packages/deb/copyright misc/packages/rpm/changelog Modified Files: cmake/monetdb-custom-targets.cmake cmake/monetdb-findpackages.cmake cmake/monetdb-functions.cmake cmake/monetdb-packages.cmake Branch: default Log Message: Cleanup: remove rpm/deb/wix building from cmake files. These options are not tested and are not being maintained. diffs (truncated from 11271 to 300 lines): diff --git a/cmake/Modules/FindCandle.cmake b/cmake/Modules/FindCandle.cmake deleted file mode 100644 --- a/cmake/Modules/FindCandle.cmake +++ /dev/null @@ -1,24 +0,0 @@ -#[[ -# SPDX-License-Identifier: MPL-2.0 -# -# This Source Code Form is subject to the terms of the Mozilla Public -# License, v. 2.0. If a copy of the MPL was not distributed with this -# file, You can obtain one at http://mozilla.org/MPL/2.0/. -# -# Copyright 2024 MonetDB Foundation; -# Copyright August 2008 - 2023 MonetDB B.V.; -# Copyright 1997 - July 2008 CWI. -#]] - -find_program(CANDLE_EXECUTABLE NAMES candle - DOC "Create wix packages" -) - -include(FindPackageHandleStandardArgs) - -find_package_handle_standard_args(Candle - DEFAULT_MSG - CANDLE_EXECUTABLE -) - -mark_as_advanced(CANDLE_EXECUTABLE) diff --git a/cmake/Modules/FindCreaterepo.cmake b/cmake/Modules/FindCreaterepo.cmake deleted file mode 100644 --- a/cmake/Modules/FindCreaterepo.cmake +++ /dev/null @@ -1,24 +0,0 @@ -#[[ -# SPDX-License-Identifier: MPL-2.0 -# -# This Source Code Form is subject to the terms of the Mozilla Public -# License, v. 2.0. If a copy of the MPL was not distributed with this -# file, You can obtain one at http://mozilla.org/MPL/2.0/. -# -# Copyright 2024 MonetDB Foundation; -# Copyright August 2008 - 2023 MonetDB B.V.; -# Copyright 1997 - July 2008 CWI. -#]] - -find_program(CREATEREPO_EXECUTABLE NAMES createrepo - DOC "Create rpm repository" -) - -include(FindPackageHandleStandardArgs) - -find_package_handle_standard_args(Createrepo - DEFAULT_MSG - CREATEREPO_EXECUTABLE -) - -mark_as_advanced(CREATEREPO_EXECUTABLE) diff --git a/cmake/Modules/FindDpkgBuildpackage.cmake b/cmake/Modules/FindDpkgBuildpackage.cmake deleted file mode 100644 --- a/cmake/Modules/FindDpkgBuildpackage.cmake +++ /dev/null @@ -1,24 +0,0 @@ -#[[ -# SPDX-License-Identifier: MPL-2.0 -# -# This Source Code Form is subject to the terms of the Mozilla Public -# License, v. 2.0. If a copy of the MPL was not distributed with this -# file, You can obtain one at http://mozilla.org/MPL/2.0/. -# -# Copyright 2024 MonetDB Foundation; -# Copyright August 2008 - 2023 MonetDB B.V.; -# Copyright 1997 - July 2008 CWI. -#]] - -find_program(DPKGBUILDPACKAGE_EXECUTABLE NAMES dpkg-buildpackage - DOC "Create deb packages" -) - -include(FindPackageHandleStandardArgs) - -find_package_handle_standard_args(DpkgBuildpackage - DEFAULT_MSG - DPKGBUILDPACKAGE_EXECUTABLE -) - -mark_as_advanced(DPKGBUILDPACKAGE_EXECUTABLE) diff --git a/cmake/Modules/FindReprepro.cmake b/cmake/Modules/FindReprepro.cmake deleted file mode 100644 --- a/cmake/Modules/FindReprepro.cmake +++ /dev/null @@ -1,24 +0,0 @@ -#[[ -# SPDX-License-Identifier: MPL-2.0 -# -# This Source Code Form is subject to the terms of the Mozilla Public -# License, v. 2.0. If a copy of the MPL was not distributed with this -# file, You can obtain one at http://mozilla.org/MPL/2.0/. -# -# Copyright 2024 MonetDB Foundation; -# Copyright August 2008 - 2023 MonetDB B.V.; -# Copyright 1997 - July 2008 CWI. -#]] - -find_program(REPREPRO_EXECUTABLE NAMES reprepro - DOC "Create debian package repository" -) - -include(FindPackageHandleStandardArgs) - -find_package_handle_standard_args(Reprepro - DEFAULT_MSG - REPREPRO_EXECUTABLE -) - -mark_as_advanced(REPREPRO_EXECUTABLE) diff --git a/cmake/Modules/FindRpmbuild.cmake b/cmake/Modules/FindRpmbuild.cmake deleted file mode 100644 --- a/cmake/Modules/FindRpmbuild.cmake +++ /dev/null @@ -1,24 +0,0 @@ -#[[ -# SPDX-License-Identifier: MPL-2.0 -# -# This Source Code Form is subject to the terms of the Mozilla Public -# License, v. 2.0. If a copy of the MPL was not distributed with this -# file, You can obtain one at http://mozilla.org/MPL/2.0/. -# -# Copyright 2024 MonetDB Foundation; -# Copyright August 2008 - 2023 MonetDB B.V.; -# Copyright 1997 - July 2008 CWI. -#]] - -find_program(RPMBUILD_EXECUTABLE NAMES rpmbuild - DOC "Create rpm packages" -) - -include(FindPackageHandleStandardArgs) - -find_package_handle_standard_args(Rpmbuild - DEFAULT_MSG - RPMBUILD_EXECUTABLE -) - -mark_as_advanced(RPM
MonetDB: default - Remove Mconvert.py.
Changeset: e81fdadbf9b0 for MonetDB URL: https://dev.monetdb.org/hg/MonetDB/rev/e81fdadbf9b0 Removed Files: testing/Mconvert.py.in testing/SQLogicConvertNotes Modified Files: MonetDB.spec documentation/source/developers_handbook.rst testing/CMakeLists.txt Branch: default Log Message: Remove Mconvert.py. diffs (truncated from 2948 to 300 lines): diff --git a/MonetDB.spec b/MonetDB.spec --- a/MonetDB.spec +++ b/MonetDB.spec @@ -815,7 +815,6 @@ developer, but if you do want to test, t %files testing-python %defattr(-,root,root) -%{_bindir}/Mconvert.py %{_bindir}/Mtest.py %{_bindir}/Mz.py %{_bindir}/mktest.py diff --git a/documentation/source/developers_handbook.rst b/documentation/source/developers_handbook.rst --- a/documentation/source/developers_handbook.rst +++ b/documentation/source/developers_handbook.rst @@ -121,11 +121,6 @@ Consider the following single client con 6 -Alternatively existing ``.sql`` scripts can be converted to sqllogic tests (.test) with ``Mconvert.py``. -For example:: - -$ Mconvert.py --auto /Tests .sql - All new tests need to be placed in the appropriate test folder and their name respectively in the index ``All`` file. diff --git a/testing/CMakeLists.txt b/testing/CMakeLists.txt --- a/testing/CMakeLists.txt +++ b/testing/CMakeLists.txt @@ -111,10 +111,6 @@ configure_file(Mz.py.in ${CMAKE_CURRENT_BINARY_DIR}/Mz.py @ONLY) -configure_file(Mconvert.py.in - ${CMAKE_CURRENT_BINARY_DIR}/Mconvert.py - @ONLY) - configure_file(listexports.py.in ${CMAKE_CURRENT_BINARY_DIR}/listexports.py @ONLY) @@ -127,7 +123,6 @@ install(FILES install(FILES ${CMAKE_CURRENT_BINARY_DIR}/Mz.py - ${CMAKE_CURRENT_BINARY_DIR}/Mconvert.py PERMISSIONS ${PROGRAM_PERMISSIONS_DEFAULT} DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT pytesting) diff --git a/testing/Mconvert.py.in b/testing/Mconvert.py.in deleted file mode 100755 --- a/testing/Mconvert.py.in +++ /dev/null @@ -1,2827 +0,0 @@ -#!@PYTHON@ - -# SPDX-License-Identifier: MPL-2.0 -# -# This Source Code Form is subject to the terms of the Mozilla Public -# License, v. 2.0. If a copy of the MPL was not distributed with this -# file, You can obtain one at http://mozilla.org/MPL/2.0/. -# -# Copyright 2024 MonetDB Foundation; -# Copyright August 2008 - 2023 MonetDB B.V.; -# Copyright 1997 - July 2008 CWI. - -#TODO: -#= -# - check all TODO's below -# - tidy -up HTML-generation by "keeping in mind" during testing, -# which OUT/ERR differ or not and which tests were skipped. -# dump HTML-stuff only at end -# print an ascii summary at end, too -# - if no diffs, but warnings, say so at end -# - produce, keep & reference LOG -# - add a "grep-like" function and replace "inlined" grep -# contains(,) -# - do multi-level prompting? -# - normalize all path's used -# - Python 3? (or do a full rewrite?) - -import os -import sys -import shutil -import re -import random -import time -import socket -import struct -import signal -import fnmatch -import glob -import pymonetdb # check for pymonetdb early: it is essential for our work -try: -import winreg # Python 3 on Windows -except ImportError: -winreg = None # not on Windows - -MonetDB_VERSION = '@MONETDB_VERSION@'.split('.') - -procdebug = False -verbose = False -quiet = False - -initdb = None - -global_timeout = 0 -start_time = time.time() - -# whether output goes to a tty -isatty = os.isatty(sys.stdout.fileno()) - -# default is no color (these three functions may get redefined) -def prred(str, write = sys.stdout.write): -write(str) -def prgreen(str, write = sys.stdout.write): -write(str) -def prpurple(str, write = sys.stdout.write): -write(str) -if isatty: -if os.name != 'nt': -# color output a little -RED = '\033[1;31m' -GREEN = '\033[0;32m' -PURPLE = '\033[1;35m' # actually magenta -BLACK = '\033[0;0m' -def prred(str, write = sys.stdout.write): -try: -write(RED) -write(str) -finally: -write(BLACK) -def prgreen(str, write = sys.stdout.write): -try: -write(GREEN) -write(str) -finally: -write(BLACK) -def prpurple(str, write = sys.stdout.write): -try: -write(PURPLE) -write(str) -finally: -write(BLACK) -else: -try: -import ctypes -except ImportError: -pass -else: -STD_OUTPUT_HANDLE = -11 -try: -handle = ctypes.windll.kernel32.GetStdHandle(STD_OUTPUT_HANDLE) -except AttributeError: -pass -else: -def get_csbi_attributes(handle): -# Based on IPython's winconsole.py, written by Alexander Belchenko -
MonetDB: Aug2024 - Imported newever version of strptime + made s...
Changeset: 3b77f54d2fd6 for MonetDB URL: https://dev.monetdb.org/hg/MonetDB/rev/3b77f54d2fd6 Added Files: sql/test/BugTracker-2024/Tests/7570-timestamp-str.test Modified Files: gdk/gdk_select.c monetdb5/modules/atoms/mtime.c monetdb5/modules/atoms/strptime.c sql/test/BugTracker-2024/Tests/All Branch: Aug2024 Log Message: Imported newever version of strptime + made some changes to it. Also some changes in how strptime is used in that the timezone offset is filled in before the call and then used after to adjust the timestamp. The call only changes the timezone offset if it was getting parsed. This fixes #7570. diffs (truncated from 1297 to 300 lines): diff --git a/gdk/gdk_select.c b/gdk/gdk_select.c --- a/gdk/gdk_select.c +++ b/gdk/gdk_select.c @@ -647,7 +647,7 @@ NAME##_##TYPE(BATiter *bi, struct candit hval = true;\ } \ if (vl > vh) { \ - *algo = "select: empty range"; \ + *algo = "select: empty range"; \ return 0; \ } \ } \ 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 @@ -39,6 +39,7 @@ #ifndef HAVE_STRPTIME extern char *strptime(const char *, const char *, struct tm *); +extern char *strptime2(const char *, const char *, struct tm *, int *); #endif /* interfaces callable from MAL, not used from any C code */ @@ -1169,16 +1170,24 @@ static str str_to_timestamp(timestamp *ret, const char *const *s, const char *const *format, const long gmtoff, const char *type, const char *malfunc) { - struct tm tm = (struct tm) { 0 }; + struct tm tm = (struct tm) { + .tm_isdst = -1, + .tm_mday = 1, +#ifdef HAVE_TM_GMTOFF + .tm_gmtoff = (int) gmtoff, +#endif + }; + int tz = (int) gmtoff; if (strNil(*s) || strNil(*format)) { *ret = timestamp_nil; return MAL_SUCCEED; } - tm.tm_sec = tm.tm_min = tm.tm_hour = 0; - tm.tm_isdst = -1; - tm.tm_mday = 1; +#ifdef HAVE_STRPTIME if (strptime(*s, *format, &tm) == NULL) +#else + if (strptime2(*s, *format, &tm, &tz) == NULL) +#endif throw(MAL, malfunc, "format '%s', doesn't match %s '%s'", *format, type, *s); *ret = timestamp_create(date_create(tm.tm_year + 1900, @@ -1188,26 +1197,10 @@ str_to_timestamp(timestamp *ret, const c tm.tm_min, tm.tm_sec == 60 ? 59 : tm.tm_sec, 0)); - /* if strptime filled in DST information (tm_isdst >= 0), then the -* time is in system local time and we convert to GMT by -* subtracting the time zone offset, else we don't touch the time -* returned because it is assumed to already be in GMT */ - if (tm.tm_isdst >= 0) { - int isdst = 0; - int tz = local_timezone(&isdst); - /* if strptime's information doesn't square with our own -* information about having or not having DST, we compensate -* an hour */ - if (tm.tm_isdst > 0 && isdst == 0) { - tz += 3600; - } else if (tm.tm_isdst == 0 && isdst > 0) { - tz -= 3600; - } - - *ret = timestamp_add_usec(*ret, -tz * LL_CONSTANT(100)); - } else { - *ret = timestamp_add_usec(*ret, -gmtoff * LL_CONSTANT(100)); - } +#ifdef HAVE_TM_GMTOFF + tz = tm.tm_gmtoff; +#endif + *ret = timestamp_add_usec(*ret, -tz * LL_CONSTANT(100)); if (is_timestamp_nil(*ret)) throw(MAL, malfunc, "bad %s '%s'", type, *s); return MAL_SUCCEED; diff --git a/monetdb5/modules/atoms/strptime.c b/monetdb5/modules/atoms/strptime.c --- a/monetdb5/modules/atoms/strptime.c +++ b/monetdb5/modules/atoms/strptime.c @@ -1,12 +1,15 @@ -/* Adapted from https://opensource.apple.com/source/lukemftp/lukemftp-3/lukemftp/libukem/strptime.c */ -/* $Id$*/ -/* $NetBSD: strptime.c,v 1.18 1999/04/29 02:58:30 tv Exp $ */ - +/* Adapted from https://github.com/res2001/strptime/blob/master/strptime.c */ +/* $NetBSD: strptime.c,v 1.62 2017/08/24 01:01:09 ginsbach Exp $ */ +/* http://cvsweb.netbsd.
MonetDB: default - Merge with Aug2024 branch.
Changeset: e53455d0a662 for MonetDB URL: https://dev.monetdb.org/hg/MonetDB/rev/e53455d0a662 Modified Files: gdk/gdk_select.c Branch: default Log Message: Merge with Aug2024 branch. diffs (35 lines): diff --git a/gdk/gdk_select.c b/gdk/gdk_select.c --- a/gdk/gdk_select.c +++ b/gdk/gdk_select.c @@ -616,6 +616,7 @@ NAME##_##TYPE(BATiter *bi, struct candit if (!li) { \ /* open range on left */\ if (vl == MAXVALUE##TYPE) { \ + *algo = "select: empty range"; \ return 0; \ } \ /* vl < x === vl+1 <= x */ \ @@ -633,6 +634,7 @@ NAME##_##TYPE(BATiter *bi, struct candit if (!hi) { \ /* open range on right */ \ if (vh == MINVALUE##TYPE) { \ + *algo = "select: empty range"; \ return 0; \ } \ /* x < vh === x <= vh-1 */ \ @@ -646,6 +648,7 @@ NAME##_##TYPE(BATiter *bi, struct candit hval = true;\ } \ if (vl > vh) { \ + *algo = "select: empty range"; \ return 0; \ } \ } \ @@ -898,6 +901,7 @@ fullscan_str(BATiter *bi, struct candite return 0; } if (pos == (var_t) -1) { + *algo = NULL; BBPreclaim(bn); return BUN_NONE; } ___ checkin-list mailing list -- checkin-list@monetdb.org To unsubscribe send an email to checkin-list-le...@monetdb.org
MonetDB: Dec2023 - Closing branch Dec2023.
Changeset: 289d60551171 for MonetDB URL: https://dev.monetdb.org/hg/MonetDB/rev/289d60551171 Branch: Dec2023 Log Message: Closing branch Dec2023. ___ checkin-list mailing list -- checkin-list@monetdb.org To unsubscribe send an email to checkin-list-le...@monetdb.org
MonetDB: Aug2024 - Make sure variable is initialized on all paths.
Changeset: 57c390356432 for MonetDB URL: https://dev.monetdb.org/hg/MonetDB/rev/57c390356432 Modified Files: gdk/gdk_select.c Branch: Aug2024 Log Message: Make sure variable is initialized on all paths. diffs (35 lines): diff --git a/gdk/gdk_select.c b/gdk/gdk_select.c --- a/gdk/gdk_select.c +++ b/gdk/gdk_select.c @@ -615,6 +615,7 @@ NAME##_##TYPE(BATiter *bi, struct candit if (!li) { \ /* open range on left */\ if (vl == MAXVALUE##TYPE) { \ + *algo = "select: empty range"; \ return 0; \ } \ /* vl < x === vl+1 <= x */ \ @@ -632,6 +633,7 @@ NAME##_##TYPE(BATiter *bi, struct candit if (!hi) { \ /* open range on right */ \ if (vh == MINVALUE##TYPE) { \ + *algo = "select: empty range"; \ return 0; \ } \ /* x < vh === x <= vh-1 */ \ @@ -645,6 +647,7 @@ NAME##_##TYPE(BATiter *bi, struct candit hval = true;\ } \ if (vl > vh) { \ + *algo = "select: empty range"; \ return 0; \ } \ } \ @@ -889,6 +892,7 @@ fullscan_str(BATiter *bi, struct candite return 0; } if (pos == (var_t) -1) { + *algo = NULL; BBPreclaim(bn); return BUN_NONE; } ___ checkin-list mailing list -- checkin-list@monetdb.org To unsubscribe send an email to checkin-list-le...@monetdb.org
MonetDB: default - Merge with Aug2024 branch.
Changeset: 71315e925a9b for MonetDB URL: https://dev.monetdb.org/hg/MonetDB/rev/71315e925a9b Modified Files: sql/backends/monet5/sql_upgrades.c Branch: default Log Message: Merge with Aug2024 branch. diffs (truncated from 1206 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 @@ -363,1128 +363,6 @@ sql_drop_shp(Client c) } static str -sql_update_jul2021(Client c, mvc *sql) -{ - size_t bufsize = 65536, pos = 0; - char *buf = NULL, *err = NULL; - res_table *output = NULL; - BAT *b = NULL; - sql_schema *s = mvc_bind_schema(sql, "sys"); - sql_table *t; - - if ((buf = GDKmalloc(bufsize)) == NULL) - throw(SQL, __func__, SQLSTATE(HY013) MAL_MALLOC_FAIL); - - /* if the keyword STREAM is in the list of keywords, upgrade */ - pos += snprintf(buf + pos, bufsize - pos, - "select keyword from sys.keywords where keyword = 'STREAM';\n"); - assert(pos < bufsize); - if ((err = SQLstatementIntern(c, buf, "update", true, false, &output))) - goto bailout; - if ((b = BATdescriptor(output->cols[0].b))) { - if (BATcount(b) == 1) { - /* 20_vacuum.sql */ - pos += snprintf(buf + pos, bufsize - pos, - "drop procedure sys.shrink(string, string) cascade;\n" - "drop procedure sys.reuse(string, string) cascade;\n" - "drop procedure sys.vacuum(string, string) cascade;\n"); - - /* 22_clients.sql */ - pos += snprintf(buf + pos, bufsize - pos, - "create function sys.current_sessionid() returns int\n" - "external name clients.current_sessionid;\n" - "grant execute on function sys.current_sessionid to public;\n" - "update sys.functions set system = true where system <> true and schema_id = 2000 and name = 'current_sessionid' and type = %d;\n", (int) F_FUNC); - - /* 25_debug.sql */ - pos += snprintf(buf + pos, bufsize - pos, - "drop procedure sys.flush_log() cascade;\n"); - - pos += snprintf(buf + pos, bufsize - pos, - "drop function sys.deltas(string) cascade;\n" - "drop function sys.deltas(string, string) cascade;\n" - "drop function sys.deltas(string, string, string) cascade;\n"); - pos += snprintf(buf + pos, bufsize - pos, - "create function sys.deltas (\"schema\" string)\n" - "returns table (\"id\" int, \"segments\" bigint, \"all\" bigint, \"inserted\" bigint, \"updates\" bigint, \"deletes\" bigint, \"level\" int)\n" - "external name \"sql\".\"deltas\";\n" - "create function sys.deltas (\"schema\" string, \"table\" string)\n" - "returns table (\"id\" int, \"segments\" bigint, \"all\" bigint, \"inserted\" bigint, \"updates\" bigint, \"deletes\" bigint, \"level\" int)\n" - "external name \"sql\".\"deltas\";\n" - "create function sys.deltas (\"schema\" string, \"table\" string, \"column\" string)\n" - "returns table (\"id\" int, \"segments\" bigint, \"all\" bigint, \"inserted\" bigint, \"updates\" bigint, \"deletes\" bigint, \"level\" int)\n" - "external name \"sql\".\"deltas\";\n" - "update sys.functions set system = true" - " where schema_id = 2000 and name = 'deltas';\n"); - - /* 26_sysmon */ - t = mvc_bind_table(sql, s, "queue"); - t->system = 0; /* make it non-system else the drop view will fail */ - - pos += snprintf(buf + pos, bufsize - pos, - "drop view sys.queue cascade;\n" - "dr
MonetDB: Aug2024 - Remove upgrade code to upgrade from an unrele...
Changeset: d86c9479d083 for MonetDB URL: https://dev.monetdb.org/hg/MonetDB/rev/d86c9479d083 Modified Files: sql/backends/monet5/sql_upgrades.c Branch: Aug2024 Log Message: Remove upgrade code to upgrade from an unreleased Jan2022 RC. diffs (38 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 @@ -371,34 +371,6 @@ sql_update_jan2022(Client c, mvc *sql) sql_schema *s = mvc_bind_schema(sql, "sys"); sql_table *t; - /* this bit of code is to upgrade from a Jan2022 RC to the Jan2022 release */ - allocator *old_sa = sql->sa; - if ((sql->sa = sa_create(sql->pa)) != NULL) { - list *l; - if ((l = sa_list(sql->sa)) != NULL) { - sql_find_subtype(&tp, "varchar", 0, 0); - list_append(l, &tp); - list_append(l, &tp); - list_append(l, &tp); - if (sql_bind_func_(sql, s->base.name, "strimp_create", l, F_PROC, true, true)) { - /* do the upgrade by removing the two functions */ - const char query[] = - "drop filter function sys.strimp_filter(string, string) cascade;\n" - "drop procedure sys.strimp_create(string, string, string) cascade;\n"; - printf("Running database upgrade commands:\n%s\n", query); - fflush(stdout); - err = SQLstatementIntern(c, query, "update", true, false, NULL); - } else { - sql->session->status = 0; /* if the function was not found clean the error */ - sql->errstr[0] = '\0'; - } - } - sa_destroy(sql->sa); - if (err) - return err; - } - sql->sa = old_sa; - sql_find_subtype(&tp, "bigint", 0, 0); if (!sql_bind_func(sql, s->base.name, "epoch", &tp, NULL, F_FUNC, true, true)) { sql->session->status = 0; /* if the function was not found clean the error */ ___ checkin-list mailing list -- checkin-list@monetdb.org To unsubscribe send an email to checkin-list-le...@monetdb.org
MonetDB: Aug2024 - Cleanup: remove upgrade code for versions old...
Changeset: d32e5376375e for MonetDB URL: https://dev.monetdb.org/hg/MonetDB/rev/d32e5376375e Modified Files: sql/backends/monet5/sql_upgrades.c Branch: Aug2024 Log Message: Cleanup: remove upgrade code for versions older than Jul2021. diffs (truncated from 1171 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 @@ -363,1128 +363,6 @@ sql_drop_shp(Client c) } static str -sql_update_jul2021(Client c, mvc *sql) -{ - size_t bufsize = 65536, pos = 0; - char *buf = NULL, *err = NULL; - res_table *output = NULL; - BAT *b = NULL; - sql_schema *s = mvc_bind_schema(sql, "sys"); - sql_table *t; - - if ((buf = GDKmalloc(bufsize)) == NULL) - throw(SQL, __func__, SQLSTATE(HY013) MAL_MALLOC_FAIL); - - /* if the keyword STREAM is in the list of keywords, upgrade */ - pos += snprintf(buf + pos, bufsize - pos, - "select keyword from sys.keywords where keyword = 'STREAM';\n"); - assert(pos < bufsize); - if ((err = SQLstatementIntern(c, buf, "update", true, false, &output))) - goto bailout; - if ((b = BATdescriptor(output->cols[0].b))) { - if (BATcount(b) == 1) { - /* 20_vacuum.sql */ - pos += snprintf(buf + pos, bufsize - pos, - "drop procedure sys.shrink(string, string) cascade;\n" - "drop procedure sys.reuse(string, string) cascade;\n" - "drop procedure sys.vacuum(string, string) cascade;\n"); - - /* 22_clients.sql */ - pos += snprintf(buf + pos, bufsize - pos, - "create function sys.current_sessionid() returns int\n" - "external name clients.current_sessionid;\n" - "grant execute on function sys.current_sessionid to public;\n" - "update sys.functions set system = true where system <> true and schema_id = 2000 and name = 'current_sessionid' and type = %d;\n", (int) F_FUNC); - - /* 25_debug.sql */ - pos += snprintf(buf + pos, bufsize - pos, - "drop procedure sys.flush_log() cascade;\n"); - - pos += snprintf(buf + pos, bufsize - pos, - "drop function sys.deltas(string) cascade;\n" - "drop function sys.deltas(string, string) cascade;\n" - "drop function sys.deltas(string, string, string) cascade;\n"); - pos += snprintf(buf + pos, bufsize - pos, - "create function sys.deltas (\"schema\" string)\n" - "returns table (\"id\" int, \"segments\" bigint, \"all\" bigint, \"inserted\" bigint, \"updates\" bigint, \"deletes\" bigint, \"level\" int)\n" - "external name \"sql\".\"deltas\";\n" - "create function sys.deltas (\"schema\" string, \"table\" string)\n" - "returns table (\"id\" int, \"segments\" bigint, \"all\" bigint, \"inserted\" bigint, \"updates\" bigint, \"deletes\" bigint, \"level\" int)\n" - "external name \"sql\".\"deltas\";\n" - "create function sys.deltas (\"schema\" string, \"table\" string, \"column\" string)\n" - "returns table (\"id\" int, \"segments\" bigint, \"all\" bigint, \"inserted\" bigint, \"updates\" bigint, \"deletes\" bigint, \"level\" int)\n" - "external name \"sql\".\"deltas\";\n" - "update sys.functions set system = true" - " where schema_id = 2000 and name = 'deltas';\n"); - - /* 26_sysmon */ - t = mvc_bind_table(sql, s, "queue"); - t->system = 0; /* make it non-system else the drop view will fail */ - - pos += snprintf(buf + pos, bufsize - pos, - "drop view sys.queue cascade;\n" -
MonetDB: default - Merge with Aug2024 branch.
Changeset: 692339075527 for MonetDB URL: https://dev.monetdb.org/hg/MonetDB/rev/692339075527 Modified Files: sql/backends/monet5/sql_upgrades.c sql/test/emptydb-previous-upgrade-chain-hge/Tests/upgrade.stable.out.int128 sql/test/emptydb-previous-upgrade-chain/Tests/upgrade.stable.out.int128 sql/test/emptydb-previous-upgrade-hge/Tests/upgrade.stable.out.int128 sql/test/emptydb-previous-upgrade/Tests/upgrade.stable.out.int128 sql/test/emptydb-upgrade-chain/Tests/upgrade.stable.out.int128 sql/test/emptydb-upgrade/Tests/upgrade.stable.out.int128 sql/test/testdb-previous-upgrade-chain-hge/Tests/upgrade.stable.out.int128 sql/test/testdb-previous-upgrade-chain/Tests/upgrade.stable.out sql/test/testdb-previous-upgrade-chain/Tests/upgrade.stable.out.int128 sql/test/testdb-previous-upgrade-hge/Tests/upgrade.stable.out.int128 sql/test/testdb-previous-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 Aug2024 branch. diffs (truncated from 2982 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 @@ -240,7 +240,9 @@ sql_update_hugeint(Client c, mvc *sql) "external name generator.series;\n" "create function sys.generate_series(first hugeint, \"limit\" hugeint, stepsize hugeint)\n" "returns table (value hugeint)\n" - "external name generator.series;\n"); + "external name generator.series;\n" + "grant execute on function sys.generate_series(hugeint, hugeint) to public;\n" + "grant execute on function sys.generate_series(hugeint, hugeint, hugeint) to public;\n"); /* 39_analytics_hge.sql */ pos += snprintf(buf + pos, bufsize - pos, @@ -297,7 +299,19 @@ sql_update_hugeint(Client c, mvc *sql) "GRANT EXECUTE ON AGGREGATE corr(HUGEINT, HUGEINT) TO PUBLIC;\n" "create window corr(e1 HUGEINT, e2 HUGEINT) returns DOUBLE\n" " external name \"sql\".\"corr\";\n" - "GRANT EXECUTE ON WINDOW corr(HUGEINT, HUGEINT) TO PUBLIC;\n"); + "GRANT EXECUTE ON WINDOW corr(HUGEINT, HUGEINT) TO PUBLIC;\n" + "create aggregate median(val DECIMAL(38)) returns DECIMAL(38)\n" + " external name \"aggr\".\"median\";\n" + "GRANT EXECUTE ON AGGREGATE median(DECIMAL(38)) TO PUBLIC;\n" + "create aggregate median_avg(val DECIMAL(38)) returns DOUBLE\n" + " external name \"aggr\".\"median_avg\";\n" + "GRANT EXECUTE ON AGGREGATE median_avg(DECIMAL(38)) TO PUBLIC;\n" + "create aggregate quantile(val DECIMAL(38), q DOUBLE) returns DECIMAL(38)\n" + " external name \"aggr\".\"quantile\";\n" + "GRANT EXECUTE ON AGGREGATE quantile(DECIMAL(38), DOUBLE) TO PUBLIC;\n" + "create aggregate quantile_avg(val DECIMAL(38), q DOUBLE) returns DOUBLE\n" + " external name \"aggr\".\"quantile_avg\";\n" + "GRANT EXECUTE ON AGGREGATE quantile_avg(DECIMAL(38), DOUBLE) TO PUBLIC;\n"); /* 40_json_hge.sql */ pos += snprintf(buf + pos, bufsize - pos, @@ -306,9 +320,9 @@ sql_update_hugeint(Client c, mvc *sql) "GRANT EXECUTE ON FUNCTION json.filter(json, hugeint) TO PUBLIC;\n"); pos += snprintf(buf + pos, bufsize - pos, - "update sys.functions set system = true where system <> true and name in ('generate_series') and schema_id = (select id from sys.schemas where name = 'sys') and type = %d;\n" - "update sys.functions set system = true where system <> true and name in ('stddev_samp', 'stddev_pop', 'var_samp', 'covar_samp', 'var_pop', 'covar_pop', 'median', 'median_avg', 'quantile', 'quantile_avg', 'corr') and schema_id = (select id from sys.schemas where name = 'sys') and type = %d;\n" - "update sys.functions set system = true where system <> true and name in ('stddev_samp', 'stddev_pop', 'var_samp', 'covar_samp', 'var_pop', 'covar_pop', 'corr') and schema_id = (select id from sys.schemas where name = 'sys') and type = %d;\n" + "update sys.functions set system = true where system <> true and name in ('generate_series') and schema_id = 2000 and type = %d;\n" + "update sys.functions set system = true where system <> true and name in ('stddev_samp', 'stddev_pop', 'var_samp', 'c
MonetDB: Aug2024 - Fix upgrade from older database (pre Sep2022).
Changeset: 239c37a76d91 for MonetDB URL: https://dev.monetdb.org/hg/MonetDB/rev/239c37a76d91 Modified Files: sql/backends/monet5/sql_upgrades.c Branch: Aug2024 Log Message: Fix upgrade from older database (pre Sep2022). diffs (41 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 @@ -2487,18 +2487,25 @@ sql_update_jan2022(Client c, mvc *sql) "from sys.querylog_catalog() qd, sys.querylog_calls() ql\n" "where qd.id = ql.id and qd.owner = user;\n" "create function sys.sessions()\n" - "returns table(\n" - " \"sessionid\" int,\n" - " \"username\" string,\n" - " \"login\" timestamp,\n" - " \"idle\" timestamp,\n" - " \"optimizer\" string,\n" - " \"sessiontimeout\" int,\n" - " \"querytimeout\" int,\n" - " \"workerlimit\" int,\n" - " \"memorylimit\" int\n" - ")\n" - "external name sql.sessions;\n" + " returns table(\n" + " \"sessionid\" int,\n" + " \"username\" string,\n" + " \"login\" timestamp,\n" + " \"idle\" timestamp,\n" + " \"optimizer\" string,\n" + " \"sessiontimeout\" int,\n" + " \"querytimeout\" int,\n" + " \"workerlimit\" int,\n" + " \"memorylimit\" int,\n" + " \"language\" string,\n" + " \"peer\" string,\n" + " \"hostname\" string,\n" + " \"application\" string,\n" + " \"client\" string,\n" + " \"clientpid\" bigint,\n" + " \"remark\" string\n" + " )\n" + " external name sql.sessions;\n" "create view sys.sessions as select * from sys.sessions();\n" "create function sys.prepared_statements()\n" "returns table(\n" ___ checkin-list mailing list -- checkin-list@monetdb.org To unsubscribe send an email to checkin-list-le...@monetdb.org
MonetDB: Aug2024 - Fix database upgrade for Aug2024 database.
Changeset: 0f58d320e8d2 for MonetDB URL: https://dev.monetdb.org/hg/MonetDB/rev/0f58d320e8d2 Modified Files: sql/backends/monet5/sql_upgrades.c sql/test/emptydb-previous-upgrade-chain-hge/Tests/upgrade.stable.out.int128 sql/test/emptydb-previous-upgrade-chain/Tests/upgrade.stable.out.int128 sql/test/emptydb-previous-upgrade-hge/Tests/upgrade.stable.out.int128 sql/test/emptydb-previous-upgrade/Tests/upgrade.stable.out.int128 sql/test/emptydb-upgrade-chain/Tests/upgrade.stable.out.int128 sql/test/emptydb-upgrade/Tests/upgrade.stable.out.int128 sql/test/testdb-previous-upgrade-chain-hge/Tests/upgrade.stable.out.int128 sql/test/testdb-previous-upgrade-chain/Tests/upgrade.stable.out sql/test/testdb-previous-upgrade-chain/Tests/upgrade.stable.out.int128 sql/test/testdb-previous-upgrade-hge/Tests/upgrade.stable.out.int128 sql/test/testdb-previous-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: Aug2024 Log Message: Fix database upgrade for Aug2024 database. Especially, the non-hugeint to with-hugeint upgrade. diffs (truncated from 997 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 @@ -240,7 +240,9 @@ sql_update_hugeint(Client c, mvc *sql) "external name generator.series;\n" "create function sys.generate_series(first hugeint, \"limit\" hugeint, stepsize hugeint)\n" "returns table (value hugeint)\n" - "external name generator.series;\n"); + "external name generator.series;\n" + "grant execute on function sys.generate_series(hugeint, hugeint) to public;\n" + "grant execute on function sys.generate_series(hugeint, hugeint, hugeint) to public;\n"); /* 39_analytics_hge.sql */ pos += snprintf(buf + pos, bufsize - pos, @@ -297,7 +299,19 @@ sql_update_hugeint(Client c, mvc *sql) "GRANT EXECUTE ON AGGREGATE corr(HUGEINT, HUGEINT) TO PUBLIC;\n" "create window corr(e1 HUGEINT, e2 HUGEINT) returns DOUBLE\n" " external name \"sql\".\"corr\";\n" - "GRANT EXECUTE ON WINDOW corr(HUGEINT, HUGEINT) TO PUBLIC;\n"); + "GRANT EXECUTE ON WINDOW corr(HUGEINT, HUGEINT) TO PUBLIC;\n" + "create aggregate median(val DECIMAL(38)) returns DECIMAL(38)\n" + " external name \"aggr\".\"median\";\n" + "GRANT EXECUTE ON AGGREGATE median(DECIMAL(38)) TO PUBLIC;\n" + "create aggregate median_avg(val DECIMAL(38)) returns DOUBLE\n" + " external name \"aggr\".\"median_avg\";\n" + "GRANT EXECUTE ON AGGREGATE median_avg(DECIMAL(38)) TO PUBLIC;\n" + "create aggregate quantile(val DECIMAL(38), q DOUBLE) returns DECIMAL(38)\n" + " external name \"aggr\".\"quantile\";\n" + "GRANT EXECUTE ON AGGREGATE quantile(DECIMAL(38), DOUBLE) TO PUBLIC;\n" + "create aggregate quantile_avg(val DECIMAL(38), q DOUBLE) returns DOUBLE\n" + " external name \"aggr\".\"quantile_avg\";\n" + "GRANT EXECUTE ON AGGREGATE quantile_avg(DECIMAL(38), DOUBLE) TO PUBLIC;\n"); /* 40_json_hge.sql */ pos += snprintf(buf + pos, bufsize - pos, @@ -306,9 +320,9 @@ sql_update_hugeint(Client c, mvc *sql) "GRANT EXECUTE ON FUNCTION json.filter(json, hugeint) TO PUBLIC;\n"); pos += snprintf(buf + pos, bufsize - pos, - "update sys.functions set system = true where system <> true and name in ('generate_series') and schema_id = (select id from sys.schemas where name = 'sys') and type = %d;\n" - "update sys.functions set system = true where system <> true and name in ('stddev_samp', 'stddev_pop', 'var_samp', 'covar_samp', 'var_pop', 'covar_pop', 'median', 'median_avg', 'quantile', 'quantile_avg', 'corr') and schema_id = (select id from sys.schemas where name = 'sys') and type = %d;\n" - "update sys.functions set system = true where system <> true and name in ('stddev_samp', 'stddev_pop', 'var_samp', 'covar_samp', 'var_pop', 'covar_pop', 'corr') and schema_id = (select id from sys.schemas where name = 'sys') and type = %d;\n" + "update sys.functions set system = true where system <> true and name in ('generate_series') and schema_id = 2000 and type = %d;\n" + "update sys.functions set system = true where syst
MonetDB: Aug2024 - Cleanup: remove upgrade code for versions old...
Changeset: 6ed68780e9e9 for MonetDB URL: https://dev.monetdb.org/hg/MonetDB/rev/6ed68780e9e9 Modified Files: sql/backends/monet5/sql_upgrades.c Branch: Aug2024 Log Message: Cleanup: remove upgrade code for versions older than Jul2021. Also see changeset afbbaca9055c. diffs (truncated from 1946 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 @@ -349,1803 +349,6 @@ sql_drop_shp(Client c) } static str -sql_update_generator(Client c) -{ - const char query[] = "update sys.args set name = 'limit' where name = 'last' and func_id in (select id from sys.functions where schema_id = 2000 and name = 'generate_series' and func like '% last %');\n" - "update sys.functions set func = replace(func, ' last ', ' \"limit\" ') where schema_id = 2000 and name = 'generate_series' and func like '% last %';\n"; - return SQLstatementIntern(c, query, "update", true, false, NULL); -} - -static str -sql_drop_functions_dependencies_Xs_on_Ys(Client c) -{ - size_t bufsize = 1600, pos = 0; - char *err = NULL, *buf = GDKmalloc(bufsize); - - if (buf == NULL) - throw(SQL, __func__, SQLSTATE(HY013) MAL_MALLOC_FAIL); - - /* remove functions which were created in sql/scripts/21_dependency_functions.sql */ - pos += snprintf(buf + pos, bufsize - pos, - "DROP FUNCTION dependencies_schemas_on_users() CASCADE;\n" - "DROP FUNCTION dependencies_owners_on_schemas() CASCADE;\n" - "DROP FUNCTION dependencies_tables_on_views() CASCADE;\n" - "DROP FUNCTION dependencies_tables_on_indexes() CASCADE;\n" - "DROP FUNCTION dependencies_tables_on_triggers() CASCADE;\n" - "DROP FUNCTION dependencies_tables_on_foreignKeys() CASCADE;\n" - "DROP FUNCTION dependencies_tables_on_functions() CASCADE;\n" - "DROP FUNCTION dependencies_columns_on_views() CASCADE;\n" - "DROP FUNCTION dependencies_columns_on_keys() CASCADE;\n" - "DROP FUNCTION dependencies_columns_on_indexes() CASCADE;\n" - "DROP FUNCTION dependencies_columns_on_functions() CASCADE;\n" - "DROP FUNCTION dependencies_columns_on_triggers() CASCADE;\n" - "DROP FUNCTION dependencies_views_on_functions() CASCADE;\n" - "DROP FUNCTION dependencies_views_on_triggers() CASCADE;\n" - "DROP FUNCTION dependencies_functions_on_functions() CASCADE;\n" - "DROP FUNCTION dependencies_functions_on_triggers() CASCADE;\n" - "DROP FUNCTION dependencies_keys_on_foreignKeys() CASCADE;\n"); - - assert(pos < bufsize); - - printf("Running database upgrade commands:\n%s\n", buf); - fflush(stdout); - err = SQLstatementIntern(c, buf, "update", true, false, NULL); - GDKfree(buf); - return err; /* usually MAL_SUCCEED */ -} - -static str -sql_update_storagemodel(Client c, mvc *sql, bool oct2020_upgrade) -{ - size_t bufsize = 2, pos = 0; - char *buf, *err; - sql_schema *s = mvc_bind_schema(sql, "sys"); - sql_table *t; - char *day_interval_str = oct2020_upgrade ? " 'day_interval'," : ""; - - if ((buf = GDKmalloc(bufsize)) == NULL) - throw(SQL, __func__, SQLSTATE(HY013) MAL_MALLOC_FAIL); - - /* set views and tables internally to non-system to allow drop commands to succeed without error */ - if ((t = mvc_bind_table(sql, s, "storage")) != NULL) - t->system = 0; - if ((t = mvc_bind_table(sql, s, "storagemodel")) != NULL) - t->system = 0; - if ((t = mvc_bind_table(sql, s, "storagemodelinput")) != NULL) - t->system = 0; - if ((t = mvc_bind_table(sql, s, "tablestoragemodel")) != NULL) - t->system = 0; - - /* new 75_storagemodel.sql */ - pos += snprintf(buf + pos, bufsize - pos, - /* drop objects in reverse order of original creation of old 75_storagemodel.sql */ - "drop view if exists sys.tablestoragemodel cascade;\n" - "drop view if exists sys.storagemodel cascade;\n" - "drop function if exists sys.storagemodel() cascade;\n"); - - if (oct2020_upgrade) { - pos += snprintf(buf + pos, bufsize - pos, - "drop function if exists sys.imprintsize(varchar(1024), bigint) cascade;\n"); - } else { - pos += snprintf(buf + pos, bufsize - pos, - "drop function if exists sys.imprintsize(bigint, clob) cascade;\n"); - } - - pos += snprintf(buf + pos, bufsize - pos, - "drop function if exists sys.
MonetDB: default - Merge with Aug2024 branch.
Changeset: 1ec61a7ca94b for MonetDB URL: https://dev.monetdb.org/hg/MonetDB/rev/1ec61a7ca94b Modified Files: sql/test/emptydb-previous-upgrade-chain-hge/Tests/upgrade.stable.out.int128 sql/test/emptydb-previous-upgrade-chain/Tests/upgrade.stable.out sql/test/emptydb-previous-upgrade-chain/Tests/upgrade.stable.out.int128 sql/test/emptydb-previous-upgrade-hge/Tests/upgrade.stable.out.int128 sql/test/emptydb-previous-upgrade/Tests/upgrade.stable.out sql/test/emptydb-previous-upgrade/Tests/upgrade.stable.out.int128 sql/test/emptydb-upgrade-chain-hge/Tests/upgrade.stable.out.int128 sql/test/emptydb-upgrade-chain/Tests/upgrade.stable.out sql/test/emptydb-upgrade-chain/Tests/upgrade.stable.out.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.int128 sql/test/testdb-previous-upgrade-chain-hge/Tests/upgrade.stable.out.int128 sql/test/testdb-previous-upgrade-chain/Tests/upgrade.stable.out sql/test/testdb-previous-upgrade-chain/Tests/upgrade.stable.out.int128 sql/test/testdb-previous-upgrade-hge/Tests/upgrade.stable.out.int128 sql/test/testdb-previous-upgrade/Tests/upgrade.stable.out sql/test/testdb-previous-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.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.int128 Branch: default Log Message: Merge with Aug2024 branch. diffs (truncated from 13990 to 300 lines): diff --git a/.hgtags b/.hgtags --- a/.hgtags +++ b/.hgtags @@ -832,3 +832,4 @@ cde7d8f7c99540a8c95856df052a9f123b0c1643 cde7d8f7c99540a8c95856df052a9f123b0c1643 Dec2023_SP4_release ae474f7fda0a3f2ebefc6c0b2cd969ef0854fad1 Aug2024_1 dce400b68239412b1835fb28bd183bf50f5e8692 Aug2024_3 +dce400b68239412b1835fb28bd183bf50f5e8692 Aug2024_release diff --git a/sql/backends/monet5/sql_bincopyconvert.c b/sql/backends/monet5/sql_bincopyconvert.c --- a/sql/backends/monet5/sql_bincopyconvert.c +++ b/sql/backends/monet5/sql_bincopyconvert.c @@ -474,6 +474,12 @@ load_blob(BAT *bat, stream *s, int *eof_ *eof_reached = 0; + /* we know nothing about the ordering of the input data */ + bat->tsorted = false; + bat->trevsorted = false; + bat->tkey = false; + /* keep tno* properties: if they're set they remain valid when +* appending */ while (1) { const blob *value; // Read the header @@ -492,6 +498,8 @@ load_blob(BAT *bat, stream *s, int *eof_ if (header.length == ~(uint64_t)0) { value = nil_value; + bat->tnonil = false; + bat->tnil = true; } else { size_t length; size_t needed; @@ -535,7 +543,7 @@ load_blob(BAT *bat, stream *s, int *eof_ value = buffer; } - if (BUNappend(bat, value, false) != GDK_SUCCEED) { + if (bunfastapp(bat, value) != GDK_SUCCEED) { msg = createException(SQL, mal_operator, GDK_EXCEPTION); goto end; } diff --git a/sql/test/emptydb-previous-upgrade-chain-hge/Tests/upgrade.stable.out.int128 b/sql/test/emptydb-previous-upgrade-chain-hge/Tests/upgrade.stable.out.int128 --- a/sql/test/emptydb-previous-upgrade-chain-hge/Tests/upgrade.stable.out.int128 +++ b/sql/test/emptydb-previous-upgrade-chain-hge/Tests/upgrade.stable.out.int128 @@ -1,628 +1,6 @@ Running database upgrade commands to update system tables. Running database upgrade commands: -drop procedure if exists SHPattach(string) cascade; -drop procedure if exists SHPload(integer) cascade; -drop procedure if exists SHPload(integer, geometry) cascade; - -Running database upgrade commands: -create procedure SHPLoad(fname string, schemaname string, tablename string) external name shp.load; -create procedure SHPLoad(fname string, tablename string) external name shp.load; -update sys.functions set system = true where schema_id = 2000 and name in ('shpload'); - -Running database upgrade commands: -drop function if exists sys.st_intersects(geometry, geometry) cascade; -drop function if exists sys.st_dwithin(geometry, geometry, double) cascade; -drop view if exists sys.geometry_columns cascade; -drop function if exists sys.st_collect(geometry, geometry) cascade; -drop aggregate if exists sys.st_collect(geometry) cascade; -drop aggregate if exists sys.st_makeline(geometry) cascade; -crea
MonetDB: Aug2024 - Upgrade from Aug2024 release.
Changeset: 76a5a95a2548 for MonetDB URL: https://dev.monetdb.org/hg/MonetDB/rev/76a5a95a2548 Modified Files: sql/test/emptydb-previous-upgrade-chain-hge/Tests/upgrade.stable.out.int128 sql/test/emptydb-previous-upgrade-chain/Tests/upgrade.stable.out sql/test/emptydb-previous-upgrade-chain/Tests/upgrade.stable.out.int128 sql/test/emptydb-previous-upgrade-hge/Tests/upgrade.stable.out.int128 sql/test/emptydb-previous-upgrade/Tests/upgrade.stable.out sql/test/emptydb-previous-upgrade/Tests/upgrade.stable.out.int128 sql/test/emptydb-upgrade-chain-hge/Tests/upgrade.stable.out.int128 sql/test/emptydb-upgrade-chain/Tests/upgrade.stable.out sql/test/emptydb-upgrade-chain/Tests/upgrade.stable.out.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.int128 sql/test/testdb-previous-upgrade-chain-hge/Tests/upgrade.stable.out.int128 sql/test/testdb-previous-upgrade-chain/Tests/upgrade.stable.out sql/test/testdb-previous-upgrade-chain/Tests/upgrade.stable.out.int128 sql/test/testdb-previous-upgrade-hge/Tests/dump.stable.out sql/test/testdb-previous-upgrade-hge/Tests/upgrade.stable.out.int128 sql/test/testdb-previous-upgrade/Tests/dump.stable.out sql/test/testdb-previous-upgrade/Tests/upgrade.stable.out sql/test/testdb-previous-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.int128 sql/test/testdb-upgrade-hge/Tests/dump.stable.out sql/test/testdb-upgrade-hge/Tests/upgrade.stable.out.int128 sql/test/testdb-upgrade/Tests/dump.stable.out sql/test/testdb-upgrade/Tests/upgrade.stable.out sql/test/testdb-upgrade/Tests/upgrade.stable.out.int128 Branch: Aug2024 Log Message: Upgrade from Aug2024 release. diffs (truncated from 13892 to 300 lines): diff --git a/sql/test/emptydb-previous-upgrade-chain-hge/Tests/upgrade.stable.out.int128 b/sql/test/emptydb-previous-upgrade-chain-hge/Tests/upgrade.stable.out.int128 --- a/sql/test/emptydb-previous-upgrade-chain-hge/Tests/upgrade.stable.out.int128 +++ b/sql/test/emptydb-previous-upgrade-chain-hge/Tests/upgrade.stable.out.int128 @@ -1,627 +1,6 @@ Running database upgrade commands to update system tables. Running database upgrade commands: -drop procedure if exists SHPattach(string) cascade; -drop procedure if exists SHPload(integer) cascade; -drop procedure if exists SHPload(integer, geometry) cascade; - -Running database upgrade commands: -create procedure SHPLoad(fname string, schemaname string, tablename string) external name shp.load; -create procedure SHPLoad(fname string, tablename string) external name shp.load; -update sys.functions set system = true where schema_id = 2000 and name in ('shpload'); -Running database upgrade commands: -drop function if exists sys.st_intersects(geometry, geometry) cascade; -drop function if exists sys.st_dwithin(geometry, geometry, double) cascade; -drop view if exists sys.geometry_columns cascade; -drop function if exists sys.st_collect(geometry, geometry) cascade; -drop aggregate if exists sys.st_collect(geometry) cascade; -drop aggregate if exists sys.st_makeline(geometry) cascade; -create view sys.geometry_columns as - select cast(null as varchar(1)) as f_table_catalog, - s.name as f_table_schema, - t.name as f_table_name, - c.name as f_geometry_column, - cast(has_z(c.type_digits) + has_m(c.type_digits) +2 as integer) as coord_dimension, - c.type_scale as srid, - get_type(c.type_digits, 0) as geometry_type - from sys.columns c, sys.tables t, sys.schemas s - where c.table_id = t.id and t.schema_id = s.id - and c.type in (select sqlname from sys.types where systemname in ('wkb', 'wkba')); -GRANT SELECT ON sys.geometry_columns TO PUBLIC; -CREATE FUNCTION ST_Collect(geom1 Geometry, geom2 Geometry) RETURNS Geometry EXTERNAL NAME geom."Collect"; -GRANT EXECUTE ON FUNCTION ST_Collect(Geometry, Geometry) TO PUBLIC; -CREATE AGGREGATE ST_Collect(geom Geometry) RETURNS Geometry external name aggr."Collect"; -GRANT EXECUTE ON AGGREGATE ST_Collect(Geometry) TO PUBLIC; -CREATE FUNCTION ST_DistanceGeographic(geom1 Geometry, geom2 Geometry) RETURNS double EXTERNAL NAME geom."DistanceGeographic"; -GRANT EXECUTE ON FUNCTION ST_DistanceGeographic(Geometry, Geometry) TO PUBLIC; -CREATE FILTER FUNCTION ST_DWithinGeographic(geom1 Geometry, geom2 Geometry, distance double) EXTERNAL NAME geom."DWithinGeographic"; -GRANT EXECUTE ON FILTER ST_DWithinGeographic(Geometry, Geometry, double) TO PUBLIC; -CREATE FILTER FUNCTION ST_DWithin(geom1 Geometry, geom2 Geometry, distance double) EXTERNAL NAME rtree."DWithin"; -GRANT EXECUTE ON FILTER ST_DWit
MonetDB: Aug2024 - Aug2024 was released.
Changeset: f9c58174a7ce for MonetDB URL: https://dev.monetdb.org/hg/MonetDB/rev/f9c58174a7ce Modified Files: .hgtags Branch: Aug2024 Log Message: Aug2024 was released. diffs (8 lines): diff --git a/.hgtags b/.hgtags --- a/.hgtags +++ b/.hgtags @@ -832,3 +832,4 @@ cde7d8f7c99540a8c95856df052a9f123b0c1643 cde7d8f7c99540a8c95856df052a9f123b0c1643 Dec2023_SP4_release ae474f7fda0a3f2ebefc6c0b2cd969ef0854fad1 Aug2024_1 dce400b68239412b1835fb28bd183bf50f5e8692 Aug2024_3 +dce400b68239412b1835fb28bd183bf50f5e8692 Aug2024_release ___ checkin-list mailing list -- checkin-list@monetdb.org To unsubscribe send an email to checkin-list-le...@monetdb.org
MonetDB: default - Use the correct variable to get logging output.
Changeset: b0681dd2e243 for MonetDB URL: https://dev.monetdb.org/hg/MonetDB/rev/b0681dd2e243 Modified Files: clients/mapilib/Tests/tlssecurity.py Branch: default Log Message: Use the correct variable to get logging output. diffs (12 lines): diff --git a/clients/mapilib/Tests/tlssecurity.py b/clients/mapilib/Tests/tlssecurity.py --- a/clients/mapilib/Tests/tlssecurity.py +++ b/clients/mapilib/Tests/tlssecurity.py @@ -21,7 +21,7 @@ log_level = logging.WARNING log_format = '%(levelname)s:t=%(relativeCreated)d:%(name)s:%(message)s'# if sys.platform == 'win32': if sys.platform == 'win32': -level=logging.DEBUG +log_level=logging.DEBUG if '-v' in sys.argv: log_level = logging.DEBUG #level = logging.DEBUG ___ checkin-list mailing list -- checkin-list@monetdb.org To unsubscribe send an email to checkin-list-le...@monetdb.org
MonetDB: Aug2024 - Use slightly faster bat append function for b...
Changeset: 1f5524bc8823 for MonetDB URL: https://dev.monetdb.org/hg/MonetDB/rev/1f5524bc8823 Modified Files: sql/backends/monet5/sql_bincopyconvert.c Branch: Aug2024 Log Message: Use slightly faster bat append function for binary copy-into of blobs. diffs (34 lines): diff --git a/sql/backends/monet5/sql_bincopyconvert.c b/sql/backends/monet5/sql_bincopyconvert.c --- a/sql/backends/monet5/sql_bincopyconvert.c +++ b/sql/backends/monet5/sql_bincopyconvert.c @@ -474,6 +474,12 @@ load_blob(BAT *bat, stream *s, int *eof_ *eof_reached = 0; + /* we know nothing about the ordering of the input data */ + bat->tsorted = false; + bat->trevsorted = false; + bat->tkey = false; + /* keep tno* properties: if they're set they remain valid when +* appending */ while (1) { const blob *value; // Read the header @@ -492,6 +498,8 @@ load_blob(BAT *bat, stream *s, int *eof_ if (header.length == ~(uint64_t)0) { value = nil_value; + bat->tnonil = false; + bat->tnil = true; } else { size_t length; size_t needed; @@ -535,7 +543,7 @@ load_blob(BAT *bat, stream *s, int *eof_ value = buffer; } - if (BUNappend(bat, value, false) != GDK_SUCCEED) { + if (bunfastapp(bat, value) != GDK_SUCCEED) { msg = createException(SQL, mal_operator, GDK_EXCEPTION); goto end; } ___ checkin-list mailing list -- checkin-list@monetdb.org To unsubscribe send an email to checkin-list-le...@monetdb.org
MonetDB: default - Merge with Aug2024 branch.
Changeset: 26986f3ce6ce for MonetDB URL: https://dev.monetdb.org/hg/MonetDB/rev/26986f3ce6ce Modified Files: gdk/gdk_private.h gdk/gdk_select.c sql/backends/monet5/rel_bin.c sql/server/sql_parser.y Branch: default Log Message: Merge with Aug2024 branch. diffs (truncated from 1325 to 300 lines): diff --git a/clients/odbc/winsetup/setup.c b/clients/odbc/winsetup/setup.c --- a/clients/odbc/winsetup/setup.c +++ b/clients/odbc/winsetup/setup.c @@ -297,7 +297,7 @@ DialogProc(HWND hwndDlg, UINT uMsg, WPAR SetDlgItemText(hwndDlg, IDC_EDIT_TIMEZONE, datap->timezone ? datap->timezone : ""); SetDlgItemText(hwndDlg, IDC_EDIT_LOGFILE, datap->logfile ? datap->logfile : ""); // Client Info - SetDlgItemText(hwndDlg, IDC_EDIT_CLIENTINFO, datap->clientinfo ? datap->clientinfo : "off"); + SetDlgItemText(hwndDlg, IDC_EDIT_CLIENTINFO, datap->clientinfo ? datap->clientinfo : "on"); SetDlgItemText(hwndDlg, IDC_EDIT_APPLICNAME, datap->applicationname ? datap->applicationname : ""); SetDlgItemText(hwndDlg, IDC_EDIT_CLIENTREMARK, datap->clientremark ? datap->clientremark : ""); if (datap->request == ODBC_ADD_DSN && datap->dsn && *datap->dsn) @@ -333,7 +333,7 @@ DialogProc(HWND hwndDlg, UINT uMsg, WPAR } GetDlgItemText(hwndDlg, IDC_EDIT_CLIENTINFO, buf, sizeof(buf)); if (strcmp("on", buf) != 0 && strcmp("off", buf) != 0) { - MessageBox(hwndDlg, "Client Info must be set to on or off.\nDefault is off.", NULL, MB_ICONERROR); + MessageBox(hwndDlg, "Client Info must be set to on or off.\nDefault is on.", NULL, MB_ICONERROR); return TRUE; } @@ -585,7 +585,7 @@ ConfigDSN(HWND parent, WORD request, LPC MergeFromProfileString(data.dsn, &data.autocommit, "AutoCommit", "on"); MergeFromProfileString(data.dsn, &data.timezone, "TimeZone", ""); MergeFromProfileString(data.dsn, &data.logfile, "LogFile", ""); - MergeFromProfileString(data.dsn, &data.clientinfo, "ClientInfo", "off"); + MergeFromProfileString(data.dsn, &data.clientinfo, "ClientInfo", "on"); MergeFromProfileString(data.dsn, &data.applicationname, "AppName", ""); MergeFromProfileString(data.dsn, &data.clientremark, "ClientRemark", ""); diff --git a/clients/odbc/winsetup/winredist/ds16gt.dll b/clients/odbc/winsetup/winredist/ds16gt.dll deleted file mode 100755 index ea94cdd0ef7d009441d6b56da7464cb8f2515384.. GIT binary patch literal 0 Hc$@tseqbase); hi = SORTfndfirst(odels, &(oid) {bn->tseqbase + BATcount(bn)}); if (lo == hi) return bn; + if (lo + nr == hi) { + BATsetcount(bn, 0); + goto doreturn; + } nme = BBP_physical(bn->batCacheid); if ((dels = GDKmalloc(sizeof(Heap))) == NULL){ @@ -1350,10 +1354,7 @@ BATnegcands(BUN nr, BAT *odels) assert(bn->tvheap == NULL); bn->tvheap = dels; BATsetcount(bn, bn->batCount - (hi - lo)); - TRC_DEBUG(ALGO, "BATnegcands(cands=" ALGOBATFMT "," - "dels=" ALGOBATFMT ")\n", - ALGOBATPAR(bn), - ALGOBATPAR(odels)); + doreturn: TRC_DEBUG(ALGO, "nr=" BUNFMT ", odels=" ALGOBATFMT " -> " ALGOBATFMT "\n", nr, ALGOBATPAR(odels), @@ -1362,6 +1363,12 @@ BATnegcands(BUN nr, BAT *odels) } BAT * +BATnegcands(BUN nr, BAT *odels) +{ + return BATnegcands2(0, nr, odels); +} + +BAT * BATmaskedcands(oid hseq, BUN nr, BAT *masked, bool selected) { const char *nme; diff --git a/gdk/gdk_private.h b/gdk/gdk_private.h --- a/gdk/gdk_private.h +++ b/gdk/gdk_private.h @@ -78,6 +78,8 @@ BAT *BATload_intern(bat bid, bool lock) gdk_return BATmaterialize(BAT *b, BUN cap) __attribute__((__warn_unused_result__)) __attribute__((__visibility__("hidden"))); +BAT *BATnegcands2(oid hseq, BUN nr, BAT *odels) + __attribute__((__visibility__("hidden"))); gdk_return BATsave_iter(BAT *bd, BATiter *bi, BUN size) __attribute__((__visibility__("hidden"))); void BATsetdims(BAT *b, uint16_t width) diff --git a/gdk/gdk_select.c b/gdk/gdk_select.c --- a/gdk/gdk_select.c +++ b/gdk/gdk_select.c @@ -545,10 +545,6 @@ NAME##_##TYPE(BATiter *bi, struct candit (void) hi; \ (void) lval;\ (void) hval;\ - assert(li == !anti);\ - assert(hi == !anti);\ - assert(lval); \ -
MonetDB: Aug2024 - Overflow check.
Changeset: a1dbeac3e40a for MonetDB URL: https://dev.monetdb.org/hg/MonetDB/rev/a1dbeac3e40a Modified Files: sql/server/sql_parser.y Branch: Aug2024 Log Message: Overflow check. diffs (16 lines): diff --git a/sql/server/sql_parser.y b/sql/server/sql_parser.y --- a/sql/server/sql_parser.y +++ b/sql/server/sql_parser.y @@ -1642,9 +1642,10 @@ opt_max_memory: | MAX_MEMORY poslng { $$ = $2; } | MAX_MEMORY string { char *end = NULL; + errno = 0; lng size = strtoll($2, &end, 10); - lng unit = size_unit(end); - if (unit < 0 || size < 0) { + lng unit; + if (errno == ERANGE || size < 0 || (unit = size_unit(end)) < 0) { $$ = -1; yyerror(m, "Invalid size"); YYABORT; ___ checkin-list mailing list -- checkin-list@monetdb.org To unsubscribe send an email to checkin-list-le...@monetdb.org
MonetDB: Aug2024 - Catch overflow.
Changeset: 0ee596246c28 for MonetDB URL: https://dev.monetdb.org/hg/MonetDB/rev/0ee596246c28 Modified Files: sql/server/sql_parser.y Branch: Aug2024 Log Message: Catch overflow. Fixes #7572. diffs (17 lines): diff --git a/sql/server/sql_parser.y b/sql/server/sql_parser.y --- a/sql/server/sql_parser.y +++ b/sql/server/sql_parser.y @@ -6107,7 +6107,12 @@ intval: // errno might be non-zero due to other people's code errno = 0; if (l <= 10) { - $$ = strtol(s,&end,10); + long v = strtol(s,&end,10); +#if SIZEOF_LONG > SIZEOF_INT + if (v > INT_MAX) + errno = ERANGE; +#endif + $$ = (int) v; } else { $$ = 0; } ___ checkin-list mailing list -- checkin-list@monetdb.org To unsubscribe send an email to checkin-list-le...@monetdb.org
MonetDB: Aug2024 - Do some smarter things for anti-equi-select.
Changeset: 93ff376d3437 for MonetDB URL: https://dev.monetdb.org/hg/MonetDB/rev/93ff376d3437 Modified Files: gdk/gdk_cand.c gdk/gdk_private.h gdk/gdk_select.c Branch: Aug2024 Log Message: Do some smarter things for anti-equi-select. In cases where the equi select could use some smart algorithm, we now implement anti-equi select using the equi select and we invert the result (also taking nils into account). This fixes #7449. diffs (truncated from 551 to 300 lines): diff --git a/gdk/gdk_cand.c b/gdk/gdk_cand.c --- a/gdk/gdk_cand.c +++ b/gdk/gdk_cand.c @@ -1293,7 +1293,7 @@ canditer_slice2val(const struct canditer } BAT * -BATnegcands(BUN nr, BAT *odels) +BATnegcands2(oid tseq, BUN nr, BAT *odels) { const char *nme; Heap *dels; @@ -1301,16 +1301,20 @@ BATnegcands(BUN nr, BAT *odels) ccand_t *c; BAT *bn; - bn = BATdense(0, 0, nr); + bn = BATdense(0, tseq, nr); if (bn == NULL) return NULL; if (BATcount(odels) == 0) - return bn; + goto doreturn; lo = SORTfndfirst(odels, &bn->tseqbase); hi = SORTfndfirst(odels, &(oid) {bn->tseqbase + BATcount(bn)}); if (lo == hi) return bn; + if (lo + nr == hi) { + BATsetcount(bn, 0); + goto doreturn; + } nme = BBP_physical(bn->batCacheid); if ((dels = GDKmalloc(sizeof(Heap))) == NULL){ @@ -1350,10 +1354,7 @@ BATnegcands(BUN nr, BAT *odels) assert(bn->tvheap == NULL); bn->tvheap = dels; BATsetcount(bn, bn->batCount - (hi - lo)); - TRC_DEBUG(ALGO, "BATnegcands(cands=" ALGOBATFMT "," - "dels=" ALGOBATFMT ")\n", - ALGOBATPAR(bn), - ALGOBATPAR(odels)); + doreturn: TRC_DEBUG(ALGO, "nr=" BUNFMT ", odels=" ALGOBATFMT " -> " ALGOBATFMT "\n", nr, ALGOBATPAR(odels), @@ -1362,6 +1363,12 @@ BATnegcands(BUN nr, BAT *odels) } BAT * +BATnegcands(BUN nr, BAT *odels) +{ + return BATnegcands2(0, nr, odels); +} + +BAT * BATmaskedcands(oid hseq, BUN nr, BAT *masked, bool selected) { const char *nme; diff --git a/gdk/gdk_private.h b/gdk/gdk_private.h --- a/gdk/gdk_private.h +++ b/gdk/gdk_private.h @@ -87,6 +87,8 @@ BAT *BATload_intern(bat bid, bool lock) gdk_return BATmaterialize(BAT *b, BUN cap) __attribute__((__warn_unused_result__)) __attribute__((__visibility__("hidden"))); +BAT *BATnegcands2(oid hseq, BUN nr, BAT *odels) + __attribute__((__visibility__("hidden"))); gdk_return BATsave_iter(BAT *bd, BATiter *bi, BUN size) __attribute__((__visibility__("hidden"))); void BATsetdims(BAT *b, uint16_t width) diff --git a/gdk/gdk_select.c b/gdk/gdk_select.c --- a/gdk/gdk_select.c +++ b/gdk/gdk_select.c @@ -544,10 +544,6 @@ NAME##_##TYPE(BATiter *bi, struct candit (void) hi; \ (void) lval;\ (void) hval;\ - assert(li == !anti);\ - assert(hi == !anti);\ - assert(lval); \ - assert(hval); \ size_t counter = 0; \ QryCtx *qry_ctx = MT_thread_get_qry_ctx(); \ if (imprints && imprints->imprints.parentid != bi->b->batCacheid) { \ @@ -564,6 +560,104 @@ NAME##_##TYPE(BATiter *bi, struct candit } else {\ basesrc = src; \ } \ + /* Normalize the variables li, hi, lval, hval, possibly */ \ + /* changing anti in the process. This works for all */ \ + /* (and only) numeric types. */ \ + \ + /* Note that the expression x < v is equivalent to x <= */ \ + /* v' where v' is the next smaller value in the domain */ \ + /* of v (similarly for x > v). Also note that for */ \ + /* floating point numbers there actually is such a */ \ + /* value. In fact, there is a function in standard C */\ + /* that calculates that value. */ \ + \ + /* The result is: */\ + /* li == !anti, hi == !anti, lval == true, hval == true */ \ + /* This means that all ranges that we check for are */ \ +
MonetDB: Aug2024 - Merge with Dec2023 branch.
Changeset: d97e2f119210 for MonetDB URL: https://dev.monetdb.org/hg/MonetDB/rev/d97e2f119210 Modified Files: gdk/gdk_select.c Branch: Aug2024 Log Message: Merge with Dec2023 branch. diffs (truncated from 435 to 300 lines): diff --git a/gdk/gdk_select.c b/gdk/gdk_select.c --- a/gdk/gdk_select.c +++ b/gdk/gdk_select.c @@ -762,11 +762,35 @@ fullscan_str(BATiter *bi, struct candite oid o; QryCtx *qry_ctx = MT_thread_get_qry_ctx(); - if (!equi || !GDK_ELIMDOUBLES(bi->vh)) + if (anti && tl == th && !bi->nonil && GDK_ELIMDOUBLES(bi->vh) && + strcmp(tl, str_nil) != 0 && + strLocate(bi->vh, str_nil) == (var_t) -2) { + /* anti-equi select for non-nil value, and there are no +* nils, so we can use fast path; trigger by setting +* nonil */ + bi->nonil = true; + } + if (!((equi || + (anti && tl == th && (bi->nonil || strcmp(tl, str_nil) == 0))) && + GDK_ELIMDOUBLES(bi->vh))) return fullscan_any(bi, ci, bn, tl, th, li, hi, equi, anti, lval, hval, lnil, cnt, hseq, dst, maximum, imprints, algo); if ((pos = strLocate(bi->vh, tl)) == (var_t) -2) { + if (anti) { + /* return the whole shebang */ + *algo = "select: fullscan anti-equi strelim (all)"; + if (BATextend(bn, ncand) != GDK_SUCCEED) { + BBPreclaim(bn); + return BUN_NONE; + } + dst = Tloc(bn, 0); + TIMEOUT_LOOP_IDX(p, ncand, qry_ctx) { + dst[p] = canditer_next(ci); + } + TIMEOUT_CHECK(qry_ctx, GOTO_LABEL_TIMEOUT_HANDLER(bailout, qry_ctx)); + return ncand; + } *algo = "select: fullscan equi strelim (nomatch)"; return 0; } @@ -774,40 +798,74 @@ fullscan_str(BATiter *bi, struct candite BBPreclaim(bn); return BUN_NONE; } - *algo = "select: fullscan equi strelim"; + *algo = anti ? "select: fullscan anti-equi strelim" : "select: fullscan equi strelim"; assert(pos >= GDK_VAROFFSET); switch (bi->width) { case 1: { const unsigned char *ptr = (const unsigned char *) bi->base; pos -= GDK_VAROFFSET; if (ci->tpe == cand_dense) { - TIMEOUT_LOOP_IDX(p, ncand, qry_ctx) { - o = canditer_next_dense(ci); - if (ptr[o - hseq] == pos) { - dst = buninsfix(bn, dst, cnt, o, - (BUN) ((dbl) cnt / (dbl) (p == 0 ? 1 : p) - * (dbl) (ncand-p) * 1.1 + 1024), - maximum); - if (dst == NULL) { - BBPreclaim(bn); - return BUN_NONE; + if (anti) { + TIMEOUT_LOOP_IDX(p, ncand, qry_ctx) { + o = canditer_next_dense(ci); + if (ptr[o - hseq] != pos) { + dst = buninsfix(bn, dst, cnt, o, + (BUN) ((dbl) cnt / (dbl) (p == 0 ? 1 : p) + * (dbl) (ncand-p) * 1.1 + 1024), + maximum); + if (dst == NULL) { + BBPreclaim(bn); + return BUN_NONE; + } + cnt++; } - cnt++; + } + } else { + TIMEOUT_LOOP_IDX(p, ncand, qry_ctx) { + o = canditer_next_dense(ci); + if (ptr[o - hseq] == pos) { + dst = buninsfix(bn, dst, cnt, o, + (BUN) ((dbl) cnt / (dbl) (p == 0 ? 1 : p) + * (dbl) (ncand-p) * 1.1 + 1024), + maximum); +
MonetDB: Dec2023 - Handle anti select on duplicate-eliminated st...
Changeset: 0d2d8a07cd9b for MonetDB URL: https://dev.monetdb.org/hg/MonetDB/rev/0d2d8a07cd9b Modified Files: gdk/gdk_select.c Branch: Dec2023 Log Message: Handle anti select on duplicate-eliminated string bats without nils more efficiently. diffs (truncated from 435 to 300 lines): diff --git a/gdk/gdk_select.c b/gdk/gdk_select.c --- a/gdk/gdk_select.c +++ b/gdk/gdk_select.c @@ -778,11 +778,35 @@ fullscan_str(BATiter *bi, struct candite timeoffset = (qry_ctx->starttime && qry_ctx->querytimeout) ? (qry_ctx->starttime + qry_ctx->querytimeout) : 0; } - if (!equi || !GDK_ELIMDOUBLES(bi->vh)) + if (anti && tl == th && !bi->nonil && GDK_ELIMDOUBLES(bi->vh) && + strcmp(tl, str_nil) != 0 && + strLocate(bi->vh, str_nil) == (var_t) -2) { + /* anti-equi select for non-nil value, and there are no +* nils, so we can use fast path; trigger by setting +* nonil */ + bi->nonil = true; + } + if (!((equi || + (anti && tl == th && (bi->nonil || strcmp(tl, str_nil) == 0))) && + GDK_ELIMDOUBLES(bi->vh))) return fullscan_any(bi, ci, bn, tl, th, li, hi, equi, anti, lval, hval, lnil, cnt, hseq, dst, maximum, imprints, algo); if ((pos = strLocate(bi->vh, tl)) == (var_t) -2) { + if (anti) { + /* return the whole shebang */ + *algo = "select: fullscan anti-equi strelim (all)"; + if (BATextend(bn, ncand) != GDK_SUCCEED) { + BBPreclaim(bn); + return BUN_NONE; + } + dst = Tloc(bn, 0); + TIMEOUT_LOOP_IDX(p, ncand, timeoffset) { + dst[p] = canditer_next(ci); + } + TIMEOUT_CHECK(timeoffset, GOTO_LABEL_TIMEOUT_HANDLER(bailout)); + return ncand; + } *algo = "select: fullscan equi strelim (nomatch)"; return 0; } @@ -790,40 +814,74 @@ fullscan_str(BATiter *bi, struct candite BBPreclaim(bn); return BUN_NONE; } - *algo = "select: fullscan equi strelim"; + *algo = anti ? "select: fullscan anti-equi strelim" : "select: fullscan equi strelim"; assert(pos >= GDK_VAROFFSET); switch (bi->width) { case 1: { const unsigned char *ptr = (const unsigned char *) bi->base; pos -= GDK_VAROFFSET; if (ci->tpe == cand_dense) { - TIMEOUT_LOOP_IDX(p, ncand, timeoffset) { - o = canditer_next_dense(ci); - if (ptr[o - hseq] == pos) { - dst = buninsfix(bn, dst, cnt, o, - (BUN) ((dbl) cnt / (dbl) (p == 0 ? 1 : p) - * (dbl) (ncand-p) * 1.1 + 1024), - maximum); - if (dst == NULL) { - BBPreclaim(bn); - return BUN_NONE; + if (anti) { + TIMEOUT_LOOP_IDX(p, ncand, timeoffset) { + o = canditer_next_dense(ci); + if (ptr[o - hseq] != pos) { + dst = buninsfix(bn, dst, cnt, o, + (BUN) ((dbl) cnt / (dbl) (p == 0 ? 1 : p) + * (dbl) (ncand-p) * 1.1 + 1024), + maximum); + if (dst == NULL) { + BBPreclaim(bn); + return BUN_NONE; + } + cnt++; } - cnt++; + } + } else { + TIMEOUT_LOOP_IDX(p, ncand, timeoffset) { + o = canditer_next_dense(ci); + if (ptr[o - hseq] == pos) { + dst = buninsfix(bn, dst, cnt, o, + (BUN) ((dbl) cnt / (dbl) (p == 0 ? 1 : p) +
MonetDB: Aug2024 - Test for bug #7569.
Changeset: 0eae52ea1a6d for MonetDB URL: https://dev.monetdb.org/hg/MonetDB/rev/0eae52ea1a6d Added Files: sql/test/BugTracker-2024/Tests/7569-temp-table-column-reuse.test Modified Files: sql/test/BugTracker-2024/Tests/All testing/sqllogictest.py Branch: Aug2024 Log Message: Test for bug #7569. diffs (47 lines): diff --git a/sql/test/BugTracker-2024/Tests/7569-temp-table-column-reuse.test b/sql/test/BugTracker-2024/Tests/7569-temp-table-column-reuse.test new file mode 100644 --- /dev/null +++ b/sql/test/BugTracker-2024/Tests/7569-temp-table-column-reuse.test @@ -0,0 +1,23 @@ +statement ok +START TRANSACTION + +statement ok +CREATE TEMPORARY TABLE nums(x INT, y INT) + +statement ok +INSERT INTO nums +SELECT value AS x, value AS y +FROM sys.generate_series(0, 1) + +statement ok +UPDATE nums SET y = 100 + +query II nosort +SELECT * FROM nums + +0 +100 + +statement ok +ROLLBACK + 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 @@ -84,3 +84,4 @@ 7556-missing-ignore-case 7465-fwf-block-boundary-error 7566-connections-refused 7562-interval-overflow +7569-temp-table-column-reuse diff --git a/testing/sqllogictest.py b/testing/sqllogictest.py --- a/testing/sqllogictest.py +++ b/testing/sqllogictest.py @@ -769,6 +769,7 @@ class SQLLogic: if line == '\n': self.writeline() continue +self.qline = self.line conn = None # look for connection string if line.startswith('@connection'): ___ checkin-list mailing list -- checkin-list@monetdb.org To unsubscribe send an email to checkin-list-le...@monetdb.org
MonetDB: Aug2024 - Partial backou of ed08ba0b1ffa: don't reuse b...
Changeset: 11aee40252d3 for MonetDB URL: https://dev.monetdb.org/hg/MonetDB/rev/11aee40252d3 Modified Files: sql/storage/bat/bat_storage.c Branch: Aug2024 Log Message: Partial backou of ed08ba0b1ffa: don't reuse bat for empty temp tables. This fixes #7569. diffs (63 lines): diff --git a/sql/storage/bat/bat_storage.c b/sql/storage/bat/bat_storage.c --- a/sql/storage/bat/bat_storage.c +++ b/sql/storage/bat/bat_storage.c @@ -2107,7 +2107,7 @@ update_idx(sql_trans *tr, sql_idx * i, v } static int -delta_append_bat(sql_trans *tr, sql_delta **batp, sqlid id, BUN offset, BAT *offsets, BAT *i, char *storage_type, bool istemp) +delta_append_bat(sql_trans *tr, sql_delta **batp, sqlid id, BUN offset, BAT *offsets, BAT *i, char *storage_type) { BAT *b, *oi = i; int err = 0; @@ -2150,13 +2150,7 @@ delta_append_bat(sql_trans *tr, sql_delt bat_destroy(oi); return LOG_ERR; } - if (istemp && !offsets && offset == 0 && BATcount(b) == 0 && bat->cs.ucnt == 0) { - bat_set_access(i, BAT_READ); - if (bat->cs.bid) - temp_destroy(bat->cs.bid); - i = transfer_to_systrans(i); - bat->cs.bid = temp_create(i); - } else if (!offsets && offset == b->hseqbase+BATcount(b)) { + if (!offsets && offset == b->hseqbase+BATcount(b)) { if (BATappend(b, oi, NULL, true) != GDK_SUCCEED) err = 1; } else if (!offsets) { @@ -2306,7 +2300,7 @@ dup_storage( sql_trans *tr, storage *oba } static int -append_col_execute(sql_trans *tr, sql_delta **delta, sqlid id, BUN offset, BAT *offsets, void *incoming_data, BUN cnt, bool isbat, int tt, char *storage_type, bool isnew) +append_col_execute(sql_trans *tr, sql_delta **delta, sqlid id, BUN offset, BAT *offsets, void *incoming_data, BUN cnt, bool isbat, int tt, char *storage_type) { int ok = LOG_OK; @@ -2316,7 +2310,7 @@ append_col_execute(sql_trans *tr, sql_de BAT *bat = incoming_data; if (BATcount(bat)) - ok = delta_append_bat(tr, delta, id, offset, offsets, bat, storage_type, isnew); + ok = delta_append_bat(tr, delta, id, offset, offsets, bat, storage_type); } else { ok = delta_append_val(tr, delta, id, offset, offsets, incoming_data, cnt, storage_type, tt); } @@ -2341,7 +2335,7 @@ append_col(sql_trans *tr, sql_column *c, assert(delta->cs.st == ST_DEFAULT || delta->cs.st == ST_DICT || delta->cs.st == ST_FOR); odelta = delta; - if ((res = append_col_execute(tr, &delta, c->base.id, offset, offsets, data, cnt, isbat, tpe, c->storage_type, isTempTable(c->t))) != LOG_OK) + if ((res = append_col_execute(tr, &delta, c->base.id, offset, offsets, data, cnt, isbat, tpe, c->storage_type)) != LOG_OK) return res; if (odelta != delta) { delta->next = odelta; @@ -2373,7 +2367,7 @@ append_idx(sql_trans *tr, sql_idx *i, BU assert(delta->cs.st == ST_DEFAULT); - res = append_col_execute(tr, &delta, i->base.id, offset, offsets, data, cnt, isbat, tpe, NULL, isTempTable(i->t)); + res = append_col_execute(tr, &delta, i->base.id, offset, offsets, data, cnt, isbat, tpe, NULL); return res; } ___ checkin-list mailing list -- checkin-list@monetdb.org To unsubscribe send an email to checkin-list-le...@monetdb.org
MonetDB: default - Cleanup
Changeset: 6663ca13e289 for MonetDB URL: https://dev.monetdb.org/hg/MonetDB/rev/6663ca13e289 Modified Files: gdk/gdk_bbp.c gdk/gdk_hash.c gdk/gdk_join.c gdk/gdk_orderidx.c gdk/gdk_private.h Branch: default Log Message: Cleanup - remove hash upgrade code keeping some old hashes; - remove compile-time option to not persist indexes. diffs (229 lines): diff --git a/gdk/gdk_bbp.c b/gdk/gdk_bbp.c --- a/gdk/gdk_bbp.c +++ b/gdk/gdk_bbp.c @@ -310,14 +310,6 @@ BBPselectfarm(role_t role, int type, enu if (GDKinmemory(0)) return 0; -#ifndef PERSISTENTHASH - if (hptype == hashheap) - role = TRANSIENT; -#endif -#ifndef PERSISTENTIDX - if (hptype == orderidxheap) - role = TRANSIENT; -#endif for (i = 0; i < MAXFARMS; i++) if (BBPfarms[i].roles & (1U << (int) role)) return i; @@ -4622,14 +4614,10 @@ BBPdiskscan(const char *parent, size_t b delete = (b == NULL || !b->tvheap || !b->batCopiedtodisk || b->tvheap->free == 0); } else if (strncmp(p + 1, "thashl", 6) == 0 || strncmp(p + 1, "thashb", 6) == 0) { -#ifdef PERSISTENTHASH BAT *b = getdesc(bid); delete = b == NULL; if (!delete) b->thash = (Hash *) 1; -#else - delete = true; -#endif } else if (strncmp(p + 1, "thash", 5) == 0) { /* older versions used .thash which we * can simply ignore */ @@ -4644,14 +4632,10 @@ BBPdiskscan(const char *parent, size_t b if (!delete) b->timprints = (Imprints *) 1; } else if (strncmp(p + 1, "torderidx", 9) == 0) { -#ifdef PERSISTENTIDX BAT *b = getdesc(bid); delete = b == NULL; if (!delete) b->torderidx = (Heap *) 1; -#else - delete = true; -#endif } else if (strncmp(p + 1, "tstrimps", 8) == 0) { BAT *b = getdesc(bid); delete = b == NULL; diff --git a/gdk/gdk_hash.c b/gdk/gdk_hash.c --- a/gdk/gdk_hash.c +++ b/gdk/gdk_hash.c @@ -81,13 +81,6 @@ HASHclear(Hash *h) } #define HASH_VERSION 6 -/* this is only for the change of hash function of the floating point - * types, the UUID type and the MBR type; if HASH_VERSION is increased - * again from 6, the code associated with HASH_VERSION_NOUUID and - * HASH_VERSION_NOMBR must be deleted */ -#define HASH_VERSION_FLOAT 5 -#define HASH_VERSION_NOMBR 4 -#define HASH_VERSION_NOUUID3 #define HASH_HEADER_SIZE 7 /* nr of size_t fields in header */ void @@ -477,45 +470,7 @@ BATcheckhash(BAT *b) struct stat st; if (read(fd, hdata, sizeof(hdata)) == sizeof(hdata) && - (hdata[0] == ( -#ifdef PERSISTENTHASH - ((size_t) 1 << 24) | -#endif - HASH_VERSION) -#ifdef HASH_VERSION_NOUUID -/* if not uuid, also allow previous version */ -|| (hdata[0] == ( -#ifdef PERSISTENTHASH -((size_t) 1 << 24) | -#endif -HASH_VERSION_NOUUID) && -strcmp(ATOMname(b->ttype), "flt") != 0 && -strcmp(ATOMname(b->ttype), "dbl") != 0 && -strcmp(ATOMname(b->ttype), "uuid") != 0 && -strcmp(ATOMname(b->ttype), "mbr") != 0) -#endif -#ifdef HASH_VERSION_NOMBR -/* if not uuid, also allow previous version */ -|| (hdata[0] == ( -#ifdef PERSISTENTHASH -((size_t) 1 << 24) | -#endif -HASH_VERSION_NOMBR) && -strcmp(ATOMname(b->ttype), "flt") != 0 && -strcmp(ATOMname(b->ttype), "dbl") != 0 && -strcmp(ATOMname(b->ttype), "mbr") != 0) -#endif -#ifdef HASH_VERSION_FLOAT -/* if not f
MonetDB: default - Merge with Aug2024 branch, not changing any f...
Changeset: 23886498f43e for MonetDB URL: https://dev.monetdb.org/hg/MonetDB/rev/23886498f43e Modified Files: .bumpversion.cfg MonetDB.spec clients/mapilib/mapi.rc clients/odbc/driver/driver.rc clients/odbc/winsetup/setup.rc cmake/monetdb-versions.cmake gdk/libbat.rc monetdb5/tools/libmonetdb5.rc Branch: default Log Message: Merge with Aug2024 branch, not changing any files.. ___ checkin-list mailing list -- checkin-list@monetdb.org To unsubscribe send an email to checkin-list-le...@monetdb.org
MonetDB: Aug2024 - Post release build.
Changeset: 979938af8570 for MonetDB URL: https://dev.monetdb.org/hg/MonetDB/rev/979938af8570 Modified Files: .bumpversion.cfg MonetDB.spec clients/mapilib/mapi.rc clients/odbc/driver/driver.rc clients/odbc/winsetup/setup.rc cmake/monetdb-versions.cmake gdk/libbat.rc monetdb5/tools/libmonetdb5.rc Branch: Aug2024 Log Message: Post release build. diffs (191 lines): diff --git a/.bumpversion.cfg b/.bumpversion.cfg --- a/.bumpversion.cfg +++ b/.bumpversion.cfg @@ -1,5 +1,5 @@ [bumpversion] -current_version = 11.51.3 +current_version = 11.51.4 commit = False tag = False 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.51.3 +%global version 11.51.4 %bcond_with compat diff --git a/clients/mapilib/mapi.rc b/clients/mapilib/mapi.rc --- a/clients/mapilib/mapi.rc +++ b/clients/mapilib/mapi.rc @@ -6,8 +6,8 @@ LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_U #define sversion(major,minor,patch)#major "." #minor "." #patch "\0" 1 VERSIONINFO - FILEVERSION version(11,51,3) - PRODUCTVERSION version(11,51,3) + FILEVERSION version(11,51,4) + PRODUCTVERSION version(11,51,4) FILEFLAGSMASK 0x3fL FILEFLAGS 0 FILEOS VOS_NT_WINDOWS32 @@ -21,14 +21,14 @@ BEGIN VALUE "Comments", "\0" VALUE "CompanyName", "MonetDB Foundation\0" VALUE "FileDescription", "MonetDB Application Interface DLL\0" - VALUE "FileVersion", sversion(11,51,3) + VALUE "FileVersion", sversion(11,51,4) VALUE "InternalName", "Mapi\0" VALUE "LegalCopyright", "Copyright (c) 2024 MonetDB Foundation\0" VALUE "LegalTrademarks", "\0" VALUE "OriginalFilename", "Mapi.dll\0" VALUE "PrivateBuild", "\0" VALUE "ProductName", "MonetDB Client Libraries\0" - VALUE "ProductVersion", sversion(11,51,3) + VALUE "ProductVersion", sversion(11,51,4) 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 @@ -6,8 +6,8 @@ LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_U #define sversion(major,minor,patch)#major "." #minor "." #patch "\0" 1 VERSIONINFO - FILEVERSION version(11,51,3) - PRODUCTVERSION version(11,51,3) + FILEVERSION version(11,51,4) + PRODUCTVERSION version(11,51,4) FILEFLAGSMASK 0x3fL FILEFLAGS 0 FILEOS VOS_NT_WINDOWS32 @@ -21,14 +21,14 @@ BEGIN VALUE "Comments", "\0" VALUE "CompanyName", "MonetDB Foundation\0" VALUE "FileDescription", "MonetDB ODBC Driver DLL\0" - VALUE "FileVersion", sversion(11,51,3) + VALUE "FileVersion", sversion(11,51,4) VALUE "InternalName", "MonetODBC\0" VALUE "LegalCopyright", "Copyright (c) 2024 MonetDB Foundation\0" VALUE "LegalTrademarks", "\0" VALUE "OriginalFilename", "MonetODBC.dll\0" VALUE "PrivateBuild", "\0" VALUE "ProductName", "MonetDB ODBC Driver\0" - VALUE "ProductVersion", sversion(11,51,3) + VALUE "ProductVersion", sversion(11,51,4) VALUE "SpecialBuild", "\0" END END diff --git a/clients/odbc/winsetup/setup.rc b/clients/odbc/winsetup/setup.rc --- a/clients/odbc/winsetup/setup.rc +++ b/clients/odbc/winsetup/setup.rc @@ -51,8 +51,8 @@ END // VS_VERSION_INFO VERSIONINFO - FILEVERSION version(11,51,3) - PRODUCTVERSION version(11,51,3) + FILEVERSION version(11,51,4) + PRODUCTVERSION version(11,51,4) FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L @@ -69,12 +69,12 @@ BEGIN BEGIN VALUE "CompanyName", "MonetDB Foundation" VALUE "FileDescription", "MonetDB ODBC Setup DLL" -VALUE "FileVersion", sversion(11,51,3) +VALUE "FileVersion", sversion(11,51,4) VALUE "InternalName", "MonetODBCs.dll" VALUE "LegalCopyright", "Copyright (c) 2024 MonetDB Foundation" VALUE "OriginalFilename", "MonetODBCs.dll" VALUE "ProductName", "MonetDB ODBC Setup" -VALUE "ProductVersion", sversion(11,51,3) +VALUE "ProductVersion", sversion(11,51,4) END END BLOCK "VarFileInfo" diff --git a/cmake/monetdb-versions.cmake b/cmake/monetdb-versions.cmake --- a/cmake/monetdb-versions.cmake +++ b/cmake/monetdb-versions.cmake @@ -12,10 +12,10 @@ set(MONETDB_VERSION_MAJOR "11") set(MONETDB_VERSION_MINOR "51") -set(MONETDB_VERSION_PATCH "3") +set(MONETDB_VERSION_PATCH "4") if(RELEASE_VERSION) - set(MONETDB_RELEASE "Aug2024") + set(MONETDB_RELEASE "unreleased") endif() set(MONETDB_VERSION "${MONETDB_VERSION_MAJOR}.${MONETDB_VERSION_MINOR}.${MONETDB_VERSION_PATCH}") diff --git a/gdk/libbat.rc b/gdk/libbat.rc --- a/gdk/libbat.rc +++ b/gdk/libbat.rc @@ -6,8 +6,8 @@ LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_U #define sversion(major,minor,patch)#major "
MonetDB: default - Merge with Aug2024 branch.
Changeset: 18089d375e3b for MonetDB URL: https://dev.monetdb.org/hg/MonetDB/rev/18089d375e3b Modified Files: MonetDB.spec cmake/monetdb-versions.cmake Branch: default Log Message: Merge with Aug2024 branch. diffs (132 lines): diff --git a/.hgtags b/.hgtags --- a/.hgtags +++ b/.hgtags @@ -831,3 +831,4 @@ e1e9e22bf3d734dc50b56151c657a57c18f56561 cde7d8f7c99540a8c95856df052a9f123b0c1643 Dec2023_11 cde7d8f7c99540a8c95856df052a9f123b0c1643 Dec2023_SP4_release ae474f7fda0a3f2ebefc6c0b2cd969ef0854fad1 Aug2024_1 +dce400b68239412b1835fb28bd183bf50f5e8692 Aug2024_3 diff --git a/MonetDB.spec b/MonetDB.spec --- a/MonetDB.spec +++ b/MonetDB.spec @@ -989,6 +989,11 @@ rm "${RPM_BUILD_ROOT}"%{_unitdir}/monetd %endif %changelog +* Mon Aug 19 2024 Sjoerd Mullender - 11.51.3-20240819 +- Rebuilt. +- GH#7562: Assertion failure when comparing `INTERVAL` value +- GH#7566: After a while, all new sessions (connections) may get refused + * Mon Aug 12 2024 Sjoerd Mullender - 11.51.1-20240812 - Rebuilt. - GH#7045: A value filtered in a subquery finds its way to a later filter diff --git a/clients/mapiclient/mclient.1 b/clients/mapiclient/mclient.1 --- a/clients/mapiclient/mclient.1 +++ b/clients/mapiclient/mclient.1 @@ -8,7 +8,7 @@ .\" Copyright August 2008 - 2023 MonetDB B.V.; .\" Copyright 1997 - July 2008 CWI. .\" -.TH MCLIENT 1 2024-08-12 MonetDB "MonetDB Applications" +.TH MCLIENT 1 2024-08-19 MonetDB "MonetDB Applications" .SH NAME mclient \- the MonetDB command-line tool .SH SYNOPSIS diff --git a/cmake/monetdb-versions.cmake b/cmake/monetdb-versions.cmake --- a/cmake/monetdb-versions.cmake +++ b/cmake/monetdb-versions.cmake @@ -57,7 +57,7 @@ set(MAPI_VERSION "${MAPI_VERSION_MAJOR}. # extras, and tools/utils/msabaoth.[ch]) set(MONETDB5_VERSION_MAJOR "36") set(MONETDB5_VERSION_MINOR "0") -set(MONETDB5_VERSION_PATCH "0") +set(MONETDB5_VERSION_PATCH "1") set(MONETDB5_VERSION "${MONETDB5_VERSION_MAJOR}.${MONETDB5_VERSION_MINOR}.${MONETDB5_VERSION_PATCH}") # version of the MONETDBE library (subdirectory tools/monetdbe) @@ -75,5 +75,5 @@ set(STREAM_VERSION "${STREAM_VERSION_MAJ # version of the SQL library (subdirectory sql) set(SQL_VERSION_MAJOR "15") set(SQL_VERSION_MINOR "0") -set(SQL_VERSION_PATCH "0") +set(SQL_VERSION_PATCH "1") set(SQL_VERSION "${SQL_VERSION_MAJOR}.${SQL_VERSION_MINOR}.${SQL_VERSION_PATCH}") diff --git a/debian/changelog b/debian/changelog --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,11 @@ +monetdb (11.51.3) unstable; urgency=low + + * Rebuilt. + * GH#7562: Assertion failure when comparing `INTERVAL` value + * GH#7566: After a while, all new sessions (connections) may get refused + + -- Sjoerd Mullender Mon, 19 Aug 2024 12:54:58 +0200 + monetdb (11.51.1) unstable; urgency=low * Rebuilt. diff --git a/misc/packages/deb/changelog b/misc/packages/deb/changelog --- a/misc/packages/deb/changelog +++ b/misc/packages/deb/changelog @@ -1,3 +1,11 @@ +monetdb (11.51.3) unstable; urgency=low + + * Rebuilt. + * GH#7562: Assertion failure when comparing `INTERVAL` value + * GH#7566: After a while, all new sessions (connections) may get refused + + -- Sjoerd Mullender Mon, 19 Aug 2024 12:54:58 +0200 + monetdb (11.51.1) unstable; urgency=low * Rebuilt. diff --git a/misc/packages/rpm/changelog b/misc/packages/rpm/changelog --- a/misc/packages/rpm/changelog +++ b/misc/packages/rpm/changelog @@ -1,3 +1,8 @@ +* Mon Aug 19 2024 Sjoerd Mullender - 11.51.3-20240819 +- Rebuilt. +- GH#7562: Assertion failure when comparing `INTERVAL` value +- GH#7566: After a while, all new sessions (connections) may get refused + * Mon Aug 12 2024 Sjoerd Mullender - 11.51.1-20240812 - Rebuilt. - GH#7045: A value filtered in a subquery finds its way to a later filter diff --git a/tools/merovingian/client/monetdb.1 b/tools/merovingian/client/monetdb.1 --- a/tools/merovingian/client/monetdb.1 +++ b/tools/merovingian/client/monetdb.1 @@ -11,7 +11,7 @@ .\" Process this file with .\" groff -man -Tascii foo.1 .\" -.TH MONETDB 1 2024-08-12 MonetDB "MonetDB Applications" +.TH MONETDB 1 2024-08-19 MonetDB "MonetDB Applications" .SH NAME monetdb \- control a MonetDB Database Server instance .SH SYNOPSIS diff --git a/tools/merovingian/daemon/monetdbd.1.in b/tools/merovingian/daemon/monetdbd.1.in --- a/tools/merovingian/daemon/monetdbd.1.in +++ b/tools/merovingian/daemon/monetdbd.1.in @@ -11,7 +11,7 @@ .\" Process this file with .\" groff -man -Tascii foo.1 .\" -.TH MONETDBD 1 2024-08-12 MonetDB "MonetDB Applications" +.TH MONETDBD 1 2024-08-19 MonetDB "MonetDB Applications" .SH NAME monetdbd \- the MonetDB Database Server daemon .SH SYNOPSIS diff --git a/tools/mserver/mserver5.1.in b/tools/mserver/mserver5.1.in --- a/tools/mserver/mserv
MonetDB: Aug2024 - Setting tag Aug2024_3 for the release build.
Changeset: ab8524b83e91 for MonetDB URL: https://dev.monetdb.org/hg/MonetDB/rev/ab8524b83e91 Modified Files: .hgtags Branch: Aug2024 Log Message: Setting tag Aug2024_3 for the release build. diffs (8 lines): diff --git a/.hgtags b/.hgtags --- a/.hgtags +++ b/.hgtags @@ -831,3 +831,4 @@ e1e9e22bf3d734dc50b56151c657a57c18f56561 cde7d8f7c99540a8c95856df052a9f123b0c1643 Dec2023_11 cde7d8f7c99540a8c95856df052a9f123b0c1643 Dec2023_SP4_release ae474f7fda0a3f2ebefc6c0b2cd969ef0854fad1 Aug2024_1 +dce400b68239412b1835fb28bd183bf50f5e8692 Aug2024_3 ___ checkin-list mailing list -- checkin-list@monetdb.org To unsubscribe send an email to checkin-list-le...@monetdb.org
MonetDB: Aug2024 - Moved contents of ChangeLog.Aug2024 to MonetD...
Changeset: dce400b68239 for MonetDB URL: https://dev.monetdb.org/hg/MonetDB/rev/dce400b68239 Modified Files: MonetDB.spec clients/mapiclient/mclient.1 debian/changelog misc/packages/deb/changelog misc/packages/rpm/changelog tools/merovingian/client/monetdb.1 tools/merovingian/daemon/monetdbd.1.in tools/mserver/mserver5.1.in Branch: Aug2024 Log Message: Moved contents of ChangeLog.Aug2024 to MonetDB.spec, debian/changelog and ChangeLog-Archive. diffs (105 lines): diff --git a/MonetDB.spec b/MonetDB.spec --- a/MonetDB.spec +++ b/MonetDB.spec @@ -989,6 +989,11 @@ rm "${RPM_BUILD_ROOT}"%{_unitdir}/monetd %endif %changelog +* Mon Aug 19 2024 Sjoerd Mullender - 11.51.3-20240819 +- Rebuilt. +- GH#7562: Assertion failure when comparing `INTERVAL` value +- GH#7566: After a while, all new sessions (connections) may get refused + * Mon Aug 12 2024 Sjoerd Mullender - 11.51.1-20240812 - Rebuilt. - GH#7045: A value filtered in a subquery finds its way to a later filter diff --git a/clients/mapiclient/mclient.1 b/clients/mapiclient/mclient.1 --- a/clients/mapiclient/mclient.1 +++ b/clients/mapiclient/mclient.1 @@ -8,7 +8,7 @@ .\" Copyright August 2008 - 2023 MonetDB B.V.; .\" Copyright 1997 - July 2008 CWI. .\" -.TH MCLIENT 1 2024-08-12 MonetDB "MonetDB Applications" +.TH MCLIENT 1 2024-08-19 MonetDB "MonetDB Applications" .SH NAME mclient \- the MonetDB command-line tool .SH SYNOPSIS diff --git a/debian/changelog b/debian/changelog --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,11 @@ +monetdb (11.51.3) unstable; urgency=low + + * Rebuilt. + * GH#7562: Assertion failure when comparing `INTERVAL` value + * GH#7566: After a while, all new sessions (connections) may get refused + + -- Sjoerd Mullender Mon, 19 Aug 2024 12:54:58 +0200 + monetdb (11.51.1) unstable; urgency=low * Rebuilt. diff --git a/misc/packages/deb/changelog b/misc/packages/deb/changelog --- a/misc/packages/deb/changelog +++ b/misc/packages/deb/changelog @@ -1,3 +1,11 @@ +monetdb (11.51.3) unstable; urgency=low + + * Rebuilt. + * GH#7562: Assertion failure when comparing `INTERVAL` value + * GH#7566: After a while, all new sessions (connections) may get refused + + -- Sjoerd Mullender Mon, 19 Aug 2024 12:54:58 +0200 + monetdb (11.51.1) unstable; urgency=low * Rebuilt. diff --git a/misc/packages/rpm/changelog b/misc/packages/rpm/changelog --- a/misc/packages/rpm/changelog +++ b/misc/packages/rpm/changelog @@ -1,3 +1,8 @@ +* Mon Aug 19 2024 Sjoerd Mullender - 11.51.3-20240819 +- Rebuilt. +- GH#7562: Assertion failure when comparing `INTERVAL` value +- GH#7566: After a while, all new sessions (connections) may get refused + * Mon Aug 12 2024 Sjoerd Mullender - 11.51.1-20240812 - Rebuilt. - GH#7045: A value filtered in a subquery finds its way to a later filter diff --git a/tools/merovingian/client/monetdb.1 b/tools/merovingian/client/monetdb.1 --- a/tools/merovingian/client/monetdb.1 +++ b/tools/merovingian/client/monetdb.1 @@ -11,7 +11,7 @@ .\" Process this file with .\" groff -man -Tascii foo.1 .\" -.TH MONETDB 1 2024-08-12 MonetDB "MonetDB Applications" +.TH MONETDB 1 2024-08-19 MonetDB "MonetDB Applications" .SH NAME monetdb \- control a MonetDB Database Server instance .SH SYNOPSIS diff --git a/tools/merovingian/daemon/monetdbd.1.in b/tools/merovingian/daemon/monetdbd.1.in --- a/tools/merovingian/daemon/monetdbd.1.in +++ b/tools/merovingian/daemon/monetdbd.1.in @@ -11,7 +11,7 @@ .\" Process this file with .\" groff -man -Tascii foo.1 .\" -.TH MONETDBD 1 2024-08-12 MonetDB "MonetDB Applications" +.TH MONETDBD 1 2024-08-19 MonetDB "MonetDB Applications" .SH NAME monetdbd \- the MonetDB Database Server daemon .SH SYNOPSIS diff --git a/tools/mserver/mserver5.1.in b/tools/mserver/mserver5.1.in --- a/tools/mserver/mserver5.1.in +++ b/tools/mserver/mserver5.1.in @@ -11,7 +11,7 @@ .\" Process this file with .\" groff -man -Tascii foo.1 .\" -.TH MSERVER5 1 2024-08-12 MonetDB "MonetDB Applications" +.TH MSERVER5 1 2024-08-19 MonetDB "MonetDB Applications" .SH NAME mserver5 \- the MonetDB server version 5 .SH SYNOPSIS ___ checkin-list mailing list -- checkin-list@monetdb.org To unsubscribe send an email to checkin-list-le...@monetdb.org
MonetDB: Aug2024 - Updated library versions.
Changeset: 6bb0dde70d40 for MonetDB URL: https://dev.monetdb.org/hg/MonetDB/rev/6bb0dde70d40 Modified Files: cmake/monetdb-versions.cmake Branch: Aug2024 Log Message: Updated library versions. diffs (19 lines): diff --git a/cmake/monetdb-versions.cmake b/cmake/monetdb-versions.cmake --- a/cmake/monetdb-versions.cmake +++ b/cmake/monetdb-versions.cmake @@ -57,7 +57,7 @@ set(MAPI_VERSION "${MAPI_VERSION_MAJOR}. # extras, and tools/utils/msabaoth.[ch]) set(MONETDB5_VERSION_MAJOR "36") set(MONETDB5_VERSION_MINOR "0") -set(MONETDB5_VERSION_PATCH "0") +set(MONETDB5_VERSION_PATCH "1") set(MONETDB5_VERSION "${MONETDB5_VERSION_MAJOR}.${MONETDB5_VERSION_MINOR}.${MONETDB5_VERSION_PATCH}") # version of the MONETDBE library (subdirectory tools/monetdbe) @@ -75,5 +75,5 @@ set(STREAM_VERSION "${STREAM_VERSION_MAJ # version of the SQL library (subdirectory sql) set(SQL_VERSION_MAJOR "15") set(SQL_VERSION_MINOR "0") -set(SQL_VERSION_PATCH "0") +set(SQL_VERSION_PATCH "1") set(SQL_VERSION "${SQL_VERSION_MAJOR}.${SQL_VERSION_MINOR}.${SQL_VERSION_PATCH}") ___ checkin-list mailing list -- checkin-list@monetdb.org To unsubscribe send an email to checkin-list-le...@monetdb.org
MonetDB: default - Merge with Aug2024 branch, not changing any f...
Changeset: 3b8d43664b98 for MonetDB URL: https://dev.monetdb.org/hg/MonetDB/rev/3b8d43664b98 Modified Files: .bumpversion.cfg MonetDB.spec clients/mapilib/mapi.rc clients/odbc/driver/driver.rc clients/odbc/winsetup/setup.rc cmake/monetdb-versions.cmake gdk/libbat.rc monetdb5/tools/libmonetdb5.rc Branch: default Log Message: Merge with Aug2024 branch, not changing any files. ___ checkin-list mailing list -- checkin-list@monetdb.org To unsubscribe send an email to checkin-list-le...@monetdb.org
MonetDB: Aug2024 - Pre-release version number update.
Changeset: 8a22f83c70ae for MonetDB URL: https://dev.monetdb.org/hg/MonetDB/rev/8a22f83c70ae Modified Files: .bumpversion.cfg MonetDB.spec clients/mapilib/mapi.rc clients/odbc/driver/driver.rc clients/odbc/winsetup/setup.rc cmake/monetdb-versions.cmake gdk/libbat.rc monetdb5/tools/libmonetdb5.rc Branch: Aug2024 Log Message: Pre-release version number update. diffs (191 lines): diff --git a/.bumpversion.cfg b/.bumpversion.cfg --- a/.bumpversion.cfg +++ b/.bumpversion.cfg @@ -1,5 +1,5 @@ [bumpversion] -current_version = 11.51.2 +current_version = 11.51.3 commit = False tag = False 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.51.2 +%global version 11.51.3 %bcond_with compat diff --git a/clients/mapilib/mapi.rc b/clients/mapilib/mapi.rc --- a/clients/mapilib/mapi.rc +++ b/clients/mapilib/mapi.rc @@ -6,8 +6,8 @@ LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_U #define sversion(major,minor,patch)#major "." #minor "." #patch "\0" 1 VERSIONINFO - FILEVERSION version(11,51,2) - PRODUCTVERSION version(11,51,2) + FILEVERSION version(11,51,3) + PRODUCTVERSION version(11,51,3) FILEFLAGSMASK 0x3fL FILEFLAGS 0 FILEOS VOS_NT_WINDOWS32 @@ -21,14 +21,14 @@ BEGIN VALUE "Comments", "\0" VALUE "CompanyName", "MonetDB Foundation\0" VALUE "FileDescription", "MonetDB Application Interface DLL\0" - VALUE "FileVersion", sversion(11,51,2) + VALUE "FileVersion", sversion(11,51,3) VALUE "InternalName", "Mapi\0" VALUE "LegalCopyright", "Copyright (c) 2024 MonetDB Foundation\0" VALUE "LegalTrademarks", "\0" VALUE "OriginalFilename", "Mapi.dll\0" VALUE "PrivateBuild", "\0" VALUE "ProductName", "MonetDB Client Libraries\0" - VALUE "ProductVersion", sversion(11,51,2) + VALUE "ProductVersion", sversion(11,51,3) 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 @@ -6,8 +6,8 @@ LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_U #define sversion(major,minor,patch)#major "." #minor "." #patch "\0" 1 VERSIONINFO - FILEVERSION version(11,51,2) - PRODUCTVERSION version(11,51,2) + FILEVERSION version(11,51,3) + PRODUCTVERSION version(11,51,3) FILEFLAGSMASK 0x3fL FILEFLAGS 0 FILEOS VOS_NT_WINDOWS32 @@ -21,14 +21,14 @@ BEGIN VALUE "Comments", "\0" VALUE "CompanyName", "MonetDB Foundation\0" VALUE "FileDescription", "MonetDB ODBC Driver DLL\0" - VALUE "FileVersion", sversion(11,51,2) + VALUE "FileVersion", sversion(11,51,3) VALUE "InternalName", "MonetODBC\0" VALUE "LegalCopyright", "Copyright (c) 2024 MonetDB Foundation\0" VALUE "LegalTrademarks", "\0" VALUE "OriginalFilename", "MonetODBC.dll\0" VALUE "PrivateBuild", "\0" VALUE "ProductName", "MonetDB ODBC Driver\0" - VALUE "ProductVersion", sversion(11,51,2) + VALUE "ProductVersion", sversion(11,51,3) VALUE "SpecialBuild", "\0" END END diff --git a/clients/odbc/winsetup/setup.rc b/clients/odbc/winsetup/setup.rc --- a/clients/odbc/winsetup/setup.rc +++ b/clients/odbc/winsetup/setup.rc @@ -51,8 +51,8 @@ END // VS_VERSION_INFO VERSIONINFO - FILEVERSION version(11,51,2) - PRODUCTVERSION version(11,51,2) + FILEVERSION version(11,51,3) + PRODUCTVERSION version(11,51,3) FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L @@ -69,12 +69,12 @@ BEGIN BEGIN VALUE "CompanyName", "MonetDB Foundation" VALUE "FileDescription", "MonetDB ODBC Setup DLL" -VALUE "FileVersion", sversion(11,51,2) +VALUE "FileVersion", sversion(11,51,3) VALUE "InternalName", "MonetODBCs.dll" VALUE "LegalCopyright", "Copyright (c) 2024 MonetDB Foundation" VALUE "OriginalFilename", "MonetODBCs.dll" VALUE "ProductName", "MonetDB ODBC Setup" -VALUE "ProductVersion", sversion(11,51,2) +VALUE "ProductVersion", sversion(11,51,3) END END BLOCK "VarFileInfo" diff --git a/cmake/monetdb-versions.cmake b/cmake/monetdb-versions.cmake --- a/cmake/monetdb-versions.cmake +++ b/cmake/monetdb-versions.cmake @@ -12,10 +12,10 @@ set(MONETDB_VERSION_MAJOR "11") set(MONETDB_VERSION_MINOR "51") -set(MONETDB_VERSION_PATCH "2") +set(MONETDB_VERSION_PATCH "3") if(RELEASE_VERSION) - set(MONETDB_RELEASE "unreleased") + set(MONETDB_RELEASE "Aug2024") endif() set(MONETDB_VERSION "${MONETDB_VERSION_MAJOR}.${MONETDB_VERSION_MINOR}.${MONETDB_VERSION_PATCH}") diff --git a/gdk/libbat.rc b/gdk/libbat.rc --- a/gdk/libbat.rc +++ b/gdk/libbat.rc @@ -6,8 +6,8 @@ LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_U #define sversion(major,minor,pat
MonetDB: default - Merge with Aug2024 branch.
Changeset: 6963f27a434e for MonetDB URL: https://dev.monetdb.org/hg/MonetDB/rev/6963f27a434e Modified Files: sql/server/rel_schema.c sql/server/rel_select.c sql/storage/store.c Branch: default Log Message: Merge with Aug2024 branch. diffs (239 lines): diff --git a/debian/libmonetdb5-server-cfitsio.install b/debian/monetdb-cfitsio.install rename from debian/libmonetdb5-server-cfitsio.install rename to debian/monetdb-cfitsio.install diff --git a/debian/libmonetdb5-server-geom.install b/debian/monetdb-geom.install rename from debian/libmonetdb5-server-geom.install rename to debian/monetdb-geom.install diff --git a/debian/monetdb5-server-dev.install b/debian/monetdb-server-dev.install rename from debian/monetdb5-server-dev.install rename to debian/monetdb-server-dev.install diff --git a/debian/monetdb5-server.dirs b/debian/monetdb-server.dirs rename from debian/monetdb5-server.dirs rename to debian/monetdb-server.dirs diff --git a/debian/monetdb5-server.docs b/debian/monetdb-server.docs rename from debian/monetdb5-server.docs rename to debian/monetdb-server.docs diff --git a/debian/monetdb5-server.install b/debian/monetdb-server.install rename from debian/monetdb5-server.install rename to debian/monetdb-server.install diff --git a/debian/monetdb5-server.manpages b/debian/monetdb-server.manpages rename from debian/monetdb5-server.manpages rename to debian/monetdb-server.manpages diff --git a/debian/monetdb5-server.postinst b/debian/monetdb-server.postinst rename from debian/monetdb5-server.postinst rename to debian/monetdb-server.postinst diff --git a/debian/monetdb5-sql-dev.install b/debian/monetdb-sql-dev.install rename from debian/monetdb5-sql-dev.install rename to debian/monetdb-sql-dev.install diff --git a/debian/monetdb5-sql.README.Debian b/debian/monetdb-sql.README.Debian rename from debian/monetdb5-sql.README.Debian rename to debian/monetdb-sql.README.Debian diff --git a/debian/monetdb5-sql.default b/debian/monetdb-sql.default rename from debian/monetdb5-sql.default rename to debian/monetdb-sql.default diff --git a/debian/monetdb5-sql.dirs b/debian/monetdb-sql.dirs rename from debian/monetdb5-sql.dirs rename to debian/monetdb-sql.dirs diff --git a/debian/monetdb5-sql.docs b/debian/monetdb-sql.docs rename from debian/monetdb5-sql.docs rename to debian/monetdb-sql.docs diff --git a/debian/monetdb5-sql.init.d b/debian/monetdb-sql.init.d rename from debian/monetdb5-sql.init.d rename to debian/monetdb-sql.init.d diff --git a/debian/monetdb5-sql.install b/debian/monetdb-sql.install rename from debian/monetdb5-sql.install rename to debian/monetdb-sql.install diff --git a/debian/monetdb5-sql.manpages b/debian/monetdb-sql.manpages rename from debian/monetdb5-sql.manpages rename to debian/monetdb-sql.manpages diff --git a/debian/monetdb5-sql.postinst b/debian/monetdb-sql.postinst rename from debian/monetdb5-sql.postinst rename to debian/monetdb-sql.postinst diff --git a/geom/monetdb5/geom.c b/geom/monetdb5/geom.c --- a/geom/monetdb5/geom.c +++ b/geom/monetdb5/geom.c @@ -2078,7 +2078,7 @@ dumpPointsPolygon(BAT *idBAT, BAT *geomB const int lvlDigitsNum = 10;//MAX_UNIT = 4,294,967,295 size_t pathLength = strlen(path); char *newPath; - char *extraStr = ","; + const char extraStr[] = ","; int extraLength = 1; //get the exterior ring of the polygon @@ -2133,7 +2133,7 @@ dumpPointsMultiGeometry(BAT *idBAT, BAT unsigned int lvl = 0; size_t pathLength = strlen(path); char *newPath = NULL; - char *extraStr = ","; + const char extraStr[] = ","; int extraLength = 1; geometriesNum = GEOSGetNumGeometries_r(geoshandle, geosGeometry); 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 @@ -358,7 +358,7 @@ static BAT* sexp_to_bat(SEXP s, int type return b; } -const char* rapi_enableflag = "embedded_r"; +const char rapi_enableflag[] = "embedded_r"; static bool RAPIEnabled(void) { return (GDKgetenv_istrue(rapi_enableflag) diff --git a/monetdb5/modules/mal/bbp.c b/monetdb5/modules/mal/bbp.c --- a/monetdb5/modules/mal/bbp.c +++ b/monetdb5/modules/mal/bbp.c @@ -437,8 +437,8 @@ CMDbbp(bat *ID, bat *NS, bat *TT, bat *C if (bn->batCacheid != 0) { lng l = BATcount(bn); int heat_ = 0, len; - char *loc = BBP_status(i) & BBPLOADED ? "load" : "disk"; - char *mode = "persistent"; + const char *loc = BBP_status(i) & BBPLOADED ? "load" : "disk"; + const char *mode = "persistent"; int refs = BBP_refs(i); int lrefs = BBP_lrefs(i); diff --git a/sql/backends/monet5/sql_scenario.c b/sql/backends/monet5/sql_scenario.c --- a/sql/ba
MonetDB: Aug2024 - Packages were renamed, also rename the files.
Changeset: 681cfd4c2e5c for MonetDB URL: https://dev.monetdb.org/hg/MonetDB/rev/681cfd4c2e5c Added Files: debian/monetdb-cfitsio.install debian/monetdb-geom.install debian/monetdb-server-dev.install debian/monetdb-server.dirs debian/monetdb-server.docs debian/monetdb-server.install debian/monetdb-server.manpages debian/monetdb-server.postinst debian/monetdb-sql-dev.install debian/monetdb-sql.README.Debian debian/monetdb-sql.default debian/monetdb-sql.dirs debian/monetdb-sql.docs debian/monetdb-sql.init.d debian/monetdb-sql.install debian/monetdb-sql.manpages debian/monetdb-sql.postinst Removed Files: debian/libmonetdb5-server-cfitsio.install debian/libmonetdb5-server-geom.install debian/monetdb5-server-dev.install debian/monetdb5-server.dirs debian/monetdb5-server.docs debian/monetdb5-server.install debian/monetdb5-server.manpages debian/monetdb5-server.postinst debian/monetdb5-sql-dev.install debian/monetdb5-sql.README.Debian debian/monetdb5-sql.default debian/monetdb5-sql.dirs debian/monetdb5-sql.docs debian/monetdb5-sql.init.d debian/monetdb5-sql.install debian/monetdb5-sql.manpages debian/monetdb5-sql.postinst Branch: Aug2024 Log Message: Packages were renamed, also rename the files. diffs (51 lines): diff --git a/debian/libmonetdb5-server-cfitsio.install b/debian/monetdb-cfitsio.install rename from debian/libmonetdb5-server-cfitsio.install rename to debian/monetdb-cfitsio.install diff --git a/debian/libmonetdb5-server-geom.install b/debian/monetdb-geom.install rename from debian/libmonetdb5-server-geom.install rename to debian/monetdb-geom.install diff --git a/debian/monetdb5-server-dev.install b/debian/monetdb-server-dev.install rename from debian/monetdb5-server-dev.install rename to debian/monetdb-server-dev.install diff --git a/debian/monetdb5-server.dirs b/debian/monetdb-server.dirs rename from debian/monetdb5-server.dirs rename to debian/monetdb-server.dirs diff --git a/debian/monetdb5-server.docs b/debian/monetdb-server.docs rename from debian/monetdb5-server.docs rename to debian/monetdb-server.docs diff --git a/debian/monetdb5-server.install b/debian/monetdb-server.install rename from debian/monetdb5-server.install rename to debian/monetdb-server.install diff --git a/debian/monetdb5-server.manpages b/debian/monetdb-server.manpages rename from debian/monetdb5-server.manpages rename to debian/monetdb-server.manpages diff --git a/debian/monetdb5-server.postinst b/debian/monetdb-server.postinst rename from debian/monetdb5-server.postinst rename to debian/monetdb-server.postinst diff --git a/debian/monetdb5-sql-dev.install b/debian/monetdb-sql-dev.install rename from debian/monetdb5-sql-dev.install rename to debian/monetdb-sql-dev.install diff --git a/debian/monetdb5-sql.README.Debian b/debian/monetdb-sql.README.Debian rename from debian/monetdb5-sql.README.Debian rename to debian/monetdb-sql.README.Debian diff --git a/debian/monetdb5-sql.default b/debian/monetdb-sql.default rename from debian/monetdb5-sql.default rename to debian/monetdb-sql.default diff --git a/debian/monetdb5-sql.dirs b/debian/monetdb-sql.dirs rename from debian/monetdb5-sql.dirs rename to debian/monetdb-sql.dirs diff --git a/debian/monetdb5-sql.docs b/debian/monetdb-sql.docs rename from debian/monetdb5-sql.docs rename to debian/monetdb-sql.docs diff --git a/debian/monetdb5-sql.init.d b/debian/monetdb-sql.init.d rename from debian/monetdb5-sql.init.d rename to debian/monetdb-sql.init.d diff --git a/debian/monetdb5-sql.install b/debian/monetdb-sql.install rename from debian/monetdb5-sql.install rename to debian/monetdb-sql.install diff --git a/debian/monetdb5-sql.manpages b/debian/monetdb-sql.manpages rename from debian/monetdb5-sql.manpages rename to debian/monetdb-sql.manpages diff --git a/debian/monetdb5-sql.postinst b/debian/monetdb-sql.postinst rename from debian/monetdb5-sql.postinst rename to debian/monetdb-sql.postinst ___ checkin-list mailing list -- checkin-list@monetdb.org To unsubscribe send an email to checkin-list-le...@monetdb.org
MonetDB: Aug2024 - Use const. Use array instead of pointer to s...
Changeset: aaf4753ce39d for MonetDB URL: https://dev.monetdb.org/hg/MonetDB/rev/aaf4753ce39d Modified Files: geom/monetdb5/geom.c monetdb5/extras/rapi/rapi.c monetdb5/modules/mal/bbp.c sql/backends/monet5/sql_scenario.c sql/backends/monet5/sql_user.c sql/server/rel_schema.c sql/server/rel_select.c sql/server/sql_semantic.c sql/storage/store.c tools/merovingian/client/monetdb.c tools/merovingian/utils/utils.c tools/mserver/mserver5.c Branch: Aug2024 Log Message: Use const. Use array instead of pointer to string when it makes sense. diffs (188 lines): diff --git a/geom/monetdb5/geom.c b/geom/monetdb5/geom.c --- a/geom/monetdb5/geom.c +++ b/geom/monetdb5/geom.c @@ -2078,7 +2078,7 @@ dumpPointsPolygon(BAT *idBAT, BAT *geomB const int lvlDigitsNum = 10;//MAX_UNIT = 4,294,967,295 size_t pathLength = strlen(path); char *newPath; - char *extraStr = ","; + const char extraStr[] = ","; int extraLength = 1; //get the exterior ring of the polygon @@ -2133,7 +2133,7 @@ dumpPointsMultiGeometry(BAT *idBAT, BAT unsigned int lvl = 0; size_t pathLength = strlen(path); char *newPath = NULL; - char *extraStr = ","; + const char extraStr[] = ","; int extraLength = 1; geometriesNum = GEOSGetNumGeometries_r(geoshandle, geosGeometry); 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 @@ -358,7 +358,7 @@ static BAT* sexp_to_bat(SEXP s, int type return b; } -const char* rapi_enableflag = "embedded_r"; +const char rapi_enableflag[] = "embedded_r"; static bool RAPIEnabled(void) { return (GDKgetenv_istrue(rapi_enableflag) diff --git a/monetdb5/modules/mal/bbp.c b/monetdb5/modules/mal/bbp.c --- a/monetdb5/modules/mal/bbp.c +++ b/monetdb5/modules/mal/bbp.c @@ -437,8 +437,8 @@ CMDbbp(bat *ID, bat *NS, bat *TT, bat *C if (bn->batCacheid != 0) { lng l = BATcount(bn); int heat_ = 0, len; - char *loc = BBP_status(i) & BBPLOADED ? "load" : "disk"; - char *mode = "persistent"; + const char *loc = BBP_status(i) & BBPLOADED ? "load" : "disk"; + const char *mode = "persistent"; int refs = BBP_refs(i); int lrefs = BBP_lrefs(i); 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 @@ -1262,7 +1262,7 @@ SQLchannelcmd(Client c, backend *be) sqlcleanup(be, 0); return msg; } - static const char* columnar_protocol = "columnar_protocol "; + static const char columnar_protocol[] = "columnar_protocol "; if (strncmp(in->buf + in->pos, columnar_protocol, strlen(columnar_protocol)) == 0) { v = (int) strtol(in->buf + in->pos + strlen(columnar_protocol), NULL, 10); diff --git a/sql/backends/monet5/sql_user.c b/sql/backends/monet5/sql_user.c --- a/sql/backends/monet5/sql_user.c +++ b/sql/backends/monet5/sql_user.c @@ -427,7 +427,7 @@ monet5_create_privileges(ptr _mvc, sql_s assert(schema_id == 2000); sqlstore *store = m->session->tr->store; - char *username = "monetdb"; + const char *username = "monetdb"; char *password = initpasswd ? mcrypt_BackendSum(initpasswd, strlen(initpasswd)) : mcrypt_BackendSum("monetdb", strlen("monetdb")); char *hash = NULL; if (password == NULL || @@ -439,8 +439,8 @@ monet5_create_privileges(ptr _mvc, sql_s } free(password); - char *fullname = "MonetDB Admin"; - char *schema_path = default_schema_path; + const char *fullname = "MonetDB Admin"; + const char *schema_path = default_schema_path; // default values char *optimizer = default_optimizer; lng max_memory = 0; diff --git a/sql/server/rel_schema.c b/sql/server/rel_schema.c --- a/sql/server/rel_schema.c +++ b/sql/server/rel_schema.c @@ -1109,7 +1109,7 @@ table_element(sql_query *query, symbol * (partition_find_part(sql->session->tr, t, NULL) && (s->token == SQL_DROP_COLUMN || s->token == SQL_COLUMN || s->token == SQL_CONSTRAINT || s->token == SQL_DEFAULT || s->token == SQL_DROP_DEFAULT || s->token == SQL_NOT_NULL || s->token == SQL_NULL || s->token == SQL_DROP_CONSTRAINT{ - char *msg = ""; + const char *msg = ""; switch (s->token) { case SQL_TABLE: diff --git a/sql/server/rel_select.c b/sql/server/rel_select.c --- a/sql/server/rel_select.c
MonetDB: default - Merge with Aug2024 branch.
Changeset: af25906ff554 for MonetDB URL: https://dev.monetdb.org/hg/MonetDB/rev/af25906ff554 Branch: default Log Message: Merge with Aug2024 branch. diffs (241 lines): diff --git a/clients/odbc/driver/SQLConnect.c b/clients/odbc/driver/SQLConnect.c --- a/clients/odbc/driver/SQLConnect.c +++ b/clients/odbc/driver/SQLConnect.c @@ -459,12 +459,15 @@ MNDBConnectSettings(ODBCDbc *dbc, const mapi_reconnect(mid); } if (mid == NULL || mapi_error(mid)) { - const char *error_state; + const char *error_state = "08001"; const char *error_explanation = mid ? mapi_error_str(mid) : NULL; - if (error_explanation && strncmp(error_explanation, "InvalidCredentialsException:", 28) == 0) - error_state = "28000"; - else - error_state = "08001"; + if (error_explanation) { + if (strncmp(error_explanation, "InvalidCredentialsException:", 28) == 0) + error_state = "28000"; + else + if (strncmp(error_explanation, "could not connect: Connection timed out", 39) == 0) + error_state = "HYT00"; + } addDbcError(dbc, error_state, error_explanation, 0); if (mid) mapi_destroy(mid); diff --git a/clients/odbc/driver/SQLExecDirect.c b/clients/odbc/driver/SQLExecDirect.c --- a/clients/odbc/driver/SQLExecDirect.c +++ b/clients/odbc/driver/SQLExecDirect.c @@ -93,9 +93,9 @@ ODBCExecDirect(ODBCStmt *stmt, const SQL case MOK: break; case MTIMEOUT: - /* Timeout expired / Communication link failure */ + /* Connection timeout expired / Communication link failure */ timeout = msetting_long(stmt->Dbc->settings, MP_REPLY_TIMEOUT); - addStmtError(stmt, timeout > 0 ? "HYT00" : "08S01", mapi_error_str(stmt->Dbc->mid), 0); + addStmtError(stmt, timeout > 0 ? "HYT01" : "08S01", mapi_error_str(stmt->Dbc->mid), 0); return SQL_ERROR; default: err = mapi_result_error(hdl); diff --git a/clients/odbc/driver/SQLExecute.c b/clients/odbc/driver/SQLExecute.c --- a/clients/odbc/driver/SQLExecute.c +++ b/clients/odbc/driver/SQLExecute.c @@ -529,9 +529,9 @@ MNDBExecute(ODBCStmt *stmt) case MOK: break; case MTIMEOUT: - /* Timeout expired / Communication link failure */ + /* Connection timeout expired / Communication link failure */ timeout = msetting_long(stmt->Dbc->settings, MP_REPLY_TIMEOUT); - addStmtError(stmt, timeout > 0 ? "HYT00" : "08S01", mapi_error_str(stmt->Dbc->mid), 0); + addStmtError(stmt, timeout > 0 ? "HYT01" : "08S01", mapi_error_str(stmt->Dbc->mid), 0); return SQL_ERROR; default: errstr = mapi_result_error(hdl); diff --git a/clients/odbc/driver/SQLFetch.c b/clients/odbc/driver/SQLFetch.c --- a/clients/odbc/driver/SQLFetch.c +++ b/clients/odbc/driver/SQLFetch.c @@ -101,10 +101,9 @@ MNDBFetch(ODBCStmt *stmt, SQLUSMALLINT * case MTIMEOUT: if (RowStatusArray) WriteValue(RowStatusArray, SQL_ROW_ERROR); - /* Timeout expired / Communication -* link failure */ + /* Connection timeout expired / Communication link failure */ timeout = msetting_long(stmt->Dbc->settings, MP_REPLY_TIMEOUT); - addStmtError(stmt, timeout > 0 ? "HYT00" : "08S01", mapi_error_str(stmt->Dbc->mid), 0); + addStmtError(stmt, timeout > 0 ? "HYT01" : "08S01", mapi_error_str(stmt->Dbc->mid), 0); return SQL_ERROR; default: if (RowStatusArray) diff --git a/clients/odbc/driver/SQLMoreResults.c b/clients/odbc/driver/SQLMoreResults.c --- a/clients/odbc/driver/SQLMoreResults.c +++ b/clients/odbc/driver/SQLMoreResults.c @@ -60,9 +60,9 @@ SQLMoreResults(SQLHSTMT StatementHandle) addStmtError(stmt, "HY000", mapi_error_str(stmt->Dbc->mid), 0); return SQL_ERROR; case MTIMEOUT: - /* Timeout expired / Communication link failure */ + /* Connection timeout expired / Communication link failure */ timeout = msetting_long(stmt->Dbc->settings, MP_REPLY_TIMEOUT); - addStmtError(stmt, timeout > 0 ? "HYT00" : "08S01", mapi_error_str(stmt->Dbc->mid), 0); + addStmtError(stmt, timeout > 0 ? "HYT01" : "08S01", mapi_error_str(stmt->Dbc->mid), 0); return SQL_ERROR; default:
MonetDB: Aug2024 - Add const keyword.
Changeset: 2064249d8c3e for MonetDB URL: https://dev.monetdb.org/hg/MonetDB/rev/2064249d8c3e Modified Files: clients/odbc/driver/SQLConnect.c Branch: Aug2024 Log Message: Add const keyword. diffs (12 lines): diff --git a/clients/odbc/driver/SQLConnect.c b/clients/odbc/driver/SQLConnect.c --- a/clients/odbc/driver/SQLConnect.c +++ b/clients/odbc/driver/SQLConnect.c @@ -459,7 +459,7 @@ MNDBConnectSettings(ODBCDbc *dbc, const mapi_reconnect(mid); } if (mid == NULL || mapi_error(mid)) { - char *error_state = "08001"; + const char *error_state = "08001"; const char *error_explanation = mid ? mapi_error_str(mid) : NULL; if (error_explanation) { if (strncmp(error_explanation, "InvalidCredentialsException:", 28) == 0) ___ checkin-list mailing list -- checkin-list@monetdb.org To unsubscribe send an email to checkin-list-le...@monetdb.org
MonetDB: default - Merge with Aug2024 branch.
Changeset: 82c3aa76f31f for MonetDB URL: https://dev.monetdb.org/hg/MonetDB/rev/82c3aa76f31f Modified Files: clients/odbc/driver/driver.rc sql/test/rel-optimizers/Tests/merge-unions.test Branch: default Log Message: Merge with Aug2024 branch. diffs (truncated from 2778 to 300 lines): 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 @@ -27,7 +27,7 @@ BEGIN VALUE "LegalTrademarks", "\0" VALUE "OriginalFilename", "MonetODBC.dll\0" VALUE "PrivateBuild", "\0" - VALUE "ProductName", "MonetDB SQL Server\0" + VALUE "ProductName", "MonetDB ODBC Driver\0" VALUE "ProductVersion", sversion(11,52,0) VALUE "SpecialBuild", "\0" END diff --git a/sql/backends/monet5/generator/Tests/execute-privilege-for-public-hge.test b/sql/backends/monet5/generator/Tests/execute-privilege-for-public-hge.test --- a/sql/backends/monet5/generator/Tests/execute-privilege-for-public-hge.test +++ b/sql/backends/monet5/generator/Tests/execute-privilege-for-public-hge.test @@ -3,21 +3,21 @@ statement ok create user test with password 'test' name 'test' @connection(id=c2, username=test, password=test) -query I +query I nosort SELECT * from generate_series(cast(1 as hugeint),3) 1 2 @connection(id=c2, username=test, password=test) -query I +query I nosort SELECT * from generate_series(1,cast(4 as hugeint),2) 1 3 @connection(id=c2, username=test, password=test) -query I +query I nosort SELECT * from generate_series(5,1,cast(-2 as hugeint)) 5 @@ -35,3 +35,4 @@ drop schema test @connection(id=c1, username=monetdb, password=monetdb) statement ok drop user test + diff --git a/sql/backends/monet5/generator/Tests/execute-privilege-for-public.test b/sql/backends/monet5/generator/Tests/execute-privilege-for-public.test --- a/sql/backends/monet5/generator/Tests/execute-privilege-for-public.test +++ b/sql/backends/monet5/generator/Tests/execute-privilege-for-public.test @@ -3,182 +3,182 @@ statement ok create user test with password 'test' name 'test' @connection(id=c2, username=test, password=test) -query I +query I nosort SELECT * from generate_series(1,3) 1 2 @connection(id=c2, username=test, password=test) -query I +query I nosort SELECT * from generate_series(1,4,2) 1 3 @connection(id=c2, username=test, password=test) -query I +query I nosort SELECT * from generate_series(5,1,-2) 5 3 @connection(id=c2, username=test, password=test) -query I +query I nosort SELECT * from generate_series(cast(1 as tinyint),3) 1 2 @connection(id=c2, username=test, password=test) -query I +query I nosort SELECT * from generate_series(1,cast(4 as tinyint),2) 1 3 @connection(id=c2, username=test, password=test) -query I +query I nosort SELECT * from generate_series(5,1,cast(-2 as tinyint)) 5 3 @connection(id=c2, username=test, password=test) -query I +query I nosort SELECT * from generate_series(cast(1 as smallint),3) 1 2 @connection(id=c2, username=test, password=test) -query I +query I nosort SELECT * from generate_series(1,cast(4 as smallint),2) 1 3 @connection(id=c2, username=test, password=test) -query I +query I nosort SELECT * from generate_series(5,1,cast(-2 as smallint)) 5 3 @connection(id=c2, username=test, password=test) -query I +query I nosort SELECT * from generate_series(cast(1 as int),3) 1 2 @connection(id=c2, username=test, password=test) -query I +query I nosort SELECT * from generate_series(1,cast(4 as int),2) 1 3 @connection(id=c2, username=test, password=test) -query I +query I nosort SELECT * from generate_series(5,1,cast(-2 as int)) 5 3 @connection(id=c2, username=test, password=test) -query I +query I nosort SELECT * from generate_series(cast(1 as bigint),3) 1 2 @connection(id=c2, username=test, password=test) -query I +query I nosort SELECT * from generate_series(1,cast(4 as bigint),2) 1 3 @connection(id=c2, username=test, password=test) -query I +query I nosort SELECT * from generate_series(5,1,cast(-2 as bigint)) 5 3 @connection(id=c2, username=test, password=test) -query R +query R nosort SELECT * from generate_series(cast(1 as real),3,1) 1.000 2.000 @connection(id=c2, username=test, password=test) -query R +query R nosort SELECT * from generate_series(1,cast(4 as real),2) 1.000 3.000 @connection(id=c2, username=test, password=test) -query R +query R nosort SELECT * from generate_series(5,1,cast(-2 as real)) 5.000 3.000 @connection(id=c2, username=test, password=test) -query R +query R nosort SELECT * from generate_series(cast(1 as double),3,1) 1.000 2.000 @connection(id=c2, username=test, password=test) -query R +query R nosort SELECT * from generate_series(1,cast(4 as double),2) 1.000 3.000 @connectio
MonetDB: Aug2024 - Cleanup tests.
Changeset: 5bde60a2042e for MonetDB URL: https://dev.monetdb.org/hg/MonetDB/rev/5bde60a2042e Modified Files: sql/backends/monet5/generator/Tests/execute-privilege-for-public-hge.test sql/backends/monet5/generator/Tests/execute-privilege-for-public.test sql/test/2023/Tests/unique_nulls_distinct.test sql/test/2024/Tests/check.test sql/test/2024/Tests/distinct_from.test sql/test/BugConstraints/Tests/check_constraints.test sql/test/BugDay_2005-10-06_2.9.3/Tests/simple_union.SF-1005596.test sql/test/BugTracker-2010/Tests/alter-table-restart-crash.SF-2975018.test sql/test/BugTracker-2017/Tests/crash_after_oidx_on_sys_statistics.Bug-6251.test sql/test/BugTracker-2018/Tests/truncate_sys_tables.Bug-6543.test sql/test/BugTracker-2019/Tests/cte-union.Bug-6755.test sql/test/BugTracker-2023/Tests/aggregate-vararg.Bug-7422.test sql/test/BugTracker-2023/Tests/interval-day-and-second.Bug-7353.test sql/test/BugTracker-2024/Tests/7045-do-not-push-down-converts.test sql/test/BugTracker-2024/Tests/7465-fwf-block-boundary-error.test.in sql/test/BugTracker-2024/Tests/7511-password-hash-missing-error.test sql/test/BugTracker-2024/Tests/7512-concurrent-globaltmp-instantiate-crash.test sql/test/BugTracker-2024/Tests/7513-uri-authority-parse-issue.test sql/test/BugTracker-2024/Tests/7514-wrong-window-function.test sql/test/BugTracker-2024/Tests/7524-right-outer-join.test sql/test/BugTracker-2024/Tests/7525-cudf-aggr-var-input.test sql/test/BugTracker-2024/Tests/7534-is-distinct-from.test sql/test/BugTracker-2024/Tests/7535-create-view-groupby-func.test sql/test/BugTracker-2024/Tests/7537-prepare_stmt_with_dropped_table.test sql/test/BugTracker-2024/Tests/7538-reduce-cast.test sql/test/BugTracker-2024/Tests/7539-is-distinct-from.test sql/test/BugTracker-2024/Tests/7542-column-name-resolution.test sql/test/BugTracker-2024/Tests/7544-startswith-bug.test sql/test/BugTracker-2024/Tests/7545-groupby_on_index_col.test sql/test/BugTracker-2024/Tests/7547-drop-login-trigger-crash.test sql/test/BugTracker-2024/Tests/7550-select-statistics-auth.test sql/test/BugTracker-2024/Tests/7552-nested-expression-with-null.test sql/test/BugTracker-2024/Tests/7553-join-on-startswith-crash.test sql/test/BugTracker-2024/Tests/7554-incorrect-result-between.test sql/test/BugTracker-2024/Tests/7555-incorrect-semijoin-rewrite.test sql/test/BugTracker-2024/Tests/7556-missing-ignore-case.test sql/test/BugTracker-2024/Tests/SQLunionfunc-Bug-7473.test sql/test/BugTracker-2024/Tests/analyze-in-proc-func-trig-body-Bug-7500.test sql/test/BugTracker-2024/Tests/atom_cmp-Bug-7477.test sql/test/BugTracker-2024/Tests/between-true-and-null-Bug-7465.test sql/test/BugTracker-2024/Tests/bin_find_smallest_column-Bug-7482.test sql/test/BugTracker-2024/Tests/contains-or-7469.test sql/test/BugTracker-2024/Tests/conversion-string-to-bte-failed-7470.test sql/test/BugTracker-2024/Tests/exp_equal-Bug-7475.test sql/test/BugTracker-2024/Tests/exp_equal-Bug-7478.test sql/test/BugTracker-2024/Tests/field-arg-error-Bug-7506.test sql/test/BugTracker-2024/Tests/get_rel_count-Bug-7480.test sql/test/BugTracker-2024/Tests/groupby-select1-Bug-7472.test sql/test/BugTracker-2024/Tests/inner-join-contains-7466.test sql/test/BugTracker-2024/Tests/multicolumn_IN_value_list-Bug-7497.test sql/test/BugTracker-2024/Tests/mvc_row_result_wrap-Bug-7481.test sql/test/BugTracker-2024/Tests/orderby-max-over-rows-Bug-7488.test sql/test/BugTracker-2024/Tests/rel2bin_join-Bug-7476.test sql/test/BugTracker-2024/Tests/rel2bin_select-Bug-7496.test sql/test/BugTracker-2024/Tests/rel_groupby_cse-Bug-7484.test sql/test/BugTracker-2024/Tests/sql_init_subtype-Bug-7487.test sql/test/SQLancer/Tests/sqlancer03.test sql/test/SQLancer/Tests/sqlancer04.test sql/test/Tests/regexp.test sql/test/Tests/union-corresponding.test sql/test/Users/Tests/copyinto.test.in sql/test/Users/Tests/create_user_options.test sql/test/bugs/Tests/default-error.test sql/test/copy/Tests/decimal_separators.test sql/test/copy/Tests/select-from-file.test.in sql/test/file_loader/Tests/file_loader_field_separator.test.in sql/test/mapi/Tests/clientinfo-nonadmin.test sql/test/miscellaneous/Tests/group_by_all.test sql/test/miscellaneous/Tests/simple_selects.test sql/test/rel-optimizers/Tests/merge-unions.test sql/test/remote/Tests/create-remote-flavors.test sql/test/rename/Tests/rename01.test sql/test/sets/Tests/union.test sql/test/strimps/Tests/strimps_stable_counts_conta
MonetDB: Aug2024 - Typo.
Changeset: d2f3d119b740 for MonetDB URL: https://dev.monetdb.org/hg/MonetDB/rev/d2f3d119b740 Modified Files: sql/test/miscellaneous/Tests/groupby_expressions.test Branch: Aug2024 Log Message: Typo. diffs (12 lines): diff --git a/sql/test/miscellaneous/Tests/groupby_expressions.test b/sql/test/miscellaneous/Tests/groupby_expressions.test --- a/sql/test/miscellaneous/Tests/groupby_expressions.test +++ b/sql/test/miscellaneous/Tests/groupby_expressions.test @@ -334,7 +334,7 @@ rollback statement error 42000!SELECT: GROUP BY position 2 is not in select list select 1 group by 2 -42000!SELECT: non-integer constant in GROUP BY +statement error 42000!SELECT: non-integer constant in GROUP BY select -90 from "groupings" group by -90 statement error ___ checkin-list mailing list -- checkin-list@monetdb.org To unsubscribe send an email to checkin-list-le...@monetdb.org
MonetDB: Aug2024 - Merge with Dec2023 branch.
Changeset: 769cc21b3d32 for MonetDB URL: https://dev.monetdb.org/hg/MonetDB/rev/769cc21b3d32 Modified Files: sql/test/BugTracker-2024/Tests/exp_ref-Bug-7479.test Branch: Aug2024 Log Message: Merge with Dec2023 branch. diffs (20 lines): diff --git a/sql/test/BugTracker-2024/Tests/exp_ref-Bug-7479.test b/sql/test/BugTracker-2024/Tests/exp_ref-Bug-7479.test --- a/sql/test/BugTracker-2024/Tests/exp_ref-Bug-7479.test +++ b/sql/test/BugTracker-2024/Tests/exp_ref-Bug-7479.test @@ -10,15 +10,8 @@ WITH x AS ( SELECT 1 x UNION SELECT - '1 1 1 -query IRI rowsort +statement error syntax error, unexpected ')' in: "with x as ( select 1 x union select - '199419' ) select 1 from x as where x in (" WITH x AS ( SELECT 1 x UNION SELECT - '199419' ) SELECT 1 FROM x AS WHERE x IN ( SELECT min ( x ) OVER ( PARTITION BY x ) AS ) - -1 --199419.000 -1 -1 -1.000 -1 query I nosort WITH x AS ( SELECT 1 x UNION SELECT - '199419' ) SELECT 1 FROM x AS WHERE x IN ( SELECT x FROM x , ( SELECT min ( x ) OVER ( PARTITION BY x ) ) AS ) ___ checkin-list mailing list -- checkin-list@monetdb.org To unsubscribe send an email to checkin-list-le...@monetdb.org
MonetDB: Dec2023 - Seems like query is supposed to fail, but it ...
Changeset: 2ab46b5a9c75 for MonetDB URL: https://dev.monetdb.org/hg/MonetDB/rev/2ab46b5a9c75 Modified Files: sql/test/BugTracker-2024/Tests/exp_ref-Bug-7479.test Branch: Dec2023 Log Message: Seems like query is supposed to fail, but it doesn't. In Aug2024, the query fails with the reported syntax error. diffs (21 lines): diff --git a/sql/test/BugTracker-2024/Tests/exp_ref-Bug-7479.test b/sql/test/BugTracker-2024/Tests/exp_ref-Bug-7479.test --- a/sql/test/BugTracker-2024/Tests/exp_ref-Bug-7479.test +++ b/sql/test/BugTracker-2024/Tests/exp_ref-Bug-7479.test @@ -10,15 +10,9 @@ WITH x AS ( SELECT 1 x UNION SELECT - '1 1 1 -query IRI rowsort +skipif knownfail +statement error syntax error, unexpected ')' in: "with x as ( select 1 x union select - '199419' ) select 1 from x as where x in (" WITH x AS ( SELECT 1 x UNION SELECT - '199419' ) SELECT 1 FROM x AS WHERE x IN ( SELECT min ( x ) OVER ( PARTITION BY x ) AS ) - -1 --199419.000 -1 -1 -1.000 -1 query I nosort WITH x AS ( SELECT 1 x UNION SELECT - '199419' ) SELECT 1 FROM x AS WHERE x IN ( SELECT x FROM x , ( SELECT min ( x ) OVER ( PARTITION BY x ) ) AS ) ___ checkin-list mailing list -- checkin-list@monetdb.org To unsubscribe send an email to checkin-list-le...@monetdb.org
MonetDB: Aug2024 - Merge with Dec2023 branch.
Changeset: e519799dabb9 for MonetDB URL: https://dev.monetdb.org/hg/MonetDB/rev/e519799dabb9 Modified Files: sql/backends/monet5/sql_time.c sql/test/BugTracker-2024/Tests/All testing/sqllogictest.py Branch: Aug2024 Log Message: Merge with Dec2023 branch. diffs (218 lines): diff --git a/sql/backends/monet5/sql_time.c b/sql/backends/monet5/sql_time.c --- a/sql/backends/monet5/sql_time.c +++ b/sql/backends/monet5/sql_time.c @@ -951,7 +951,8 @@ month_interval_str_imp(int *ret, const c lng upcast; if (interval_from_str(next, d, sk, &upcast) < 0) return createException(SQL, "batcalc.month_interval_str", SQLSTATE(42000) "Wrong format (%s)", next); - assert((lng) GDK_int_min <= upcast && upcast <= (lng) GDK_int_max); + if (upcast < (lng) GDK_int_min || upcast > (lng) GDK_int_max) + throw(SQL, "batcalc.month_interval_str", SQLSTATE(22003) "value out of range"); *ret = (int) upcast; return MAL_SUCCEED; } diff --git a/sql/test/BugTracker-2024/Tests/7562-interval-overflow.test b/sql/test/BugTracker-2024/Tests/7562-interval-overflow.test new file mode 100644 --- /dev/null +++ b/sql/test/BugTracker-2024/Tests/7562-interval-overflow.test @@ -0,0 +1,9 @@ +statement ok +CREATE TABLE t0(c0 INTERVAL YEAR TO MONTH) + +statement ok +INSERT INTO t0( c0) VALUES ('2-5') + +statement error +SELECT * FROM t0 WHERE (NOT ((t0.c0)>=('--18945599805'))) + 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 @@ -83,3 +83,4 @@ 7555-incorrect-semijoin-rewrite 7556-missing-ignore-case 7465-fwf-block-boundary-error 7566-connections-refused +7562-interval-overflow diff --git a/sql/test/BugTracker-2024/Tests/exp_ref-Bug-7479.test b/sql/test/BugTracker-2024/Tests/exp_ref-Bug-7479.test --- a/sql/test/BugTracker-2024/Tests/exp_ref-Bug-7479.test +++ b/sql/test/BugTracker-2024/Tests/exp_ref-Bug-7479.test @@ -1,25 +1,32 @@ -query T nosort +query I nosort WITH x AS ( SELECT 1 x UNION SELECT - '199419' ) SELECT 1 FROM x AS 1 1 -query T nosort +query I nosort WITH x AS ( SELECT 1 x UNION SELECT - '199419' ) SELECT 1 FROM x AS WHERE x IN ( SELECT x FROM x AS ) 1 1 -statment error syntax error, unexpected ')' in: "with x as ( select 1 x union select - '199419' ) select 1 from x as where x in (" +query IRI rowsort WITH x AS ( SELECT 1 x UNION SELECT - '199419' ) SELECT 1 FROM x AS WHERE x IN ( SELECT min ( x ) OVER ( PARTITION BY x ) AS ) +1 +-199419.000 +1 +1 +1.000 +1 -query T nosort +query I nosort WITH x AS ( SELECT 1 x UNION SELECT - '199419' ) SELECT 1 FROM x AS WHERE x IN ( SELECT x FROM x , ( SELECT min ( x ) OVER ( PARTITION BY x ) ) AS ) 1 1 -statment error GDK reported error: BATsubcross: more than one match +statement error GDK reported error: BATsubcross: more than one match SELECT ( WITH x AS ( SELECT 1 x UNION SELECT - '199419' ) SELECT 1 FROM x AS WHERE x IN ( SELECT x FROM x , ( SELECT min ( x ) OVER ( PARTITION BY x ) ) AS ) ) + diff --git a/testing/sqllogictest.py b/testing/sqllogictest.py --- a/testing/sqllogictest.py +++ b/testing/sqllogictest.py @@ -122,6 +122,9 @@ def prepare_copyfrom_stmt(stmt:[str]=[]) tail='\n'.join(tail) return head + '\n' + tail, head, stmt +def dq(s): +return s.replace('"', '""') + class SQLLogic: def __init__(self, report=None, out=sys.stdout): self.dbh = None @@ -224,40 +227,40 @@ class SQLLogic: self.crs.execute('select s.name, t.name, case when t.type in (select table_type_id from sys.table_types where table_type_name like \'%VIEW%\') then \'VIEW\' else \'TABLE\' end from sys.tables t, sys.schemas s where not t.system and t.schema_id = s.id') for row in self.crs.fetchall(): try: -self.crs.execute('drop {} "{}"."{}" cascade'.format(row[2], row[0].replace('"', '""'), row[1].replace('"', '""'))) +self.crs.execute(f'drop {row[2]} "{dq(row[0])}"."{dq(row[1])}" cascade') except pymonetdb.Error: # perhaps already dropped because of the cascade pass self.crs.execute('select s.name, f.name, ft.function_type_keyword from functions f, schemas s, function_types ft where not f.system and f.schema_id = s.id and f.type = ft.function_type_id') for row in self.crs.fetchall(): try: -self.crs.execute('drop all {} "{}"."{}"'.format(row[2], row[0].replace('"', '""'), row[1].replace('"', '""'))) +self.crs.execute(f'drop all {row[2]} "{dq(row[0])}"."{dq(row[1])}"') except pymonetdb.Error: # perhaps already dropped pass self.crs.execute('select s.name, q.name from sys.sequences q, schemas s where q.schema_id = s.id') for row in self.crs.fetchall(): try: -
MonetDB: Dec2023 - Fix typos.
Changeset: 81bdbab98788 for MonetDB URL: https://dev.monetdb.org/hg/MonetDB/rev/81bdbab98788 Modified Files: sql/test/BugTracker-2024/Tests/exp_ref-Bug-7479.test Branch: Dec2023 Log Message: Fix typos. diffs (41 lines): diff --git a/sql/test/BugTracker-2024/Tests/exp_ref-Bug-7479.test b/sql/test/BugTracker-2024/Tests/exp_ref-Bug-7479.test --- a/sql/test/BugTracker-2024/Tests/exp_ref-Bug-7479.test +++ b/sql/test/BugTracker-2024/Tests/exp_ref-Bug-7479.test @@ -1,25 +1,32 @@ -query T nosort +query I nosort WITH x AS ( SELECT 1 x UNION SELECT - '199419' ) SELECT 1 FROM x AS 1 1 -query T nosort +query I nosort WITH x AS ( SELECT 1 x UNION SELECT - '199419' ) SELECT 1 FROM x AS WHERE x IN ( SELECT x FROM x AS ) 1 1 -statment error syntax error, unexpected ')' in: "with x as ( select 1 x union select - '199419' ) select 1 from x as where x in (" +query IRI rowsort WITH x AS ( SELECT 1 x UNION SELECT - '199419' ) SELECT 1 FROM x AS WHERE x IN ( SELECT min ( x ) OVER ( PARTITION BY x ) AS ) +1 +-199419.000 +1 +1 +1.000 +1 -query T nosort +query I nosort WITH x AS ( SELECT 1 x UNION SELECT - '199419' ) SELECT 1 FROM x AS WHERE x IN ( SELECT x FROM x , ( SELECT min ( x ) OVER ( PARTITION BY x ) ) AS ) 1 1 -statment error GDK reported error: BATsubcross: more than one match +statement error GDK reported error: BATsubcross: more than one match SELECT ( WITH x AS ( SELECT 1 x UNION SELECT - '199419' ) SELECT 1 FROM x AS WHERE x IN ( SELECT x FROM x , ( SELECT min ( x ) OVER ( PARTITION BY x ) ) AS ) ) + ___ checkin-list mailing list -- checkin-list@monetdb.org To unsubscribe send an email to checkin-list-le...@monetdb.org
MonetDB: Dec2023 - Use f-strings instead of .format method; comp...
Changeset: 531646b2df15 for MonetDB URL: https://dev.monetdb.org/hg/MonetDB/rev/531646b2df15 Modified Files: testing/sqllogictest.py Branch: Dec2023 Log Message: Use f-strings instead of .format method; complain on unrecognized commands. diffs (153 lines): diff --git a/testing/sqllogictest.py b/testing/sqllogictest.py --- a/testing/sqllogictest.py +++ b/testing/sqllogictest.py @@ -122,6 +122,9 @@ def prepare_copyfrom_stmt(stmt:[str]=[]) tail='\n'.join(tail) return head + '\n' + tail, head, stmt +def dq(s): +return s.replace('"', '""') + class SQLLogic: def __init__(self, report=None, out=sys.stdout): self.dbh = None @@ -224,40 +227,40 @@ class SQLLogic: self.crs.execute('select s.name, t.name, case when t.type in (select table_type_id from sys.table_types where table_type_name like \'%VIEW%\') then \'VIEW\' else \'TABLE\' end from sys.tables t, sys.schemas s where not t.system and t.schema_id = s.id') for row in self.crs.fetchall(): try: -self.crs.execute('drop {} "{}"."{}" cascade'.format(row[2], row[0].replace('"', '""'), row[1].replace('"', '""'))) +self.crs.execute(f'drop {row[2]} "{dq(row[0])}"."{dq(row[1])}" cascade') except pymonetdb.Error: # perhaps already dropped because of the cascade pass self.crs.execute('select s.name, f.name, ft.function_type_keyword from functions f, schemas s, function_types ft where not f.system and f.schema_id = s.id and f.type = ft.function_type_id') for row in self.crs.fetchall(): try: -self.crs.execute('drop all {} "{}"."{}"'.format(row[2], row[0].replace('"', '""'), row[1].replace('"', '""'))) +self.crs.execute(f'drop all {row[2]} "{dq(row[0])}"."{dq(row[1])}"') except pymonetdb.Error: # perhaps already dropped pass self.crs.execute('select s.name, q.name from sys.sequences q, schemas s where q.schema_id = s.id') for row in self.crs.fetchall(): try: -self.crs.execute('drop sequence "{}"."{}"'.format(row[0].replace('"', '""'), row[1].replace('"', '""'))) +self.crs.execute(f'drop sequence "{dq(row[0])}"."{dq(row[1])}"') except pymonetdb.Error: # perhaps already dropped pass self.crs.execute("select name from sys.users where name not in ('monetdb', '.snapshot')") for row in self.crs.fetchall(): try: -self.crs.execute('alter user "{}" SET SCHEMA "sys"'.format(row[0].replace('"', '""'))) +self.crs.execute(f'alter user "{dq(row[0])}" SET SCHEMA "sys"') except pymonetdb.Error: pass self.crs.execute('select name from sys.schemas where not system') for row in self.crs.fetchall(): try: -self.crs.execute('drop schema "{}" cascade'.format(row[0].replace('"', '""'))) +self.crs.execute(f'drop schema "{dq(row[0])}" cascade') except pymonetdb.Error: pass self.crs.execute("select name from sys.users where name not in ('monetdb', '.snapshot')") for row in self.crs.fetchall(): try: -self.crs.execute('drop user "{}"'.format(row[0].replace('"', '""'))) +self.crs.execute(f'drop user "{dq(row[0])}"') except pymonetdb.Error: pass @@ -303,8 +306,8 @@ class SQLLogic: if expected_err_msg.lower() == err_msg_received.lower(): return result msg = "statement was expected to fail with" \ -+ (" error code {}".format(expected_err_code) if expected_err_code else '')\ -+ (", error message {}".format(str(expected_err_msg)) if expected_err_msg else '') ++ (f" error code {expected_err_code}" if expected_err_code else '')\ ++ (f", error message {str(expected_err_msg)}" if expected_err_msg else '') self.query_error(err_stmt or statement, str(msg), str(e)) return result except ConnectionError as e: @@ -321,9 +324,9 @@ class SQLLogic: if expectok: if expected_rowcount is not None: result.append('rowcount') -result.append('{}'.format(affected_rowcount)) +result.append(f'{affected_rowcount}') if expected_rowcount != affected_rowcount: -self.query_error(err_stmt or statement, "statement was expecting to succeed with {} rows but received {} rows!".format(expected_rowcount, affected_rowcount)) +self.query_error(err_stmt or statement, f"statement was expe