MonetDB: default - Approve information schema changes.
Changeset: 6c2a629ade03 for MonetDB URL: https://dev.monetdb.org/hg/MonetDB/rev/6c2a629ade03 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: Approve information schema changes. diffs (truncated from 1200 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 @@ -1059,3 +1059,46 @@ UPDATE sys._tables SET system = true WHE Running database upgrade commands: ALTER TABLE sys.key_types SET READ ONLY; +Running database upgrade commands: +DROP VIEW information_schema.check_constraints CASCADE; +DROP VIEW information_schema.table_constraints CASCADE; +CREATE VIEW INFORMATION_SCHEMA.CHECK_CONSTRAINTS AS SELECT + cast(NULL AS varchar(1)) AS CONSTRAINT_CATALOG, + s."name" AS CONSTRAINT_SCHEMA, + k."name" AS CONSTRAINT_NAME, + cast(sys.check_constraint(s."name", k."name") AS varchar(2048)) AS CHECK_CLAUSE, + t."schema_id" AS schema_id, + t."id" AS table_id, + t."name" AS table_name, + k."id" AS key_id + FROM (SELECT sk."id", sk."table_id", sk."name" FROM sys."keys" sk WHERE sk."type" = 4 UNION ALL SELECT tk."id", tk."table_id", tk."name" FROM tmp."keys" tk WHERE tk."type" = 4) k + INNER JOIN (SELECT st."id", st."schema_id", st."name" FROM sys."_tables" st UNION ALL SELECT tt."id", tt."schema_id", tt."name" FROM tmp."_tables" tt) t ON k."table_id" = t."id" + INNER JOIN sys."schemas" s ON t."schema_id" = s."id" + ORDER BY s."name", t."name", k."name"; +GRANT SELECT ON TABLE INFORMATION_SCHEMA.CHECK_CONSTRAINTS TO PUBLIC WITH GRANT OPTION; +CREATE VIEW INFORMATION_SCHEMA.TABLE_CONSTRAINTS AS SELECT + cast(NULL AS varchar(1)) AS CONSTRAINT_CATALOG, + s."name" AS CONSTRAINT_SCHEMA, + k."name" AS CONSTRAINT_NAME, + cast(NULL AS varchar(1)) AS TABLE_CATALOG, + s."name" AS TABLE_SCHEMA, + t."name" AS TABLE_NAME, + cast(CASE k."type" WHEN 0 THEN 'PRIMARY KEY' WHEN 1 THEN 'UNIQUE' WHEN 2 THEN 'FOREIGN KEY' WHEN 3 THEN 'UNIQUE NULLS NOT DISTINCT' WHEN 4 THEN 'CHECK' ELSE NULL END AS varchar(26)) AS CONSTRAINT_TYPE, + cast('NO' AS varchar(3)) AS IS_DEFERRABLE, + cast('NO' AS varchar(3)) AS INITIALLY_DEFERRED, + cast('YES' AS varchar(3)) AS ENFORCED, + t."schema_id" AS schema_id, + t."id" AS table_id, + k."id" AS key_id, + k."type" AS key_type, + t."system" AS is_system + FROM (SELECT sk."id", sk."table_id", sk."name", sk."type" FROM sys."keys" sk UNION ALL SELECT tk."id", tk."table_id", tk."name", tk."type" FROM tmp."keys" tk) k + INNER JOIN (SELECT st."id", st."schema_id", st."name", st."system" FROM sys."_tables" st UNION ALL SELECT tt."id", tt."schema_id", tt."name", tt."system" FROM tmp."_tables" tt) t ON k."table_id" = t."id" + INNER JOIN sys."schemas" s ON t."schema_id" = s."id" + ORDER BY s."name", t."name", k."name"; +GRANT SELECT ON TABLE INFORMATION_SCHEMA.TABLE_CONSTRAINTS TO PUBLIC WITH GRANT OPTION; + +UPDATE sys._tables SET system = true where system <> true + and schema_id = (select s.id from sys.schemas s where s.name = 'information_schema') + and name in ('check_constraints','table_constraints'); + diff --git
MonetDB: Aug2024 - New upgrade code.
Changeset: 3c14c03845bd for MonetDB URL: https://dev.monetdb.org/hg/MonetDB/rev/3c14c03845bd 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: Aug2024 Log Message: New upgrade code. diffs (truncated from 1200 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 @@ -1059,3 +1059,46 @@ UPDATE sys._tables SET system = true WHE Running database upgrade commands: ALTER TABLE sys.key_types SET READ ONLY; +Running database upgrade commands: +DROP VIEW information_schema.check_constraints CASCADE; +DROP VIEW information_schema.table_constraints CASCADE; +CREATE VIEW INFORMATION_SCHEMA.CHECK_CONSTRAINTS AS SELECT + cast(NULL AS varchar(1)) AS CONSTRAINT_CATALOG, + s."name" AS CONSTRAINT_SCHEMA, + k."name" AS CONSTRAINT_NAME, + cast(sys.check_constraint(s."name", k."name") AS varchar(2048)) AS CHECK_CLAUSE, + t."schema_id" AS schema_id, + t."id" AS table_id, + t."name" AS table_name, + k."id" AS key_id + FROM (SELECT sk."id", sk."table_id", sk."name" FROM sys."keys" sk WHERE sk."type" = 4 UNION ALL SELECT tk."id", tk."table_id", tk."name" FROM tmp."keys" tk WHERE tk."type" = 4) k + INNER JOIN (SELECT st."id", st."schema_id", st."name" FROM sys."_tables" st UNION ALL SELECT tt."id", tt."schema_id", tt."name" FROM tmp."_tables" tt) t ON k."table_id" = t."id" + INNER JOIN sys."schemas" s ON t."schema_id" = s."id" + ORDER BY s."name", t."name", k."name"; +GRANT SELECT ON TABLE INFORMATION_SCHEMA.CHECK_CONSTRAINTS TO PUBLIC WITH GRANT OPTION; +CREATE VIEW INFORMATION_SCHEMA.TABLE_CONSTRAINTS AS SELECT + cast(NULL AS varchar(1)) AS CONSTRAINT_CATALOG, + s."name" AS CONSTRAINT_SCHEMA, + k."name" AS CONSTRAINT_NAME, + cast(NULL AS varchar(1)) AS TABLE_CATALOG, + s."name" AS TABLE_SCHEMA, + t."name" AS TABLE_NAME, + cast(CASE k."type" WHEN 0 THEN 'PRIMARY KEY' WHEN 1 THEN 'UNIQUE' WHEN 2 THEN 'FOREIGN KEY' WHEN 3 THEN 'UNIQUE NULLS NOT DISTINCT' WHEN 4 THEN 'CHECK' ELSE NULL END AS varchar(26)) AS CONSTRAINT_TYPE, + cast('NO' AS varchar(3)) AS IS_DEFERRABLE, + cast('NO' AS varchar(3)) AS INITIALLY_DEFERRED, + cast('YES' AS varchar(3)) AS ENFORCED, + t."schema_id" AS schema_id, + t."id" AS table_id, + k."id" AS key_id, + k."type" AS key_type, + t."system" AS is_system + FROM (SELECT sk."id", sk."table_id", sk."name", sk."type" FROM sys."keys" sk UNION ALL SELECT tk."id", tk."table_id", tk."name", tk."type" FROM tmp."keys" tk) k + INNER JOIN (SELECT st."id", st."schema_id", st."name", st."system" FROM sys."_tables" st UNION ALL SELECT tt."id", tt."schema_id", tt."name", tt."system" FROM tmp."_tables" tt) t ON k."table_id" = t."id" + INNER JOIN sys."schemas" s ON t."schema_id" = s."id" + ORDER BY s."name", t."name", k."name"; +GRANT SELECT ON TABLE INFORMATION_SCHEMA.TABLE_CONSTRAINTS TO PUBLIC WITH GRANT OPTION; + +UPDATE sys._tables SET system = true where system <> true + and schema_id = (select s.id from sys.schemas s where s.name = 'information_schema') + and name in ('check_constraints','table_constraints'); + diff --git
MonetDB: Aug2024 - Fix a problem that interrupting a query halfw...
Changeset: 9a93a50925ef for MonetDB URL: https://dev.monetdb.org/hg/MonetDB/rev/9a93a50925ef Modified Files: common/stream/mapi_stream.c common/stream/socket_stream.c monetdb5/mal/mal_client.c monetdb5/modules/mal/tablet.c sql/backends/monet5/sql.c sql/server/sql_scan.c Branch: Aug2024 Log Message: Fix a problem that interrupting a query halfway on the client didn't work properly. diffs (185 lines): diff --git a/common/stream/mapi_stream.c b/common/stream/mapi_stream.c --- a/common/stream/mapi_stream.c +++ b/common/stream/mapi_stream.c @@ -152,8 +152,12 @@ setup_transfer(const char *req, const ch bool ok; int oob = 0; - while (!bs->eof) - bstream_next(bs); + while (!bs->eof) { + if (bstream_next(bs) < 0) { + msg = mnstr_peek_error(ws); + goto end; + } + } stream *rs = bs->s; assert(isa_block_stream(ws)); assert(isa_block_stream(rs)); diff --git a/common/stream/socket_stream.c b/common/stream/socket_stream.c --- a/common/stream/socket_stream.c +++ b/common/stream/socket_stream.c @@ -126,7 +126,7 @@ socket_read(stream *restrict s, void *re struct pollfd pfd; pfd = (struct pollfd) {.fd = s->stream_data.s, - .events = POLLIN}; + .events = POLLIN | POLLPRI}; ret = poll(, 1, (int) s->timeout); if (ret == -1 && errno == EINTR) @@ -135,6 +135,20 @@ socket_read(stream *restrict s, void *re mnstr_set_error_errno(s, MNSTR_READ_ERROR, "poll error"); return -1; } + if (ret == 1 && pfd.revents & POLLPRI) { + char b = 0; + switch (recv(s->stream_data.s, , 1, MSG_OOB)) { + case 0: + /* unexpectedly didn't receive a byte */ + continue; + case 1: + mnstr_set_error(s, MNSTR_INTERRUPT, "query abort from client"); + return -1; + case -1: + mnstr_set_error_errno(s, MNSTR_READ_ERROR, "recv error"); + return -1; + } + } #else struct timeval tv; fd_set fds; diff --git a/monetdb5/mal/mal_client.c b/monetdb5/mal/mal_client.c --- a/monetdb5/mal/mal_client.c +++ b/monetdb5/mal/mal_client.c @@ -107,11 +107,13 @@ MCpushClientInput(Client c, bstream *new ClientInput *x = (ClientInput *) GDKmalloc(sizeof(ClientInput)); if (x == 0) return -1; - x->fdin = c->fdin; - x->yycur = c->yycur; - x->listing = c->listing; - x->prompt = c->prompt; - x->next = c->bak; + *x = (ClientInput) { + .fdin = c->fdin, + .yycur = c->yycur, + .listing = c->listing, + .prompt = c->prompt, + .next = c->bak, + }; c->bak = x; c->fdin = new_input; c->qryctx.bs = new_input; @@ -567,7 +569,10 @@ MCreadClient(Client c) if (!in->mode) /* read one line at a time in line mode */ break; } - if (in->mode) { /* find last new line */ + if (rd < 0) { + /* force end of stream handling below */ + in->pos = in->len; + } else if (in->mode) { /* find last new line */ char *p = in->buf + in->len - 1; while (p > in->buf && *p != '\n') { diff --git a/monetdb5/modules/mal/tablet.c b/monetdb5/modules/mal/tablet.c --- a/monetdb5/modules/mal/tablet.c +++ b/monetdb5/modules/mal/tablet.c @@ -601,8 +601,13 @@ tablet_read_more(READERtask *task) do { /* query is not finished ask for more */ /* we need more query text */ - if (bstream_next(in) < 0) + if (bstream_next(in) < 0) { + if (mnstr_errnr(in->s) == MNSTR_INTERRUPT) { + task->aborted = true; + mnstr_clearerr(in->s); + } return false; + } if (in->eof) { if (bstream_getoob(in)) {
MonetDB: Dec2023 - A little cleanup.
Changeset: f3e8eff39fb4 for MonetDB URL: https://dev.monetdb.org/hg/MonetDB/rev/f3e8eff39fb4 Modified Files: clients/odbc/driver/ODBCError.c clients/odbc/driver/ODBCError.h gdk/gdk.h gdk/gdk_utils.c monetdb5/modules/mal/txtsim.c Branch: Dec2023 Log Message: A little cleanup. diffs (100 lines): diff --git a/clients/odbc/driver/ODBCError.c b/clients/odbc/driver/ODBCError.c --- a/clients/odbc/driver/ODBCError.c +++ b/clients/odbc/driver/ODBCError.c @@ -373,27 +373,6 @@ appendODBCError(ODBCError **head, ODBCEr } -#if 0 /* unused */ -/* - * Prepends a valid ODBCError object 'err' to the front of the list - * of a valid ODBCError object 'head' and return the new head. - * - * Precondition: both head and err must be valid (non NULL) - * Returns: the new head (which is the same as the prepended 'err'). - */ -void -prependODBCError(ODBCError **head, ODBCError *err) -{ - assert(head); - assert(err); - assert(err->next == NULL); - - err->next = *head; - *head = err; -} -#endif - - /* * Frees the ODBCError object including its linked ODBCError objects. * diff --git a/clients/odbc/driver/ODBCError.h b/clients/odbc/driver/ODBCError.h --- a/clients/odbc/driver/ODBCError.h +++ b/clients/odbc/driver/ODBCError.h @@ -110,18 +110,6 @@ int getErrorRecCount(ODBCError *error); void appendODBCError(ODBCError **head, ODBCError *err); -#if 0 /* unused */ -/* - * Prepends a valid ODBCError object 'this' to the front of the list - * of a valid ODBCError object 'head' and return the new head. - * - * Precondition: both head and this must be valid (non NULL) - * Returns: the new head (which is the same as the prepended 'this'). - */ -void prependODBCError(ODBCError **head, ODBCError *err); -#endif - - /* * Frees the ODBCError object including its linked ODBCError objects. * diff --git a/gdk/gdk.h b/gdk/gdk.h --- a/gdk/gdk.h +++ b/gdk/gdk.h @@ -1092,7 +1092,7 @@ bat_iterator_nolock(BAT *b) { /* does not get matched by bat_iterator_end */ if (b) { - bool isview = VIEWtparent(b); + const bool isview = VIEWtparent(b) != 0; return (BATiter) { .b = b, .h = b->theap, diff --git a/gdk/gdk_utils.c b/gdk/gdk_utils.c --- a/gdk/gdk_utils.c +++ b/gdk/gdk_utils.c @@ -378,19 +378,7 @@ GDKlog(FILE *lockFile, const char *forma /* * @+ Interrupt handling - * The current version simply catches signals and prints a warning. - * It should be extended to cope with the specifics of the interrupt - * received. */ -#if 0 /* these are unused */ -static void -BATSIGignore(int nr) -{ - (void) nr; - GDKsyserror("! ERROR signal %d caught by thread %zu\n", nr, (size_t) MT_getpid()); -} -#endif - #ifdef WIN32 static void BATSIGabort(int nr) diff --git a/monetdb5/modules/mal/txtsim.c b/monetdb5/modules/mal/txtsim.c --- a/monetdb5/modules/mal/txtsim.c +++ b/monetdb5/modules/mal/txtsim.c @@ -243,7 +243,7 @@ levenshtein(int *res, const char *x, con throw(MAL, "txtsim.levenshtein", "Illegal unicode code point"); } -/* Levenshtein OP but with column externaly allocated */ +/* Levenshtein OP but with column externally allocated */ static inline int levenshtein2(const char *x, const char *y, const size_t xlen, const size_t ylen, unsigned int *column, const int insdel_cost, ___ checkin-list mailing list -- checkin-list@monetdb.org To unsubscribe send an email to checkin-list-le...@monetdb.org
MonetDB: Aug2024 - A new test program has appeared.
Changeset: cf573882ef1c for MonetDB URL: https://dev.monetdb.org/hg/MonetDB/rev/cf573882ef1c Modified Files: MonetDB.spec debian/monetdb-client-testing.install Branch: Aug2024 Log Message: A new test program has appeared. diffs (22 lines): diff --git a/MonetDB.spec b/MonetDB.spec --- a/MonetDB.spec +++ b/MonetDB.spec @@ -417,6 +417,7 @@ developer. %{_bindir}/arraytest %{_bindir}/bincopydata %{_bindir}/murltest +%{_bindir}/odbcconnect %{_bindir}/odbcsample1 %{_bindir}/sample0 %{_bindir}/sample1 diff --git a/debian/monetdb-client-testing.install b/debian/monetdb-client-testing.install --- a/debian/monetdb-client-testing.install +++ b/debian/monetdb-client-testing.install @@ -5,6 +5,7 @@ debian/tmp/usr/bin/ODBCtester usr/bin debian/tmp/usr/bin/arraytest usr/bin debian/tmp/usr/bin/bincopydata usr/bin debian/tmp/usr/bin/murltest usr/bin +debian/tmp/usr/bin/odbcconnect usr/bin debian/tmp/usr/bin/odbcsample1 usr/bin debian/tmp/usr/bin/sample0 usr/bin debian/tmp/usr/bin/sample1 usr/bin ___ 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: fb6bc35c16a9 for MonetDB URL: https://dev.monetdb.org/hg/MonetDB/rev/fb6bc35c16a9 Modified Files: sql/test/rel-optimizers/Tests/merge-unions.test Branch: default Log Message: Merge with Aug2024 branch. diffs (78 lines): diff --git a/sql/backends/monet5/sql_statement.c b/sql/backends/monet5/sql_statement.c --- a/sql/backends/monet5/sql_statement.c +++ b/sql/backends/monet5/sql_statement.c @@ -4639,6 +4639,8 @@ stmt_has_null(stmt *s) case st_uselect2: case st_atom: return 0; + case st_alias: + return stmt_has_null(s->op1); case st_join: return stmt_has_null(s->op2); case st_bat: diff --git a/sql/server/rel_optimize_proj.c b/sql/server/rel_optimize_proj.c --- a/sql/server/rel_optimize_proj.c +++ b/sql/server/rel_optimize_proj.c @@ -3440,18 +3440,26 @@ rel_push_project_down_union(visitor *v, static inline sql_rel * rel_merge_unions(visitor *v, sql_rel *rel) { - (void)v; + /* stacked munion flattening e.g. +* munion( munion(a, b, c), munion(d, e)) => munion(a,b,c,d,e) +*/ if (rel && is_munion(rel->op)) { list *l = rel->l; for(node *n = l->h; n; ) { node *next = n->next; - sql_rel *i = n->data; - if (is_munion(i->op)) { - i = rel_dup(i); + sql_rel *oc = n->data; + sql_rel *c = oc; + + /* acount for any group-bys pushed down between stacked munions */ + if (oc->op == op_groupby) + c = oc->l; + + if (is_munion(c->op)) { + c = rel_dup(c); list_remove_node(l, NULL, n); - l = list_merge(l, i->l, (fdup)NULL); - i->l = NULL; - rel_destroy(i); + l = list_merge(l, c->l, (fdup)NULL); + c->l = NULL; + rel_destroy(oc); if (!next) next = l->h; v->changes++; diff --git a/sql/test/rel-optimizers/Tests/merge-unions.test b/sql/test/rel-optimizers/Tests/merge-unions.test --- a/sql/test/rel-optimizers/Tests/merge-unions.test +++ b/sql/test/rel-optimizers/Tests/merge-unions.test @@ -257,3 +257,25 @@ 2 5 1 +query T nosort +plan select n, count(n) from f_merge_rec group by n + +project ( +| group by ( +| | munion ( +| | | group by ( +| | | | table("sys"."f1") [ "f1"."n" UNIQUE as "f_merge_rec"."n" ] +| | | ) [ "f_merge_rec"."n" UNIQUE ] [ "f_merge_rec"."n" UNIQUE, "sys"."count" no nil ("f_merge_rec"."n" UNIQUE) NOT NULL as "%1"."%1" ], +| | | group by ( +| | | | table("sys"."f2") [ "f2"."n" UNIQUE as "f_merge_rec"."n" ] +| | | ) [ "f_merge_rec"."n" UNIQUE ] [ "f_merge_rec"."n" UNIQUE, "sys"."count" no nil ("f_merge_rec"."n" UNIQUE) NOT NULL as "%1"."%1" ], +| | | group by ( +| | | | table("sys"."f3") [ "f3"."n" UNIQUE as "f_merge_rec"."n" ] +| | | ) [ "f_merge_rec"."n" UNIQUE ] [ "f_merge_rec"."n" UNIQUE, "sys"."count" no nil ("f_merge_rec"."n" UNIQUE) NOT NULL as "%1"."%1" ], +| | | group by ( +| | | | table("sys"."f4") [ "f4"."n" UNIQUE as "f_merge_rec"."n" ] +| | | ) [ "f_merge_rec"."n" UNIQUE ] [ "f_merge_rec"."n" UNIQUE, "sys"."count" no nil ("f_merge_rec"."n" UNIQUE) NOT NULL as "%1"."%1" ] +| | ) [ "f_merge_rec"."n", "%1"."%1" NOT NULL ] +| ) [ "f_merge_rec"."n" ] [ "f_merge_rec"."n", "sys"."sum" no nil ("%1"."%1" NOT NULL) NOT NULL as "%1"."%1" ] +) [ "f_merge_rec"."n" UNIQUE, "%1"."%1" NOT NULL ] + ___ checkin-list mailing list -- checkin-list@monetdb.org To unsubscribe send an email to checkin-list-le...@monetdb.org
MonetDB: default - Approve new signatures.
Changeset: b35af04a9070 for MonetDB URL: https://dev.monetdb.org/hg/MonetDB/rev/b35af04a9070 Modified Files: clients/Tests/MAL-signatures-hge.test clients/Tests/MAL-signatures.test Branch: default Log Message: Approve new signatures. diffs (154 lines): 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 @@ -44944,36 +44944,6 @@ pattern generator.join(X_0:bat[:sht], X_ VLTgenerator_join; (empty) generator -join -pattern generator.join(X_0:bat[:bte], X_1:bat[:bte], X_2:bat[:bte], X_3:bit, X_4:bit) (X_5:bat[:oid], X_6:bat[:oid]) -VLTgenerator_rangejoin; -(empty) -generator -join -pattern generator.join(X_0:bat[:dbl], X_1:bat[:dbl], X_2:bat[:dbl], X_3:bit, X_4:bit) (X_5:bat[:oid], X_6:bat[:oid]) -VLTgenerator_rangejoin; -Overloaded range join operation -generator -join -pattern generator.join(X_0:bat[:flt], X_1:bat[:flt], X_2:bat[:flt], X_3:bit, X_4:bit) (X_5:bat[:oid], X_6:bat[:oid]) -VLTgenerator_rangejoin; -(empty) -generator -join -pattern generator.join(X_0:bat[:int], X_1:bat[:int], X_2:bat[:int], X_3:bit, X_4:bit) (X_5:bat[:oid], X_6:bat[:oid]) -VLTgenerator_rangejoin; -(empty) -generator -join -pattern generator.join(X_0:bat[:lng], X_1:bat[:lng], X_2:bat[:lng], X_3:bit, X_4:bit) (X_5:bat[:oid], X_6:bat[:oid]) -VLTgenerator_rangejoin; -(empty) -generator -join -pattern generator.join(X_0:bat[:sht], X_1:bat[:sht], X_2:bat[:sht], X_3:bit, X_4:bit) (X_5:bat[:oid], X_6:bat[:oid]) -VLTgenerator_rangejoin; -(empty) -generator parameters pattern generator.parameters(X_0:bte, X_1:bte):bat[:bte] VLTgenerator_noop; @@ -45104,6 +45074,36 @@ pattern generator.projection(X_0:bat[:oi VLTgenerator_projection; Overloaded projection operation generator +rangejoin +pattern generator.rangejoin(X_0:bat[:bte], X_1:bat[:bte], X_2:bat[:bte], X_3:bat[:oid], X_4:bat[:oid], X_5:bit, X_6:bit, X_7:bit, X_8:bit, X_9:lng) (X_10:bat[:oid], X_11:bat[:oid]) +VLTgenerator_rangejoin; +(empty) +generator +rangejoin +pattern generator.rangejoin(X_0:bat[:dbl], X_1:bat[:dbl], X_2:bat[:dbl], X_3:bat[:oid], X_4:bat[:oid], X_5:bit, X_6:bit, X_7:bit, X_8:bit, X_9:lng) (X_10:bat[:oid], X_11:bat[:oid]) +VLTgenerator_rangejoin; +Overloaded range join operation +generator +rangejoin +pattern generator.rangejoin(X_0:bat[:flt], X_1:bat[:flt], X_2:bat[:flt], X_3:bat[:oid], X_4:bat[:oid], X_5:bit, X_6:bit, X_7:bit, X_8:bit, X_9:lng) (X_10:bat[:oid], X_11:bat[:oid]) +VLTgenerator_rangejoin; +(empty) +generator +rangejoin +pattern generator.rangejoin(X_0:bat[:int], X_1:bat[:int], X_2:bat[:int], X_3:bat[:oid], X_4:bat[:oid], X_5:bit, X_6:bit, X_7:bit, X_8:bit, X_9:lng) (X_10:bat[:oid], X_11:bat[:oid]) +VLTgenerator_rangejoin; +(empty) +generator +rangejoin +pattern generator.rangejoin(X_0:bat[:lng], X_1:bat[:lng], X_2:bat[:lng], X_3:bat[:oid], X_4:bat[:oid], X_5:bit, X_6:bit, X_7:bit, X_8:bit, X_9:lng) (X_10:bat[:oid], X_11:bat[:oid]) +VLTgenerator_rangejoin; +(empty) +generator +rangejoin +pattern generator.rangejoin(X_0:bat[:sht], X_1:bat[:sht], X_2:bat[:sht], X_3:bat[:oid], X_4:bat[:oid], X_5:bit, X_6:bit, X_7:bit, X_8:bit, X_9:lng) (X_10:bat[:oid], X_11:bat[:oid]) +VLTgenerator_rangejoin; +(empty) +generator select pattern generator.select(X_0:bat[:bte], X_1:bat[:oid], X_2:bte, X_3:bte, X_4:bit, X_5:bit, X_6:bit):bat[:oid] VLTgenerator_subselect; diff --git a/clients/Tests/MAL-signatures.test b/clients/Tests/MAL-signatures.test --- a/clients/Tests/MAL-signatures.test +++ b/clients/Tests/MAL-signatures.test @@ -33474,36 +33474,6 @@ pattern generator.join(X_0:bat[:sht], X_ VLTgenerator_join; (empty) generator -join -pattern generator.join(X_0:bat[:bte], X_1:bat[:bte], X_2:bat[:bte], X_3:bit, X_4:bit) (X_5:bat[:oid], X_6:bat[:oid]) -VLTgenerator_rangejoin; -(empty) -generator -join -pattern generator.join(X_0:bat[:dbl], X_1:bat[:dbl], X_2:bat[:dbl], X_3:bit, X_4:bit) (X_5:bat[:oid], X_6:bat[:oid]) -VLTgenerator_rangejoin; -Overloaded range join operation -generator -join -pattern generator.join(X_0:bat[:flt], X_1:bat[:flt], X_2:bat[:flt], X_3:bit, X_4:bit) (X_5:bat[:oid], X_6:bat[:oid]) -VLTgenerator_rangejoin; -(empty) -generator -join -pattern generator.join(X_0:bat[:int], X_1:bat[:int], X_2:bat[:int], X_3:bit, X_4:bit) (X_5:bat[:oid], X_6:bat[:oid]) -VLTgenerator_rangejoin; -(empty) -generator -join -pattern generator.join(X_0:bat[:lng], X_1:bat[:lng], X_2:bat[:lng], X_3:bit, X_4:bit) (X_5:bat[:oid], X_6:bat[:oid]) -VLTgenerator_rangejoin; -(empty) -generator -join -pattern generator.join(X_0:bat[:sht], X_1:bat[:sht], X_2:bat[:sht], X_3:bit, X_4:bit) (X_5:bat[:oid], X_6:bat[:oid]) -VLTgenerator_rangejoin; -(empty) -generator parameters pattern generator.parameters(X_0:bte, X_1:bte):bat[:bte] VLTgenerator_noop; @@ -33619,6 +33589,36 @@ pattern generator.projection(X_0:bat[:oi VLTgenerator_projection; Overloaded projection operation generator +rangejoin +pattern
MonetDB: default - Merge with Aug2024 branch.
Changeset: fefb169a14d2 for MonetDB URL: https://dev.monetdb.org/hg/MonetDB/rev/fefb169a14d2 Modified Files: sql/storage/store.c Branch: default Log Message: Merge with Aug2024 branch. diffs (49 lines): diff --git a/monetdb5/modules/mal/txtsim.c b/monetdb5/modules/mal/txtsim.c --- a/monetdb5/modules/mal/txtsim.c +++ b/monetdb5/modules/mal/txtsim.c @@ -481,6 +481,10 @@ str_2_codepointseq(str_item *s) { const uint8_t *p = (const uint8_t *) s->val; + if (s->len == 0) { + s->cp_sequence = NULL; + return MAL_SUCCEED; + } s->cp_sequence = GDKmalloc(s->len * sizeof(int)); if (s->cp_sequence == NULL) throw(MAL, "str_2_byteseq", SQLSTATE(HY013) MAL_MALLOC_FAIL); @@ -589,20 +593,29 @@ static str TXTSIMjarowinkler(dbl *res, const char *const *x, const char *const *y) { int *x_flags = NULL, *y_flags = NULL; - str_item xi = { 0 }, yi = { 0 }; + str_item xi, yi; str msg = MAL_SUCCEED; if (strNil(*x) || strNil(*y)) { *res = dbl_nil; return MAL_SUCCEED; } - xi.val = *x; - xi.len = UTF8_strlen(*x); + xi = (str_item) { + .val = *x, + .len = UTF8_strlen(*x), + }; + yi = (str_item) { + .val = *y, + .len = UTF8_strlen(*y), + }; + if (xi.len == 0 || yi.len == 0) { + *res = 0; + return MAL_SUCCEED; + } + if ((msg = str_2_codepointseq()) != MAL_SUCCEED) goto bailout; - yi.val = *y; - yi.len = UTF8_strlen(*y); if ((msg = str_2_codepointseq()) != MAL_SUCCEED) goto bailout; ___ 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: 1b36a61240f0 for MonetDB URL: https://dev.monetdb.org/hg/MonetDB/rev/1b36a61240f0 Modified Files: monetdb5/modules/mal/txtsim.c sql/storage/store.c Branch: Aug2024 Log Message: Merge with Dec2023 branch. diffs (49 lines): diff --git a/monetdb5/modules/mal/txtsim.c b/monetdb5/modules/mal/txtsim.c --- a/monetdb5/modules/mal/txtsim.c +++ b/monetdb5/modules/mal/txtsim.c @@ -481,6 +481,10 @@ str_2_codepointseq(str_item *s) { const uint8_t *p = (const uint8_t *) s->val; + if (s->len == 0) { + s->cp_sequence = NULL; + return MAL_SUCCEED; + } s->cp_sequence = GDKmalloc(s->len * sizeof(int)); if (s->cp_sequence == NULL) throw(MAL, "str_2_byteseq", SQLSTATE(HY013) MAL_MALLOC_FAIL); @@ -589,20 +593,29 @@ static str TXTSIMjarowinkler(dbl *res, const char *const *x, const char *const *y) { int *x_flags = NULL, *y_flags = NULL; - str_item xi = { 0 }, yi = { 0 }; + str_item xi, yi; str msg = MAL_SUCCEED; if (strNil(*x) || strNil(*y)) { *res = dbl_nil; return MAL_SUCCEED; } - xi.val = *x; - xi.len = UTF8_strlen(*x); + xi = (str_item) { + .val = *x, + .len = UTF8_strlen(*x), + }; + yi = (str_item) { + .val = *y, + .len = UTF8_strlen(*y), + }; + if (xi.len == 0 || yi.len == 0) { + *res = 0; + return MAL_SUCCEED; + } + if ((msg = str_2_codepointseq()) != MAL_SUCCEED) goto bailout; - yi.val = *y; - yi.len = UTF8_strlen(*y); if ((msg = str_2_codepointseq()) != MAL_SUCCEED) goto bailout; ___ checkin-list mailing list -- checkin-list@monetdb.org To unsubscribe send an email to checkin-list-le...@monetdb.org
MonetDB: Dec2023 - Don't try to allocate 0 bytes.
Changeset: 744f5a714ec4 for MonetDB URL: https://dev.monetdb.org/hg/MonetDB/rev/744f5a714ec4 Modified Files: monetdb5/modules/mal/txtsim.c Branch: Dec2023 Log Message: Don't try to allocate 0 bytes. Fixes #7530. diffs (49 lines): diff --git a/monetdb5/modules/mal/txtsim.c b/monetdb5/modules/mal/txtsim.c --- a/monetdb5/modules/mal/txtsim.c +++ b/monetdb5/modules/mal/txtsim.c @@ -464,6 +464,10 @@ str_2_codepointseq(str_item *s) const char *p = s->val; int c; + if (s->len == 0) { + s->cp_sequence = NULL; + return MAL_SUCCEED; + } s->cp_sequence = GDKmalloc(s->len * sizeof(int)); if (s->cp_sequence == NULL) throw(MAL, "str_2_byteseq", SQLSTATE(HY013) MAL_MALLOC_FAIL); @@ -566,20 +570,29 @@ static str TXTSIMjarowinkler(dbl *res, const char *const *x, const char *const *y) { int *x_flags = NULL, *y_flags = NULL; - str_item xi = { 0 }, yi = { 0 }; + str_item xi, yi; str msg = MAL_SUCCEED; if (strNil(*x) || strNil(*y)) { *res = dbl_nil; return MAL_SUCCEED; } - xi.val = *x; - xi.len = UTF8_strlen(*x); + xi = (str_item) { + .val = *x, + .len = UTF8_strlen(*x), + }; + yi = (str_item) { + .val = *y, + .len = UTF8_strlen(*y), + }; + if (xi.len == 0 || yi.len == 0) { + *res = 0; + return MAL_SUCCEED; + } + if ((msg = str_2_codepointseq()) != MAL_SUCCEED) goto bailout; - yi.val = *y; - yi.len = UTF8_strlen(*y); if ((msg = str_2_codepointseq()) != MAL_SUCCEED) goto bailout; ___ 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: 98dcbf57d359 for MonetDB URL: https://dev.monetdb.org/hg/MonetDB/rev/98dcbf57d359 Modified Files: sql/test/rel-optimizers/Tests/merge-unions.test Branch: default Log Message: Merge with Aug2024 branch. diffs (81 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 @@ -4729,7 +4729,7 @@ claim_segmentsV2(sql_trans *tr, sql_tabl in_transaction = true; } if (in_transaction && !NOT_TO_BE_LOGGED(t)) - tr->logchanges += (int) total; + tr->logchanges += (lng) total; if (*offsets) { BAT *pos = *offsets; assert(BATcount(pos) == total); @@ -4809,7 +4809,7 @@ claim_segments(sql_trans *tr, sql_table in_transaction = true; } if (in_transaction && !NOT_TO_BE_LOGGED(t)) - tr->logchanges += (int) cnt; + tr->logchanges += (lng) cnt; *offset = slot; } return ok; diff --git a/sql/storage/store.c b/sql/storage/store.c --- a/sql/storage/store.c +++ b/sql/storage/store.c @@ -4070,7 +4070,7 @@ sql_trans_commit(sql_trans *tr) const bool log = !tr->parent && tr->logchanges > 0; if (log) { - const int min_changes = ATOMIC_GET() & FORCEMITOMASK ? 5 : 100; + const lng min_changes = ATOMIC_GET() & FORCEMITOMASK ? 5 : 100; flush = (tr->logchanges > min_changes && list_empty(store->changes)); } diff --git a/sql/test/rel-optimizers/Tests/merge-unions.test b/sql/test/rel-optimizers/Tests/merge-unions.test --- a/sql/test/rel-optimizers/Tests/merge-unions.test +++ b/sql/test/rel-optimizers/Tests/merge-unions.test @@ -137,7 +137,7 @@ munion ( | ) [ "f_merge"."n" UNIQUE ] ) [ "f_merge"."n" ] -query T nosort +query T rowsort select * from f_merge where n > 1 and n < 5 @@ -209,20 +209,18 @@ query I rowsort select * from f_merge_rec where n > 1 and n < 5 -1 2 2 3 3 4 4 -5 query T nosort plan select * from f_merge_rec where n > 1 and n < 5 -tmunion ( +munion ( | project ( | | select ( | | | table("sys"."f1") [ "f1"."n" UNIQUE as "f_merge_rec"."n" ] @@ -245,7 +243,7 @@ tmunion ( | ) [ "f_merge_rec"."n" UNIQUE ] ) [ "f_merge_rec"."n" ] -query II nosort +query II rowsort select n, count(n) from f_merge_rec group by n 1 @@ -259,4 +257,3 @@ 2 5 1 - ___ 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: 8f14f1d9f9d6 for MonetDB URL: https://dev.monetdb.org/hg/MonetDB/rev/8f14f1d9f9d6 Modified Files: sql/storage/bat/bat_storage.c sql/storage/store.c Branch: Aug2024 Log Message: Merge with Dec2023 branch. diffs (33 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 @@ -4729,7 +4729,7 @@ claim_segmentsV2(sql_trans *tr, sql_tabl in_transaction = true; } if (in_transaction && !NOT_TO_BE_LOGGED(t)) - tr->logchanges += (int) total; + tr->logchanges += (lng) total; if (*offsets) { BAT *pos = *offsets; assert(BATcount(pos) == total); @@ -4809,7 +4809,7 @@ claim_segments(sql_trans *tr, sql_table in_transaction = true; } if (in_transaction && !NOT_TO_BE_LOGGED(t)) - tr->logchanges += (int) cnt; + tr->logchanges += (lng) cnt; *offset = slot; } return ok; diff --git a/sql/storage/store.c b/sql/storage/store.c --- a/sql/storage/store.c +++ b/sql/storage/store.c @@ -4070,7 +4070,7 @@ sql_trans_commit(sql_trans *tr) const bool log = !tr->parent && tr->logchanges > 0; if (log) { - const int min_changes = ATOMIC_GET() & FORCEMITOMASK ? 5 : 100; + const lng min_changes = ATOMIC_GET() & FORCEMITOMASK ? 5 : 100; flush = (tr->logchanges > min_changes && list_empty(store->changes)); } ___ checkin-list mailing list -- checkin-list@monetdb.org To unsubscribe send an email to checkin-list-le...@monetdb.org
MonetDB: default - Step two towards a new stable branch "Aug2024".
Changeset: f4fbdb3437bf for MonetDB URL: https://dev.monetdb.org/hg/MonetDB/rev/f4fbdb3437bf Modified Files: .bumpversion.cfg ChangeLog MonetDB.spec clients/ChangeLog clients/mapilib/mapi.rc clients/odbc/ChangeLog clients/odbc/driver/driver.rc clients/odbc/winsetup/setup.rc cmake/monetdb-versions.cmake common/stream/ChangeLog debian/control gdk/ChangeLog gdk/libbat.rc monetdb5/tools/libmonetdb5.rc sql/ChangeLog Branch: default Log Message: Step two towards a new stable branch "Aug2024". Increment version numbers. >From now on, *all* bug fixes, and *only* bug fixes, *must* go to the stable branch with the name "Aug2024". diffs (truncated from 418 to 300 lines): diff --git a/.bumpversion.cfg b/.bumpversion.cfg --- a/.bumpversion.cfg +++ b/.bumpversion.cfg @@ -1,5 +1,5 @@ [bumpversion] -current_version = 11.50.0 +current_version = 11.52.0 commit = False tag = False diff --git a/ChangeLog b/ChangeLog --- a/ChangeLog +++ b/ChangeLog @@ -1,14 +1,3 @@ # ChangeLog file for devel # This file is updated with Maddlog -* Wed May 8 2024 Sjoerd Mullender -- The shared library (.dll aka .so files) now have the version number - as part of the name. This should allow the building of compatibility - versions that can be installed in parallel to the latest version. -- Some of the Debian/Ubuntu packages have been renamed. The old monetdb5 - names have been changed to plain monetdb, and libmonetdb5-server-* - packages have been renamed monetdb-*. -- The names of some of the provided RPM files have been changed. - References to the old MonetDB5 name have been removed. All packages - are now just MonetDB. - diff --git a/ChangeLog b/ChangeLog.Aug2024 copy from ChangeLog copy to ChangeLog.Aug2024 diff --git a/MonetDB.spec b/MonetDB.spec --- a/MonetDB.spec +++ b/MonetDB.spec @@ -8,7 +8,7 @@ # Copyright August 2008 - 2023 MonetDB B.V.; # Copyright 1997 - July 2008 CWI. -%global version 11.50.0 +%global version 11.52.0 %bcond_with compat diff --git a/clients/ChangeLog b/clients/ChangeLog --- a/clients/ChangeLog +++ b/clients/ChangeLog @@ -1,25 +1,3 @@ # ChangeLog file for clients # This file is updated with Maddlog -* Thu Jan 25 2024 Sjoerd Mullender -- Msqldump now accepts --output and --outputdir options. When the - --outputdir option is used, the dump is placed in the file dump.sql in - the specified directory and all tables are dumped to separate CSV files. - In this way it is feasible to edit the dump script by hand if needed, - even for a large database. - -* Wed Jan 24 2024 Sjoerd Mullender -- The --table (-t) option of msqldump now accepts SQL-style % wildcard - characters to dump all tables that match the pattern. E.g. -t - %test%.%test% dumps all tables with 'test' in both the schema and - table name. - -* Wed Jan 10 2024 Sjoerd Mullender -- Implemented interrupt handling in mclient. When using mclient - interactively, an interrupt (usually control-C) stops whatever the - client is doing. When editing a line, the line is discarded; when - editing a second or later line of a query, the whole query is discarded; - when a query is being executed, the server is asked to stop the query - at its earliest convenience. Stopping a running query can only be - done with an up-to-date server. All of this does not work on Windows. - diff --git a/clients/ChangeLog b/clients/ChangeLog.Aug2024 copy from clients/ChangeLog copy to clients/ChangeLog.Aug2024 diff --git a/clients/mapilib/ChangeLog b/clients/mapilib/ChangeLog.Aug2024 copy from clients/mapilib/ChangeLog copy to clients/mapilib/ChangeLog.Aug2024 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,50,0) - PRODUCTVERSION version(11,50,0) + FILEVERSION version(11,52,0) + PRODUCTVERSION version(11,52,0) 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,50,0) + VALUE "FileVersion", sversion(11,52,0) 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,50,0) + VALUE "ProductVersion", sversion(11,52,0) VALUE "SpecialBuild", "\0" END END diff --git a/clients/odbc/ChangeLog b/clients/odbc/ChangeLog --- a/clients/odbc/ChangeLog +++
MonetDB: Aug2024 - Step one towards a new stable branch "Aug2024".
Changeset: ad8625ed769d for MonetDB URL: https://dev.monetdb.org/hg/MonetDB/rev/ad8625ed769d Added Files: ChangeLog.Aug2024 clients/ChangeLog.Aug2024 clients/mapilib/ChangeLog.Aug2024 clients/odbc/ChangeLog.Aug2024 common/stream/ChangeLog.Aug2024 gdk/ChangeLog.Aug2024 geom/ChangeLog.Aug2024 misc/ChangeLog.Aug2024 monetdb5/ChangeLog.Aug2024 sql/ChangeLog.Aug2024 testing/ChangeLog.Aug2024 tools/merovingian/ChangeLog.Aug2024 Removed Files: ChangeLog clients/ChangeLog clients/mapilib/ChangeLog clients/odbc/ChangeLog common/stream/ChangeLog gdk/ChangeLog geom/ChangeLog misc/ChangeLog monetdb5/ChangeLog sql/ChangeLog testing/ChangeLog tools/merovingian/ChangeLog Modified Files: .bumpversion.cfg MonetDB.spec clients/mapilib/mapi.rc clients/odbc/driver/driver.rc clients/odbc/winsetup/setup.rc cmake/monetdb-versions.cmake debian/control gdk/libbat.rc monetdb5/tools/libmonetdb5.rc sql/backends/monet5/sql_upgrades.c Branch: Aug2024 Log Message: Step one towards a new stable branch "Aug2024". Incremented version numbers. Moved ChangeLog file to ChangeLog.Aug2024. The root of the stable branch is "Aug2024_root". diffs (256 lines): diff --git a/.bumpversion.cfg b/.bumpversion.cfg --- a/.bumpversion.cfg +++ b/.bumpversion.cfg @@ -1,5 +1,5 @@ [bumpversion] -current_version = 11.50.0 +current_version = 11.51.0 commit = False tag = False diff --git a/ChangeLog b/ChangeLog.Aug2024 rename from ChangeLog rename to ChangeLog.Aug2024 diff --git a/MonetDB.spec b/MonetDB.spec --- a/MonetDB.spec +++ b/MonetDB.spec @@ -8,7 +8,7 @@ # Copyright August 2008 - 2023 MonetDB B.V.; # Copyright 1997 - July 2008 CWI. -%global version 11.50.0 +%global version 11.51.0 %bcond_with compat diff --git a/clients/ChangeLog b/clients/ChangeLog.Aug2024 rename from clients/ChangeLog rename to clients/ChangeLog.Aug2024 diff --git a/clients/mapilib/ChangeLog b/clients/mapilib/ChangeLog.Aug2024 rename from clients/mapilib/ChangeLog rename to clients/mapilib/ChangeLog.Aug2024 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,50,0) - PRODUCTVERSION version(11,50,0) + FILEVERSION version(11,51,0) + PRODUCTVERSION version(11,51,0) 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,50,0) + VALUE "FileVersion", sversion(11,51,0) 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,50,0) + VALUE "ProductVersion", sversion(11,51,0) VALUE "SpecialBuild", "\0" END END diff --git a/clients/odbc/ChangeLog b/clients/odbc/ChangeLog.Aug2024 rename from clients/odbc/ChangeLog rename to clients/odbc/ChangeLog.Aug2024 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,50,0) - PRODUCTVERSION version(11,50,0) + FILEVERSION version(11,51,0) + PRODUCTVERSION version(11,51,0) 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,50,0) + VALUE "FileVersion", sversion(11,51,0) 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 SQL Server\0" - VALUE "ProductVersion", sversion(11,50,0) + VALUE "ProductVersion", sversion(11,51,0) 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 @@ -65,8 +65,8 @@ END // VS_VERSION_INFO VERSIONINFO - FILEVERSION version(11,50,0) -
MonetDB: default - Added tag Aug2024_root for changeset e1e9e22b...
Changeset: 64692ec20faf for MonetDB URL: https://dev.monetdb.org/hg/MonetDB/rev/64692ec20faf Modified Files: .hgtags Branch: default Log Message: Added tag Aug2024_root for changeset e1e9e22bf3d7 diffs (8 lines): diff --git a/.hgtags b/.hgtags --- a/.hgtags +++ b/.hgtags @@ -827,3 +827,4 @@ d656785f49ee62c19705722aa6b7c171904c64d5 d656785f49ee62c19705722aa6b7c171904c64d5 Dec2023_SP2_release 9a694c41042503a22d6c92aeab5bc4ca1912b62e Dec2023_9 9a694c41042503a22d6c92aeab5bc4ca1912b62e Dec2023_SP3_release +e1e9e22bf3d734dc50b56151c657a57c18f56561 Aug2024_root ___ checkin-list mailing list -- checkin-list@monetdb.org To unsubscribe send an email to checkin-list-le...@monetdb.org
MonetDB: default - Merge with Dec2023 branch.
Changeset: e1e9e22bf3d7 for MonetDB URL: https://dev.monetdb.org/hg/MonetDB/rev/e1e9e22bf3d7 Modified Files: MonetDB.spec Branch: default Log Message: Merge with Dec2023 branch. diffs (99 lines): diff --git a/MonetDB.spec b/MonetDB.spec --- a/MonetDB.spec +++ b/MonetDB.spec @@ -914,62 +914,62 @@ sed -i 's/1\.2/1.1/' misc/selinux/monetd %cmake3_build %install -mkdir -p "%{buildroot}/usr" -for d in etc var; do mkdir "%{buildroot}/$d"; ln -s ../$d "%{buildroot}/usr/$d"; done +mkdir -p "${RPM_BUILD_ROOT}"/usr +for d in etc var; do mkdir "${RPM_BUILD_ROOT}"/$d; ln -s ../$d "${RPM_BUILD_ROOT}"/usr/$d; done %cmake3_install -rm "%{buildroot}/usr/var" "%{buildroot}/usr/etc" +rm "${RPM_BUILD_ROOT}"/usr/var "${RPM_BUILD_ROOT}"/usr/etc # move file to correct location -mkdir -p %{buildroot}%{_tmpfilesdir} %{buildroot}%{_sysusersdir} -mv %{buildroot}%{_sysconfdir}/tmpfiles.d/monetdbd.conf %{buildroot}%{_tmpfilesdir} -cat > %{buildroot}%{_sysusersdir}/monetdb.conf << EOF +mkdir -p "${RPM_BUILD_ROOT}"%{_tmpfilesdir} "${RPM_BUILD_ROOT}"%{_sysusersdir} +mv "${RPM_BUILD_ROOT}"%{_sysconfdir}/tmpfiles.d/monetdbd.conf "${RPM_BUILD_ROOT}"%{_tmpfilesdir} +cat > "${RPM_BUILD_ROOT}"%{_sysusersdir}/monetdb.conf << EOF u monetdb - "MonetDB Server" /var/lib/monetdb EOF -rmdir %{buildroot}%{_sysconfdir}/tmpfiles.d +rmdir "${RPM_BUILD_ROOT}"%{_sysconfdir}/tmpfiles.d -install -d -m 0750 %{buildroot}%{_localstatedir}/lib/monetdb -install -d -m 0770 %{buildroot}%{_localstatedir}/monetdb5/dbfarm -install -d -m 0775 %{buildroot}%{_localstatedir}/log/monetdb -install -d -m 0775 %{buildroot}%{_rundir}/monetdb +install -d -m 0750 "${RPM_BUILD_ROOT}"%{_localstatedir}/lib/monetdb +install -d -m 0770 "${RPM_BUILD_ROOT}"%{_localstatedir}/monetdb5/dbfarm +install -d -m 0775 "${RPM_BUILD_ROOT}"%{_localstatedir}/log/monetdb +install -d -m 0775 "${RPM_BUILD_ROOT}"%{_rundir}/monetdb # remove unwanted stuff -rm -f %{buildroot}%{_libdir}/monetdb5*/lib_opt_sql_append.so -rm -f %{buildroot}%{_libdir}/monetdb5*/lib_microbenchmark*.so -rm -f %{buildroot}%{_libdir}/monetdb5*/lib_udf*.so -rm -f %{buildroot}%{_bindir}/monetdb_mtest.sh -rm -rf %{buildroot}%{_datadir}/monetdb # /cmake +rm -f "${RPM_BUILD_ROOT}"%{_libdir}/monetdb5*/lib_opt_sql_append.so +rm -f "${RPM_BUILD_ROOT}"%{_libdir}/monetdb5*/lib_microbenchmark*.so +rm -f "${RPM_BUILD_ROOT}"%{_libdir}/monetdb5*/lib_udf*.so +rm -f "${RPM_BUILD_ROOT}"%{_bindir}/monetdb_mtest.sh +rm -rf "${RPM_BUILD_ROOT}"%{_datadir}/monetdb # /cmake if [ -x /usr/sbin/hardlink ]; then -/usr/sbin/hardlink -cv %{buildroot}%{_datadir}/selinux +/usr/sbin/hardlink -cv "${RPM_BUILD_ROOT}"%{_datadir}/selinux else # Fedora 31 -/usr/bin/hardlink -cv %{buildroot}%{_datadir}/selinux +/usr/bin/hardlink -cv "${RPM_BUILD_ROOT}"%{_datadir}/selinux fi # update shebang lines for Python scripts %if %{?py3_shebang_fix:1}%{!?py3_shebang_fix:0} # Fedora has py3_shebang_fix macro -%{py3_shebang_fix} %{buildroot}%{_bindir}/*.py +%{py3_shebang_fix} "${RPM_BUILD_ROOT}"%{_bindir}/*.py %else # EPEL does not, but we can use the script directly -/usr/bin/pathfix.py -pni "%{__python3} -s" %{buildroot}%{_bindir}/*.py +/usr/bin/pathfix.py -pni "%{__python3} -s" "${RPM_BUILD_ROOT}"%{_bindir}/*.py %endif %if %{with compat} # delete files that are not going to be installed in compat packages -rm %{buildroot}%{_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 %{buildroot}%{_datadir}/doc/MonetDB* -rm %{buildroot}%{_datadir}/selinux/*/monetdb.pp -rm -r %{buildroot}%{_includedir}/monetdb -rm %{buildroot}%{_libdir}/*.so %{buildroot}%{_libdir}/libmonetdbe.so.* -rm -r %{buildroot}%{_libdir}/pkgconfig -rm -r %{buildroot}%{_localstatedir}/lib/monetdb %{buildroot}%{_localstatedir}/monetdb5 -rm -r %{buildroot}%{_mandir}/man1 -rm -r %{buildroot}%{python3_sitelib}/MonetDBtesting -rm %{buildroot}%{_sysconfdir}/logrotate.d/monetdbd -rm %{buildroot}%{_sysusersdir}/monetdb.conf -rm %{buildroot}%{_tmpfilesdir}/monetdbd.conf -rm %{buildroot}%{_unitdir}/monetdbd.service +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}"%{_includedir}/monetdb +rm "${RPM_BUILD_ROOT}"%{_libdir}/*.so "${RPM_BUILD_ROOT}"%{_libdir}/libmonetdbe.so.* +rm -r "${RPM_BUILD_ROOT}"%{_libdir}/pkgconfig +rm -r "${RPM_BUILD_ROOT}"%{_localstatedir}/lib/monetdb "${RPM_BUILD_ROOT}"%{_localstatedir}/monetdb5 +rm -r "${RPM_BUILD_ROOT}"%{_mandir}/man1 +rm -r "${RPM_BUILD_ROOT}"%{python3_sitelib}/MonetDBtesting +rm
MonetDB: label - Closing branch label.
Changeset: 98c28aabf74e for MonetDB URL: https://dev.monetdb.org/hg/MonetDB/rev/98c28aabf74e Branch: label Log Message: Closing branch label. ___ checkin-list mailing list -- checkin-list@monetdb.org To unsubscribe send an email to checkin-list-le...@monetdb.org
MonetDB: default - Merging branch label into default.
Changeset: ec2e89c6b469 for MonetDB URL: https://dev.monetdb.org/hg/MonetDB/rev/ec2e89c6b469 Branch: default Log Message: Merging branch label into default. diffs (truncated from 10559 to 300 lines): 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 @@ -48969,6 +48969,11 @@ pattern sql.bind_idxbat(X_0:int, X_1:str mvc_bind_idxbat_wrap; Bind the 'schema.table.index' BAT with access kind:@0 - base table@1 - inserts@2 - updates sql +check +pattern sql.check(X_0:str, X_1:str):str +SQLcheck; +Return sql string of check constraint. +sql claim unsafe pattern sql.claim(X_0:int, X_1:str, X_2:str, X_3:lng) (X_4:oid, X_5:bat[:oid]) mvc_claim_wrap; diff --git a/clients/Tests/MAL-signatures.test b/clients/Tests/MAL-signatures.test --- a/clients/Tests/MAL-signatures.test +++ b/clients/Tests/MAL-signatures.test @@ -37429,6 +37429,11 @@ pattern sql.bind_idxbat(X_0:int, X_1:str mvc_bind_idxbat_wrap; Bind the 'schema.table.index' BAT with access kind:@0 - base table@1 - inserts@2 - updates sql +check +pattern sql.check(X_0:str, X_1:str):str +SQLcheck; +Return sql string of check constraint. +sql claim unsafe pattern sql.claim(X_0:int, X_1:str, X_2:str, X_3:lng) (X_4:oid, X_5:bat[:oid]) mvc_claim_wrap; diff --git a/clients/mapiclient/dump.c b/clients/mapiclient/dump.c --- a/clients/mapiclient/dump.c +++ b/clients/mapiclient/dump.c @@ -1119,7 +1119,9 @@ dump_column_definition(Mapi mid, stream "SELECT kc.name, " /* 0 */ "kc.nr, " /* 1 */ "k.name, " /* 2 */ - "kc.id "/* 3 */ + "kc.id, " /* 3 */ + "k.type, " /* 4 */ + "case when k.type = 4 then sys.check_constraint(s.name, k.name) else null end " /* 5 */ "FROM sys.objects kc, " "sys.keys k " "WHERE kc.id = k.id " @@ -1132,14 +1134,15 @@ dump_column_definition(Mapi mid, stream "kc.nr, " /* 1 */ "k.name, " /* 2 */ "kc.id, " /* 3 */ - "k.type " /* 4 */ + "k.type, " /* 4 */ + "case when k.type = 4 then sys.check_constraint(s.name, k.name) else null end " /* 5 */ "FROM sys.objects kc, " "sys.keys k, " "sys.schemas s, " "sys._tables t " "WHERE kc.id = k.id " "AND k.table_id = t.id " - "AND k.type in (1, 3) " + "AND k.type in (1, 3, 4) " "AND t.schema_id = s.id " "AND s.name = '%s' " "AND t.name = '%s' " @@ -1158,16 +1161,28 @@ dump_column_definition(Mapi mid, stream if (strcmp(kc_nr, "0") == 0) { if (cnt) mnstr_write(sqlf, ")", 1, 1); + cnt = 0; mnstr_printf(sqlf, ",\n\t"); if (k_name) { mnstr_printf(sqlf, "CONSTRAINT "); dquoted_print(sqlf, k_name, " "); } - mnstr_printf(sqlf, "UNIQUE%s (", strcmp(k_type, "1") == 0 ? "" : " NULLS NOT DISTINCT"); - cnt = 1; + if (strcmp(k_type, "4") == 0) { + const char *k_check = mapi_fetch_field(hdl, 5); + mnstr_printf(sqlf, "CHECK (%s)", k_check); + } else { + if (strcmp(k_type, "1") == 0) { + mnstr_printf(sqlf, "UNIQUE"); + } else { + mnstr_printf(sqlf, "UNIQUE NULLS NOT DISTINCT"); + } + mnstr_printf(sqlf, " ("); + cnt = 1; + } } else mnstr_printf(sqlf, ", "); - dquoted_print(sqlf, c_column, NULL); + if (cnt) + dquoted_print(sqlf, c_column, NULL); if (mnstr_errnr(sqlf) != MNSTR_NO__ERROR) goto bailout; } diff --git a/sql/backends/monet5/rel_bin.c
MonetDB: label - Merge with default branch.
Changeset: 385c18ff602d for MonetDB URL: https://dev.monetdb.org/hg/MonetDB/rev/385c18ff602d Modified Files: sql/server/rel_select.c Branch: label Log Message: Merge with default branch. diffs (132 lines): diff --git a/cmake/monetdb-versions.cmake b/cmake/monetdb-versions.cmake --- a/cmake/monetdb-versions.cmake +++ b/cmake/monetdb-versions.cmake @@ -53,7 +53,8 @@ set(MAPI_VERSION_MINOR "2") set(MAPI_VERSION_PATCH "2") set(MAPI_VERSION "${MAPI_VERSION_MAJOR}.${MAPI_VERSION_MINOR}.${MAPI_VERSION_PATCH}") -# version of the MONETDB5 library (subdirectory monetdb5, not including extras or sql) +# version of the MONETDB5 library (subdirectory monetdb5, not including +# extras, and tools/utils/msabaoth.[ch]) set(MONETDB5_VERSION_MAJOR "35") set(MONETDB5_VERSION_MINOR "0") set(MONETDB5_VERSION_PATCH "4") diff --git a/common/utils/copybinary.h b/common/utils/copybinary.h --- a/common/utils/copybinary.h +++ b/common/utils/copybinary.h @@ -13,8 +13,6 @@ #ifndef COPYBINARY_H #define COPYBINARY_H -#include "monetdb_config.h" - typedef struct { uint8_t day; uint8_t month; diff --git a/common/utils/md5.c b/common/utils/md5.c --- a/common/utils/md5.c +++ b/common/utils/md5.c @@ -50,7 +50,7 @@ static void MD5Transform(uint32_t [4], c static void Encode(uint8_t *, const uint32_t *, unsigned int); static void Decode(uint32_t *, const uint8_t *, unsigned int); -static uint8_t PADDING[64] = { +static uint8_t const PADDING[64] = { 0x80, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 diff --git a/sql/server/rel_select.c b/sql/server/rel_select.c --- a/sql/server/rel_select.c +++ b/sql/server/rel_select.c @@ -2830,15 +2830,42 @@ rel_logical_exp(sql_query *query, sql_re char *compare_op = n->next->data.sval; int quantifier = 0; int is_semantics = 0; + bool is_distinct_from = false; if (n->next->next->next) quantifier = n->next->next->next->data.i_val + 1; assert(quantifier == 0 || quantifier == 1 || quantifier == 2 || quantifier == 3 || quantifier == 4); if (quantifier >= 3) { + if (quantifier == 4) + is_distinct_from = true; quantifier = 0; is_semantics = 1; } + if (is_distinct_from) { + sql_exp* ls = rel_value_exp(query, , lo, f|sql_farg, ek); + if (!ls) + return NULL; + sql_exp* rs = rel_value_exp(query, , ro, f|sql_farg, ek); + if (!rs) + return NULL; + + bool ls_is_non_null_atom = exp_is_atom(ls) && exp_is_not_null(ls); + bool rs_is_non_null_atom = exp_is_atom(rs) && exp_is_not_null(rs); + + if (ls_is_non_null_atom || rs_is_non_null_atom) { + sql_rel* l = rel_compare(query, rel, sc, lo, ro, compare_op, f | sql_or, ek, quantifier, 0); + sql_subtype *t; + if (!(t = exp_subtype(rs_is_non_null_atom?ls:rs))) + return sql_error(sql, 01, SQLSTATE(42000) "Cannot have a parameter for IS NULL operator"); + sql_exp* e = exp_compare(sql->sa, rs_is_non_null_atom?ls:rs, exp_atom(sql->sa, atom_general(sql->sa, t, NULL, 0)), cmp_equal); + set_has_no_nil(e); + set_semantics(e); + sql_rel* r = rel_select_push_compare_exp_down(sql, rel, e, e->l, e->r, NULL, f | sql_or); + + return rel_or(sql, rel_dup(rel), l, r, NULL, NULL, NULL); + } + } /* [NOT] DISTINCT FROM */ return rel_compare(query, rel, sc, lo, ro, compare_op, f, ek, quantifier, is_semantics); diff --git a/sql/test/2024/Tests/distinct_from.test b/sql/test/2024/Tests/distinct_from.test --- a/sql/test/2024/Tests/distinct_from.test +++ b/sql/test/2024/Tests/distinct_from.test @@ -107,6 +107,28 @@ 1 1 0 +query I nosort +select s FROM foo WHERE s IS DISTINCT FROM 20; + +10 +NULL + +query I nosort +select s FROM foo WHERE s IS NOT DISTINCT FROM 20; + +20 + +query I nosort +select s FROM foo WHERE s + 10 IS DISTINCT FROM s; + +10 +20 + +query I nosort +select s FROM foo WHERE s + 10 IS NOT DISTINCT FROM s; + +NULL + statement ok create table bar(s) as values (20), (30), (NULL) @@ -176,3 +198,16 @@ 20 20 NULL NULL + +statement ok +create table baz(s int) + +query II rowsort +SELECT * FROM baz RIGHT JOIN foo ON true WHERE (1 IS
MonetDB: Dec2023 - The recommendation is to use ${RPM_BUILD_ROOT...
Changeset: 370476ad5a92 for MonetDB URL: https://dev.monetdb.org/hg/MonetDB/rev/370476ad5a92 Modified Files: MonetDB.spec Branch: Dec2023 Log Message: The recommendation is to use ${RPM_BUILD_ROOT} instead of %{buildroot}. The former is expanded at run time (which is when you want it), the latter at parse time. diffs (69 lines): diff --git a/MonetDB.spec b/MonetDB.spec --- a/MonetDB.spec +++ b/MonetDB.spec @@ -875,45 +875,45 @@ sed -i 's/1\.2/1.1/' misc/selinux/monetd %cmake3_build %install -mkdir -p "%{buildroot}/usr" -for d in etc var; do mkdir "%{buildroot}/$d"; ln -s ../$d "%{buildroot}/usr/$d"; done +mkdir -p "${RPM_BUILD_ROOT}"/usr +for d in etc var; do mkdir "${RPM_BUILD_ROOT}"/$d; ln -s ../$d "${RPM_BUILD_ROOT}"/usr/$d; done %cmake3_install -rm "%{buildroot}/usr/var" "%{buildroot}/usr/etc" +rm "${RPM_BUILD_ROOT}"/usr/var "${RPM_BUILD_ROOT}"/usr/etc # move file to correct location -mkdir -p %{buildroot}%{_tmpfilesdir} %{buildroot}%{_sysusersdir} -mv %{buildroot}%{_sysconfdir}/tmpfiles.d/monetdbd.conf %{buildroot}%{_tmpfilesdir} -cat > %{buildroot}%{_sysusersdir}/monetdb.conf << EOF +mkdir -p "${RPM_BUILD_ROOT}"%{_tmpfilesdir} "${RPM_BUILD_ROOT}"%{_sysusersdir} +mv "${RPM_BUILD_ROOT}"%{_sysconfdir}/tmpfiles.d/monetdbd.conf "${RPM_BUILD_ROOT}"%{_tmpfilesdir} +cat > "${RPM_BUILD_ROOT}"%{_sysusersdir}/monetdb.conf << EOF u monetdb - "MonetDB Server" /var/lib/monetdb EOF -rmdir %{buildroot}%{_sysconfdir}/tmpfiles.d +rmdir "${RPM_BUILD_ROOT}"%{_sysconfdir}/tmpfiles.d -install -d -m 0750 %{buildroot}%{_localstatedir}/lib/monetdb -install -d -m 0770 %{buildroot}%{_localstatedir}/monetdb5/dbfarm -install -d -m 0775 %{buildroot}%{_localstatedir}/log/monetdb -install -d -m 0775 %{buildroot}%{_rundir}/monetdb +install -d -m 0750 "${RPM_BUILD_ROOT}"%{_localstatedir}/lib/monetdb +install -d -m 0770 "${RPM_BUILD_ROOT}"%{_localstatedir}/monetdb5/dbfarm +install -d -m 0775 "${RPM_BUILD_ROOT}"%{_localstatedir}/log/monetdb +install -d -m 0775 "${RPM_BUILD_ROOT}"%{_rundir}/monetdb # remove unwanted stuff -rm -f %{buildroot}%{_libdir}/monetdb5/lib_opt_sql_append.so -rm -f %{buildroot}%{_libdir}/monetdb5/lib_microbenchmark*.so -rm -f %{buildroot}%{_libdir}/monetdb5/lib_udf*.so -rm -f %{buildroot}%{_bindir}/monetdb_mtest.sh -rm -rf %{buildroot}%{_datadir}/monetdb # /cmake +rm -f "${RPM_BUILD_ROOT}"%{_libdir}/monetdb5/lib_opt_sql_append.so +rm -f "${RPM_BUILD_ROOT}"%{_libdir}/monetdb5/lib_microbenchmark*.so +rm -f "${RPM_BUILD_ROOT}"%{_libdir}/monetdb5/lib_udf*.so +rm -f "${RPM_BUILD_ROOT}"%{_bindir}/monetdb_mtest.sh +rm -rf "${RPM_BUILD_ROOT}"%{_datadir}/monetdb # /cmake if [ -x /usr/sbin/hardlink ]; then -/usr/sbin/hardlink -cv %{buildroot}%{_datadir}/selinux +/usr/sbin/hardlink -cv "${RPM_BUILD_ROOT}"%{_datadir}/selinux else # Fedora 31 -/usr/bin/hardlink -cv %{buildroot}%{_datadir}/selinux +/usr/bin/hardlink -cv "${RPM_BUILD_ROOT}"%{_datadir}/selinux fi # update shebang lines for Python scripts %if %{?py3_shebang_fix:1}%{!?py3_shebang_fix:0} # Fedora has py3_shebang_fix macro -%{py3_shebang_fix} %{buildroot}%{_bindir}/*.py +%{py3_shebang_fix} "${RPM_BUILD_ROOT}"%{_bindir}/*.py %else # EPEL does not, but we can use the script directly -/usr/bin/pathfix.py -pni "%{__python3} -s" %{buildroot}%{_bindir}/*.py +/usr/bin/pathfix.py -pni "%{__python3} -s" "${RPM_BUILD_ROOT}"%{_bindir}/*.py %endif %changelog ___ checkin-list mailing list -- checkin-list@monetdb.org To unsubscribe send an email to checkin-list-le...@monetdb.org
MonetDB: default - A little cleanup.
Changeset: 79a1251eda6b for MonetDB URL: https://dev.monetdb.org/hg/MonetDB/rev/79a1251eda6b Modified Files: cmake/monetdb-versions.cmake common/utils/copybinary.h common/utils/md5.c Branch: default Log Message: A little cleanup. diffs (37 lines): diff --git a/cmake/monetdb-versions.cmake b/cmake/monetdb-versions.cmake --- a/cmake/monetdb-versions.cmake +++ b/cmake/monetdb-versions.cmake @@ -53,7 +53,8 @@ set(MAPI_VERSION_MINOR "2") set(MAPI_VERSION_PATCH "2") set(MAPI_VERSION "${MAPI_VERSION_MAJOR}.${MAPI_VERSION_MINOR}.${MAPI_VERSION_PATCH}") -# version of the MONETDB5 library (subdirectory monetdb5, not including extras or sql) +# version of the MONETDB5 library (subdirectory monetdb5, not including +# extras, and tools/utils/msabaoth.[ch]) set(MONETDB5_VERSION_MAJOR "35") set(MONETDB5_VERSION_MINOR "0") set(MONETDB5_VERSION_PATCH "4") diff --git a/common/utils/copybinary.h b/common/utils/copybinary.h --- a/common/utils/copybinary.h +++ b/common/utils/copybinary.h @@ -13,8 +13,6 @@ #ifndef COPYBINARY_H #define COPYBINARY_H -#include "monetdb_config.h" - typedef struct { uint8_t day; uint8_t month; diff --git a/common/utils/md5.c b/common/utils/md5.c --- a/common/utils/md5.c +++ b/common/utils/md5.c @@ -50,7 +50,7 @@ static void MD5Transform(uint32_t [4], c static void Encode(uint8_t *, const uint32_t *, unsigned int); static void Decode(uint32_t *, const uint8_t *, unsigned int); -static uint8_t PADDING[64] = { +static uint8_t const PADDING[64] = { 0x80, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ___ checkin-list mailing list -- checkin-list@monetdb.org To unsubscribe send an email to checkin-list-le...@monetdb.org
MonetDB: label - Approve test output.
Changeset: 78e6ad71f298 for MonetDB URL: https://dev.monetdb.org/hg/MonetDB/rev/78e6ad71f298 Modified Files: sql/test/prepare/Tests/sqlancer_prepare.stable.out Branch: label Log Message: Approve test output. diffs (19 lines): diff --git a/sql/test/prepare/Tests/sqlancer_prepare.stable.out b/sql/test/prepare/Tests/sqlancer_prepare.stable.out --- a/sql/test/prepare/Tests/sqlancer_prepare.stable.out +++ b/sql/test/prepare/Tests/sqlancer_prepare.stable.out @@ -153,13 +153,13 @@ % type,digits, scale, schema, table, column # name % varchar, int,int,varchar,varchar,varchar # type % 6, 2, 1, 0, 3, 3 # length -[ "json", 0, 0, "", "%15", "%15" ] +[ "json", 0, 0, "", "%10", "%10" ] [ "bigint",63, 0, NULL, NULL, NULL] % .prepare,.prepare, .prepare, .prepare, .prepare, .prepare # table_name % type,digits, scale, schema, table, column # name % varchar, int,int,varchar,varchar,varchar # type % 6, 2, 1, 0, 3, 3 # length -[ "json", 0, 0, "", "%15", "%15" ] +[ "json", 0, 0, "", "%10", "%10" ] [ "bigint",63, 0, NULL, NULL, NULL] % .prepare,.prepare, .prepare, .prepare, .prepare, .prepare # table_name % type,digits, scale, schema, table, column # name ___ checkin-list mailing list -- checkin-list@monetdb.org To unsubscribe send an email to checkin-list-le...@monetdb.org
MonetDB: label - Dump CHECK constraints.
Changeset: 5cdf070153fa for MonetDB URL: https://dev.monetdb.org/hg/MonetDB/rev/5cdf070153fa Modified Files: clients/mapiclient/dump.c sql/server/rel_dump.c sql/test/testdb/Tests/dump-nogeom.stable.out sql/test/testdb/Tests/dump.stable.out Branch: label Log Message: Dump CHECK constraints. diffs (139 lines): diff --git a/clients/mapiclient/dump.c b/clients/mapiclient/dump.c --- a/clients/mapiclient/dump.c +++ b/clients/mapiclient/dump.c @@ -1119,7 +1119,9 @@ dump_column_definition(Mapi mid, stream "SELECT kc.name, " /* 0 */ "kc.nr, " /* 1 */ "k.name, " /* 2 */ - "kc.id "/* 3 */ + "kc.id, " /* 3 */ + "k.type, " /* 4 */ + "case when k.type = 4 then sys.check_constraint(s.name, k.name) else null end " /* 5 */ "FROM sys.objects kc, " "sys.keys k " "WHERE kc.id = k.id " @@ -1132,14 +1134,15 @@ dump_column_definition(Mapi mid, stream "kc.nr, " /* 1 */ "k.name, " /* 2 */ "kc.id, " /* 3 */ - "k.type " /* 4 */ + "k.type, " /* 4 */ + "case when k.type = 4 then sys.check_constraint(s.name, k.name) else null end " /* 5 */ "FROM sys.objects kc, " "sys.keys k, " "sys.schemas s, " "sys._tables t " "WHERE kc.id = k.id " "AND k.table_id = t.id " - "AND k.type in (1, 3) " + "AND k.type in (1, 3, 4) " "AND t.schema_id = s.id " "AND s.name = '%s' " "AND t.name = '%s' " @@ -1158,16 +1161,28 @@ dump_column_definition(Mapi mid, stream if (strcmp(kc_nr, "0") == 0) { if (cnt) mnstr_write(sqlf, ")", 1, 1); + cnt = 0; mnstr_printf(sqlf, ",\n\t"); if (k_name) { mnstr_printf(sqlf, "CONSTRAINT "); dquoted_print(sqlf, k_name, " "); } - mnstr_printf(sqlf, "UNIQUE%s (", strcmp(k_type, "1") == 0 ? "" : " NULLS NOT DISTINCT"); - cnt = 1; + if (strcmp(k_type, "4") == 0) { + const char *k_check = mapi_fetch_field(hdl, 5); + mnstr_printf(sqlf, "CHECK (%s)", k_check); + } else { + if (strcmp(k_type, "1") == 0) { + mnstr_printf(sqlf, "UNIQUE"); + } else { + mnstr_printf(sqlf, "UNIQUE NULLS NOT DISTINCT"); + } + mnstr_printf(sqlf, " ("); + cnt = 1; + } } else mnstr_printf(sqlf, ", "); - dquoted_print(sqlf, c_column, NULL); + if (cnt) + dquoted_print(sqlf, c_column, NULL); if (mnstr_errnr(sqlf) != MNSTR_NO__ERROR) goto bailout; } diff --git a/sql/server/rel_dump.c b/sql/server/rel_dump.c --- a/sql/server/rel_dump.c +++ b/sql/server/rel_dump.c @@ -2525,6 +2525,29 @@ is_infix(sql_func *f) return false; } +static void +exp2sql_dquoted(stream *fout, const char *pref, const char *val, const char *suff) +{ + if (pref) + mnstr_printf(fout, "%s", pref); + mnstr_write(fout, "\"", 1, 1); + while (*val) { + const char *p = strchr(val, '"'); + if (p) { + if (p > val) + mnstr_write(fout, val, 1, p - val); + mnstr_write(fout, "\"\"", 1, 2); + val = p + 1; + } else { + mnstr_printf(fout, "%s", val); + break; + } + } + mnstr_write(fout, "\"", 1, 1); + if (suff) + mnstr_printf(fout, "%s", suff); +} + /* only simple expressions, ie recursive no psm */ static void exp2sql_print(mvc *sql, stream *fout, sql_exp *e) @@ -2538,7
MonetDB: label - Approve upgrade.
Changeset: dae30aa04d0b for MonetDB URL: https://dev.monetdb.org/hg/MonetDB/rev/dae30aa04d0b Modified Files: sql/backends/monet5/sql_upgrades.c sql/scripts/76_dump.sql 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/emptydb/Tests/check.stable.out sql/test/emptydb/Tests/check.stable.out.32bit sql/test/emptydb/Tests/check.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: label Log Message: Approve upgrade. diffs (truncated from 4124 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 @@ -7002,7 +7002,6 @@ sql_update_default(Client c, mvc *sql, s " INSERT INTO sys.dump_statements SELECT (SELECT COUNT(*) FROM sys.dump_statements) + RANK() OVER(), stmt FROM sys.dump_add_schemas_to_users;\n" " INSERT INTO sys.dump_statements SELECT (SELECT COUNT(*) FROM sys.dump_statements) + RANK() OVER(), stmt FROM sys.dump_grant_user_privileges;\n" " INSERT INTO sys.dump_statements SELECT (SELECT COUNT(*) FROM sys.dump_statements) + RANK() OVER(), stmt FROM sys.dump_sequences;\n" - "\n" " --functions and table-likes can be interdependent. They should be inserted in the order of their catalogue id.\n" " INSERT INTO sys.dump_statements SELECT (SELECT COUNT(*) FROM sys.dump_statements) + RANK() OVER(ORDER BY stmts.o), stmts.s\n" " FROM (\n" @@ -7010,12 +7009,10 @@ sql_update_default(Client c, mvc *sql, s " UNION ALL\n" " SELECT t.o, t.stmt FROM sys.dump_tables t\n" " ) AS stmts(o, s);\n" - "\n" " -- dump table data before adding constraints and fixing sequences\n" " IF NOT DESCRIBE THEN\n" " CALL sys.dump_table_data();\n" " END IF;\n" - "\n" " INSERT INTO sys.dump_statements SELECT (SELECT COUNT(*) FROM sys.dump_statements) + RANK() OVER(), stmt FROM sys.dump_start_sequences;\n" " INSERT INTO sys.dump_statements SELECT (SELECT COUNT(*) FROM sys.dump_statements) + RANK() OVER(), stmt FROM sys.dump_column_defaults;\n" " INSERT INTO sys.dump_statements SELECT (SELECT COUNT(*) FROM sys.dump_statements) + RANK() OVER(), stmt FROM sys.dump_table_constraint_type;\n" @@ -7027,13 +7024,10 @@ sql_update_default(Client c, mvc *sql, s " INSERT INTO sys.dump_statements SELECT (SELECT COUNT(*) FROM sys.dump_statements) + RANK() OVER(), stmt FROM sys.dump_table_grants;\n" " INSERT INTO sys.dump_statements SELECT (SELECT COUNT(*) FROM sys.dump_statements) + RANK() OVER(), stmt FROM sys.dump_column_grants;\n" " INSERT INTO sys.dump_statements SELECT (SELECT COUNT(*) FROM sys.dump_statements) + RANK() OVER(), stmt FROM sys.dump_function_grants;\n" -
MonetDB: default - Clean up some library mess.
Changeset: 548ab7923877 for MonetDB URL: https://dev.monetdb.org/hg/MonetDB/rev/548ab7923877 Modified Files: clients/odbc/driver/CMakeLists.txt common/utils/CMakeLists.txt common/utils/mcrypt.h common/utils/muuid.h ctest/monetdb5/mal/CMakeLists.txt geom/lib/CMakeLists.txt geom/monetdb5/CMakeLists.txt monetdb5/extras/mal_optimizer_template/CMakeLists.txt monetdb5/extras/rapi/CMakeLists.txt monetdb5/mal/CMakeLists.txt monetdb5/modules/atoms/CMakeLists.txt monetdb5/modules/kernel/CMakeLists.txt monetdb5/modules/mal/CMakeLists.txt monetdb5/tools/CMakeLists.txt sql/backends/monet5/CMakeLists.txt sql/backends/monet5/UDF/capi/CMakeLists.txt sql/backends/monet5/UDF/pyapi3/CMakeLists.txt sql/backends/monet5/UDF/pyapi3/pyheader.h sql/backends/monet5/UDF/udf/CMakeLists.txt sql/backends/monet5/vaults/fits/CMakeLists.txt sql/backends/monet5/vaults/netcdf/CMakeLists.txt sql/backends/monet5/vaults/shp/CMakeLists.txt sql/server/CMakeLists.txt sql/storage/CMakeLists.txt sql/storage/bat/CMakeLists.txt tools/merovingian/daemon/CMakeLists.txt tools/monetdbe/CMakeLists.txt tools/mserver/CMakeLists.txt Branch: default Log Message: Clean up some library mess. mutils is part of GDK and MAPI, so don't include it separately if either one is included already. mcrypt is part of MAPI, so don't include it separately if MAPI is included already. diffs (truncated from 370 to 300 lines): diff --git a/clients/odbc/driver/CMakeLists.txt b/clients/odbc/driver/CMakeLists.txt --- a/clients/odbc/driver/CMakeLists.txt +++ b/clients/odbc/driver/CMakeLists.txt @@ -127,7 +127,6 @@ target_include_directories(MonetODBC target_link_libraries(MonetODBC PRIVATE monetdb_config_header - mutils mapi mutf8 ${ODBCINST_LIBRARIES}) diff --git a/common/utils/CMakeLists.txt b/common/utils/CMakeLists.txt --- a/common/utils/CMakeLists.txt +++ b/common/utils/CMakeLists.txt @@ -32,10 +32,7 @@ target_link_libraries(mutils mutf8) target_compile_definitions(mutils PRIVATE - LIBMUTILS - LIBGDK - LIBMAPI - LIBMEROUTIL) + LIBMUTILS) set_target_properties(mutils PROPERTIES @@ -74,8 +71,6 @@ target_link_libraries(mcrypt target_compile_definitions(mcrypt PRIVATE - LIBMONETDB5 - LIBMAPI LIBMCRYPT) set_target_properties(mcrypt @@ -108,8 +103,7 @@ target_link_libraries(msabaoth target_compile_definitions(msabaoth PRIVATE - LIBMSABAOTH - LIBMONETDB5) + LIBMSABAOTH) set_target_properties(msabaoth PROPERTIES diff --git a/common/utils/mcrypt.h b/common/utils/mcrypt.h --- a/common/utils/mcrypt.h +++ b/common/utils/mcrypt.h @@ -14,7 +14,7 @@ #define _SEEN_MCRYPT_H 1 #if defined(_MSC_VER) || defined(__CYGWIN__) || defined(__MINGW32__) -#if !defined(LIBMAPI) && !defined(LIBMCRYPT) && !defined(LIBMONETDB5) +#if !defined(LIBMAPI) && !defined(LIBMCRYPT) #define mcrypt_export extern __declspec(dllimport) #else #define mcrypt_export extern __declspec(dllexport) diff --git a/common/utils/muuid.h b/common/utils/muuid.h --- a/common/utils/muuid.h +++ b/common/utils/muuid.h @@ -17,13 +17,14 @@ * msabaoth is part of monetdb5 and we want this function to be * exported so that the call in sql can be satisfied by the version * that is included in monetdb5 */ -extern #ifdef WIN32 -#if !defined(LIBMSABAOTH) && !defined(LIBMUUID) +#if !defined(LIBMONETDB5) && !defined(LIBMSABAOTH) __declspec(dllimport) #else __declspec(dllexport) #endif +#else +extern #endif char *generateUUID(void); diff --git a/ctest/monetdb5/mal/CMakeLists.txt b/ctest/monetdb5/mal/CMakeLists.txt --- a/ctest/monetdb5/mal/CMakeLists.txt +++ b/ctest/monetdb5/mal/CMakeLists.txt @@ -17,7 +17,6 @@ target_link_libraries(test_malEmbeddedBo mal mcrypt msabaoth - mutils stream bat ${CMAKE_DL_LIBS} @@ -32,7 +31,6 @@ target_link_libraries(test_malInclude mal mcrypt msabaoth - mutils stream bat ${CMAKE_DL_LIBS} diff --git a/geom/lib/CMakeLists.txt b/geom/lib/CMakeLists.txt --- a/geom/lib/CMakeLists.txt +++ b/geom/lib/CMakeLists.txt @@ -28,7 +28,6 @@ if(GEOS_FOUND) target_link_libraries(geomlib PRIVATE -mutils stream bat monetdb_config_header diff --git a/geom/monetdb5/CMakeLists.txt b/geom/monetdb5/CMakeLists.txt --- a/geom/monetdb5/CMakeLists.txt +++ b/geom/monetdb5/CMakeLists.txt @@ -50,7 +50,6 @@ if(GEOS_FOUND) target_link_libraries(geomodule PRIVATE -mutils stream bat geomlib diff --git a/monetdb5/extras/mal_optimizer_template/CMakeLists.txt b/monetdb5/extras/mal_optimizer_template/CMakeLists.txt --- a/monetdb5/extras/mal_optimizer_template/CMakeLists.txt +++ b/monetdb5/extras/mal_optimizer_template/CMakeLists.txt @@ -26,7 +26,6 @@ target_include_directories(opt_sql_appen target_link_libraries(opt_sql_append PRIVATE
MonetDB: default - The ODBC driver does not use __declspec, it u...
Changeset: 7763c63b4b93 for MonetDB URL: https://dev.monetdb.org/hg/MonetDB/rev/7763c63b4b93 Modified Files: clients/odbc/driver/CMakeLists.txt clients/odbc/driver/ODBCGlobal.h clients/odbc/setup/drvcfg.h clients/odbc/winsetup/setup.c Branch: default Log Message: The ODBC driver does not use __declspec, it uses a .def file instead. diffs (77 lines): diff --git a/clients/odbc/driver/CMakeLists.txt b/clients/odbc/driver/CMakeLists.txt --- a/clients/odbc/driver/CMakeLists.txt +++ b/clients/odbc/driver/CMakeLists.txt @@ -124,10 +124,6 @@ target_include_directories(MonetODBC $ $) -target_compile_definitions(MonetODBC - PRIVATE - LIBMONETODBCS) - target_link_libraries(MonetODBC PRIVATE monetdb_config_header diff --git a/clients/odbc/driver/ODBCGlobal.h b/clients/odbc/driver/ODBCGlobal.h --- a/clients/odbc/driver/ODBCGlobal.h +++ b/clients/odbc/driver/ODBCGlobal.h @@ -49,16 +49,6 @@ #define ODBCDEBUG 1 -#ifdef WIN32 -#ifndef LIBMONETODBC -#define odbc_export extern __declspec(dllimport) -#else -#define odbc_export extern __declspec(dllexport) -#endif -#else -#define odbc_export extern -#endif - /* standard ODBC driver include files */ #include /* ODBC C typedefs */ /* Note: sqlext.h includes sql.h so it is not needed here to be included */ diff --git a/clients/odbc/setup/drvcfg.h b/clients/odbc/setup/drvcfg.h --- a/clients/odbc/setup/drvcfg.h +++ b/clients/odbc/setup/drvcfg.h @@ -32,16 +32,6 @@ #define ODBCVER 0x0351 -#ifdef WIN32 -#ifndef LIBMONETODBCS -#define odbc_export extern __declspec(dllimport) -#else -#define odbc_export extern __declspec(dllexport) -#endif -#else -#define odbc_export extern -#endif - #include / @@ -148,7 +138,7 @@ extern "C" { #endif /* ONLY IMPLEMENTED IN DRIVER SETUP (not in ODBCINST) */ - odbc_export int ODBCINSTGetProperties(HODBCINSTPROPERTY hFirstProperty); + extern int ODBCINSTGetProperties(HODBCINSTPROPERTY hFirstProperty); #if defined(__cplusplus) } 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 @@ -22,10 +22,6 @@ #define ALREADY_HAVE_WINDOWS_TYPE 1 #include #include -#ifdef EXPORT -#undef EXPORT -#endif -#define EXPORT __declspec(dllexport) #include #include "resource.h" ___ checkin-list mailing list -- checkin-list@monetdb.org To unsubscribe send an email to checkin-list-le...@monetdb.org
MonetDB: default - Use buffer instead of strdup.
Changeset: e811acf9ead8 for MonetDB URL: https://dev.monetdb.org/hg/MonetDB/rev/e811acf9ead8 Modified Files: common/utils/mutils.c tools/merovingian/daemon/merovingian.c tools/merovingian/daemon/merovingian.h Branch: default Log Message: Use buffer instead of strdup. diffs (87 lines): diff --git a/common/utils/mutils.c b/common/utils/mutils.c --- a/common/utils/mutils.c +++ b/common/utils/mutils.c @@ -838,7 +838,7 @@ get_bin_path(void) uint32_t size = PATH_MAX; if (_NSGetExecutablePath(buf, ) == 0 && realpath(buf, _bin_path) != NULL) - return _bin_path; + return _bin_path; #elif defined(BSD) && defined(KERN_PROC_PATHNAME) /* BSD */ int mib[4]; size_t cb = sizeof(_bin_path); diff --git a/tools/merovingian/daemon/merovingian.c b/tools/merovingian/daemon/merovingian.c --- a/tools/merovingian/daemon/merovingian.c +++ b/tools/merovingian/daemon/merovingian.c @@ -52,6 +52,7 @@ #include "msabaoth.h" #include "mutils.h" /* MT_lockf */ #include "mcrypt.h" /* mcrypt_BackendSum */ +#include "mstring.h" /* strcpy_len */ #include "utils/utils.h" #include "utils/properties.h" #include "utils/glob.h" @@ -102,7 +103,10 @@ typedef struct _threadlist { /* globals */ /* full path to the mserver5 binary */ -char *_mero_mserver = NULL; +#ifndef PATH_MAX +# define PATH_MAX 1024 +#endif +char _mero_mserver[PATH_MAX]; /* list of databases that we have started */ dpair _mero_topdp = NULL; /* lock to _mero_topdp, initialised as recursive later on */ @@ -472,8 +476,12 @@ main(int argc, char *argv[]) /* where is the mserver5 binary we fork on demand? * first try to locate it based on our binary location, fall-back to * hardcoded bin-dir */ - _mero_mserver = get_bin_path(); - if (_mero_mserver != NULL) { + p = get_bin_path(); + if (p != NULL) { + if (strcpy_len(_mero_mserver, p, sizeof(_mero_mserver)) >= sizeof(_mero_mserver)) { + Mlevelfprintf(ERROR, stderr, "fatal: monetdbd full path name is too long\n"); + exit(1); + } /* Find where the string monetdbd actually starts */ char *s = strstr(_mero_mserver, "monetdbd"); if (s != NULL) { @@ -483,9 +491,7 @@ main(int argc, char *argv[]) for (int i = 0; i < 8; i++) s[i] = "mserver5"[i]; if (stat(_mero_mserver, ) == -1) - _mero_mserver = NULL; - else - _mero_mserver = strdup(_mero_mserver); + _mero_mserver[0] = 0; } } /* setup default database properties, constants: unlike historical @@ -699,8 +705,11 @@ main(int argc, char *argv[]) } } - if (_mero_mserver == NULL) { - _mero_mserver = BINDIR "/mserver5"; + if (_mero_mserver[0] == 0) { + if (strcpy_len(_mero_mserver, BINDIR "/mserver5", sizeof(_mero_mserver)) >= sizeof(_mero_mserver)) { + Mlevelfprintf(ERROR, stderr, "fatal: mserver5 full path name is too long\n"); + MERO_EXIT_CLEAN(1); + } if (stat(_mero_mserver, ) == -1) { /* exit early if this is not going to work well */ Mlevelfprintf(ERROR, stderr, "cannot stat %s executable: %s\n", diff --git a/tools/merovingian/daemon/merovingian.h b/tools/merovingian/daemon/merovingian.h --- a/tools/merovingian/daemon/merovingian.h +++ b/tools/merovingian/daemon/merovingian.h @@ -75,7 +75,7 @@ void setLogLevel(loglevel level); } \ } while (0) -extern char *_mero_mserver; +extern char _mero_mserver[]; extern dpair _mero_topdp; extern pthread_mutex_t _mero_topdp_lock; extern volatile int _mero_keep_logging; ___ checkin-list mailing list -- checkin-list@monetdb.org To unsubscribe send an email to checkin-list-le...@monetdb.org
MonetDB: balanced_union - Closing branch balanced_union.
Changeset: d5084b4aa997 for MonetDB URL: https://dev.monetdb.org/hg/MonetDB/rev/d5084b4aa997 Branch: balanced_union Log Message: Closing branch balanced_union. ___ checkin-list mailing list -- checkin-list@monetdb.org To unsubscribe send an email to checkin-list-le...@monetdb.org
MonetDB: default - Merge balanced_union branch into default.
Changeset: 57cde1d14e40 for MonetDB URL: https://dev.monetdb.org/hg/MonetDB/rev/57cde1d14e40 Branch: default Log Message: Merge balanced_union branch into default. diffs (truncated from 3330 to 300 lines): diff --git a/monetdb5/optimizer/opt_support.c b/monetdb5/optimizer/opt_support.c --- a/monetdb5/optimizer/opt_support.c +++ b/monetdb5/optimizer/opt_support.c @@ -264,6 +264,8 @@ isUpdateInstruction(InstrPtr p) && (getFunctionId(p) == appendRef || getFunctionId(p) == replaceRef || getFunctionId(p) == deleteRef)) return TRUE; + if (getModuleId(p) == matRef) + return TRUE; return FALSE; } diff --git a/sql/backends/monet5/rel_bin.c b/sql/backends/monet5/rel_bin.c --- a/sql/backends/monet5/rel_bin.c +++ b/sql/backends/monet5/rel_bin.c @@ -2328,6 +2328,13 @@ rel2bin_args(backend *be, sql_rel *rel, args = rel2bin_args(be, rel->l, args); args = rel2bin_args(be, rel->r, args); break; + case op_munion: + if (rel->l) { + for (node* n = ((list*)rel->l)->h; n; n = n->next) { + args = rel2bin_args(be, n->data, args); + } + } + break; case op_groupby: if (rel->r) args = exps2bin_args(be, rel->r, args); @@ -3864,6 +3871,65 @@ rel_rename(backend *be, sql_rel *rel, st } static stmt * +rel2bin_munion(backend *be, sql_rel *rel, list *refs) +{ + mvc *sql = be->mvc; + list *l, *rstmts; + node *n, *m; + stmt *rel_stmt = NULL, *sub; + int i, len = 0, nr_unions = list_length((list*)rel->l); + + /* convert to stmt and store the munion operands in rstmts list */ + rstmts = sa_list(sql->sa); + for (n = ((list*)rel->l)->h; n; n = n->next) { + rel_stmt = subrel_bin(be, n->data, refs); + rel_stmt = subrel_project(be, rel_stmt, refs, n->data); + if (!rel_stmt) + return NULL; + list_append(rstmts, rel_stmt); + if (!len || len > list_length(rel_stmt->op4.lval)) + len = list_length(rel_stmt->op4.lval); + } + + /* construct relation */ + l = sa_list(sql->sa); + + /* for every op4 lval node */ + //len = list_length(((stmt*)rstmts->h->data)->op4.lval); + for (i = 0; i < len; i++) { + /* extract t and c name from the first stmt */ + stmt *s = list_fetch(((stmt*)rstmts->h->data)->op4.lval, i); + if (s == NULL) + return NULL; + const char *rnme = table_name(sql->sa, s); + const char *nme = column_name(sql->sa, s); + /* create a const column also from the first stmt */ + s = stmt_pack(be, column(be, s), nr_unions); + /* for every other rstmt */ + for (m = rstmts->h->next; m; m = m->next) { + stmt *t = list_fetch(((stmt*)m->data)->op4.lval, i); + if (t == NULL) + return NULL; + s = stmt_pack_add(be, s, column(be, t)); + if (s == NULL) + return NULL; + } + s = stmt_alias(be, s, rnme, nme); + if (s == NULL) + return NULL; + list_append(l, s); + } + sub = stmt_list(be, l); + + sub = rel_rename(be, rel, sub); + if (need_distinct(rel)) + sub = rel2bin_distinct(be, sub, NULL); + if (is_single(rel)) + sub = rel2bin_single(be, sub); + return sub; +} + +static stmt * rel2bin_union(backend *be, sql_rel *rel, list *refs) { mvc *sql = be->mvc; @@ -7294,6 +7360,10 @@ subrel_bin(backend *be, sql_rel *rel, li s = rel2bin_union(be, rel, refs); sql->type = Q_TABLE; break; + case op_munion: + s = rel2bin_munion(be, rel, refs); + sql->type = Q_TABLE; + break; case op_except: s = rel2bin_except(be, rel, refs); sql->type = Q_TABLE; diff --git a/sql/backends/monet5/sql_statement.c b/sql/backends/monet5/sql_statement.c --- a/sql/backends/monet5/sql_statement.c +++ b/sql/backends/monet5/sql_statement.c @@ -3447,6 +3447,78 @@ stmt_append_bulk(backend *be, stmt *c, l } stmt * +stmt_pack(backend *be, stmt *c, int n) +{ + MalBlkPtr mb = be->mb; + InstrPtr q = NULL; + + if (c == NULL || c->nr < 0) + goto bailout; + q = newStmtArgs(mb, matRef, packIncrementRef, 3); + if (q == NULL) + goto bailout; + q = pushArgument(mb, q, c->nr); + q = pushInt(mb, q, n); + bool enabled = be->mvc->sa->eb.enabled; +
MonetDB: default - When things go wrong, dump merovingian.log file.
Changeset: c49ab073c042 for MonetDB URL: https://dev.monetdb.org/hg/MonetDB/rev/c49ab073c042 Modified Files: tools/merovingian/client/Tests/monetdbd.py Branch: default Log Message: When things go wrong, dump merovingian.log file. So that there is some hope in figuring out what went wrong. diffs (13 lines): diff --git a/tools/merovingian/client/Tests/monetdbd.py b/tools/merovingian/client/Tests/monetdbd.py --- a/tools/merovingian/client/Tests/monetdbd.py +++ b/tools/merovingian/client/Tests/monetdbd.py @@ -155,6 +155,9 @@ class MonetDBD: self.runner.print() self.runner.print('ABORT ABORT exception occurred, stopping all databases') self.runner.print() +logfile = self.run_monetdbd('get', 'logfile', output=True) + self.runner.print(open(logfile.split('\n')[1][7:].strip()).read()) +self.runner.print() self.run_monetdb('stop', '-a') self.proc.terminate() if exc_type == None: ___ checkin-list mailing list -- checkin-list@monetdb.org To unsubscribe send an email to checkin-list-le...@monetdb.org
MonetDB: default - Save output from get_bin_path() in case it ge...
Changeset: c35679b96ca0 for MonetDB URL: https://dev.monetdb.org/hg/MonetDB/rev/c35679b96ca0 Modified Files: tools/merovingian/daemon/merovingian.c Branch: default Log Message: Save output from get_bin_path() in case it gets called again. diffs (12 lines): diff --git a/tools/merovingian/daemon/merovingian.c b/tools/merovingian/daemon/merovingian.c --- a/tools/merovingian/daemon/merovingian.c +++ b/tools/merovingian/daemon/merovingian.c @@ -484,6 +484,8 @@ main(int argc, char *argv[]) s[i] = "mserver5"[i]; if (stat(_mero_mserver, ) == -1) _mero_mserver = NULL; + else + _mero_mserver = strdup(_mero_mserver); } } /* setup default database properties, constants: unlike historical ___ checkin-list mailing list -- checkin-list@monetdb.org To unsubscribe send an email to checkin-list-le...@monetdb.org
MonetDB: balanced_union - Merge with default branch.
Changeset: 84987918aa9b for MonetDB URL: https://dev.monetdb.org/hg/MonetDB/rev/84987918aa9b Branch: balanced_union Log Message: Merge with default branch. diffs (truncated from 714 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 @@ -6657,7 +6657,7 @@ sql_update_default(Client c, mvc *sql, s if (BATcount(b) == 0) { /* do update */ sql_table *t; - const char query[] = + const char query1[] = "update sys._columns set type_digits = 7 where type = 'tinyint' and type_digits <> 7;\n" "update sys._columns set type_digits = 15 where type = 'smallint' and type_digits <> 15;\n" "update sys._columns set type_digits = 31 where type = 'int' and type_digits <> 31;\n" @@ -7061,37 +7061,102 @@ sql_update_default(Client c, mvc *sql, s t->system = 0; if ((t = mvc_bind_table(sql, s, "describe_tables")) != NULL) t->system = 0; - printf("Running database upgrade commands:\n%s\n", query); + printf("Running database upgrade commands:\n%s\n", query1); fflush(stdout); - err = SQLstatementIntern(c, query, "update", true, false, NULL); - - list *l; - if ((l = sa_list(sql->sa)) != NULL) { - sql_subtype tp1, tp2; - sql_find_subtype(, "date", 0, 0); - list_append(l, ); - list_append(l, ); - sql_find_subtype(, "day_interval", 0, 0); - list_append(l, ); - if (!sql_bind_func_(sql, s->base.name, "generate_series", l, F_UNION, true, true)) { - const char query[] = "create function sys.generate_series(first date, \"limit\" date, stepsize interval month)\n" - "returns table (value date)\n" - "external name generator.series;\n" - "create function sys.generate_series(first date, \"limit\" date, stepsize interval day)\n" - "returns table (value date)\n" - "external name generator.series;\n" - "update sys.functions set system = true where system <> true and name = 'generate_series' and schema_id = 2000;\n"; - sql->session->status = 0; - sql->errstr[0] = '\0'; - printf("Running database upgrade commands:\n%s\n", query); + err = SQLstatementIntern(c, query1, "update", true, false, NULL); + if (err == MAL_SUCCEED) { + const char query2[] = "create function sys.generate_series(first date, \"limit\" date, stepsize interval month)\n" + "returns table (value date)\n" + "external name generator.series;\n" + "create function sys.generate_series(first date, \"limit\" date, stepsize interval day)\n" + "returns table (value date)\n" + "external name generator.series;\n" + "update sys.functions set system = true where system <> true and name = 'generate_series' and schema_id = 2000;\n"; + sql->session->status = 0; + sql->errstr[0] = '\0'; + printf("Running database upgrade commands:\n%s\n", query2); + fflush(stdout); + err = SQLstatementIntern(c, query2, "update", true, false, NULL); + if (err == MAL_SUCCEED) { + const char query3[] = + "drop view sys.sessions;\n" + "drop function sys.sessions();\n" + "create function sys.sessions()\n" + " returns table(\n" + " \"sessionid\" int,\n" + " \"username\" string,\n" + " \"login\"
MonetDB: default - Cleaned up the upgrade code.
Changeset: e351962c for MonetDB URL: https://dev.monetdb.org/hg/MonetDB/rev/e351962c 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 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: Cleaned up the upgrade code. diffs (truncated from 783 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 @@ -6657,7 +6657,7 @@ sql_update_default(Client c, mvc *sql, s if (BATcount(b) == 0) { /* do update */ sql_table *t; - const char query[] = + const char query1[] = "update sys._columns set type_digits = 7 where type = 'tinyint' and type_digits <> 7;\n" "update sys._columns set type_digits = 15 where type = 'smallint' and type_digits <> 15;\n" "update sys._columns set type_digits = 31 where type = 'int' and type_digits <> 31;\n" @@ -7061,21 +7061,11 @@ sql_update_default(Client c, mvc *sql, s t->system = 0; if ((t = mvc_bind_table(sql, s, "describe_tables")) != NULL) t->system = 0; - printf("Running database upgrade commands:\n%s\n", query); + printf("Running database upgrade commands:\n%s\n", query1); fflush(stdout); - err = SQLstatementIntern(c, query, "update", true, false, NULL); - - list *l; - if (!(l = sa_list(sql->sa))) - return "allocation failed"; - sql_subtype tp1, tp2; - sql_find_subtype(, "date", 0, 0); - list_append(l, ); - list_append(l, ); - sql_find_subtype(, "day_interval", 0, 0); - list_append(l, ); - if (!sql_bind_func_(sql, s->base.name, "generate_series", l, F_UNION, true, true)) { - const char query[] = "create function sys.generate_series(first date, \"limit\" date, stepsize interval month)\n" + err = SQLstatementIntern(c, query1, "update", true, false, NULL); + if (err == MAL_SUCCEED) { + const char query2[] = "create function sys.generate_series(first date, \"limit\" date, stepsize interval month)\n" "returns table (value date)\n" "external name generator.series;\n" "create function sys.generate_series(first date, \"limit\" date, stepsize interval day)\n" @@ -7084,92 +7074,89 @@ sql_update_default(Client c, mvc *sql, s "update sys.functions set system = true where system <> true and name = 'generate_series' and schema_id = 2000;\n"; sql->session->status = 0; sql->errstr[0] = '\0'; - printf("Running database upgrade
MonetDB: balanced_union - Merge with default branch.
Changeset: cfca19afb8c2 for MonetDB URL: https://dev.monetdb.org/hg/MonetDB/rev/cfca19afb8c2 Modified Files: sql/server/rel_dump.c Branch: balanced_union Log Message: Merge with default branch. diffs (239 lines): diff --git a/gdk/gdk_aggr.c b/gdk/gdk_aggr.c --- a/gdk/gdk_aggr.c +++ b/gdk/gdk_aggr.c @@ -3610,7 +3610,7 @@ BATmin_skipnil(BAT *b, void *aggr, bit s pos = binsearch(NULL, 0, bi.type, bi.base, bi.vh ? bi.vh->base : NULL, bi.width, 0, bi.count, - ATOMnilptr(bi.type), -1, 1); + ATOMnilptr(bi.type), -1, 0); if (pos == 0) pos = oid_nil; else 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 @@ -6645,19 +6645,13 @@ sql_update_dec2023_sp4(Client c, mvc *sq static str sql_update_default(Client c, mvc *sql, sql_schema *s) { - allocator *old_sa = sql->sa; char *err; res_table *output; BAT *b; - if ((sql->sa = sa_create(sql->pa)) == NULL) { - sql->sa = old_sa; - return "sa_create failed"; - } - err = SQLstatementIntern(c, "SELECT id FROM sys.functions WHERE schema_id = 2000 AND name = 'describe_type' AND func LIKE '%sql_datatype%';\n", "update", true, false, ); if (err) - goto end; + return err; b = BATdescriptor(output->cols[0].b); if (b) { if (BATcount(b) == 0) { @@ -7070,114 +7064,34 @@ sql_update_default(Client c, mvc *sql, s printf("Running database upgrade commands:\n%s\n", query); fflush(stdout); err = SQLstatementIntern(c, query, "update", true, false, NULL); + + list *l; + if ((l = sa_list(sql->sa)) != NULL) { + sql_subtype tp1, tp2; + sql_find_subtype(, "date", 0, 0); + list_append(l, ); + list_append(l, ); + sql_find_subtype(, "day_interval", 0, 0); + list_append(l, ); + if (!sql_bind_func_(sql, s->base.name, "generate_series", l, F_UNION, true, true)) { + const char query[] = "create function sys.generate_series(first date, \"limit\" date, stepsize interval month)\n" + "returns table (value date)\n" + "external name generator.series;\n" + "create function sys.generate_series(first date, \"limit\" date, stepsize interval day)\n" + "returns table (value date)\n" + "external name generator.series;\n" + "update sys.functions set system = true where system <> true and name = 'generate_series' and schema_id = 2000;\n"; + sql->session->status = 0; + sql->errstr[0] = '\0'; + printf("Running database upgrade commands:\n%s\n", query); + fflush(stdout); + err = SQLstatementIntern(c, query, "update", true, false, NULL); + } + } } BBPunfix(b->batCacheid); } res_table_destroy(output); - list *l; - if ((l = sa_list(sql->sa)) != NULL) { - sql_subtype tp1, tp2; - sql_find_subtype(, "date", 0, 0); - list_append(l, ); - list_append(l, ); - sql_find_subtype(, "day_interval", 0, 0); - list_append(l, ); - if (!sql_bind_func_(sql, s->base.name, "generate_series", l, F_UNION, true, true)) { - const char query[] = "create function sys.generate_series(first date, \"limit\" date, stepsize interval month)\n" - "returns table (value date)\n" - "external name generator.series;\n" - "create function sys.generate_series(first date, \"limit\" date, stepsize interval day)\n" - "returns table (value date)\n" - "external name generator.series;\n" - "update sys.functions set system = true where system
MonetDB: default - Merge with Dec2023 branch.
Changeset: 06b5a9250dec for MonetDB URL: https://dev.monetdb.org/hg/MonetDB/rev/06b5a9250dec Modified Files: gdk/gdk_aggr.c Branch: default Log Message: Merge with Dec2023 branch. diffs (12 lines): diff --git a/gdk/gdk_aggr.c b/gdk/gdk_aggr.c --- a/gdk/gdk_aggr.c +++ b/gdk/gdk_aggr.c @@ -3610,7 +3610,7 @@ BATmin_skipnil(BAT *b, void *aggr, bit s pos = binsearch(NULL, 0, bi.type, bi.base, bi.vh ? bi.vh->base : NULL, bi.width, 0, bi.count, - ATOMnilptr(bi.type), -1, 1); + ATOMnilptr(bi.type), -1, 0); if (pos == 0) pos = oid_nil; else ___ checkin-list mailing list -- checkin-list@monetdb.org To unsubscribe send an email to checkin-list-le...@monetdb.org
MonetDB: Dec2023 - Fix searching for smallest value in revsorted...
Changeset: 5ab1adc1ae79 for MonetDB URL: https://dev.monetdb.org/hg/MonetDB/rev/5ab1adc1ae79 Modified Files: gdk/gdk_aggr.c Branch: Dec2023 Log Message: Fix searching for smallest value in revsorted column with nils. Fixes #7529. diffs (12 lines): diff --git a/gdk/gdk_aggr.c b/gdk/gdk_aggr.c --- a/gdk/gdk_aggr.c +++ b/gdk/gdk_aggr.c @@ -3650,7 +3650,7 @@ BATmin_skipnil(BAT *b, void *aggr, bit s pos = binsearch(NULL, 0, bi.type, bi.base, bi.vh ? bi.vh->base : NULL, bi.width, 0, bi.count, - ATOMnilptr(bi.type), -1, 1); + ATOMnilptr(bi.type), -1, 0); if (pos == 0) pos = oid_nil; else ___ checkin-list mailing list -- checkin-list@monetdb.org To unsubscribe send an email to checkin-list-le...@monetdb.org
MonetDB: default - Not all systems support the basename() function.
Changeset: 0491ab919c77 for MonetDB URL: https://dev.monetdb.org/hg/MonetDB/rev/0491ab919c77 Modified Files: clients/mapilib/connect.c Branch: default Log Message: Not all systems support the basename() function. diffs (35 lines): diff --git a/clients/mapilib/connect.c b/clients/mapilib/connect.c --- a/clients/mapilib/connect.c +++ b/clients/mapilib/connect.c @@ -381,6 +381,22 @@ connect_socket_tcp_addr(Mapi mid, struct return s; } +static const char * +base_name(const char *file) +{ + char *p = strrchr(file, '/'); +#ifdef _MSC_VER + char *q = strrchr(file, '\\'); + if (q != NULL) { + if (p == NULL || p < q) + p = q; + } +#endif + if (p) + return p + 1; + return file; +} + static void send_all_clientinfo(Mapi mid) { @@ -403,7 +419,7 @@ send_all_clientinfo(Mapi mid) application_name = get_bin_path(); if (application_name) { free_this = strdup(application_name); - application_name = (const char*) basename((char*)application_name); + application_name = base_name(application_name); } } const char *client_remark = msetting_string(mp, MP_CLIENT_REMARK); ___ checkin-list mailing list -- checkin-list@monetdb.org To unsubscribe send an email to checkin-list-le...@monetdb.org
MonetDB: default - Add test for dumping new types of constraints.
Changeset: c05a8d7f1c39 for MonetDB URL: https://dev.monetdb.org/hg/MonetDB/rev/c05a8d7f1c39 Modified Files: sql/test/testdb/Tests/dump-nogeom.stable.out sql/test/testdb/Tests/dump.stable.out sql/test/testdb/Tests/load.test Branch: default Log Message: Add test for dumping new types of constraints. diffs (65 lines): diff --git a/sql/test/testdb/Tests/dump-nogeom.stable.out b/sql/test/testdb/Tests/dump-nogeom.stable.out --- a/sql/test/testdb/Tests/dump-nogeom.stable.out +++ b/sql/test/testdb/Tests/dump-nogeom.stable.out @@ -101190,6 +101190,18 @@ 00 0 1 1 0 1 1 +CREATE TABLE "testschema"."nulls_not_distinct" ( + "id" INTEGER NOT NULL, + "unique1" INTEGER, + "unique2" INTEGER, + "check1" INTEGER, + 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) +); +COPY 1 RECORDS INTO "testschema"."nulls_not_distinct" FROM stdin USING DELIMITERS E'\t',E'\n','"'; +1 1 1 1 CREATE TABLE "testschema"."selfref" ( "id" INTEGER NOT NULL, "parentid" INTEGER, diff --git a/sql/test/testdb/Tests/dump.stable.out b/sql/test/testdb/Tests/dump.stable.out --- a/sql/test/testdb/Tests/dump.stable.out +++ b/sql/test/testdb/Tests/dump.stable.out @@ -101190,6 +101190,18 @@ 00 0 1 1 0 1 1 +CREATE TABLE "testschema"."nulls_not_distinct" ( + "id" INTEGER NOT NULL, + "unique1" INTEGER, + "unique2" INTEGER, + "check1" INTEGER, + 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) +); +COPY 1 RECORDS INTO "testschema"."nulls_not_distinct" FROM stdin USING DELIMITERS E'\t',E'\n','"'; +1 1 1 1 CREATE TABLE "testschema"."selfref" ( "id" INTEGER NOT NULL, "parentid" INTEGER, diff --git a/sql/test/testdb/Tests/load.test b/sql/test/testdb/Tests/load.test --- a/sql/test/testdb/Tests/load.test +++ b/sql/test/testdb/Tests/load.test @@ -101300,6 +101300,17 @@ statement ok comment on function keyjoin is 'function used for testing' statement ok +create table testschema.nulls_not_distinct ( + id integer primary key, + unique1 integer unique nulls distinct, + unique2 integer unique nulls not distinct, + check1 integer check (check1 > 0) +) + +statement ok +insert into testschema.nulls_not_distinct values (1, 1, 1, 1) + +statement ok CREATE TABLE "testschema"."selfref" ( "id" INTEGER NOT NULL DEFAULT next value for "testschema"."selfref_seq", "parentid" INTEGER, ___ checkin-list mailing list -- checkin-list@monetdb.org To unsubscribe send an email to checkin-list-le...@monetdb.org
MonetDB: default - Approve output.
Changeset: baf72dba3d7b for MonetDB URL: https://dev.monetdb.org/hg/MonetDB/rev/baf72dba3d7b Modified Files: sql/test/emptydb/Tests/check.stable.out.int128 Branch: default Log Message: Approve output. diffs (137 lines): 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 @@ -5597,7 +5597,7 @@ select 'null in fkeys.delete_action', de % .%1, .key_types # table_name % %1, key_type_name # name % varchar, varchar # type -% 13, 11 # length +% 13, 34 # length [ "sys.key_types", "Check Constraint" ] [ "sys.key_types", "Foreign Key" ] [ "sys.key_types", "Primary Key" ] @@ -6057,26 +6057,26 @@ select 'null in fkeys.delete_action', de % %237,id, id, name, schema_id, table_id, table_name, obj_type, sys_table, system # name % varchar, int,int,varchar,int,int,varchar, varchar,varchar,boolean # type % 0, 1, 1, 0, 1, 1, 0, 0, 0, 5 # length -% .%5, sys.keys, sys.keys, sys.keys, sys.keys, sys.keys, sys.keys, sys.keys # table_name -% %5, id, id, table_id, type, name, rkey, action # name -% varchar, int,int,int,int,varchar,int,int # type -% 0, 1, 1, 1, 1, 0, 1, 1 # length -% .%5, sys.keys, sys.keys, sys.keys, sys.keys, sys.keys, sys.keys, sys.keys # table_name -% %5, table_id, id, table_id, type, name, rkey, action # name -% varchar, int,int,int,int,varchar,int,int # type -% 0, 1, 1, 1, 1, 0, 1, 1 # length -% .%13,sys.keys, sys.keys, sys.keys, sys.keys, sys.keys, sys.keys, sys.keys # table_name -% %13, table_id, id, table_id, type, name, rkey, action # name -% varchar, int,int,int,int,varchar,int,int # type -% 0, 1, 1, 1, 1, 0, 1, 1 # length -% .%5, sys.keys, sys.keys, sys.keys, sys.keys, sys.keys, sys.keys, sys.keys # table_name -% %5, type, id, table_id, type, name, rkey, action # name -% varchar, int,int,int,int,varchar,int,int # type -% 0, 1, 1, 1, 1, 0, 1, 1 # length -% .%5, sys.keys, sys.keys, sys.keys, sys.keys, sys.keys, sys.keys, sys.keys # table_name -% %5, rkey, id, table_id, type, name, rkey, action # name -% varchar, int,int,int,int,varchar,int,int # type -% 0, 1, 1, 1, 1, 0, 1, 1 # length +% .%5, sys.keys, sys.keys, sys.keys, sys.keys, sys.keys, sys.keys, sys.keys, sys.keys # table_name +% %5, id, id, table_id, type, name, rkey, action, check # name +% varchar, int,int,int,int,varchar,int,int, varchar # type +% 0, 1, 1, 1, 1, 0, 1, 1, 0 # length +% .%5, sys.keys, sys.keys, sys.keys, sys.keys, sys.keys, sys.keys, sys.keys, sys.keys # table_name +% %5, table_id, id, table_id, type, name, rkey, action, check # name +% varchar, int,int,int,int,varchar,int,int, varchar # type +% 0, 1, 1, 1, 1, 0, 1, 1, 0 # length +% .%13,sys.keys, sys.keys, sys.keys, sys.keys, sys.keys, sys.keys, sys.keys, sys.keys # table_name +% %13, table_id, id, table_id, type, name, rkey, action, check # name +% varchar, int,int,int,int,varchar,int,int, varchar # type +% 0, 1, 1, 1, 1, 0, 1, 1, 0 # length +% .%5, sys.keys, sys.keys, sys.keys, sys.keys, sys.keys, sys.keys, sys.keys, sys.keys # table_name +% %5, type, id, table_id, type, name, rkey, action, check # name +% varchar, int,int,int,int,varchar,int,int, varchar # type +% 0, 1, 1, 1, 1, 0, 1, 1, 0 # length +% .%5, sys.keys, sys.keys, sys.keys, sys.keys, sys.keys, sys.keys, sys.keys, sys.keys # table_name +% %5, rkey, id, table_id, type, name, rkey, action, check # name +% varchar, int,int,int,int,varchar,int,int, varchar # type +% 0, 1, 1, 1, 1, 0, 1,
MonetDB: default - Dump UNIQUE NULLS NOT DISTINCT constraints.
Changeset: 23c11a918e28 for MonetDB URL: https://dev.monetdb.org/hg/MonetDB/rev/23c11a918e28 Modified Files: clients/mapiclient/dump.c Branch: default Log Message: Dump UNIQUE NULLS NOT DISTINCT constraints. diffs (38 lines): diff --git a/clients/mapiclient/dump.c b/clients/mapiclient/dump.c --- a/clients/mapiclient/dump.c +++ b/clients/mapiclient/dump.c @@ -1131,14 +1131,15 @@ dump_column_definition(Mapi mid, stream "SELECT kc.name, " /* 0 */ "kc.nr, " /* 1 */ "k.name, " /* 2 */ - "kc.id "/* 3 */ + "kc.id, " /* 3 */ + "k.type " /* 4 */ "FROM sys.objects kc, " "sys.keys k, " "sys.schemas s, " "sys._tables t " "WHERE kc.id = k.id " "AND k.table_id = t.id " - "AND k.type = 1 " + "AND k.type in (1, 3) " "AND t.schema_id = s.id " "AND s.name = '%s' " "AND t.name = '%s' " @@ -1150,6 +1151,7 @@ dump_column_definition(Mapi mid, stream const char *c_column = mapi_fetch_field(hdl, 0); const char *kc_nr = mapi_fetch_field(hdl, 1); const char *k_name = mapi_fetch_field(hdl, 2); + const char *k_type = mapi_fetch_field(hdl, 4); if (mapi_error(mid)) goto bailout; @@ -1161,7 +1163,7 @@ dump_column_definition(Mapi mid, stream mnstr_printf(sqlf, "CONSTRAINT "); dquoted_print(sqlf, k_name, " "); } - mnstr_printf(sqlf, "UNIQUE ("); + mnstr_printf(sqlf, "UNIQUE%s (", strcmp(k_type, "1") == 0 ? "" : " NULLS NOT DISTINCT"); cnt = 1; } else mnstr_printf(sqlf, ", "); ___ checkin-list mailing list -- checkin-list@monetdb.org To unsubscribe send an email to checkin-list-le...@monetdb.org
MonetDB: default - Fix out-of-bounds write when loading database...
Changeset: 1aea69387a5a for MonetDB URL: https://dev.monetdb.org/hg/MonetDB/rev/1aea69387a5a Modified Files: sql/storage/store.c Branch: default Log Message: Fix out-of-bounds write when loading database with UNIQUE NULLS NOT DISTINCT. diffs (38 lines): diff --git a/sql/storage/store.c b/sql/storage/store.c --- a/sql/storage/store.c +++ b/sql/storage/store.c @@ -408,23 +408,30 @@ load_key(sql_trans *tr, sql_table *t, re nk->columns = list_create((fdestroy) _destroy); nk->t = t; - if (ktype == ckey) { + switch (ktype) { + case ckey: str ch = (char*)store->table_api.table_fetch_value(rt_keys, find_sql_column(keys, "check")); if (!strNil(ch)) nk->check =_STRDUP(ch); - } - else if (ktype == ukey || ktype == pkey) { + break; + case ukey: + case unndkey: + case pkey: { sql_ukey *uk = (sql_ukey *) nk; if (ktype == pkey) t->pkey = uk; - } else { + break; + } + case fkey: { sql_fkey *fk = (sql_fkey *) nk; int action = *(int*)store->table_api.table_fetch_value(rt_keys, find_sql_column(keys, "action")); fk->on_delete = action & 255; fk->on_update = (action>>8) & 255; fk->rkey = *(sqlid*)store->table_api.table_fetch_value(rt_keys, find_sql_column(keys, "rkey")); + break; + } } for ( ; rt_keycols->cur_row < rt_keycols->nr_rows; rt_keycols->cur_row++) { ___ checkin-list mailing list -- checkin-list@monetdb.org To unsubscribe send an email to checkin-list-le...@monetdb.org
MonetDB: check - Closing branch check.
Changeset: 492adb4405a9 for MonetDB URL: https://dev.monetdb.org/hg/MonetDB/rev/492adb4405a9 Branch: check Log Message: Closing branch check. ___ checkin-list mailing list -- checkin-list@monetdb.org To unsubscribe send an email to checkin-list-le...@monetdb.org
MonetDB: default - Approve notint128 output.
Changeset: 9bec0e3a6a90 for MonetDB URL: https://dev.monetdb.org/hg/MonetDB/rev/9bec0e3a6a90 Modified Files: sql/test/emptydb/Tests/check.stable.out Branch: default Log Message: Approve notint128 output. diffs (169 lines): diff --git a/sql/test/emptydb/Tests/check.stable.out b/sql/test/emptydb/Tests/check.stable.out --- a/sql/test/emptydb/Tests/check.stable.out +++ b/sql/test/emptydb/Tests/check.stable.out @@ -1704,7 +1704,7 @@ select 'null in fkeys.delete_action', de % .%1, .s, .f, ., ., .f, .fl,., .f, .f, .f, .f, ., ., ., ., ., ., ., ., ., ., ., ., ., ., ., ., ., ., ., ., ., ., ., ., ., ., ., ., ., ., ., ., ., ., ., ., ., ., ., ., ., ., ., ., ., ., ., ., ., ., ., ., ., ., ., ., ., ., ., ., ., ., ., ., ., ., ., ., ., ., ., ., ., ., ., ., ., ., ., ., . # table_name % %1, name, name, system, query, mod,language_name, func_type, side_effect,varres, vararg, semantics, comment,name0, type0, type_digits0, type_scale0,inout0, name1, type1, type_digits1, type_scale1,inout1, name2, type2, type_digits2, type_scale2,inout2, name3, type3, type_digits3, type_scale3,inout3, name4, type4, type_digits4, type_scale4,inout4, name5, type5, type_digits5, type_scale5,inout5, name6, type6, type_digits6, type_scale6,inout6, name7, type7, type_digits7, type_scale7,inout7, name8, type8, type_digits8, type_scale8,inout8, name9, type9, type_digits9, type_scale9,inout9, name10, type10, type_digits10, type_scale10, inout10,name11, type11, type_digits11, type_scale11, inout11, name12, type12, type_digits12, type_scale12, inout12,name13, type13, type_digits13, type_scale13, inout13,name14, type14, type_digits14, type_scale14, inout14,name15, type15, type_digits15, type_scale15, inout15 # name % varchar, varchar,varchar,varchar,varchar, varchar,varchar,varchar,boolean,boolean, boolean,boolean,varchar,varchar,varchar, int,int,varchar,varchar,varchar,int,int, varchar,varchar,varchar,int,int,varchar, varchar,varchar,int,int,varchar,varchar, varchar,int,int,varchar,varchar,varchar, int,int,varchar,varchar,varchar,int,int, varchar,varchar,varchar,int,int,varchar, varchar,varchar,int,int,varchar,varchar, varchar,int,int,varchar,varchar,varchar, int,int,varchar,varchar,varchar,int,int, varchar,varchar,varchar,int,int,varchar, varchar,varchar,int,int,varchar,varchar, varchar,int,int,varchar,varchar,varchar, int,int,varchar # type -% 13, 8, 37, 6, 3806, 9, 10, 26, 5, 5, 5, 5, 0, 11, 14, 4, 1, 3, 16, 14, 4, 1, 3, 16, 14, 4, 1, 3, 27, 14, 4, 1, 3, 9, 9, 4, 1, 3, 14, 7, 4, 1, 3, 12, 9, 2, 1, 3, 11, 7, 2, 1, 3, 11, 7, 2, 1, 3, 10, 7, 2, 1, 3, 9, 7, 2, 1, 3, 6, 7, 1, 1, 3, 9, 7, 2, 1, 3, 6, 7, 4, 1, 3, 9, 7, 4, 1, 3, 6, 7, 4, 1, 3 # length +% 13, 8, 37, 6, 3806, 9, 10, 26, 5, 5, 5, 5, 0, 11, 14, 4, 1, 3, 16, 14, 4, 1, 3, 16, 14, 4, 1, 3, 27, 14, 4, 1, 3, 9, 9, 4, 1, 3, 14, 7, 4, 1, 3, 12, 9, 2, 1, 3, 11, 7, 2, 1, 3, 11, 7, 2, 1, 3, 10, 7, 2, 1, 3, 9, 7, 2, 1, 3, 8, 7, 1, 1, 3, 11, 7, 2, 1, 3, 6, 7,
MonetDB: default - Approve 32 bit output.
Changeset: 771567d3a287 for MonetDB URL: https://dev.monetdb.org/hg/MonetDB/rev/771567d3a287 Modified Files: sql/test/emptydb/Tests/check.stable.out.32bit Branch: default Log Message: Approve 32 bit output. diffs (178 lines): diff --git a/sql/test/emptydb/Tests/check.stable.out.32bit b/sql/test/emptydb/Tests/check.stable.out.32bit --- a/sql/test/emptydb/Tests/check.stable.out.32bit +++ b/sql/test/emptydb/Tests/check.stable.out.32bit @@ -1704,7 +1704,7 @@ select 'null in fkeys.delete_action', de % .%1, .s, .f, ., ., .f, .fl,., .f, .f, .f, .f, ., ., ., ., ., ., ., ., ., ., ., ., ., ., ., ., ., ., ., ., ., ., ., ., ., ., ., ., ., ., ., ., ., ., ., ., ., ., ., ., ., ., ., ., ., ., ., ., ., ., ., ., ., ., ., ., ., ., ., ., ., ., ., ., ., ., ., ., ., ., ., ., ., ., ., ., ., ., ., ., . # table_name % %1, name, name, system, query, mod,language_name, func_type, side_effect,varres, vararg, semantics, comment,name0, type0, type_digits0, type_scale0,inout0, name1, type1, type_digits1, type_scale1,inout1, name2, type2, type_digits2, type_scale2,inout2, name3, type3, type_digits3, type_scale3,inout3, name4, type4, type_digits4, type_scale4,inout4, name5, type5, type_digits5, type_scale5,inout5, name6, type6, type_digits6, type_scale6,inout6, name7, type7, type_digits7, type_scale7,inout7, name8, type8, type_digits8, type_scale8,inout8, name9, type9, type_digits9, type_scale9,inout9, name10, type10, type_digits10, type_scale10, inout10,name11, type11, type_digits11, type_scale11, inout11, name12, type12, type_digits12, type_scale12, inout12,name13, type13, type_digits13, type_scale13, inout13,name14, type14, type_digits14, type_scale14, inout14,name15, type15, type_digits15, type_scale15, inout15 # name % varchar, varchar,varchar,varchar,varchar, varchar,varchar,varchar,boolean,boolean, boolean,boolean,varchar,varchar,varchar, int,int,varchar,varchar,varchar,int,int, varchar,varchar,varchar,int,int,varchar, varchar,varchar,int,int,varchar,varchar, varchar,int,int,varchar,varchar,varchar, int,int,varchar,varchar,varchar,int,int, varchar,varchar,varchar,int,int,varchar, varchar,varchar,int,int,varchar,varchar, varchar,int,int,varchar,varchar,varchar, int,int,varchar,varchar,varchar,int,int, varchar,varchar,varchar,int,int,varchar, varchar,varchar,int,int,varchar,varchar, varchar,int,int,varchar,varchar,varchar, int,int,varchar # type -% 13, 8, 37, 6, 3806, 9, 10, 26, 5, 5, 5, 5, 0, 11, 14, 4, 1, 3, 16, 14, 4, 1, 3, 16, 14, 4, 1, 3, 27, 12, 4, 1, 3, 9, 9, 4, 1, 3, 14, 7, 4, 1, 3, 12, 9, 2, 1, 3, 11, 7, 2, 1, 3, 11, 7, 2, 1, 3, 10, 7, 2, 1, 3, 9, 7, 2, 1, 3, 6, 7, 1, 1, 3, 9, 7, 2, 1, 3, 6, 7, 4, 1, 3, 9, 7, 4, 1, 3, 6, 7, 4, 1, 3 # length +% 13, 8, 37, 6, 3806, 9, 10, 26, 5, 5, 5, 5, 0, 11, 14, 4, 1, 3, 16, 14, 4, 1, 3, 16, 14, 4, 1, 3, 27, 14, 4, 1, 3, 9, 9, 4, 1, 3, 14, 7, 4, 1, 3, 12, 9, 2, 1, 3, 11, 7, 2, 1, 3, 11, 7, 2, 1, 3, 10, 7, 2, 1, 3, 9, 7, 2, 1, 3, 8, 7, 1, 1, 3, 11, 7, 2, 1,
MonetDB: default - Merge with Dec2023 branch.
Changeset: b55743d2496c for MonetDB URL: https://dev.monetdb.org/hg/MonetDB/rev/b55743d2496c Modified Files: monetdb5/modules/mal/txtsim.c sql/test/BugTracker-2024/Tests/All Branch: default Log Message: Merge with Dec2023 branch. diffs (34 lines): diff --git a/monetdb5/modules/mal/txtsim.c b/monetdb5/modules/mal/txtsim.c --- a/monetdb5/modules/mal/txtsim.c +++ b/monetdb5/modules/mal/txtsim.c @@ -592,6 +592,10 @@ TXTSIMjarowinkler(dbl *res, const char * str_item xi = { 0 }, yi = { 0 }; str msg = MAL_SUCCEED; + if (strNil(*x) || strNil(*y)) { + *res = dbl_nil; + return MAL_SUCCEED; + } xi.val = *x; xi.len = UTF8_strlen(*x); if ((msg = str_2_codepointseq()) != MAL_SUCCEED) diff --git a/sql/test/BugTracker-2024/Tests/7528-jarowinlkler-null.test b/sql/test/BugTracker-2024/Tests/7528-jarowinlkler-null.test new file mode 100644 --- /dev/null +++ b/sql/test/BugTracker-2024/Tests/7528-jarowinlkler-null.test @@ -0,0 +1,7 @@ +statement ok +CREATE TABLE t0(c1 VARCHAR) + +query T nosort +SELECT * FROM t0 WHERE NOT NULL ORDER BY JAROWINKLER('a', NULL) DESC + + 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 @@ -60,3 +60,4 @@ 7512-concurrent-globaltmp-instantiate-cr 7513-uri-authority-parse-issue 7514-wrong-window-function 7524-right-outer-join +7528-jarowinkler-null ___ checkin-list mailing list -- checkin-list@monetdb.org To unsubscribe send an email to checkin-list-le...@monetdb.org
MonetDB: Dec2023 - Check for nils.
Changeset: 926f694c982c for MonetDB URL: https://dev.monetdb.org/hg/MonetDB/rev/926f694c982c Added Files: sql/test/BugTracker-2024/Tests/7528-jarowinlkler-null.test Modified Files: monetdb5/modules/mal/txtsim.c sql/test/BugTracker-2024/Tests/All Branch: Dec2023 Log Message: Check for nils. Fixes #7528. diffs (34 lines): diff --git a/monetdb5/modules/mal/txtsim.c b/monetdb5/modules/mal/txtsim.c --- a/monetdb5/modules/mal/txtsim.c +++ b/monetdb5/modules/mal/txtsim.c @@ -569,6 +569,10 @@ TXTSIMjarowinkler(dbl *res, const char * str_item xi = { 0 }, yi = { 0 }; str msg = MAL_SUCCEED; + if (strNil(*x) || strNil(*y)) { + *res = dbl_nil; + return MAL_SUCCEED; + } xi.val = *x; xi.len = UTF8_strlen(*x); if ((msg = str_2_codepointseq()) != MAL_SUCCEED) diff --git a/sql/test/BugTracker-2024/Tests/7528-jarowinlkler-null.test b/sql/test/BugTracker-2024/Tests/7528-jarowinlkler-null.test new file mode 100644 --- /dev/null +++ b/sql/test/BugTracker-2024/Tests/7528-jarowinlkler-null.test @@ -0,0 +1,7 @@ +statement ok +CREATE TABLE t0(c1 VARCHAR) + +query T nosort +SELECT * FROM t0 WHERE NOT NULL ORDER BY JAROWINKLER('a', NULL) DESC + + 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 @@ -55,3 +55,4 @@ field-arg-error-Bug-7506 7511-password-hash-missing-error 7512-concurrent-globaltmp-instantiate-crash 7513-uri-authority-parse-issue +7528-jarowinkler-null ___ checkin-list mailing list -- checkin-list@monetdb.org To unsubscribe send an email to checkin-list-le...@monetdb.org
MonetDB: clientinfo - Closing branch clientinfo.
Changeset: f2066f7d8c3c for MonetDB URL: https://dev.monetdb.org/hg/MonetDB/rev/f2066f7d8c3c Branch: clientinfo Log Message: Closing branch clientinfo. ___ checkin-list mailing list -- checkin-list@monetdb.org To unsubscribe send an email to checkin-list-le...@monetdb.org
MonetDB: default - Merge clientinfo branch into default.
Changeset: e2e80ee50400 for MonetDB URL: https://dev.monetdb.org/hg/MonetDB/rev/e2e80ee50400 Branch: default Log Message: Merge clientinfo branch into default. diffs (truncated from 2274 to 300 lines): 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 @@ -44629,6 +44629,11 @@ unsafe pattern clients.setScenario(X_0:s CLTsetScenario; Switch to other scenario handler, return previous one. clients +setinfo +unsafe pattern clients.setinfo(X_0:str, X_1:str):str +CLTsetClientInfo; +set a clientinfo property +clients setmemorylimit unsafe pattern clients.setmemorylimit(X_0:int):void CLTsetmemorylimit; @@ -49640,7 +49645,7 @@ SQLrow_number; return the row_numer-ed groups sql sessions -pattern sql.sessions() (X_0:bat[:int], X_1:bat[:str], X_2:bat[:timestamp], X_3:bat[:timestamp], X_4:bat[:str], X_5:bat[:int], X_6:bat[:int], X_7:bat[:int], X_8:bat[:int]) +pattern sql.sessions() (X_0:bat[:int], X_1:bat[:str], X_2:bat[:timestamp], X_3:bat[:timestamp], X_4:bat[:str], X_5:bat[:int], X_6:bat[:int], X_7:bat[:int], X_8:bat[:int], X_9:bat[:str], X_10:bat[:str], X_11:bat[:str], X_12:bat[:str], X_13:bat[:str], X_14:bat[:lng], X_15:bat[:str]) sql_sessions_wrap; SQL export table of active sessions, their timeouts and idle status sql diff --git a/clients/Tests/MAL-signatures.test b/clients/Tests/MAL-signatures.test --- a/clients/Tests/MAL-signatures.test +++ b/clients/Tests/MAL-signatures.test @@ -33164,6 +33164,11 @@ unsafe pattern clients.setScenario(X_0:s CLTsetScenario; Switch to other scenario handler, return previous one. clients +setinfo +unsafe pattern clients.setinfo(X_0:str, X_1:str):str +CLTsetClientInfo; +set a clientinfo property +clients setmemorylimit unsafe pattern clients.setmemorylimit(X_0:int):void CLTsetmemorylimit; @@ -38060,7 +38065,7 @@ SQLrow_number; return the row_numer-ed groups sql sessions -pattern sql.sessions() (X_0:bat[:int], X_1:bat[:str], X_2:bat[:timestamp], X_3:bat[:timestamp], X_4:bat[:str], X_5:bat[:int], X_6:bat[:int], X_7:bat[:int], X_8:bat[:int]) +pattern sql.sessions() (X_0:bat[:int], X_1:bat[:str], X_2:bat[:timestamp], X_3:bat[:timestamp], X_4:bat[:str], X_5:bat[:int], X_6:bat[:int], X_7:bat[:int], X_8:bat[:int], X_9:bat[:str], X_10:bat[:str], X_11:bat[:str], X_12:bat[:str], X_13:bat[:str], X_14:bat[:lng], X_15:bat[:str]) sql_sessions_wrap; SQL export table of active sessions, their timeouts and idle status sql 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 @@ -717,6 +717,7 @@ int64_t mapi_rows_affected(MapiHdl hdl) MapiMsg mapi_seek_row(MapiHdl hdl, int64_t rowne, int whence) __attribute__((__nonnull__(1))); MapiHdl mapi_send(Mapi mid, const char *cmd) __attribute__((__nonnull__(1))); MapiMsg mapi_setAutocommit(Mapi mid, bool autocommit) __attribute__((__nonnull__(1))); +void mapi_set_application_name(const char *name); MapiMsg mapi_set_columnar_protocol(Mapi mid, bool columnar_protocol) __attribute__((__nonnull__(1))); MapiMsg mapi_set_size_header(Mapi mid, bool value) __attribute__((__nonnull__(1))); MapiMsg mapi_set_time_zone(Mapi mid, int seconds_east_of_utc) __attribute__((__nonnull__(1))); @@ -810,6 +811,7 @@ void MCcloseClient(Client c); Client MCgetClient(int id); Client MCinitClient(oid user, bstream *fin, stream *fout); int MCpushClientInput(Client c, bstream *new_input, int listing, const char *prompt); +void MCsetClientInfo(Client c, const char *property, const char *value); void MCstopClients(Client c); str MCsuspendClient(int id); int MCvalid(Client c); @@ -818,7 +820,7 @@ str MSinitClientPrg(Client cntxt, const void MSresetInstructions(MalBlkPtr mb, int start); void MSresetStack(Client cntxt, MalBlkPtr mb, MalStkPtr glb); void MSresetVariables(MalBlkPtr mb); -void MSscheduleClient(str command, str challenge, bstream *fin, stream *fout, protocol_version protocol, size_t blocksize); +void MSscheduleClient(str command, str peer, str challenge, bstream *fin, stream *fout, protocol_version protocol, size_t blocksize); str OIDXcreateImplementation(Client cntxt, int tpe, BAT *b, int pieces); str OIDXdropImplementation(Client cntxt, BAT *b); str QLOGcalls(BAT **r); diff --git a/clients/mapiclient/mclient.c b/clients/mapiclient/mclient.c --- a/clients/mapiclient/mclient.c +++ b/clients/mapiclient/mclient.c @@ -3682,6 +3682,7 @@ main(int argc, char **argv) } else { mid = mapi_mapi(host, port, user, passwd, language, dbname); } + mapi_set_application_name("mclient"); free(user_allocated); user_allocated = NULL; free(passwd_allocated); diff --git a/clients/mapiclient/msqldump.c b/clients/mapiclient/msqldump.c --- a/clients/mapiclient/msqldump.c +++ b/clients/mapiclient/msqldump.c @@ -237,6 +237,7 @@ main(int argc, char
MonetDB: clientinfo - Fix and approve upgrades.
Changeset: 069d1413870e for MonetDB URL: https://dev.monetdb.org/hg/MonetDB/rev/069d1413870e 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 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/emptydb/Tests/check.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: clientinfo Log Message: Fix and approve upgrades. diffs (truncated from 1103 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 @@ -7141,7 +7141,7 @@ sql_update_default(Client c, mvc *sql, s " ('ClientRemark'),\n" " ('ClientPid');\n" "update sys.functions set system = true where schema_id = 2000 and name in ('setclientinfo', 'sessions');\n" - "update sys._tables set system = true where schema_id = 2000 and name = 'clientinfo_properties';\n"; + "update sys._tables set system = true where schema_id = 2000 and name in ('clientinfo_properties', 'sessions');\n"; ; sql_schema *sys = mvc_bind_schema(sql, "sys"); sql_table *t = mvc_bind_table(sql, sys, "sessions"); 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 @@ -1009,3 +1009,40 @@ returns table (value date) external name generator.series; update sys.functions set system = true where system <> true and name = 'generate_series' and schema_id = 2000; +Running database upgrade commands: +drop view sys.sessions; +drop function sys.sessions(); +create function sys.sessions() + returns table( + "sessionid" int, + "username" string, + "login" timestamp, + "idle" timestamp, + "optimizer" string, + "sessiontimeout" int, + "querytimeout" int, + "workerlimit" int, + "memorylimit" int, + "language" string, + "peer" string, + "hostname" string, + "application" string, + "client" string, + "clientpid" bigint, + "remark" string + ) + external name sql.sessions; +create view sys.sessions as select * from sys.sessions(); +create procedure sys.setclientinfo(property string, value string) + external name clients.setinfo; +grant execute on procedure sys.setclientinfo(string, string) to public; +create table sys.clientinfo_properties(prop string); +insert into sys.clientinfo_properties values + ('ClientHostname'), + ('ApplicationName'), + ('ClientLibrary'), + ('ClientRemark'), + ('ClientPid'); +update sys.functions set system = true where schema_id = 2000 and name in ('setclientinfo', 'sessions'); +update sys._tables set system = true where schema_id = 2000 and name in ('clientinfo_properties', 'sessions'); + diff --git a/sql/test/emptydb-previous-upgrade-chain/Tests/upgrade.stable.out b/sql/test/emptydb-previous-upgrade-chain/Tests/upgrade.stable.out --- a/sql/test/emptydb-previous-upgrade-chain/Tests/upgrade.stable.out +++ b/sql/test/emptydb-previous-upgrade-chain/Tests/upgrade.stable.out @@ -997,3 +997,40 @@ returns table (value date) external name generator.series; update
MonetDB: label - Add casts.
Changeset: 830142d4a906 for MonetDB URL: https://dev.monetdb.org/hg/MonetDB/rev/830142d4a906 Modified Files: sql/server/rel_select.c sql/server/rel_updates.c Branch: label Log Message: Add casts. diffs (33 lines): diff --git a/sql/server/rel_select.c b/sql/server/rel_select.c --- a/sql/server/rel_select.c +++ b/sql/server/rel_select.c @@ -779,7 +779,7 @@ rel_named_table_function(sql_query *quer for (m = sf->func->res->h; m; m = m->next) { sql_arg *a = m->data; sql_exp *e = exp_column(sql->sa, tname, a->name, >type, CARD_MULTI, 1, 0, 0); - e->alias.label = -(sql->nid++); + e->alias.label = -(int)(sql->nid++); set_basecol(e); append(exps, e); diff --git a/sql/server/rel_updates.c b/sql/server/rel_updates.c --- a/sql/server/rel_updates.c +++ b/sql/server/rel_updates.c @@ -1562,7 +1562,7 @@ rel_import(mvc *sql, sql_table *t, const if (c->base.name[0] != '%') { sql_exp *e = exp_column(sql->sa, t->base.name, c->base.name, >type, CARD_MULTI, c->null, is_column_unique(c), 0); - e->alias.label = -(sql->nid++); + e->alias.label = -(int) (sql->nid++); append(exps, e); } } @@ -1850,7 +1850,7 @@ bincopyfrom(sql_query *query, dlist *qna for (n = collist->h; n; n = n->next) { sql_column *c = n->data; sql_exp *e = exp_column(sql->sa, t->base.name, c->base.name, >type, CARD_MULTI, c->null, is_column_unique(c), 0); - e->alias.label = -(sql->nid++); + e->alias.label = -(int) (sql->nid++); append(exps, e); } res = rel_table_func(sql->sa, NULL, import, exps, TABLE_PROD_FUNC); ___ checkin-list mailing list -- checkin-list@monetdb.org To unsubscribe send an email to checkin-list-le...@monetdb.org
MonetDB: default - When breaking off strings, do it after all co...
Changeset: efddfa319de3 for MonetDB URL: https://dev.monetdb.org/hg/MonetDB/rev/efddfa319de3 Modified Files: clients/mapiclient/mclient.c common/utils/mutf8.h Branch: default Log Message: When breaking off strings, do it after all combining characters. diffs (44 lines): diff --git a/clients/mapiclient/mclient.c b/clients/mapiclient/mclient.c --- a/clients/mapiclient/mclient.c +++ b/clients/mapiclient/mclient.c @@ -409,7 +409,11 @@ utf8strlenmax(char *s, char *e, size_t m return len0; } if (len == max) { - *t = s; + /* add any following combining (zero width) characters */ + do { + *t = s; + s = nextcharn(s, e == NULL ? 4 : (size_t) (e - s), ); + } while (codepoint > 0 && charwidth(codepoint) == 0); return len; } } diff --git a/common/utils/mutf8.h b/common/utils/mutf8.h --- a/common/utils/mutf8.h +++ b/common/utils/mutf8.h @@ -63,3 +63,24 @@ nextchar(const char *s, uint32_t *c) *c = 0; return NULL; } + +/* like the above, but s is at most n bytes long */ +static inline char * +nextcharn(const char *s, size_t n, uint32_t *c) +{ + uint32_t codepoint = 0, state = 0; + while (n-- > 0 && *s) { + switch (decode(, , (uint8_t) *s++)) { + case UTF8_ACCEPT: + *c = codepoint; + return (char *) s; + case UTF8_REJECT: + *c = 0; + return NULL; + default: + break; + } + } + *c = 0; + return NULL; +} ___ checkin-list mailing list -- checkin-list@monetdb.org To unsubscribe send an email to checkin-list-le...@monetdb.org
MonetDB: default - Merge with Dec2023 branch.
Changeset: 4784d7f2b200 for MonetDB URL: https://dev.monetdb.org/hg/MonetDB/rev/4784d7f2b200 Modified Files: sql/storage/bat/bat_storage.c sql/storage/objectset.c sql/storage/store.c testing/sqllogictest.py Branch: default Log Message: Merge with Dec2023 branch. diffs (129 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 @@ -3492,7 +3492,6 @@ log_segments(sql_trans *tr, segments *se unlock_table(tr->store, id); if (seg->ts == tr->tid && seg->end-seg->start) { if (log_segment(tr, seg, id) != LOG_OK) { - unlock_table(tr->store, id); return LOG_ERR; } } diff --git a/sql/storage/objectset.c b/sql/storage/objectset.c --- a/sql/storage/objectset.c +++ b/sql/storage/objectset.c @@ -55,6 +55,7 @@ typedef struct objectset { allocator *sa; destroy_fptr destroy; MT_RWLock rw_lock; /*readers-writer lock to protect the links (chains) in the objectversion chain.*/ + MT_Lock lock; /* global objectset lock for os_add/del */ versionhead *name_based_h; versionhead *name_based_t; versionhead *id_based_h; @@ -668,6 +669,7 @@ os_new(allocator *sa, destroy_fptr destr }; os->destroy = destroy; MT_rwlock_init(>rw_lock, "sa_readers_lock"); + MT_lock_init(>lock, "single_writer_lock"); } return os; @@ -685,6 +687,7 @@ os_destroy(objectset *os, sql_store stor { if (ATOMIC_DEC(>refcnt) > 0) return; + MT_lock_destroy(>lock); MT_rwlock_destroy(>rw_lock); versionhead* n=os->id_based_h; while(n) { @@ -927,9 +930,9 @@ os_add_(objectset *os, struct sql_trans int os_add(objectset *os, struct sql_trans *tr, const char *name, sql_base *b) { - store_lock(tr->store); + MT_lock_set(>lock); int res = os_add_(os, tr, name, b); - store_unlock(tr->store); + MT_lock_unset(>lock); return res; } @@ -1032,9 +1035,9 @@ os_del_(objectset *os, struct sql_trans int os_del(objectset *os, sql_trans *tr, const char *name, sql_base *b) { - store_lock(tr->store); + MT_lock_set(>lock); int res = os_del_(os, tr, name, b); - store_unlock(tr->store); + MT_lock_unset(>lock); return res; } diff --git a/sql/storage/store.c b/sql/storage/store.c --- a/sql/storage/store.c +++ b/sql/storage/store.c @@ -3816,8 +3816,6 @@ sql_trans_destroy(sql_trans *tr) sql_trans_rollback(tr, false); sqlstore *store = tr->store; os_destroy(tr->localtmps, store); - store_lock(store); - store_unlock(store); MT_lock_destroy(>lock); if (!list_empty(tr->dropped)) list_destroy(tr->dropped); diff --git a/testing/sqllogictest.py b/testing/sqllogictest.py --- a/testing/sqllogictest.py +++ b/testing/sqllogictest.py @@ -656,10 +656,11 @@ class SQLLogic: result2 = result return result1, result2 -def initfile(self, f, defines): +def initfile(self, f, defines, run_until=None): self.name = f self.file = open(f, 'r', encoding='utf-8', errors='replace') self.line = 0 +self.run_until = run_until self.hashes = {} defs = [] if defines: @@ -674,6 +675,8 @@ class SQLLogic: def readline(self): self.line += 1 +if self.run_until and self.line >= self.run_until: +return '' origline = line = self.file.readline() for reg, val, key in self.defines: line = reg.sub(val.replace('\\', r'\\'), line) @@ -736,9 +739,9 @@ class SQLLogic: self.raise_error('invalid connection parameters definition, username or password missing!') return res -def parse(self, f, approve=None, verbose=False, defines=None): +def parse(self, f, approve=None, verbose=False, defines=None, run_until=None): self.approve = approve -self.initfile(f, defines) +self.initfile(f, defines, run_until=run_until) nthreads = None if self.language == 'sql': self.crs.execute(f'call sys.setsessiontimeout({self.timeout or 0})') @@ -945,6 +948,8 @@ if __name__ == '__main__': ' (can be repeated)') parser.add_argument('--alltests', action='store_true', help='also executed "knownfail" tests') +parser.add_argument('--run-until', action='store', type=int, +help='run tests until specified line') parser.add_argument('tests', nargs='*', help='tests to be run') opts = parser.parse_args() args = opts.tests @@ -959,7 +964,7 @@ if __name__ == '__main__':
MonetDB: default - Layout.
Changeset: 067509d182c9 for MonetDB URL: https://dev.monetdb.org/hg/MonetDB/rev/067509d182c9 Modified Files: monetdb5/mal/mal_utils.c Branch: default Log Message: Layout. diffs (16 lines): diff --git a/monetdb5/mal/mal_utils.c b/monetdb5/mal/mal_utils.c --- a/monetdb5/mal/mal_utils.c +++ b/monetdb5/mal/mal_utils.c @@ -48,9 +48,9 @@ mal_unquote(char *msg) out */ if (p[1] && p[2] && p[1] >= '0' && p[1] <= '7' && p[2] >= '0' && p[2] <= '7') { - *s = (char) (((p[0] - '0') << 6) | ((p[1] - - '0') << 3) | (p[2] - - '0')); + *s = (char) (((p[0] - '0') << 6) | +((p[1] - '0') << 3) | +(p[2] - '0')); p += 2; break; } ___ checkin-list mailing list -- checkin-list@monetdb.org To unsubscribe send an email to checkin-list-le...@monetdb.org
MonetDB: default - Put charwidth function and table in separate ...
Changeset: 7bc945921cc9 for MonetDB URL: https://dev.monetdb.org/hg/MonetDB/rev/7bc945921cc9 Added Files: common/utils/mwidth.c Modified Files: common/utils/CMakeLists.txt common/utils/mutf8.c Branch: default Log Message: Put charwidth function and table in separate object file in archive. This way, it doesn't have to be included in objects that use the decode function but not the charwidth function. diffs (truncated from 458 to 300 lines): diff --git a/common/utils/CMakeLists.txt b/common/utils/CMakeLists.txt --- a/common/utils/CMakeLists.txt +++ b/common/utils/CMakeLists.txt @@ -157,7 +157,8 @@ target_sources(mutf8 PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/mutf8.h PRIVATE - mutf8.c) + mutf8.c + mwidth.c) target_include_directories(mutf8 PUBLIC diff --git a/common/utils/mutf8.c b/common/utils/mutf8.c --- a/common/utils/mutf8.c +++ b/common/utils/mutf8.c @@ -13,214 +13,6 @@ #include "monetdb_config.h" #include "mutf8.h" -struct interval { - uint32_t first; - uint32_t last; - int width; -}; - -/* this table was created using the script uniwidthtab.sh */ -static const struct interval intervals[] = { - /* sorted list of non-overlapping ranges: -* ranges with width==0 represent all codepoints with -* general_category Me, Mn or Cf except U+00AD (SOFT HYPHEN), all -* codepoints \U+1160 through U+11FF (Hangul Jamo medial vowels and -* final consonants) -- see -* https://www.cl.cam.ac.uk/~mgk25/ucs/wcwidth.c from which this is -* derived; -* ranges with width==2 represent all codepoints in the East Asian -* Wide (W) or East Asian Full-width (F) category as defined in the -* EastAsianWidth.txt file */ - { 0x0300, 0x036F, 0 }, { 0x0483, 0x0489, 0 }, { 0x0591, 0x05BD, 0 }, - { 0x05BF, 0x05BF, 0 }, { 0x05C1, 0x05C2, 0 }, { 0x05C4, 0x05C5, 0 }, - { 0x05C7, 0x05C7, 0 }, { 0x0600, 0x0605, 0 }, { 0x0610, 0x061A, 0 }, - { 0x061C, 0x061C, 0 }, { 0x064B, 0x065F, 0 }, { 0x0670, 0x0670, 0 }, - { 0x06D6, 0x06DD, 0 }, { 0x06DF, 0x06E4, 0 }, { 0x06E7, 0x06E8, 0 }, - { 0x06EA, 0x06ED, 0 }, { 0x070F, 0x070F, 0 }, { 0x0711, 0x0711, 0 }, - { 0x0730, 0x074A, 0 }, { 0x07A6, 0x07B0, 0 }, { 0x07EB, 0x07F3, 0 }, - { 0x07FD, 0x07FD, 0 }, { 0x0816, 0x0819, 0 }, { 0x081B, 0x0823, 0 }, - { 0x0825, 0x0827, 0 }, { 0x0829, 0x082D, 0 }, { 0x0859, 0x085B, 0 }, - { 0x0890, 0x0891, 0 }, { 0x0898, 0x089F, 0 }, { 0x08CA, 0x0902, 0 }, - { 0x093A, 0x093A, 0 }, { 0x093C, 0x093C, 0 }, { 0x0941, 0x0948, 0 }, - { 0x094D, 0x094D, 0 }, { 0x0951, 0x0957, 0 }, { 0x0962, 0x0963, 0 }, - { 0x0981, 0x0981, 0 }, { 0x09BC, 0x09BC, 0 }, { 0x09C1, 0x09C4, 0 }, - { 0x09CD, 0x09CD, 0 }, { 0x09E2, 0x09E3, 0 }, { 0x09FE, 0x09FE, 0 }, - { 0x0A01, 0x0A02, 0 }, { 0x0A3C, 0x0A3C, 0 }, { 0x0A41, 0x0A42, 0 }, - { 0x0A47, 0x0A48, 0 }, { 0x0A4B, 0x0A4D, 0 }, { 0x0A51, 0x0A51, 0 }, - { 0x0A70, 0x0A71, 0 }, { 0x0A75, 0x0A75, 0 }, { 0x0A81, 0x0A82, 0 }, - { 0x0ABC, 0x0ABC, 0 }, { 0x0AC1, 0x0AC5, 0 }, { 0x0AC7, 0x0AC8, 0 }, - { 0x0ACD, 0x0ACD, 0 }, { 0x0AE2, 0x0AE3, 0 }, { 0x0AFA, 0x0AFF, 0 }, - { 0x0B01, 0x0B01, 0 }, { 0x0B3C, 0x0B3C, 0 }, { 0x0B3F, 0x0B3F, 0 }, - { 0x0B41, 0x0B44, 0 }, { 0x0B4D, 0x0B4D, 0 }, { 0x0B55, 0x0B56, 0 }, - { 0x0B62, 0x0B63, 0 }, { 0x0B82, 0x0B82, 0 }, { 0x0BC0, 0x0BC0, 0 }, - { 0x0BCD, 0x0BCD, 0 }, { 0x0C00, 0x0C00, 0 }, { 0x0C04, 0x0C04, 0 }, - { 0x0C3C, 0x0C3C, 0 }, { 0x0C3E, 0x0C40, 0 }, { 0x0C46, 0x0C48, 0 }, - { 0x0C4A, 0x0C4D, 0 }, { 0x0C55, 0x0C56, 0 }, { 0x0C62, 0x0C63, 0 }, - { 0x0C81, 0x0C81, 0 }, { 0x0CBC, 0x0CBC, 0 }, { 0x0CBF, 0x0CBF, 0 }, - { 0x0CC6, 0x0CC6, 0 }, { 0x0CCC, 0x0CCD, 0 }, { 0x0CE2, 0x0CE3, 0 }, - { 0x0D00, 0x0D01, 0 }, { 0x0D3B, 0x0D3C, 0 }, { 0x0D41, 0x0D44, 0 }, - { 0x0D4D, 0x0D4D, 0 }, { 0x0D62, 0x0D63, 0 }, { 0x0D81, 0x0D81, 0 }, - { 0x0DCA, 0x0DCA, 0 }, { 0x0DD2, 0x0DD4, 0 }, { 0x0DD6, 0x0DD6, 0 }, - { 0x0E31, 0x0E31, 0 }, { 0x0E34, 0x0E3A, 0 }, { 0x0E47, 0x0E4E, 0 }, - { 0x0EB1, 0x0EB1, 0 }, { 0x0EB4, 0x0EBC, 0 }, { 0x0EC8, 0x0ECE, 0 }, - { 0x0F18, 0x0F19, 0 }, { 0x0F35, 0x0F35, 0 }, { 0x0F37, 0x0F37, 0 }, - { 0x0F39, 0x0F39, 0 }, { 0x0F71, 0x0F7E, 0 }, { 0x0F80, 0x0F84, 0 }, - { 0x0F86, 0x0F87, 0 }, { 0x0F8D, 0x0F97, 0 }, { 0x0F99, 0x0FBC, 0 }, - { 0x0FC6, 0x0FC6, 0 }, { 0x102D, 0x1030, 0 }, { 0x1032, 0x1037, 0 }, - { 0x1039, 0x103A, 0 }, { 0x103D, 0x103E, 0 }, { 0x1058, 0x1059, 0 }, - { 0x105E, 0x1060, 0 }, { 0x1071, 0x1074, 0 }, { 0x1082, 0x1082, 0 }, - { 0x1085, 0x1086, 0 }, { 0x108D, 0x108D, 0 }, { 0x109D, 0x109D, 0 }, - { 0x1100, 0x115F, 2 }, { 0x1160, 0x11FF, 0 }, { 0x135D, 0x135F, 0 }, - { 0x1712, 0x1714, 0 }, { 0x1732, 0x1733, 0 }, { 0x1752, 0x1753, 0 }, - { 0x1772, 0x1773, 0 }, { 0x17B4, 0x17B5, 0 }, { 0x17B7, 0x17BD, 0 }, -
MonetDB: default - Use utf-8 decode function in more places.
Changeset: 450f65bcb3e5 for MonetDB URL: https://dev.monetdb.org/hg/MonetDB/rev/450f65bcb3e5 Modified Files: clients/odbc/driver/CMakeLists.txt clients/odbc/driver/ODBCUtil.c common/stream/CMakeLists.txt common/stream/stdio_stream.c common/stream/winio.c common/utils/CMakeLists.txt common/utils/mutils.c Branch: default Log Message: Use utf-8 decode function in more places. diffs (truncated from 430 to 300 lines): diff --git a/clients/odbc/driver/CMakeLists.txt b/clients/odbc/driver/CMakeLists.txt --- a/clients/odbc/driver/CMakeLists.txt +++ b/clients/odbc/driver/CMakeLists.txt @@ -133,6 +133,7 @@ target_link_libraries(MonetODBC monetdb_config_header mutils mapi + mutf8 ${ODBCINST_LIBRARIES}) install(TARGETS diff --git a/clients/odbc/driver/ODBCUtil.c b/clients/odbc/driver/ODBCUtil.c --- a/clients/odbc/driver/ODBCUtil.c +++ b/clients/odbc/driver/ODBCUtil.c @@ -35,6 +35,7 @@ #include "ODBCUtil.h" #include "ODBCDbc.h" #include +#include "mutf8.h" #ifdef WIN32 @@ -199,7 +200,6 @@ ODBCutf82wchar(const SQLCHAR *src, { SQLLEN i = 0; SQLINTEGER j = 0; - uint32_t c; if (buf == NULL) buflen = 0; @@ -220,51 +220,25 @@ ODBCutf82wchar(const SQLCHAR *src, else if (length < 0) return "Invalid length parameter"; + uint32_t state = 0, codepoint = 0; while (j < length && i + 1 < buflen && src[j]) { - if ((src[j+0] & 0x80) == 0) { - buf[i++] = src[j+0]; - j += 1; - } else if (j + 1 < length - && (src[j+0] & 0xE0) == 0xC0 - && (src[j+1] & 0xC0) == 0x80 - && (src[j+0] & 0x1E) != 0) { - buf[i++] = (src[j+0] & 0x1F) << 6 - | (src[j+1] & 0x3F); - j += 2; - } else if (j + 2 < length - && (src[j+0] & 0xF0) == 0xE0 - && (src[j+1] & 0xC0) == 0x80 - && (src[j+2] & 0xC0) == 0x80 - && ((src[j+0] & 0x0F) != 0 - || (src[j+1] & 0x20) != 0)) { - buf[i++] = (src[j+0] & 0x0F) << 12 - | (src[j+1] & 0x3F) << 6 - | (src[j+2] & 0x3F); - j += 3; - } else if (j + 3 < length - && (src[j+0] & 0xF8) == 0xF0 - && (src[j+1] & 0xC0) == 0x80 - && (src[j+2] & 0xC0) == 0x80 - && (src[j+3] & 0xC0) == 0x80 - && ((src[j+0] & 0x07) != 0 - || (src[j+1] & 0x30) != 0)) { - c = (src[j+0] & 0x07) << 18 - | (src[j+1] & 0x3F) << 12 - | (src[j+2] & 0x3F) << 6 - | (src[j+3] & 0x3F); - if (c > 0x10 || (c & 0x1FF800) == 0x00D800) - return "Illegal code point"; + switch (decode(, , (uint8_t) src[j++])) { + case UTF8_ACCEPT: #if SIZEOF_SQLWCHAR == 2 - if (i + 2 >= buflen) - break; - buf[i++] = 0xD7C0 + (c >> 10); - buf[i++] = 0xDC00 + (c & 0x03FF); + if (codepoint <= 0x) { + buf[i++] = (SQLWCHAR) codepoint; + } else { + buf[i++] = (SQLWCHAR) (0xD7C0 + (codepoint >> 10)); + buf[i++] = (SQLWCHAR) (0xDC00 + (codepoint & 0x3FF)); + } #else - buf[i++] = c; + buf[i++] = (SQLWCHAR) codepoint; #endif - j += 4; - } else { + break; + case UTF8_REJECT: return "Illegal code point"; + default: + break; } } if (buflen > 0) @@ -272,40 +246,22 @@ ODBCutf82wchar(const SQLCHAR *src, if (consumed) *consumed = (size_t) j; while (j < length && src[j]) { - i++; - if ((src[j+0] & 0x80) == 0) { - j += 1; - } else if (j + 1 < length - && (src[j+0] & 0xE0) == 0xC0 - && (src[j+1] & 0xC0) == 0x80 - && (src[j+0] & 0x1E) != 0) { - j += 2; - } else if (j + 2 < length - && (src[j+0] & 0xF0) == 0xE0 - && (src[j+1] & 0xC0) == 0x80 - && (src[j+2] & 0xC0) == 0x80 -
MonetDB: Dec2023 - Implemented command line option --run-until t...
Changeset: eed539e87d70 for MonetDB URL: https://dev.monetdb.org/hg/MonetDB/rev/eed539e87d70 Modified Files: testing/sqllogictest.py Branch: Dec2023 Log Message: Implemented command line option --run-until to specify line number to stop testing. Up to the specified number of lines are read from each of the test files on the command line. diffs (55 lines): diff --git a/testing/sqllogictest.py b/testing/sqllogictest.py --- a/testing/sqllogictest.py +++ b/testing/sqllogictest.py @@ -656,10 +656,11 @@ class SQLLogic: result2 = result return result1, result2 -def initfile(self, f, defines): +def initfile(self, f, defines, run_until=None): self.name = f self.file = open(f, 'r', encoding='utf-8', errors='replace') self.line = 0 +self.run_until = run_until self.hashes = {} defs = [] if defines: @@ -674,6 +675,8 @@ class SQLLogic: def readline(self): self.line += 1 +if self.run_until and self.line >= self.run_until: +return '' origline = line = self.file.readline() for reg, val, key in self.defines: line = reg.sub(val.replace('\\', r'\\'), line) @@ -736,9 +739,9 @@ class SQLLogic: self.raise_error('invalid connection parameters definition, username or password missing!') return res -def parse(self, f, approve=None, verbose=False, defines=None): +def parse(self, f, approve=None, verbose=False, defines=None, run_until=None): self.approve = approve -self.initfile(f, defines) +self.initfile(f, defines, run_until=run_until) nthreads = None if self.language == 'sql': self.crs.execute(f'call sys.setsessiontimeout({self.timeout or 0})') @@ -945,6 +948,8 @@ if __name__ == '__main__': ' (can be repeated)') parser.add_argument('--alltests', action='store_true', help='also executed "knownfail" tests') +parser.add_argument('--run-until', action='store', type=int, +help='run tests until specified line') parser.add_argument('tests', nargs='*', help='tests to be run') opts = parser.parse_args() args = opts.tests @@ -959,7 +964,7 @@ if __name__ == '__main__': print('now testing {}'. format(test)) try: sql.parse(test, approve=opts.approve, verbose=opts.verbose, - defines=opts.define) + defines=opts.define, run_until=opts.run_until) except SQLLogicSyntaxError: pass except BrokenPipeError: ___ checkin-list mailing list -- checkin-list@monetdb.org To unsubscribe send an email to checkin-list-le...@monetdb.org
MonetDB: default - Fix the odbc-tls mess.
Changeset: f04ec543d5fd for MonetDB URL: https://dev.monetdb.org/hg/MonetDB/rev/f04ec543d5fd Modified Files: clients/odbc/winsetup/setup.rc Branch: default Log Message: Fix the odbc-tls mess. After merge into default, there were some more checkins on the branch, and then the branch was closed, so loosing those changes. They are now merged. diffs (299 lines): diff --git a/clients/odbc/winsetup/install.c b/clients/odbc/winsetup/install.c --- a/clients/odbc/winsetup/install.c +++ b/clients/odbc/winsetup/install.c @@ -166,7 +166,7 @@ static void CreateAttributeString(char *attrs, size_t len, const char *dsn) { snprintf(attrs, len, - "DSN=%s;Server=localhost;Database=;UID=monetdb;PWD=monetdb;Logfile=;", + "DSN=%s;Server=localhost;Database=;UID=monetdb;PWD=monetdb;AutoCommit=on;TLS=off;", dsn); for (; *attrs; attrs++) @@ -230,9 +230,8 @@ Install(const char *driverpath, const ch } rc = InstallMyDriver(driverpath, drivername); - if (rc) { - /* after the driver is installed create the new DSN */ + /* after the driver is installed create the new System DSN */ rc = AddMyDSN(dsn, drivername); } diff --git a/clients/odbc/winsetup/resource.h b/clients/odbc/winsetup/resource.h --- a/clients/odbc/winsetup/resource.h +++ b/clients/odbc/winsetup/resource.h @@ -40,7 +40,9 @@ #define IDC_EDIT_CLIENTKEY 2024 #define IDC_EDIT_CLIENTCERT 2025 -#define IDC_BUTTON_CANCEL 2031 +//#define IDC_BUTTON_CANCEL 2031 +#define IDC_BUTTON_TEST 2031 +#define IDC_BUTTON_HELP 2032 // Next default values for new objects // 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 @@ -328,44 +328,44 @@ ConfigDSN(HWND parent, WORD request, LPC return FALSE; } value++; - if (strncasecmp("dsn=", attributes, value - attributes) == 0) { + if (strncasecmp("DSN=", attributes, value - attributes) == 0) { dsn = value; data.dsn = strdup(value); - } else if (strncasecmp("description=", attributes, value - attributes) == 0) + } else if (strncasecmp("Description=", attributes, value - attributes) == 0) data.desc = strdup(value); - else if (strncasecmp("uid=", attributes, value - attributes) == 0) + else if (strncasecmp("UID=", attributes, value - attributes) == 0) data.uid = strdup(value); - else if (strncasecmp("pwd=", attributes, value - attributes) == 0) + else if (strncasecmp("PWD=", attributes, value - attributes) == 0) data.pwd = strdup(value); - else if (strncasecmp("host=", attributes, value - attributes) == 0) + else if (strncasecmp("Host=", attributes, value - attributes) == 0) data.host = strdup(value); - else if (strncasecmp("port=", attributes, value - attributes) == 0) + else if (strncasecmp("Port=", attributes, value - attributes) == 0) data.port = strdup(value); - else if (strncasecmp("database=", attributes, value - attributes) == 0) + else if (strncasecmp("Database=", attributes, value - attributes) == 0) data.database = strdup(value); - else if (strncasecmp("schema=", attributes, value - attributes) == 0) + else if (strncasecmp("Schema=", attributes, value - attributes) == 0) data.schema = strdup(value); - else if (strncasecmp("logintimeout=", attributes, value - attributes) == 0) + else if (strncasecmp("LoginTimeout=", attributes, value - attributes) == 0) data.logintimeout = strdup(value); - else if (strncasecmp("replytimeout=", attributes, value - attributes) == 0) + else if (strncasecmp("ReplyTimeout=", attributes, value - attributes) == 0) data.replytimeout = strdup(value); - else if (strncasecmp("replysize=", attributes, value - attributes) == 0) + else if (strncasecmp("ReplySize=", attributes, value - attributes) == 0) data.replysize = strdup(value); - else if (strncasecmp("autocommit=", attributes, value - attributes) == 0) + else if (strncasecmp("AutoCommit=", attributes, value - attributes) == 0) data.autocommit = strdup(value); - else if (strncasecmp("timezone=", attributes, value - attributes) == 0) + else if
MonetDB: default - Fix output with newline.
Changeset: a02997296566 for MonetDB URL: https://dev.monetdb.org/hg/MonetDB/rev/a02997296566 Modified Files: clients/mapiclient/mclient.c Branch: default Log Message: Fix output with newline. diffs (12 lines): diff --git a/clients/mapiclient/mclient.c b/clients/mapiclient/mclient.c --- a/clients/mapiclient/mclient.c +++ b/clients/mapiclient/mclient.c @@ -389,7 +389,7 @@ utf8strlenmax(char *s, char *e, size_t m case UTF8_ACCEPT: if (codepoint == '\n') { if (max) { - *t = s; + *t = s - 1; /* before the \n */ return len; } len++; ___ checkin-list mailing list -- checkin-list@monetdb.org To unsubscribe send an email to checkin-list-le...@monetdb.org
MonetDB: default - Add script to create charwidth table.
Changeset: e3930423f7df for MonetDB URL: https://dev.monetdb.org/hg/MonetDB/rev/e3930423f7df Added Files: misc/bash/uniwidthtab.sh Modified Files: common/utils/mutf8.c Branch: default Log Message: Add script to create charwidth table. diffs (73 lines): diff --git a/common/utils/mutf8.c b/common/utils/mutf8.c --- a/common/utils/mutf8.c +++ b/common/utils/mutf8.c @@ -19,6 +19,7 @@ struct interval { int width; }; +/* this table was created using the script uniwidthtab.sh */ static const struct interval intervals[] = { /* sorted list of non-overlapping ranges: * ranges with width==0 represent all codepoints with diff --git a/misc/bash/uniwidthtab.sh b/misc/bash/uniwidthtab.sh new file mode 100755 --- /dev/null +++ b/misc/bash/uniwidthtab.sh @@ -0,0 +1,57 @@ +#!/bin/bash + +# 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. + +{ +sed -n -e '/# Mn/d' \ + -e 's/^\([0-9A-F][0-9A-F]*\)\.\.\([0-9A-F][0-9A-F]*\) *; *[FW].*/0x\1 0x\2/p' \ + -e 's/^\([0-9A-F][0-9A-F]*\) *; [FW].*/0x\1 0x\1/p' \ + < /usr/share/unicode/ucd/EastAsianWidth.txt | { + while read line; do + line=($line) + f=$((${line[0]%})) + l=$((${line[1]%})) + if [[ -n $prevl ]]; then + if (($prevl+1 == $f)); then + prevl=$l + else + printf '\t{ 0x%05X, 0x%05X, 2 },\n' $prevf $prevl + prevf=$f + prevl=$l + fi + else + prevf=$f + prevl=$l + fi + done + printf '\t{ 0x%05X, 0x%05X, 2 },\n' $prevf $prevl +} + +sed -n '/^00AD/d;s/^\([0-9A-F][0-9A-F]*\);[^;]*;\(Me\|Mn\|Cf\);.*/0x\1/p' \ + < /usr/share/unicode/ucd/UnicodeData.txt | { + while read line; do + u=$(($line)) + if [[ -n $prevf ]]; then + if (($prevl+1 == $u)); then + prevl=$u + else + printf '\t{ 0x%05X, 0x%05X, 0 },\n' $prevf $prevl + prevf=$u + prevl=$u + fi + else + prevf=$u + prevl=$u + fi + done + printf '\t{ 0x%05X, 0x%05X, 0 },\n' $prevf $prevl +} +} | sort | sed 's/0x0\([0-9A-F][0-9A-F][0-9A-F][0-9A-F]\)/0x\1/g' ___ checkin-list mailing list -- checkin-list@monetdb.org To unsubscribe send an email to checkin-list-le...@monetdb.org
MonetDB: default - Fix comment.
Changeset: b909f8286f3a for MonetDB URL: https://dev.monetdb.org/hg/MonetDB/rev/b909f8286f3a Modified Files: clients/mapiclient/mclient.c Branch: default Log Message: Fix comment. diffs (12 lines): diff --git a/clients/mapiclient/mclient.c b/clients/mapiclient/mclient.c --- a/clients/mapiclient/mclient.c +++ b/clients/mapiclient/mclient.c @@ -174,7 +174,7 @@ static char *nullstring = default_nullst static timertype gettime(void) { - /* Return the time in milliseconds since an epoch. The epoch + /* Return the time in microseconds since an epoch. The epoch is roughly the time this program started. */ #ifdef _MSC_VER static LARGE_INTEGER freq, start; /* automatically initialized to 0 */ ___ checkin-list mailing list -- checkin-list@monetdb.org To unsubscribe send an email to checkin-list-le...@monetdb.org
MonetDB: default - Fixed list of wide character code points.
Changeset: 206629814e02 for MonetDB URL: https://dev.monetdb.org/hg/MonetDB/rev/206629814e02 Modified Files: common/utils/mutf8.c Branch: default Log Message: Fixed list of wide character code points. diffs (123 lines): diff --git a/common/utils/mutf8.c b/common/utils/mutf8.c --- a/common/utils/mutf8.c +++ b/common/utils/mutf8.c @@ -101,25 +101,24 @@ static const struct interval intervals[] { 0x27BF, 0x27BF, 2 }, { 0x2B1B, 0x2B1C, 2 }, { 0x2B50, 0x2B50, 2 }, { 0x2B55, 0x2B55, 2 }, { 0x2CEF, 0x2CF1, 0 }, { 0x2D7F, 0x2D7F, 0 }, { 0x2DE0, 0x2DFF, 0 }, { 0x2E80, 0x2E99, 2 }, { 0x2E9B, 0x2EF3, 2 }, - { 0x2F00, 0x2FD5, 2 }, { 0x2FF0, 0x303E, 2 }, { 0x302A, 0x302D, 0 }, - { 0x3041, 0x3096, 2 }, { 0x3099, 0x309A, 0 }, { 0x3099, 0x30FF, 2 }, - { 0x3105, 0x312F, 2 }, { 0x3131, 0x318E, 2 }, { 0x3190, 0x31E3, 2 }, - { 0x31EF, 0x321E, 2 }, { 0x3220, 0x3247, 2 }, { 0x3250, 0x3400, 2 }, - { 0x4DBF, 0x4DBF, 2 }, { 0x4E00, 0x4E00, 2 }, { 0x9FFF, 0xA48C, 2 }, - { 0xA490, 0xA4C6, 2 }, { 0xA66F, 0xA672, 0 }, { 0xA674, 0xA67D, 0 }, - { 0xA69E, 0xA69F, 0 }, { 0xA6F0, 0xA6F1, 0 }, { 0xA802, 0xA802, 0 }, - { 0xA806, 0xA806, 0 }, { 0xA80B, 0xA80B, 0 }, { 0xA825, 0xA826, 0 }, - { 0xA82C, 0xA82C, 0 }, { 0xA8C4, 0xA8C5, 0 }, { 0xA8E0, 0xA8F1, 0 }, - { 0xA8FF, 0xA8FF, 0 }, { 0xA926, 0xA92D, 0 }, { 0xA947, 0xA951, 0 }, - { 0xA960, 0xA97C, 2 }, { 0xA980, 0xA982, 0 }, { 0xA9B3, 0xA9B3, 0 }, - { 0xA9B6, 0xA9B9, 0 }, { 0xA9BC, 0xA9BD, 0 }, { 0xA9E5, 0xA9E5, 0 }, - { 0xAA29, 0xAA2E, 0 }, { 0xAA31, 0xAA32, 0 }, { 0xAA35, 0xAA36, 0 }, - { 0xAA43, 0xAA43, 0 }, { 0xAA4C, 0xAA4C, 0 }, { 0xAA7C, 0xAA7C, 0 }, - { 0xAAB0, 0xAAB0, 0 }, { 0xAAB2, 0xAAB4, 0 }, { 0xAAB7, 0xAAB8, 0 }, - { 0xAABE, 0xAABF, 0 }, { 0xAAC1, 0xAAC1, 0 }, { 0xAAEC, 0xAAED, 0 }, - { 0xAAF6, 0xAAF6, 0 }, { 0xABE5, 0xABE5, 0 }, { 0xABE8, 0xABE8, 0 }, - { 0xABED, 0xABED, 0 }, { 0xAC00, 0xAC00, 2 }, { 0xD7A3, 0xD7A3, 2 }, - { 0xF900, 0xFA6D, 2 }, { 0xFA70, 0xFAD9, 2 }, { 0xFB1E, 0xFB1E, 0 }, + { 0x2F00, 0x2FD5, 2 }, { 0x2FF0, 0x3029, 2 }, { 0x302A, 0x302D, 0 }, + { 0x302E, 0x303E, 2 }, { 0x3041, 0x3096, 2 }, { 0x3099, 0x309A, 0 }, + { 0x309B, 0x30FF, 2 }, { 0x3105, 0x312F, 2 }, { 0x3131, 0x318E, 2 }, + { 0x3190, 0x31E3, 2 }, { 0x31EF, 0x321E, 2 }, { 0x3220, 0x3247, 2 }, + { 0x3250, 0x4DBF, 2 }, { 0x4E00, 0xA48C, 2 }, { 0xA490, 0xA4C6, 2 }, + { 0xA66F, 0xA672, 0 }, { 0xA674, 0xA67D, 0 }, { 0xA69E, 0xA69F, 0 }, + { 0xA6F0, 0xA6F1, 0 }, { 0xA802, 0xA802, 0 }, { 0xA806, 0xA806, 0 }, + { 0xA80B, 0xA80B, 0 }, { 0xA825, 0xA826, 0 }, { 0xA82C, 0xA82C, 0 }, + { 0xA8C4, 0xA8C5, 0 }, { 0xA8E0, 0xA8F1, 0 }, { 0xA8FF, 0xA8FF, 0 }, + { 0xA926, 0xA92D, 0 }, { 0xA947, 0xA951, 0 }, { 0xA960, 0xA97C, 2 }, + { 0xA980, 0xA982, 0 }, { 0xA9B3, 0xA9B3, 0 }, { 0xA9B6, 0xA9B9, 0 }, + { 0xA9BC, 0xA9BD, 0 }, { 0xA9E5, 0xA9E5, 0 }, { 0xAA29, 0xAA2E, 0 }, + { 0xAA31, 0xAA32, 0 }, { 0xAA35, 0xAA36, 0 }, { 0xAA43, 0xAA43, 0 }, + { 0xAA4C, 0xAA4C, 0 }, { 0xAA7C, 0xAA7C, 0 }, { 0xAAB0, 0xAAB0, 0 }, + { 0xAAB2, 0xAAB4, 0 }, { 0xAAB7, 0xAAB8, 0 }, { 0xAABE, 0xAABF, 0 }, + { 0xAAC1, 0xAAC1, 0 }, { 0xAAEC, 0xAAED, 0 }, { 0xAAF6, 0xAAF6, 0 }, + { 0xABE5, 0xABE5, 0 }, { 0xABE8, 0xABE8, 0 }, { 0xABED, 0xABED, 0 }, + { 0xAC00, 0xD7A3, 2 }, { 0xF900, 0xFAFF, 2 }, { 0xFB1E, 0xFB1E, 0 }, { 0xFE00, 0xFE0F, 0 }, { 0xFE10, 0xFE19, 2 }, { 0xFE20, 0xFE2F, 0 }, { 0xFE30, 0xFE52, 2 }, { 0xFE54, 0xFE66, 2 }, { 0xFE68, 0xFE6B, 2 }, { 0xFEFF, 0xFEFF, 0 }, { 0xFF01, 0xFF60, 2 }, { 0xFFE0, 0xFFE6, 2 }, @@ -159,43 +158,38 @@ static const struct interval intervals[] { 0x11F00, 0x11F01, 0 }, { 0x11F36, 0x11F3A, 0 }, { 0x11F40, 0x11F40, 0 }, { 0x11F42, 0x11F42, 0 }, { 0x13430, 0x13440, 0 }, { 0x13447, 0x13455, 0 }, { 0x16AF0, 0x16AF4, 0 }, { 0x16B30, 0x16B36, 0 }, { 0x16F4F, 0x16F4F, 0 }, - { 0x16F8F, 0x16F92, 0 }, { 0x16FE0, 0x16FE4, 2 }, { 0x16FE4, 0x16FE4, 0 }, - { 0x16FF0, 0x16FF1, 2 }, { 0x17000, 0x17000, 2 }, { 0x187F7, 0x187F7, 2 }, - { 0x18800, 0x18CD5, 2 }, { 0x18D00, 0x18D00, 2 }, { 0x18D08, 0x18D08, 2 }, - { 0x1AFF0, 0x1AFF3, 2 }, { 0x1AFF5, 0x1AFFB, 2 }, { 0x1AFFD, 0x1AFFE, 2 }, - { 0x1B000, 0x1B122, 2 }, { 0x1B132, 0x1B132, 2 }, { 0x1B150, 0x1B152, 2 }, - { 0x1B155, 0x1B155, 2 }, { 0x1B164, 0x1B167, 2 }, { 0x1B170, 0x1B2FB, 2 }, - { 0x1BC9D, 0x1BC9E, 0 }, { 0x1BCA0, 0x1BCA3, 0 }, { 0x1CF00, 0x1CF2D, 0 }, - { 0x1CF30, 0x1CF46, 0 }, { 0x1D167, 0x1D169, 0 }, { 0x1D173, 0x1D182, 0 }, - { 0x1D185, 0x1D18B, 0 }, { 0x1D1AA, 0x1D1AD, 0 }, { 0x1D242, 0x1D244, 0 }, - { 0x1DA00, 0x1DA36, 0 }, { 0x1DA3B, 0x1DA6C, 0 }, { 0x1DA75, 0x1DA75, 0 }, - { 0x1DA84, 0x1DA84, 0 }, { 0x1DA9B, 0x1DA9F, 0 }, { 0x1DAA1, 0x1DAAF, 0 }, - { 0x1E000, 0x1E006, 0 }, {
MonetDB: Dec2023 - Remove some superfluous locking and an incorr...
Changeset: 1cfea0d64831 for MonetDB URL: https://dev.monetdb.org/hg/MonetDB/rev/1cfea0d64831 Modified Files: sql/storage/bat/bat_storage.c sql/storage/store.c Branch: Dec2023 Log Message: Remove some superfluous locking and an incorrect unlock. diffs (23 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 @@ -3485,7 +3485,6 @@ log_segments(sql_trans *tr, segments *se unlock_table(tr->store, id); if (seg->ts == tr->tid && seg->end-seg->start) { if (log_segment(tr, seg, id) != LOG_OK) { - unlock_table(tr->store, id); return LOG_ERR; } } diff --git a/sql/storage/store.c b/sql/storage/store.c --- a/sql/storage/store.c +++ b/sql/storage/store.c @@ -3798,8 +3798,6 @@ sql_trans_destroy(sql_trans *tr) sql_trans_rollback(tr, false); sqlstore *store = tr->store; os_destroy(tr->localtmps, store); - store_lock(store); - store_unlock(store); MT_lock_destroy(>lock); if (!list_empty(tr->dropped)) list_destroy(tr->dropped); ___ checkin-list mailing list -- checkin-list@monetdb.org To unsubscribe send an email to checkin-list-le...@monetdb.org
MonetDB: default - Check whether search string is NULL.
Changeset: d0bb7d4a703b for MonetDB URL: https://dev.monetdb.org/hg/MonetDB/rev/d0bb7d4a703b Modified Files: monetdb5/modules/atoms/str.c Branch: default Log Message: Check whether search string is NULL. Fixes #7523. diffs (118 lines): 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 @@ -1910,60 +1910,62 @@ STRselect(MalStkPtr stk, InstrPtr pci, throw(MAL, fname, SQLSTATE(HY013) MAL_MALLOC_FAIL); } - BATiter bi = bat_iterator(b); - QryCtx *qry_ctx = MT_thread_get_qry_ctx(); - if (icase) - str_cmp = str_icmp; - oid *vals = Tloc(bn, 0); - const int klen = str_strlen(key); - if (ci.tpe == cand_dense) { - if (with_strimps_anti) - scanloop(strNil(v) || str_cmp(v, key, klen) == 0, canditer_next_dense); - else if (anti) - scanloop(!strNil(v) && str_cmp(v, key, klen) != 0, canditer_next_dense); - else - scanloop(!strNil(v) && str_cmp(v, key, klen) == 0, canditer_next_dense); - } else { - if (with_strimps_anti) - scanloop(strNil(v) || str_cmp(v, key, klen) == 0, canditer_next); - else if (anti) - scanloop(!strNil(v) && str_cmp(v, key, klen) != 0, canditer_next); - else - scanloop(!strNil(v) && str_cmp(v, key, klen) == 0, canditer_next); - } - bat_iterator_end(); - TIMEOUT_CHECK(qry_ctx, HANDLE_TIMEOUT(qry_ctx)); - - if (!msg) { - BATsetcount(bn, rcnt); - bn->tsorted = true; - bn->trevsorted = bn->batCount <= 1; - bn->tkey = true; - bn->tnil = false; - bn->tnonil = true; - bn->tseqbase = rcnt == 0 ? - 0 : rcnt == 1 ? - *(const oid *) Tloc(bn, 0) : rcnt == ci.ncand && ci.tpe == cand_dense ? ci.hseq : oid_nil; - - if (with_strimps_anti) { - BAT *rev; - if (old_s) { - rev = BATdiffcand(old_s, bn); + if (!strNil(key)) { + BATiter bi = bat_iterator(b); + QryCtx *qry_ctx = MT_thread_get_qry_ctx(); + if (icase) + str_cmp = str_icmp; + oid *vals = Tloc(bn, 0); + const int klen = str_strlen(key); + if (ci.tpe == cand_dense) { + if (with_strimps_anti) + scanloop(strNil(v) || str_cmp(v, key, klen) == 0, canditer_next_dense); + else if (anti) + scanloop(!strNil(v) && str_cmp(v, key, klen) != 0, canditer_next_dense); + else + scanloop(!strNil(v) && str_cmp(v, key, klen) == 0, canditer_next_dense); + } else { + if (with_strimps_anti) + scanloop(strNil(v) || str_cmp(v, key, klen) == 0, canditer_next); + else if (anti) + scanloop(!strNil(v) && str_cmp(v, key, klen) != 0, canditer_next); + else + scanloop(!strNil(v) && str_cmp(v, key, klen) == 0, canditer_next); + } + bat_iterator_end(); + TIMEOUT_CHECK(qry_ctx, HANDLE_TIMEOUT(qry_ctx)); + + if (!msg) { + BATsetcount(bn, rcnt); + bn->tsorted = true; + bn->trevsorted = bn->batCount <= 1; + bn->tkey = true; + bn->tnil = false; + bn->tnonil = true; + bn->tseqbase = rcnt == 0 ? + 0 : rcnt == 1 ? + *(const oid *) Tloc(bn, 0) : rcnt == ci.ncand && ci.tpe == cand_dense ? ci.hseq : oid_nil; + + if (with_strimps_anti) { + BAT *rev; + if (old_s) { + rev = BATdiffcand(old_s, bn); #ifndef NDEBUG - BAT *is = BATintersectcand(old_s, bn); - if (is) { - assert(is->batCount == bn->batCount); - BBPreclaim(is); - } - assert(rev->batCount == old_s->batCount - bn->batCount); + BAT *is = BATintersectcand(old_s, bn); + if (is) { + assert(is->batCount == bn->batCount); +
MonetDB: default - Add a cast for CentOS 7.
Changeset: 48174832a557 for MonetDB URL: https://dev.monetdb.org/hg/MonetDB/rev/48174832a557 Modified Files: sql/server/rel_unnest.c Branch: default Log Message: Add a cast for CentOS 7. diffs (12 lines): diff --git a/sql/server/rel_unnest.c b/sql/server/rel_unnest.c --- a/sql/server/rel_unnest.c +++ b/sql/server/rel_unnest.c @@ -2239,7 +2239,7 @@ exp_reset_card_and_freevar_set_physical_ switch(e->type) { case e_aggr: case e_func: { - e->card = list_empty(e->l)?rel?rel->card:CARD_MULTI:exps_card(e->l); + e->card = list_empty(e->l)?rel?rel->card:(unsigned)CARD_MULTI:exps_card(e->l); } break; case e_column: { sql_exp *le = NULL, *re = NULL; ___ checkin-list mailing list -- checkin-list@monetdb.org To unsubscribe send an email to checkin-list-le...@monetdb.org
MonetDB: default - Updated asciify tables, added script to gener...
Changeset: 3daf82cbb905 for MonetDB URL: https://dev.monetdb.org/hg/MonetDB/rev/3daf82cbb905 Added Files: misc/python/uniiconvtab.py Modified Files: gdk/gdk_string.c misc/python/unicaseconvtabs.py Branch: default Log Message: Updated asciify tables, added script to generate them. diffs (truncated from 4437 to 300 lines): diff --git a/gdk/gdk_string.c b/gdk/gdk_string.c --- a/gdk/gdk_string.c +++ b/gdk/gdk_string.c @@ -7211,421 +7211,421 @@ static const char *const valtab[] = { [102] = "~", [103] = "''", [104] = "", - [105] = ";", - [106] = "AMD", - [107] = "M", - [108] = "ue", - [109] = "X", - [110] = "SS", - [111] = "LL", - [112] = "ll", - [113] = "--", - [114] = "\"", - [115] = ",,", - [116] = "+", - [117] = "..", - [118] = "...", - [119] = "``", - [120] = "```", - [121] = "<", - [122] = ">", - [123] = "!!", - [124] = "??", - [125] = "?!", - [126] = "!?", - [127] = "&", - [128] = "0", - [129] = "4", - [130] = "5", - [131] = "6", - [132] = "7", - [133] = "8", - [134] = "9", - [135] = "=", - [136] = "(", - [137] = ")", - [138] = "CE", - [139] = "C=", - [140] = "Cr", - [141] = "Fr.", - [142] = "L.", - [143] = "Pts", - [144] = "Rs", - [145] = "KRW", - [146] = "ILS", - [147] = "Dong", - [148] = "EUR", - [149] = "GRD", - [150] = "PHP", - [151] = "UAH", - [152] = "KZT", - [153] = "INR", - [154] = "TL", - [155] = "RUB", - [156] = "GEL", - [157] = "a/c", - [158] = "a/s", - [159] = "c/o", - [160] = "c/u", - [161] = "No", - [162] = "Q", - [163] = "Rx", - [164] = "SM", - [165] = "TEL", - [166] = "(TM)", - [167] = "FAX", - [168] = " 1/7 ", - [169] = " 1/9 ", - [170] = " 1/10 ", - [171] = " 1/3 ", - [172] = " 2/3 ", - [173] = " 1/5 ", - [174] = " 2/5 ", - [175] = " 3/5 ", - [176] = " 4/5 ", - [177] = " 1/6 ", - [178] = " 5/6 ", - [179] = " 1/8 ", - [180] = " 3/8 ", - [181] = " 5/8 ", - [182] = " 7/8 ", - [183] = " 1/ ", - [184] = "II", - [185] = "III", - [186] = "IV", - [187] = "VI", - [188] = "VII", - [189] = "VIII", - [190] = "IX", - [191] = "XI", - [192] = "XII", - [193] = "ii", - [194] = "iii", - [195] = "iv", - [196] = "vi", - [197] = "vii", - [198] = "viii", - [199] = "ix", - [200] = "xi", - [201] = "xii", - [202] = " 0/3 ", - [203] = "<-", - [204] = "->", - [205] = "<->", - [206] = "!<->", - [207] = "!<=", - [208] = "!<=>", - [209] = "!=>", - [210] = "<=", - [211] = "=>", - [212] = "<=>", - [213] = "\\", - [214] = "*", - [215] = "||", - [216] = "!~", - [217] = "!~-", - [218] = "!~=", - [219] = "!~~", - [220] = "!=", - [221] = "!==", - [222] = ">=", - [223] = "!<", - [224] = "!>", - [225] = "!>=", - [226] = "!<~", - [227] = "!>~", - [228] = "!<>", - [229] = "!><", - [230] = "<<<", - [231] = ">>>", - [232] = "NUL", - [233] = "SOH", - [234] = "STX", - [235] = "ETX", - [236] = "EOT", - [237] = "ENQ", - [238] = "ACK", - [239] = "BEL", - [240] = "BS", - [241] = "HT", - [242] = "LF", - [243] = "VT", - [244] = "FF", - [245] = "CR", - [246] = "SO", - [247] = "SI", - [248] = "DLE", - [249] = "DC1", - [250] = "DC2", - [251] = "DC3", - [252] = "DC4", - [253] = "NAK", - [254] = "SYN", - [255] = "ETB", - [256] = "CAN", - [257] = "EM", - [258] = "SUB", - [259] = "ESC", - [260] = "FS", - [261] = "GS", - [262] = "RS", - [263] = "US", - [264] = "SP", - [265] = "DEL", - [266] = "NL", - [267] = "(1)", - [268] = "(2)", - [269] = "(3)", - [270] = "(4)", - [271] = "(5)", - [272] = "(6)", - [273] = "(7)", - [274] = "(8)", - [275] = "(9)", - [276] = "(10)", - [277] = "(11)", - [278] = "(12)", - [279] = "(13)", - [280] = "(14)", - [281] = "(15)", - [282] = "(16)", - [283] = "(17)", - [284] = "(18)", - [285] = "(19)", - [286] = "(20)", - [287] = "1.", - [288] = "2.", - [289] = "3.", - [290] = "4.", - [291] = "5.", - [292] = "6.", - [293] = "7.", - [294] = "8.", - [295] = "9.", - [296] = "10.", - [297] = "11.", - [298] = "12.", - [299] =
MonetDB: default - Add script to create case conversion tables.
Changeset: 52d49237cf83 for MonetDB URL: https://dev.monetdb.org/hg/MonetDB/rev/52d49237cf83 Added Files: misc/python/unicaseconvtabs.py Modified Files: gdk/gdk_string.c Branch: default Log Message: Add script to create case conversion tables. Also, add indexes to specialcase table for easy reference. diffs (truncated from 527 to 300 lines): diff --git a/gdk/gdk_string.c b/gdk/gdk_string.c --- a/gdk/gdk_string.c +++ b/gdk/gdk_string.c @@ -1477,153 +1477,155 @@ GDKanalytical_str_group_concat(BAT *r, B * Only for the casefold table, if the converted codepoint is negative, * it is actually an escape into the specialcase table. The absolute * value is the index. */ + +/* These tables were created using the code in unicaseconvtabs.py */ static const char *const specialcase[] = { NULL, - "ss", - "i\xCC\x87", - "\xCA\xBCn", - "j\xCC\x8C", - "\xCE\xB9\xCC\x88\xCC\x81", - "\xCF\x85\xCC\x88\xCC\x81", - "\xD5\xA5\xD6\x82", - "h\xCC\xB1", - "t\xCC\x88", - "w\xCC\x8A", - "y\xCC\x8A", - "a\xCA\xBE", - "\xCF\x85\xCC\x93", - "\xCF\x85\xCC\x93\xCC\x80", - "\xCF\x85\xCC\x93\xCC\x81", - "\xCF\x85\xCC\x93\xCD\x82", - "\xE1\xBC\x80\xCE\xB9", - "\xE1\xBC\x81\xCE\xB9", - "\xE1\xBC\x82\xCE\xB9", - "\xE1\xBC\x83\xCE\xB9", - "\xE1\xBC\x84\xCE\xB9", - "\xE1\xBC\x85\xCE\xB9", - "\xE1\xBC\x86\xCE\xB9", - "\xE1\xBC\x87\xCE\xB9", - "\xE1\xBC\xA0\xCE\xB9", - "\xE1\xBC\xA1\xCE\xB9", - "\xE1\xBC\xA2\xCE\xB9", - "\xE1\xBC\xA3\xCE\xB9", - "\xE1\xBC\xA4\xCE\xB9", - "\xE1\xBC\xA5\xCE\xB9", - "\xE1\xBC\xA6\xCE\xB9", - "\xE1\xBC\xA7\xCE\xB9", - "\xE1\xBD\xA0\xCE\xB9", - "\xE1\xBD\xA1\xCE\xB9", - "\xE1\xBD\xA2\xCE\xB9", - "\xE1\xBD\xA3\xCE\xB9", - "\xE1\xBD\xA4\xCE\xB9", - "\xE1\xBD\xA5\xCE\xB9", - "\xE1\xBD\xA6\xCE\xB9", - "\xE1\xBD\xA7\xCE\xB9", - "\xE1\xBD\xB0\xCE\xB9", - "\xCE\xB1\xCE\xB9", - "\xCE\xAC\xCE\xB9", - "\xCE\xB1\xCD\x82", - "\xCE\xB1\xCD\x82\xCE\xB9", - "\xE1\xBD\xB4\xCE\xB9", - "\xCE\xB7\xCE\xB9", - "\xCE\xAE\xCE\xB9", - "\xCE\xB7\xCD\x82", - "\xCE\xB7\xCD\x82\xCE\xB9", - "\xCE\xB9\xCC\x88\xCC\x80", - "\xCE\xB9\xCD\x82", - "\xCE\xB9\xCC\x88\xCD\x82", - "\xCF\x85\xCC\x88\xCC\x80", - "\xCF\x81\xCC\x93", - "\xCF\x85\xCD\x82", - "\xCF\x85\xCC\x88\xCD\x82", - "\xE1\xBD\xBC\xCE\xB9", - "\xCF\x89\xCE\xB9", - "\xCF\x8E\xCE\xB9", - "\xCF\x89\xCD\x82", - "\xCF\x89\xCD\x82\xCE\xB9", - "ff", - "fi", - "fl", - "ffi", - "ffl", - "st", - "\xD5\xB4\xD5\xB6", - "\xD5\xB4\xD5\xA5", - "\xD5\xB4\xD5\xAB", - "\xD5\xBE\xD5\xB6", - "\xD5\xB4\xD5\xAD", - "SS", - "FF", - "FI", - "FL", - "FFI", - "FFL", - "ST", - "\xD4\xB5\xD5\x92", - "\xD5\x84\xD5\x86", - "\xD5\x84\xD4\xB5", - "\xD5\x84\xD4\xBB", - "\xD5\x8E\xD5\x86", - "\xD5\x84\xD4\xBD", - "\xCA\xBCN", - "\xCE\x99\xCC\x88\xCC\x81", - "\xCE\xA5\xCC\x88\xCC\x81", - "J\xCC\x8C", - "H\xCC\xB1", - "T\xCC\x88", - "W\xCC\x8A", - "Y\xCC\x8A", - "A\xCA\xBE", - "\xCE\xA5\xCC\x93", - "\xCE\xA5\xCC\x93\xCC\x80", - "\xCE\xA5\xCC\x93\xCC\x81", - "\xCE\xA5\xCC\x93\xCD\x82", - "\xCE\x91\xCD\x82", - "\xCE\x97\xCD\x82", - "\xCE\x99\xCC\x88\xCC\x80", - "\xCE\x99\xCD\x82", - "\xCE\x99\xCC\x88\xCD\x82", - "\xCE\xA5\xCC\x88\xCC\x80", - "\xCE\xA1\xCC\x93", - "\xCE\xA5\xCD\x82", - "\xCE\xA5\xCC\x88\xCD\x82", - "\xCE\xA9\xCD\x82", - "\xE1\xBC\x88\xCE\x99", - "\xE1\xBC\x89\xCE\x99", - "\xE1\xBC\x8A\xCE\x99", - "\xE1\xBC\x8B\xCE\x99", - "\xE1\xBC\x8C\xCE\x99", - "\xE1\xBC\x8D\xCE\x99", - "\xE1\xBC\x8E\xCE\x99", - "\xE1\xBC\x8F\xCE\x99", - "\xE1\xBC\xA8\xCE\x99", - "\xE1\xBC\xA9\xCE\x99", - "\xE1\xBC\xAA\xCE\x99", - "\xE1\xBC\xAB\xCE\x99", - "\xE1\xBC\xAC\xCE\x99", - "\xE1\xBC\xAD\xCE\x99", - "\xE1\xBC\xAE\xCE\x99", - "\xE1\xBC\xAF\xCE\x99", - "\xE1\xBD\xA8\xCE\x99", - "\xE1\xBD\xA9\xCE\x99", - "\xE1\xBD\xAA\xCE\x99", - "\xE1\xBD\xAB\xCE\x99", - "\xE1\xBD\xAC\xCE\x99", - "\xE1\xBD\xAD\xCE\x99", - "\xE1\xBD\xAE\xCE\x99", - "\xE1\xBD\xAF\xCE\x99", - "\xCE\x91\xCE\x99", - "\xCE\x97\xCE\x99", - "\xCE\xA9\xCE\x99", - "\xE1\xBE\xBA\xCE\x99", - "\xCE\x86\xCE\x99", - "\xE1\xBF\x8A\xCE\x99", - "\xCE\x89\xCE\x99", - "\xE1\xBF\xBA\xCE\x99", - "\xCE\x8F\xCE\x99", - "\xCE\x91\xCD\x82\xCE\x99", - "\xCE\x97\xCD\x82\xCE\x99", - "\xCE\xA9\xCD\x82\xCE\x99",
MonetDB: default - Merge with Dec2023 branch.
Changeset: 2495e1dbce95 for MonetDB URL: https://dev.monetdb.org/hg/MonetDB/rev/2495e1dbce95 Modified Files: gdk/gdk_logger.c tools/mserver/mserver5.c Branch: default Log Message: Merge with Dec2023 branch. diffs (92 lines): diff --git a/gdk/gdk_logger.c b/gdk/gdk_logger.c --- a/gdk/gdk_logger.c +++ b/gdk/gdk_logger.c @@ -1038,6 +1038,7 @@ log_read_types_file(logger *lg, FILE *fp { int id = 0; char atom_name[IDLENGTH]; + bool seen_geom = false; /* scanf should use IDLENGTH somehow */ while (fscanf(fp, "%d,%63s\n", , atom_name) == 2) { @@ -1049,9 +1050,17 @@ log_read_types_file(logger *lg, FILE *fp GDKerror("unknown type in log file '%s'\n", atom_name); return GDK_FAIL; } + seen_geom |= strcmp(atom_name, "mbr") == 0 || strcmp(atom_name, "wkb") == 0; lg->type_id[i] = (int8_t) id; lg->type_nr[id < 0 ? 256 + id : id] = i; } +#ifdef HAVE_GEOM + if (!seen_geom && ATOMindex("mbr") > 0) { + GDKerror("incompatible database: server supports GEOM, but database does not\n"); + return GDK_FAIL; + } +#endif + (void) seen_geom; return GDK_SUCCEED; } @@ -1802,7 +1811,8 @@ bm_subcommit(logger *lg, logged_range *p cleanup++; if (lids[p] == -1) continue; - if (BUNappend(dcatalog, &(oid){p}, true) != GDK_SUCCEED) { + if (BUNfnd(dcatalog, &(oid){p}) == BUN_NONE && + BUNappend(dcatalog, &(oid){p}, true) != GDK_SUCCEED) { while (BATcount(dcatalog) > dcnt) { if (BUNdelete(dcatalog, BATcount(dcatalog) - 1) != GDK_SUCCEED) { TRC_CRITICAL(WAL, "delete after failed append failed\n"); 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 @@ -121,6 +121,18 @@ Load extra module in the form of a dynam file) which should be located in the lib/monetdb5 directory. This option can be repeated for different modules. .TP +.B \-\-without\-geom +Start the server without +.I geom +support, even if it is available. +Normally the server will refuse to start if +.I geom +is loaded, but the +database was created by a server without +.I geom +support. +With this option it is possible to start the server anyway. +.TP .B \-\-help Print list of options. .TP diff --git a/tools/mserver/mserver5.c b/tools/mserver/mserver5.c --- a/tools/mserver/mserver5.c +++ b/tools/mserver/mserver5.c @@ -342,6 +342,7 @@ main(int argc, char **av) {"read-password-initialize-and-exit", no_argument, NULL, 0}, {"loadmodule", required_argument, NULL, 0}, + {"without-geom", no_argument, NULL, 0}, {NULL, 0, NULL, 0} }; @@ -526,6 +527,19 @@ main(int argc, char **av) "ERROR: maximum number of modules reached\n"); break; } + if (strcmp(long_options[option_index].name, "without-geom") == 0) { + for (int i = 0; i < mods; i++) { + if (strcmp(modules[i], "geom") == 0) { + while (i + 1 < mods) { + modules[i] = modules[i + 1]; + i++; + } + mods--; + break; + } + } + break; + } usage(prog, -1); /* not reached */ case 'c': ___ checkin-list mailing list -- checkin-list@monetdb.org To unsubscribe send an email to checkin-list-le...@monetdb.org
MonetDB: Dec2023 - Refuse to start if geom incompatibility found...
Changeset: dc84e23b5b1b for MonetDB URL: https://dev.monetdb.org/hg/MonetDB/rev/dc84e23b5b1b Modified Files: gdk/gdk_logger.c tools/mserver/mserver5.1.in tools/mserver/mserver5.c Branch: Dec2023 Log Message: Refuse to start if geom incompatibility found + option to start anyway. If server has geom, but database was created without, refuse to start up. But add option --without-geom to start up without geom support. The other way round, database was created with geom, but server does not support it already gave an error. This fixes #7518. diffs (82 lines): diff --git a/gdk/gdk_logger.c b/gdk/gdk_logger.c --- a/gdk/gdk_logger.c +++ b/gdk/gdk_logger.c @@ -1038,6 +1038,7 @@ log_read_types_file(logger *lg, FILE *fp { int id = 0; char atom_name[IDLENGTH]; + bool seen_geom = false; /* scanf should use IDLENGTH somehow */ while (fscanf(fp, "%d,%63s\n", , atom_name) == 2) { @@ -1047,9 +1048,17 @@ log_read_types_file(logger *lg, FILE *fp GDKerror("unknown type in log file '%s'\n", atom_name); return GDK_FAIL; } + seen_geom |= strcmp(atom_name, "mbr") == 0 || strcmp(atom_name, "wkb") == 0; lg->type_id[i] = (int8_t) id; lg->type_nr[id < 0 ? 256 + id : id] = i; } +#ifdef HAVE_GEOM + if (!seen_geom && ATOMindex("mbr") > 0) { + GDKerror("incompatible database: server supports GEOM, but database does not\n"); + return GDK_FAIL; + } +#endif + (void) seen_geom; return GDK_SUCCEED; } 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 @@ -121,6 +121,18 @@ Load extra module in the form of a dynam file) which should be located in the lib/monetdb5 directory. This option can be repeated for different modules. .TP +.B \-\-without\-geom +Start the server without +.I geom +support, even if it is available. +Normally the server will refuse to start if +.I geom +is loaded, but the +database was created by a server without +.I geom +support. +With this option it is possible to start the server anyway. +.TP .B \-\-help Print list of options. .TP diff --git a/tools/mserver/mserver5.c b/tools/mserver/mserver5.c --- a/tools/mserver/mserver5.c +++ b/tools/mserver/mserver5.c @@ -342,6 +342,7 @@ main(int argc, char **av) {"read-password-initialize-and-exit", no_argument, NULL, 0}, {"loadmodule", required_argument, NULL, 0}, + {"without-geom", no_argument, NULL, 0}, {NULL, 0, NULL, 0} }; @@ -526,6 +527,19 @@ main(int argc, char **av) "ERROR: maximum number of modules reached\n"); break; } + if (strcmp(long_options[option_index].name, "without-geom") == 0) { + for (int i = 0; i < mods; i++) { + if (strcmp(modules[i], "geom") == 0) { + while (i + 1 < mods) { + modules[i] = modules[i + 1]; + i++; + } + mods--; + break; + } + } + break; + } usage(prog, -1); /* not reached */ case 'c': ___ checkin-list mailing list -- checkin-list@monetdb.org To unsubscribe send an email to checkin-list-le...@monetdb.org
MonetDB: default - Rename re_* functions to avoid conflicts with...
Changeset: e69d10afeee7 for MonetDB URL: https://dev.monetdb.org/hg/MonetDB/rev/e69d10afeee7 Modified Files: monetdb5/modules/mal/pcre.c Branch: default Log Message: Rename re_* functions to avoid conflicts with regex.h. diffs (truncated from 309 to 300 lines): diff --git a/monetdb5/modules/mal/pcre.c b/monetdb5/modules/mal/pcre.c --- a/monetdb5/modules/mal/pcre.c +++ b/monetdb5/modules/mal/pcre.c @@ -63,7 +63,7 @@ struct RE { * byte and don't deal with multibyte encodings (such as UTF-8). */ static inline bool -re_is_pattern_properly_escaped(const char *pat, unsigned char esc) +mnre_is_pattern_properly_escaped(const char *pat, unsigned char esc) { bool escaped = false; @@ -94,7 +94,7 @@ is_strcmpable(const char *pat, const cha /* Match regular expression by comparing bytes. */ static inline bool -re_match(const char *restrict s, const struct RE *restrict pattern) +mnre_match(const char *restrict s, const struct RE *restrict pattern) { const struct RE *r; @@ -142,14 +142,14 @@ re_match(const char *restrict s, const s * we need to backtrack, so use recursion; here we know we * have the %, look for an _ in the rest of the pattern * (note %_ and _% are equivalent and is taken care of by -* the pattern construction in re_create) */ +* the pattern construction in mnre_create) */ for (const struct RE *p = r->n; p; p = p->n) { if (p->skip != 0) { struct RE pat = *r; pat.search = false; pat.skip = 0; do { - if (re_match(s, )) + if (mnre_match(s, )) return true; do s++; @@ -213,7 +213,7 @@ re_match(const char *restrict s, const s } static void -re_destroy(struct RE *p) +mnre_destroy(struct RE *p) { if (p) { GDKfree(p->k); @@ -235,7 +235,7 @@ re_destroy(struct RE *p) * the first. */ static struct RE * -re_create(const char *pat, bool caseignore, uint32_t esc) +mnre_create(const char *pat, bool caseignore, uint32_t esc) { struct RE *r = GDKmalloc(sizeof(struct RE)), *n = r; bool escaped = false; @@ -312,7 +312,7 @@ re_create(const char *pat, bool caseigno *q = 0; return r; bailout: - re_destroy(r); + mnre_destroy(r); return NULL; } @@ -1131,7 +1131,7 @@ choose_like_path(bool *use_re, bool *use if (strNil(pat) || strNil(esc)) { *empty = true; } else { - if (!re_is_pattern_properly_escaped(pat, (unsigned char) *esc)) + if (!mnre_is_pattern_properly_escaped(pat, (unsigned char) *esc)) throw(MAL, "pcre.sql2pcre", SQLSTATE(22019) ILLEGAL_ARGUMENT ": (I)LIKE pattern must not end with escape character"); @@ -1169,16 +1169,16 @@ PCRElike_imp(bit *ret, const char *const *ret = *isens ? GDKstrcasecmp(*s, *pat) == 0 : strcmp(*s, *pat) == 0; } else { - if (!(re = re_create(*pat, *isens, (unsigned char) **esc))) + if (!(re = mnre_create(*pat, *isens, (unsigned char) **esc))) res = createException(MAL, "pcre.like4", SQLSTATE(HY013) MAL_MALLOC_FAIL); else - *ret = re_match(*s, re); + *ret = mnre_match(*s, re); } } if (re) - re_destroy(re); + mnre_destroy(re); return res; } @@ -1202,11 +1202,11 @@ PCREnotlike(bit *ret, const char *const } static inline str -re_like_build(struct RE **re, const char *pat, bool caseignore, +mnre_like_build(struct RE **re, const char *pat, bool caseignore, bool use_strcmp, uint32_t esc) { if (!use_strcmp) { - if (!(*re = re_create(pat, caseignore, esc))) + if (!(*re = mnre_create(pat, caseignore, esc))) return createException(MAL, "pcre.re_like_build", SQLSTATE(HY013) MAL_MALLOC_FAIL); } @@ -1214,7 +1214,7 @@ re_like_build(struct RE **re, const char } static inline bit -re_like_proj_apply(const char *s, const struct RE *restrict re, +mnre_like_proj_apply(const char *s, const struct RE
MonetDB: Dec2023 - Don't duplicate entries in sql_dcatalog.
Changeset: 912c89178a17 for MonetDB URL: https://dev.monetdb.org/hg/MonetDB/rev/912c89178a17 Modified Files: gdk/gdk_logger.c Branch: Dec2023 Log Message: Don't duplicate entries in sql_dcatalog. diffs (13 lines): diff --git a/gdk/gdk_logger.c b/gdk/gdk_logger.c --- a/gdk/gdk_logger.c +++ b/gdk/gdk_logger.c @@ -1803,7 +1803,8 @@ bm_subcommit(logger *lg, logged_range *p cleanup++; if (lids[p] == -1) continue; - if (BUNappend(dcatalog, &(oid){p}, true) != GDK_SUCCEED) { + if (BUNfnd(dcatalog, &(oid){p}) == BUN_NONE && + BUNappend(dcatalog, &(oid){p}, true) != GDK_SUCCEED) { while (BATcount(dcatalog) > dcnt) { if (BUNdelete(dcatalog, BATcount(dcatalog) - 1) != GDK_SUCCEED) { TRC_CRITICAL(WAL, "delete after failed append failed\n"); ___ checkin-list mailing list -- checkin-list@monetdb.org To unsubscribe send an email to checkin-list-le...@monetdb.org
MonetDB: default - Merge with Dec2023 branch.
Changeset: 8a06076b4de2 for MonetDB URL: https://dev.monetdb.org/hg/MonetDB/rev/8a06076b4de2 Modified Files: gdk/gdk_logger.c monetdb5/modules/mal/mal_mapi.c sql/backends/monet5/sql.c sql/server/rel_optimize_proj.c sql/server/rel_select.c sql/storage/bat/bat_storage.c sql/storage/store.c Branch: default Log Message: Merge with Dec2023 branch. diffs (165 lines): diff --git a/gdk/gdk_logger.c b/gdk/gdk_logger.c --- a/gdk/gdk_logger.c +++ b/gdk/gdk_logger.c @@ -3458,6 +3458,12 @@ log_tstart(logger *lg, bool flushnow, ul { rotation_lock(lg); if (flushnow) { + if (file_id == NULL) { + /* special case: ask store_manager to rotate log file */ + lg->file_age = 0; + rotation_unlock(lg); + return GDK_SUCCEED; + } /* I am now the exclusive flusher */ if (ATOMIC_GET(>nr_flushers)) { /* I am waiting until all existing flushers are done */ @@ -3512,7 +3518,6 @@ log_printinfo(logger *lg) rotation_lock(lg); printf("current log file "ULLFMT", last handled log file "ULLFMT"\n", lg->id, lg->saved_id); - rotation_unlock(lg); printf("current transaction id %d, saved transaction id %d\n", lg->tid, lg->saved_tid); printf("number of flushers: %d\n", (int) ATOMIC_GET(>nr_flushers)); @@ -3525,4 +3530,5 @@ log_printinfo(logger *lg) 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(>drops), (uint64_t) ATOMIC_GET(>last_ts), (uint64_t) ATOMIC_GET(>flushed_ts), (uint64_t) ATOMIC_GET(>refcount), buf, p == lg->current ? " (current)" : ""); } + rotation_unlock(lg); } diff --git a/monetdb5/modules/atoms/xml.c b/monetdb5/modules/atoms/xml.c --- a/monetdb5/modules/atoms/xml.c +++ b/monetdb5/modules/atoms/xml.c @@ -735,9 +735,9 @@ XMLxml2str(str *s, const xml *x) } str -XMLstr2xml(xml *x, const char **s) +XMLstr2xml(xml *x, const char *const*val) { - (void) s; + (void) val; (void) x; return createException(MAL, "xml.xml2str", SQLSTATE(HY005) NO_LIBXML_FATAL); } diff --git a/monetdb5/modules/mal/mal_mapi.c b/monetdb5/modules/mal/mal_mapi.c --- a/monetdb5/modules/mal/mal_mapi.c +++ b/monetdb5/modules/mal/mal_mapi.c @@ -527,7 +527,7 @@ start_listen(SOCKET *sockp, int *portp, hints.ai_family = AF_INET6; ipv6_vs6only = 0; } - char sport[8]; /* max "65535" */ + char sport[16]; /* max "65535", but compiler doesn't know */ snprintf(sport, sizeof(sport), "%d", *portp); for (;;) { /* max twice */ int check = getaddrinfo(listenaddr, sport, , ); diff --git a/sql/ChangeLog.Dec2023 b/sql/ChangeLog.Dec2023 --- a/sql/ChangeLog.Dec2023 +++ b/sql/ChangeLog.Dec2023 @@ -1,3 +1,12 @@ # ChangeLog file for sql # This file is updated with Maddlog +* Wed May 15 2024 Sjoerd Mullender +- When sys.persist_unlogged is called for a table, it may return that + zero rows were persisted. If this is because the call was done too + early, i.e. the table was recently created and the write-ahead log + where this was logged has not been processed yet, the call will + request an immediate write-ahead log rotation. This means that the + WAL will be processed as soon as possible and a new call to + sys.persist_unlogged soon after will likely return a positive result. + 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 @@ -4471,6 +4471,16 @@ SQLpersist_unlogged(Client cntxt, MalBlk GDKfree(sizes); } count = d_bi.count; + } else { + /* special case of log_tstart: third arg == NULL with second arg +* true is request to rotate log file ASAP */ + store->logger_api.log_tstart(store, true, NULL); + /* special case for sql->debug: if 1024 bit is set, +* store_manager doesn't wait for 30 seconds of idle time before +* attempting to rotate */ + MT_lock_set(>flush); + store->debug |= 1024; + MT_lock_unset(>flush); } bat_iterator_end(_bi); diff --git a/sql/server/rel_optimize_proj.c b/sql/server/rel_optimize_proj.c --- a/sql/server/rel_optimize_proj.c +++ b/sql/server/rel_optimize_proj.c @@ -907,7 +907,7 @@ rel_split_project_(visitor *v, sql_rel * } if (is_set(rel->op) || is_basetable(rel->op)) return rel; - if (rel->l) { + if (rel->l && (rel->op != op_table || rel->flag !=
MonetDB: Dec2023 - UNLOGGED tables do have to be logged when the...
Changeset: 1cc64810035e for MonetDB URL: https://dev.monetdb.org/hg/MonetDB/rev/1cc64810035e Modified Files: sql/storage/bat/bat_storage.c Branch: Dec2023 Log Message: UNLOGGED tables do have to be logged when they are dropped. Fixes #7517. diffs (30 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 @@ -3734,7 +3734,7 @@ drop_del(sql_trans *tr, sql_table *t) if (!isNew(t)) { storage *bat = ATOMIC_PTR_GET(>data); - trans_add_obj(tr, >base, bat, _gc_del, _destroy_del, NOT_TO_BE_LOGGED(t) ? NULL : _destroy_del); + trans_add_obj(tr, >base, bat, _gc_del, _destroy_del, isTempTable(t) ? NULL : _destroy_del); } return ok; } @@ -3744,7 +3744,7 @@ drop_col(sql_trans *tr, sql_column *c) { assert(!isNew(c)); sql_delta *d = ATOMIC_PTR_GET(>data); - trans_add(tr, >base, d, _gc_col, _destroy_del, NOT_TO_BE_LOGGED(c->t) ? NULL : _destroy_col); + trans_add(tr, >base, d, _gc_col, _destroy_del, isTempTable(c->t) ? NULL : _destroy_col); return LOG_OK; } @@ -3753,7 +3753,7 @@ drop_idx(sql_trans *tr, sql_idx *i) { assert(!isNew(i)); sql_delta *d = ATOMIC_PTR_GET(>data); - trans_add(tr, >base, d, _gc_idx, _destroy_del, NOT_TO_BE_LOGGED(i->t) ? NULL : _destroy_idx); + trans_add(tr, >base, d, _gc_idx, _destroy_del, isTempTable(i->t) ? NULL : _destroy_idx); return LOG_OK; } ___ checkin-list mailing list -- checkin-list@monetdb.org To unsubscribe send an email to checkin-list-le...@monetdb.org
MonetDB: Dec2023 - Compiler doesn't know we're only formatting a...
Changeset: 387817f692f7 for MonetDB URL: https://dev.monetdb.org/hg/MonetDB/rev/387817f692f7 Modified Files: monetdb5/modules/mal/mal_mapi.c Branch: Dec2023 Log Message: Compiler doesn't know we're only formatting an unsigned short value. diffs (12 lines): diff --git a/monetdb5/modules/mal/mal_mapi.c b/monetdb5/modules/mal/mal_mapi.c --- a/monetdb5/modules/mal/mal_mapi.c +++ b/monetdb5/modules/mal/mal_mapi.c @@ -525,7 +525,7 @@ start_listen(SOCKET *sockp, int *portp, hints.ai_family = AF_INET6; ipv6_vs6only = 0; } - char sport[8]; /* max "65535" */ + char sport[16]; /* max "65535", but compiler doesn't know */ snprintf(sport, sizeof(sport), "%d", *portp); for (;;) { /* max twice */ int check = getaddrinfo(listenaddr, sport, , ); ___ checkin-list mailing list -- checkin-list@monetdb.org To unsubscribe send an email to checkin-list-le...@monetdb.org
MonetDB: default - Approve tests.
Changeset: d5c6125facb1 for MonetDB URL: https://dev.monetdb.org/hg/MonetDB/rev/d5c6125facb1 Modified Files: sql/backends/monet5/generator/Tests/generator03.test Branch: default Log Message: Approve tests. diffs (27 lines): diff --git a/sql/backends/monet5/generator/Tests/generator03.test b/sql/backends/monet5/generator/Tests/generator03.test --- a/sql/backends/monet5/generator/Tests/generator03.test +++ b/sql/backends/monet5/generator/Tests/generator03.test @@ -22,6 +22,7 @@ 2008-03-02 16:00:00 2008-03-03 02:00:00 2008-03-03 12:00:00 2008-03-03 22:00:00 +2008-03-04 08:00:00 query T rowsort select * from generate_series( @@ -32,6 +33,7 @@ select * from generate_series( 2008-03-01 00:00:00 2008-03-02 00:00:00 2008-03-03 00:00:00 +2008-03-04 00:00:00 query T rowsort select * from generate_series( @@ -39,6 +41,7 @@ select * from generate_series( timestamp '2008-03-01 00:00', cast( '-1' as interval day)) +2008-03-01 12:00:00 2008-03-02 12:00:00 2008-03-03 12:00:00 2008-03-04 12:00:00 ___ checkin-list mailing list -- checkin-list@monetdb.org To unsubscribe send an email to checkin-list-le...@monetdb.org
MonetDB: default - Don't make output BAT too large.
Changeset: c6b24bb1671a for MonetDB URL: https://dev.monetdb.org/hg/MonetDB/rev/c6b24bb1671a Modified Files: sql/backends/monet5/generator/generator.c Branch: default Log Message: Don't make output BAT too large. diffs (39 lines): diff --git a/sql/backends/monet5/generator/generator.c b/sql/backends/monet5/generator/generator.c --- a/sql/backends/monet5/generator/generator.c +++ b/sql/backends/monet5/generator/generator.c @@ -248,7 +248,8 @@ VLTgenerator_table_(BAT **result, Client if (bn == NULL) throw(MAL, "generator.table", SQLSTATE(HY013) MAL_MALLOC_FAIL); v = (date *) Tloc(bn, 0); - for (BUN c = 0; c < n && f < l; c++) { + BUN c; + for (c = 0; c < n && f < l; c++) { *v++ = f; f = date_add_month(f, s); if (is_date_nil(f)) { @@ -256,6 +257,7 @@ VLTgenerator_table_(BAT **result, Client throw(MAL, "generator.table", SQLSTATE(22003) "overflow in calculation"); } } + n = c; bn->tsorted = s > 0 || n <= 1; bn->trevsorted = s < 0 || n <= 1; } else if (tpe == TYPE_date) { /* days */ @@ -282,7 +284,8 @@ VLTgenerator_table_(BAT **result, Client if (bn == NULL) throw(MAL, "generator.table", SQLSTATE(HY013) MAL_MALLOC_FAIL); v = (date *) Tloc(bn, 0); - for (BUN c = 0; c < n && f < l; c++) { + BUN c; + for (c = 0; c < n && f < l; c++) { *v++ = f; f = date_add_day(f, (int) s); if (is_date_nil(f)) { @@ -290,6 +293,7 @@ VLTgenerator_table_(BAT **result, Client throw(MAL, "generator.table", SQLSTATE(22003) "overflow in calculation"); } } + n = c; bn->tsorted = s > 0 || n <= 1; bn->trevsorted = s < 0 || n <= 1; } else if (tpe == TYPE_timestamp) { ___ checkin-list mailing list -- checkin-list@monetdb.org To unsubscribe send an email to checkin-list-le...@monetdb.org
MonetDB: default - Don't shadow variable.
Changeset: b175905caa97 for MonetDB URL: https://dev.monetdb.org/hg/MonetDB/rev/b175905caa97 Modified Files: sql/backends/monet5/generator/generator.c Branch: default Log Message: Don't shadow variable. diffs (12 lines): diff --git a/sql/backends/monet5/generator/generator.c b/sql/backends/monet5/generator/generator.c --- a/sql/backends/monet5/generator/generator.c +++ b/sql/backends/monet5/generator/generator.c @@ -176,7 +176,7 @@ VLTgenerator_noop(Client cntxt, MalBlkPt if (s == 0 || (s > 0 && f > l) || (s < 0 && f < l) || is_##TPE##_nil(f) || is_##TPE##_nil(l)) \ throw(MAL, "generator.table", \ SQLSTATE(42000) "Illegal generator range"); \ - BUN n = (BUN) ((l - f) / s); \ + n = (BUN) ((l - f) / s); \ if ((TPE) (n * s + f) != l) \ n++; \ bn = COLnew(0, TYPE_##TPE, n, TRANSIENT); \ ___ checkin-list mailing list -- checkin-list@monetdb.org To unsubscribe send an email to checkin-list-le...@monetdb.org
MonetDB: Dec2023 - Do not recurse if we're dealing with a trigge...
Changeset: 3b20ed670167 for MonetDB URL: https://dev.monetdb.org/hg/MonetDB/rev/3b20ed670167 Modified Files: sql/server/rel_optimize_proj.c Branch: Dec2023 Log Message: Do not recurse if we're dealing with a trigger wrapper. diffs (12 lines): diff --git a/sql/server/rel_optimize_proj.c b/sql/server/rel_optimize_proj.c --- a/sql/server/rel_optimize_proj.c +++ b/sql/server/rel_optimize_proj.c @@ -907,7 +907,7 @@ rel_split_project_(visitor *v, sql_rel * } if (is_set(rel->op) || is_basetable(rel->op)) return rel; - if (rel->l) { + if (rel->l && (rel->op != op_table || rel->flag != TRIGGER_WRAPPER)) { rel->l = rel_split_project_(v, rel->l, (is_topn(rel->op)||is_sample(rel->op)||is_ddl(rel->op)||is_modify(rel->op))?top:0); if (!rel->l) return NULL; ___ checkin-list mailing list -- checkin-list@monetdb.org To unsubscribe send an email to checkin-list-le...@monetdb.org
MonetDB: Dec2023 - Niels says, we need to dup some pointers (lik...
Changeset: d96c23f0856d for MonetDB URL: https://dev.monetdb.org/hg/MonetDB/rev/d96c23f0856d Modified Files: sql/server/rel_select.c Branch: Dec2023 Log Message: Niels says, we need to dup some pointers (like in the other case in this file). diffs (15 lines): diff --git a/sql/server/rel_select.c b/sql/server/rel_select.c --- a/sql/server/rel_select.c +++ b/sql/server/rel_select.c @@ -1404,9 +1404,9 @@ rel_column_ref(sql_query *query, sql_rel return sql_error(sql, ERR_AMBIGUOUS, SQLSTATE(42000) "SELECT: identifier '%s.%s' ambiguous", tname, cname); if (v && !exp) { if (*rel) - *rel = rel_crossproduct(sql->sa, *rel, v, op_join); + *rel = rel_crossproduct(sql->sa, *rel, rel_dup(v), op_join); else - *rel = v; + *rel = rel_dup(v); if (!(exp = rel_bind_column3(sql, *rel, sname, tname, cname, f)) && sql->session->status == -ERR_AMBIGUOUS) return NULL; } ___ checkin-list mailing list -- checkin-list@monetdb.org To unsubscribe send an email to checkin-list-le...@monetdb.org
MonetDB: default - Improved overflow check when materializing ge...
Changeset: e662b1463c8e for MonetDB URL: https://dev.monetdb.org/hg/MonetDB/rev/e662b1463c8e Modified Files: sql/backends/monet5/generator/generator.c Branch: default Log Message: Improved overflow check when materializing generator series. diffs (258 lines): diff --git a/sql/backends/monet5/generator/generator.c b/sql/backends/monet5/generator/generator.c --- a/sql/backends/monet5/generator/generator.c +++ b/sql/backends/monet5/generator/generator.c @@ -74,83 +74,93 @@ VLTgenerator_noop(Client cntxt, MalBlkPt return MAL_SUCCEED; } -#define check_bte() (s > 0 ? f > l : f < l) -#define check_sht() (s > 0 ? f > l : f < l) -#define check_int() (s > 0 ? f > l : f < l) +#define check_bte() ((void)0) +#define check_sht() ((void)0) #if SIZEOF_BUN < SIZEOF_LNG -#define check_lng() (s > 0 ? f > l || s > (lng) BUN_MAX : f < l || s < -(lng) BUN_MAX) +#define check_int() \ + do { \ + if (cnt > (unsigned int) BUN_MAX) \ + throw(MAL, "generator.table", \ + SQLSTATE(42000) "Illegal generator range"); \ + } while (0) #else -#define check_lng() (s > 0 ? f > l : f < l) +#define check_int() ((void)0) #endif +#define check_lng() \ + do { \ + if (cnt > (ulng) BUN_MAX) \ + throw(MAL, "generator.table", \ + SQLSTATE(42000) "Illegal generator range"); \ + } while (0) #ifdef HAVE_HGE -#define check_hge() (s > 0 ? f > l || s > (lng) BUN_MAX : f < l || s < -(lng) BUN_MAX) +#define check_hge() \ + do { \ + if (cnt > (uhge) BUN_MAX) \ + throw(MAL, "generator.table", \ + SQLSTATE(42000) "Illegal generator range"); \ + } while (0) #endif -/* - * The base line consists of materializing the generator iterator value - */ -#define VLTmaterialize(TPE) \ +#define VLTmaterialize(TPE, uTPE) \ do { \ - TPE *v, f, l, s; \ + TPE f, l, s; \ + uTPE cnt; \ + \ f = *getArgReference_##TPE(stk, pci, 1); \ l = *getArgReference_##TPE(stk, pci, 2); \ if ( pci->argc == 3) \ - s = f<=l? (TPE) 1: (TPE)-1; \ - else s = *getArgReference_##TPE(stk,pci, 3); \ - if (s == 0 || is_##TPE##_nil(f) || is_##TPE##_nil(l) || check_##TPE()) \ + s = f <= l ? (TPE) 1 : (TPE) -1; \ + else \ + s = *getArgReference_##TPE(stk,pci, 3); \ + if (s == 0 || is_##TPE##_nil(f) || is_##TPE##_nil(l) || is_##TPE##_nil(s)) \ throw(MAL, "generator.table", \ SQLSTATE(42000) "Illegal
MonetDB: default - In Debian build, remove files from versioned ...
Changeset: 6504d15c154f for MonetDB URL: https://dev.monetdb.org/hg/MonetDB/rev/6504d15c154f Modified Files: debian/rules Branch: default Log Message: In Debian build, remove files from versioned directory. diffs (16 lines): diff --git a/debian/rules b/debian/rules --- a/debian/rules +++ b/debian/rules @@ -55,9 +55,9 @@ override_dh_auto_install: dh_auto_install rm debian/tmp/usr/bin/monetdb_mtest.sh rm -r debian/tmp/usr/share/monetdb - rm debian/tmp/usr/lib/*/monetdb5/lib_opt_sql_append.so - rm debian/tmp/usr/lib/*/monetdb5/lib_microbenchmark*.so - rm debian/tmp/usr/lib/*/monetdb5/lib_udf*.so + rm debian/tmp/usr/lib/*/monetdb5*/lib_opt_sql_append.so + rm debian/tmp/usr/lib/*/monetdb5*/lib_microbenchmark*.so + rm debian/tmp/usr/lib/*/monetdb5*/lib_udf*.so override_dh_installsystemd: dh_installsystemd --no-enable --no-start ___ checkin-list mailing list -- checkin-list@monetdb.org To unsubscribe send an email to checkin-list-le...@monetdb.org
MonetDB: Dec2023 - Compilation issue when compiling without XML ...
Changeset: d0d83af809d1 for MonetDB URL: https://dev.monetdb.org/hg/MonetDB/rev/d0d83af809d1 Modified Files: monetdb5/modules/atoms/xml.c Branch: Dec2023 Log Message: Compilation issue when compiling without XML support. diffs (15 lines): diff --git a/monetdb5/modules/atoms/xml.c b/monetdb5/modules/atoms/xml.c --- a/monetdb5/modules/atoms/xml.c +++ b/monetdb5/modules/atoms/xml.c @@ -735,9 +735,9 @@ XMLxml2str(str *s, const xml *x) } str -XMLstr2xml(xml *x, const char **s) +XMLstr2xml(xml *x, const char *const*val) { - (void) s; + (void) val; (void) x; return createException(MAL, "xml.xml2str", SQLSTATE(HY005) NO_LIBXML_FATAL); } ___ checkin-list mailing list -- checkin-list@monetdb.org To unsubscribe send an email to checkin-list-le...@monetdb.org
MonetDB: Dec2023 - When persiste_unlogged finds table is not yet...
Changeset: d3f43b823539 for MonetDB URL: https://dev.monetdb.org/hg/MonetDB/rev/d3f43b823539 Modified Files: gdk/gdk_logger.c sql/ChangeLog.Dec2023 sql/backends/monet5/sql.c sql/storage/store.c Branch: Dec2023 Log Message: When persiste_unlogged finds table is not yet persistent, it requests log rotation. diffs (67 lines): diff --git a/gdk/gdk_logger.c b/gdk/gdk_logger.c --- a/gdk/gdk_logger.c +++ b/gdk/gdk_logger.c @@ -3474,6 +3474,12 @@ log_tstart(logger *lg, bool flushnow, ul { rotation_lock(lg); if (flushnow) { + if (file_id == NULL) { + /* special case: ask store_manager to rotate log file */ + lg->file_age = 0; + rotation_unlock(lg); + return GDK_SUCCEED; + } /* I am now the exclusive flusher */ if (ATOMIC_GET(>nr_flushers)) { /* I am waiting until all existing flushers are done */ diff --git a/sql/ChangeLog.Dec2023 b/sql/ChangeLog.Dec2023 --- a/sql/ChangeLog.Dec2023 +++ b/sql/ChangeLog.Dec2023 @@ -1,3 +1,12 @@ # ChangeLog file for sql # This file is updated with Maddlog +* Wed May 15 2024 Sjoerd Mullender +- When sys.persist_unlogged is called for a table, it may return that + zero rows were persisted. If this is because the call was done too + early, i.e. the table was recently created and the write-ahead log + where this was logged has not been processed yet, the call will + request an immediate write-ahead log rotation. This means that the + WAL will be processed as soon as possible and a new call to + sys.persist_unlogged soon after will likely return a positive result. + 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 @@ -4436,6 +4436,16 @@ SQLpersist_unlogged(Client cntxt, MalBlk GDKfree(sizes); } count = d_bi.count; + } else { + /* special case of log_tstart: third arg == NULL with second arg +* true is request to rotate log file ASAP */ + store->logger_api.log_tstart(store, true, NULL); + /* special case for sql->debug: if 1024 bit is set, +* store_manager doesn't wait for 30 seconds of idle time before +* attempting to rotate */ + MT_lock_set(>flush); + store->debug |= 1024; + MT_lock_unset(>flush); } bat_iterator_end(_bi); diff --git a/sql/storage/store.c b/sql/storage/store.c --- a/sql/storage/store.c +++ b/sql/storage/store.c @@ -2420,7 +2420,10 @@ store_manager(sqlstore *store) for (;;) { const int idle = ATOMIC_GET() & FORCEMITOMASK ? 5000 : IDLE_TIME * 100; - if (store->debug&128 || ATOMIC_GET(>lastactive) + idle < (ATOMIC_BASE_TYPE) GDKusec()) { + /* if debug bit 1024 is set, attempt immediate log activation +* and clear the bit */ + if (store->debug&(128|1024) || ATOMIC_GET(>lastactive) + idle < (ATOMIC_BASE_TYPE) GDKusec()) { + store->debug &= ~1024; MT_lock_unset(>flush); store_lock(store); if (ATOMIC_GET(>nr_active) == 0) { ___ checkin-list mailing list -- checkin-list@monetdb.org To unsubscribe send an email to checkin-list-le...@monetdb.org
MonetDB: default - Use clever UTF-8 decode function and put it i...
Changeset: 48eb20c82ba6 for MonetDB URL: https://dev.monetdb.org/hg/MonetDB/rev/48eb20c82ba6 Added Files: common/utils/mutf8.c common/utils/mutf8.h Modified Files: clients/mapiclient/CMakeLists.txt clients/mapiclient/mclient.c common/utils/CMakeLists.txt monetdb5/modules/atoms/CMakeLists.txt monetdb5/modules/atoms/str.c monetdb5/modules/mal/CMakeLists.txt monetdb5/modules/mal/txtsim.c monetdb5/tools/CMakeLists.txt Branch: default Log Message: Use clever UTF-8 decode function and put it in a central location. diffs (truncated from 1182 to 300 lines): diff --git a/clients/mapiclient/CMakeLists.txt b/clients/mapiclient/CMakeLists.txt --- a/clients/mapiclient/CMakeLists.txt +++ b/clients/mapiclient/CMakeLists.txt @@ -54,6 +54,7 @@ target_link_libraries(mclient mprompt moptions mutils + mutf8 mapi stream $<$:Readline::Readline> diff --git a/clients/mapiclient/mclient.c b/clients/mapiclient/mclient.c --- a/clients/mapiclient/mclient.c +++ b/clients/mapiclient/mclient.c @@ -169,53 +169,7 @@ static char *nullstring = default_nullst #include #include "mhelp.h" - -/* The code starting here, and up to and including the function decode - * below are copyright Bjoern Hoehrmann per the below notice. - * - * The function decode provides a fast way to check for valid UTF-8 - * sequences and returns the value of the codepoint as well. */ - -// Copyright (c) 2008-2009 Bjoern Hoehrmann -// See http://bjoern.hoehrmann.de/utf-8/decoder/dfa/ for details. - -#define UTF8_ACCEPT 0 -#define UTF8_REJECT 12 - -static const uint8_t utf8d[] = { - // The first part of the table maps bytes to character classes that - // to reduce the size of the transition table and create bitmasks. -0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, 9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9, -7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, -8,8,2,2,2,2,2,2,2,2,2,2,2,2,2,2, 2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2, - 10,3,3,3,3,3,3,3,3,3,3,3,3,4,3,3, 11,6,6,6,5,8,8,8,8,8,8,8,8,8,8,8, - - // The second part is a transition table that maps a combination - // of a state of the automaton and a character class to a state. -0,12,24,36,60,96,84,12,12,12,48,72, 12,12,12,12,12,12,12,12,12,12,12,12, - 12, 0,12,12,12,12,12, 0,12, 0,12,12, 12,24,12,12,12,12,12,24,12,24,12,12, - 12,12,12,12,12,12,12,24,12,12,12,12, 12,24,12,12,12,12,12,12,12,24,12,12, - 12,12,12,12,12,12,12,36,12,36,12,12, 12,36,12,12,12,12,12,36,12,36,12,12, - 12,36,12,12,12,12,12,12,12,12,12,12, -}; - -static inline uint32_t -decode(uint32_t *state, uint32_t *codep, uint32_t byte) -{ - uint32_t type = utf8d[byte]; - - *codep = (*state != UTF8_ACCEPT) ? - (byte & 0x3fu) | (*codep << 6) : - (0xff >> type) & (byte); - - *state = utf8d[256 + *state + type]; - return *state; -} -/* end code copyright by Bjoern Hoehrmann */ +#include "mutf8.h" static timertype gettime(void) @@ -366,217 +320,6 @@ timerHuman(int64_t sqloptimizer, int64_t return; } -struct interval { - uint32_t first; - uint32_t last; - int width; -}; - -static const struct interval intervals[] = { - /* sorted list of non-overlapping ranges; -* ranges with width==0 represent all codepoints with -* general_category Me, Mn or Cf except U+00AD (SOFT HYPHEN), all -* codepoints \U+1160 through U+11FF (Hangul Jamo medial vowels and -* final consonants) -- see -* https://www.cl.cam.ac.uk/~mgk25/ucs/wcwidth.c from which this is -* derived; -* ranges with width==2 represent all codepoints in the East Asian -* Wide (W) or East Asian Full-width (F) category as defined in the -* EastAsianWidth.txt file; -* also see monetdb5/modules/atoms/str.c which has a copy of this */ - { 0x0300, 0x036F, 0 }, { 0x0483, 0x0489, 0 }, { 0x0591, 0x05BD, 0 }, - { 0x05BF, 0x05BF, 0 }, { 0x05C1, 0x05C2, 0 }, { 0x05C4, 0x05C5, 0 }, - { 0x05C7, 0x05C7, 0 }, { 0x0600, 0x0605, 0 }, { 0x0610, 0x061A, 0 }, - { 0x061C, 0x061C, 0 }, { 0x064B, 0x065F, 0 }, { 0x0670, 0x0670, 0 }, - { 0x06D6, 0x06DD, 0 }, { 0x06DF, 0x06E4, 0 }, { 0x06E7, 0x06E8, 0 }, - { 0x06EA, 0x06ED, 0 }, { 0x070F, 0x070F, 0 }, { 0x0711, 0x0711, 0 }, - { 0x0730, 0x074A, 0 }, { 0x07A6, 0x07B0, 0 }, { 0x07EB, 0x07F3, 0 }, - { 0x07FD, 0x07FD, 0 }, { 0x0816, 0x0819, 0 }, { 0x081B, 0x0823, 0 }, - { 0x0825, 0x0827, 0 }, { 0x0829, 0x082D, 0 }, { 0x0859, 0x085B, 0 }, - { 0x0890, 0x0891, 0 }, { 0x0898, 0x089F, 0 },
MonetDB: Dec2023 - Keep rotation lock for the duration of printi...
Changeset: 32a1eb24e340 for MonetDB URL: https://dev.monetdb.org/hg/MonetDB/rev/32a1eb24e340 Modified Files: gdk/gdk_logger.c Branch: Dec2023 Log Message: Keep rotation lock for the duration of printing log info with SIGUSR1. diffs (17 lines): diff --git a/gdk/gdk_logger.c b/gdk/gdk_logger.c --- a/gdk/gdk_logger.c +++ b/gdk/gdk_logger.c @@ -3528,7 +3528,6 @@ log_printinfo(logger *lg) rotation_lock(lg); printf("current log file "ULLFMT", last handled log file "ULLFMT"\n", lg->id, lg->saved_id); - rotation_unlock(lg); printf("current transaction id %d, saved transaction id %d\n", lg->tid, lg->saved_tid); printf("number of flushers: %d\n", (int) ATOMIC_GET(>nr_flushers)); @@ -3541,4 +3540,5 @@ log_printinfo(logger *lg) 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(>drops), (uint64_t) ATOMIC_GET(>last_ts), (uint64_t) ATOMIC_GET(>flushed_ts), (uint64_t) ATOMIC_GET(>refcount), buf, p == lg->current ? " (current)" : ""); } + rotation_unlock(lg); } ___ checkin-list mailing list -- checkin-list@monetdb.org To unsubscribe send an email to checkin-list-le...@monetdb.org
MonetDB: default - Fix tiny memory leak.
Changeset: b93871d52277 for MonetDB URL: https://dev.monetdb.org/hg/MonetDB/rev/b93871d52277 Modified Files: clients/mapiclient/iconv-stream.h Branch: default Log Message: Fix tiny memory leak. diffs (18 lines): diff --git a/clients/mapiclient/iconv-stream.h b/clients/mapiclient/iconv-stream.h --- a/clients/mapiclient/iconv-stream.h +++ b/clients/mapiclient/iconv-stream.h @@ -195,12 +195,14 @@ ic_close(void *private) if (ic->cd != (iconv_t) -1) iconv_close(ic->cd); ic->cd = (iconv_t) -1; + mnstr_close(ic->s); } static void ic_destroy(void *private) { ic_close(private); + mnstr_destroy(((struct ic_priv_t *) private)->s); free(private); } ___ checkin-list mailing list -- checkin-list@monetdb.org To unsubscribe send an email to checkin-list-le...@monetdb.org
MonetDB: default - Approve non-hge tests.
Changeset: 60b8d7104db5 for MonetDB URL: https://dev.monetdb.org/hg/MonetDB/rev/60b8d7104db5 Modified Files: clients/Tests/MAL-signatures.test sql/test/emptydb/Tests/check.stable.out Branch: default Log Message: Approve non-hge tests. diffs (99 lines): diff --git a/clients/Tests/MAL-signatures.test b/clients/Tests/MAL-signatures.test --- a/clients/Tests/MAL-signatures.test +++ b/clients/Tests/MAL-signatures.test @@ -33510,6 +33510,16 @@ VLTgenerator_noop; (empty) generator parameters +pattern generator.parameters(X_0:date, X_1:date, X_2:int):bat[:date] +VLTgenerator_noop; +Retain the table definition, but don't materialize (months) +generator +parameters +pattern generator.parameters(X_0:date, X_1:date, X_2:lng):bat[:date] +VLTgenerator_noop; +Retain the table definition, but don't materialize (days) +generator +parameters pattern generator.parameters(X_0:dbl, X_1:dbl):bat[:dbl] VLTgenerator_noop; (empty) @@ -33570,6 +33580,11 @@ VLTgenerator_projection; (empty) generator projection +pattern generator.projection(X_0:bat[:oid], X_1:bat[:date]):bat[:date] +VLTgenerator_projection; +(empty) +generator +projection pattern generator.projection(X_0:bat[:oid], X_1:bat[:dbl]):bat[:dbl] VLTgenerator_projection; (empty) @@ -33610,6 +33625,16 @@ VLTgenerator_subselect; (empty) generator select +pattern generator.select(X_0:bat[:date], X_1:bat[:oid], X_2:date, X_3:date, X_4:bit, X_5:bit, X_6:bit):bat[:oid] +VLTgenerator_subselect; +(empty) +generator +select +pattern generator.select(X_0:bat[:date], X_1:date, X_2:date, X_3:bit, X_4:bit, X_5:bit):bat[:oid] +VLTgenerator_subselect; +(empty) +generator +select pattern generator.select(X_0:bat[:dbl], X_1:bat[:oid], X_2:dbl, X_3:dbl, X_4:bit, X_5:bit, X_6:bit):bat[:oid] VLTgenerator_subselect; (empty) @@ -33680,6 +33705,16 @@ VLTgenerator_table; (empty) generator series +pattern generator.series(X_0:date, X_1:date, X_2:int):bat[:date] +VLTgenerator_table; +date generator with step size in months +generator +series +pattern generator.series(X_0:date, X_1:date, X_2:lng):bat[:date] +VLTgenerator_table; +date generator with step size in days +generator +series pattern generator.series(X_0:dbl, X_1:dbl):bat[:dbl] VLTgenerator_table; (empty) @@ -33740,6 +33775,11 @@ VLTgenerator_thetasubselect; (empty) generator thetaselect +pattern generator.thetaselect(X_0:bat[:date], X_1:bat[:oid], X_2:date, X_3:str):bat[:oid] +VLTgenerator_thetasubselect; +Overloaded selection routine +generator +thetaselect pattern generator.thetaselect(X_0:bat[:dbl], X_1:bat[:oid], X_2:dbl, X_3:str):bat[:oid] VLTgenerator_thetasubselect; (empty) diff --git a/sql/test/emptydb/Tests/check.stable.out b/sql/test/emptydb/Tests/check.stable.out --- a/sql/test/emptydb/Tests/check.stable.out +++ b/sql/test/emptydb/Tests/check.stable.out @@ -1693,7 +1693,7 @@ select 'null in fkeys.delete_action', de % .%1, .s, .f, ., ., .f, .fl,., .f, .f, .f, .f, ., ., ., ., ., ., ., ., ., ., ., ., ., ., ., ., ., ., ., ., ., ., ., ., ., ., ., ., ., ., ., ., ., ., ., ., ., ., ., ., ., ., ., ., ., ., ., ., ., ., ., ., ., ., ., ., ., ., ., ., ., ., ., ., ., ., ., ., ., ., ., ., ., ., ., ., ., ., ., ., . # table_name % %1, name, name, system, query, mod,language_name, func_type, side_effect,varres, vararg, semantics, comment,name0, type0, type_digits0, type_scale0,inout0, name1, type1, type_digits1, type_scale1,inout1, name2, type2, type_digits2, type_scale2,inout2, name3, type3, type_digits3, type_scale3,inout3, name4, type4, type_digits4, type_scale4,inout4, name5, type5, type_digits5, type_scale5,inout5, name6, type6, type_digits6, type_scale6,inout6, name7, type7, type_digits7, type_scale7,inout7, name8, type8, type_digits8, type_scale8,inout8, name9, type9, type_digits9, type_scale9,inout9, name10, type10, type_digits10, type_scale10, inout10,name11, type11, type_digits11, type_scale11, inout11, name12, type12, type_digits12, type_scale12, inout12,name13, type13, type_digits13, type_scale13, inout13,name14, type14, type_digits14, type_scale14, inout14,name15, type15, type_digits15, type_scale15, inout15 # name % varchar, varchar,varchar,varchar,varchar, varchar,varchar,varchar,boolean,boolean, boolean,boolean,varchar,varchar,varchar,
MonetDB: default - Merge with Dec2023 branch.
Changeset: 1c9d7fbe4bc0 for MonetDB URL: https://dev.monetdb.org/hg/MonetDB/rev/1c9d7fbe4bc0 Modified Files: gdk/gdk_calc_convert.c gdk/gdk_hash.c monetdb5/optimizer/opt_mergetable.c 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 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/emptydb/Tests/check.SQL.py 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 Dec2023 branch. diffs (truncated from 650 to 300 lines): diff --git a/gdk/gdk_calc_convert.c b/gdk/gdk_calc_convert.c --- a/gdk/gdk_calc_convert.c +++ b/gdk/gdk_calc_convert.c @@ -821,6 +821,7 @@ convert_str_fix(BATiter *bi, int tp, voi return 0; } + int (*atomcmp)(const void *, const void *) = ATOMcompare(tp); TIMEOUT_LOOP(ci->ncand, qry_ctx) { oid x = canditer_next(ci) - candoff; const char *s = BUNtvar(*bi, x); @@ -834,7 +835,7 @@ convert_str_fix(BATiter *bi, int tp, voi goto conversion_failed; } assert(len == ATOMsize(tp)); - if (ATOMcmp(tp, dst, nil) == 0) + if (atomcmp(dst, nil) == 0) nils++; } dst = (void *) ((char *) dst + len); diff --git a/gdk/gdk_hash.c b/gdk/gdk_hash.c --- a/gdk/gdk_hash.c +++ b/gdk/gdk_hash.c @@ -873,7 +873,8 @@ BAThash_impl(BAT *restrict b, struct can case TYPE_uuid: starthash(uuid); break; - default: + default: { + int (*atomcmp)(const void *, const void *) = ATOMcompare(h->type); TIMEOUT_LOOP(p, qry_ctx) { const void *restrict v = BUNtail(bi, o - b->hseqbase); c = hash_any(h, v); @@ -887,8 +888,7 @@ BAThash_impl(BAT *restrict b, struct can for (hb = hget; hb != BUN_NONE; hb = HASHgetlink(h, hb)) { - if (ATOMcmp(h->type, - v, + if (atomcmp(v, BUNtail(bi, hb)) == 0) break; } @@ -902,6 +902,7 @@ BAThash_impl(BAT *restrict b, struct can GOTO_LABEL_TIMEOUT_HANDLER(bailout, qry_ctx)); break; } + } TRC_DEBUG_IF(ACCELERATOR) if (p < cnt1) TRC_DEBUG_ENDIF(ACCELERATOR, "%s: abort starthash with " @@ -949,7 +950,8 @@ BAThash_impl(BAT *restrict b, struct can case TYPE_uuid: finishhash(uuid); break; - default: + default: { + int (*atomcmp)(const void *, const void *) = ATOMcompare(h->type); TIMEOUT_LOOP(ci->ncand - p, qry_ctx) { const void *restrict v = BUNtail(bi, o - b->hseqbase); c = hash_any(h,
MonetDB: default - Remove assert. Fixes #7516.
Changeset: 4316a7af79b3 for MonetDB URL: https://dev.monetdb.org/hg/MonetDB/rev/4316a7af79b3 Modified Files: sql/server/sql_semantic.c Branch: default Log Message: Remove assert. Fixes #7516. diffs (11 lines): diff --git a/sql/server/sql_semantic.c b/sql/server/sql_semantic.c --- a/sql/server/sql_semantic.c +++ b/sql/server/sql_semantic.c @@ -121,7 +121,6 @@ tmp_schema(mvc *sql) do { \ sql_schema *next = NULL; \ \ - assert(objstr); \ if (sname) { /* user has explicitly typed the schema, so either the object is there or we return error */ \ if (!(next = mvc_bind_schema(sql, sname))) \ return sql_error(sql, ERR_NOTFOUND, SQLSTATE(3F000) "%s: no such schema '%s'", error, sname); \ ___ checkin-list mailing list -- checkin-list@monetdb.org To unsubscribe send an email to checkin-list-le...@monetdb.org
MonetDB: Dec2023 - Fix an old upgrade error where triggers were ...
Changeset: ad9b188058a3 for MonetDB URL: https://dev.monetdb.org/hg/MonetDB/rev/ad9b188058a3 Modified Files: sql/backends/monet5/sql_upgrades.c sql/test/emptydb-previous-upgrade-chain-hge/Tests/All sql/test/emptydb-previous-upgrade-chain-hge/Tests/upgrade.stable.out.int128 sql/test/emptydb-previous-upgrade-chain/Tests/All 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/All sql/test/emptydb-upgrade-chain-hge/Tests/upgrade.stable.out.int128 sql/test/emptydb-upgrade-chain/Tests/All 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/emptydb/Tests/check.SQL.py 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: Dec2023 Log Message: Fix an old upgrade error where triggers were left with bad table_id values. diffs (truncated from 436 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 @@ -6616,17 +6616,24 @@ sql_update_dec2023_sp4(Client c, mvc *sq b = BATdescriptor(output->cols[0].b); if (b) { if (BATcount(b) > 0) { - const char query[] = "delete from sys.dependencies where (id, depend_id) in (select c.id, f.id from sys.functions f, sys._tables t, sys._columns c, sys.dependencies d where c.table_id = t.id and f.id = d.depend_id and c.id = d.id and f.schema_id = 2000 and t.schema_id = 2000 and (f.name, t.name, c.name) in (values ('describe_columns', '_columns', 'storage'), ('describe_function', 'function_languages', 'language_name'), ('describe_function', 'function_types', 'function_type_name'), ('describe_function', 'functions', 'func'), ('describe_function', 'functions', 'mod'), ('describe_function', 'functions', 'semantics'), ('describe_function', 'functions', 'side_effect'), ('describe_function', 'functions', 'system'), ('describe_function', 'functions', 'vararg'), ('describe_function', 'functions', 'varres'), ('describe_function', 'schemas', 'authorization'), ('describe_function', 'schemas', 'owner'), ('describe_function', 'schemas', 'system'), ('describe_table', '_tables', 'access'), ('de scribe_table', '_tables', 'commit_action'), ('describe_table', '_tables', 'system')));\n" + const char query[] = + "delete from sys.dependencies where (id, depend_id) in (select c.id, f.id from sys.functions f, sys._tables t, sys._columns c, sys.dependencies d where c.table_id = t.id and f.id = d.depend_id and c.id = d.id and f.schema_id = 2000 and t.schema_id = 2000 and (f.name, t.name, c.name) in (values ('describe_columns', '_columns', 'storage'), ('describe_function', 'function_languages', 'language_name'), ('describe_function', 'function_types', 'function_type_name'), ('describe_function', 'functions', 'func'), ('describe_function', 'functions', 'mod'), ('describe_function', 'functions', 'semantics'), ('describe_function', 'functions', 'side_effect'), ('describe_function', 'functions', 'system'), ('describe_function', 'functions', 'vararg'), ('describe_function', 'functions', 'varres'), ('describe_function', 'schemas', 'authorization'), ('describe_function', 'schemas', 'owner'), ('describe_function', 'schemas', 'system'), ('describe_table', '_tables', 'access'), ('describe_table', '_tab les', 'commit_action'), ('describe_table', '_tables', 'system')));\n" "delete from sys.dependencies where (id, depend_id) in (select c.id, v.id
MonetDB: default - Turn constant pointers to constant string int...
Changeset: dc85db7d9402 for MonetDB URL: https://dev.monetdb.org/hg/MonetDB/rev/dc85db7d9402 Modified Files: clients/mapiclient/dump.c clients/odbc/winsetup/install.c common/stream/stdio_stream.c geom/monetdb5/geom.c monetdb5/mal/mal_session.c sql/backends/monet5/UDF/capi/capi.c sql/backends/monet5/sql.c sql/backends/monet5/sql_bincopy.c sql/backends/monet5/sql_bincopyconvert.c sql/backends/monet5/sql_scenario.c sql/backends/monet5/vaults/csv/csv.c sql/server/sql_semantic.c sql/storage/store.c tools/monetdbe/monetdbe.c Branch: default Log Message: Turn constant pointers to constant string into constant arrays. diffs (truncated from 519 to 300 lines): diff --git a/clients/mapiclient/dump.c b/clients/mapiclient/dump.c --- a/clients/mapiclient/dump.c +++ b/clients/mapiclient/dump.c @@ -2654,9 +2654,9 @@ bailout: int dump_database(Mapi mid, stream *sqlf, const char *ddir, const char *ext, bool describe, bool useInserts, bool noescape) { - const char *start_trx = "START TRANSACTION"; - const char *end = "ROLLBACK"; - const char *types = + const char start_trx[] = "START TRANSACTION"; + const char end[] = "ROLLBACK"; + const char types[] = "SELECT s.name, " "t.systemname, " "t.sqlname " @@ -2708,13 +2708,13 @@ dump_database(Mapi mid, stream *sqlf, co "AND ui.name <> 'monetdb' " "AND ui.name <> '.snapshot' " "ORDER BY ui.name"; - const char *roles = + const char roles[] = "SELECT name " "FROM sys.auths " "WHERE name NOT IN (SELECT name FROM sys.db_user_info) " "AND grantor <> 0 " "ORDER BY name"; - const char *grants = + const char grants[] = /* all grants granting roles to users excepting the default role */ "SELECT a1.name, " "a2.name " @@ -2727,7 +2727,7 @@ dump_database(Mapi mid, stream *sqlf, co "AND a1.name = ui.name " "AND a2.id <> ui.default_role " "ORDER BY a1.name, a2.name"; - const char *table_grants = + const char table_grants[] = "SELECT s.name, t.name, " "a.name, " "sum(p.privileges), " @@ -2744,7 +2744,7 @@ dump_database(Mapi mid, stream *sqlf, co "AND p.grantable = go.id " "GROUP BY s.name, t.name, a.name, g.name, go.opt " "ORDER BY s.name, t.name, a.name, g.name, go.opt"; - const char *column_grants = + const char column_grants[] = "SELECT s.name, t.name, " "c.name, a.name, " "pc.privilege_code_name, " @@ -2766,7 +2766,7 @@ dump_database(Mapi mid, stream *sqlf, co "AND p.privileges = pc.privilege_code_id " "AND p.grantable = go.id " "ORDER BY s.name, t.name, c.name, a.name, g.name, p.grantable"; - const char *function_grants = + const char function_grants[] = "SELECT f.id, " "s.name, " "f.name, " @@ -2803,7 +2803,7 @@ dump_database(Mapi mid, stream *sqlf, co "f.id, " "a.inout DESC, " "a.number"; - const char *global_grants = + const char global_grants[] = "SELECT a.name, pc.grnt, g.name, go.opt " "FROM sys.privileges p, " "sys.auths a, " @@ -2816,22 +2816,22 @@ dump_database(Mapi mid, stream *sqlf, co "AND p.privileges = pc.id " "AND p.grantable = go.id " "ORDER BY a.name, g.name, go.opt"; - const char *schemas = + const char schemas[] = "SELECT s.name, a.name, rem.remark " "FROM sys.schemas s LEFT OUTER JOIN sys.comments rem ON s.id = rem.id, " "sys.auths a " "WHERE s.\"authorization\" = a.id " "AND s.system = FALSE " "ORDER BY s.name"; - const char *sequences1 = + const char sequences1[] = "SELECT sch.name, seq.name, rem.remark " "FROM sys.schemas sch, " "sys.sequences seq LEFT OUTER JOIN sys.comments rem ON seq.id = rem.id " "WHERE sch.id = seq.schema_id " "ORDER BY sch.name, seq.name"; - const char *sequences2 = + const char sequences2[] = "SELECT * FROM sys.describe_sequences ORDER BY sch, seq"; - const char *tables = + const char tables[] = "SELECT t.id AS id, " "s.name AS sname, "
MonetDB: default - Upgrade: add new generate_series functions.
Changeset: 9a60c2693323 for MonetDB URL: https://dev.monetdb.org/hg/MonetDB/rev/9a60c2693323 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 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/emptydb/Tests/check.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: Upgrade: add new generate_series functions. diffs (truncated from 610 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 @@ -327,7 +327,7 @@ static str sql_create_shp(Client c) { //Create the new SHPload procedures - const char *query = "create procedure SHPLoad(fname string, schemaname string, tablename string) external name shp.load;\n" + const char query[] = "create procedure SHPLoad(fname string, schemaname string, tablename string) external name shp.load;\n" "create procedure SHPLoad(fname string, tablename string) external name shp.load;\n" "update sys.functions set system = true where schema_id = 2000 and name in ('shpload');"; printf("Running database upgrade commands:\n%s\n", query); @@ -340,7 +340,7 @@ static str sql_drop_shp(Client c) { //Drop the old SHP procedures (upgrade from version before shpload upgrade) - const char *query = "drop procedure if exists SHPattach(string) cascade;\n" + const char query[] = "drop procedure if exists SHPattach(string) cascade;\n" "drop procedure if exists SHPload(integer) cascade;\n" "drop procedure if exists SHPload(integer, geometry) cascade;\n"; printf("Running database upgrade commands:\n%s\n", query); @@ -351,7 +351,7 @@ 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" + 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); } @@ -3287,7 +3287,7 @@ sql_update_jan2022(Client c, mvc *sql) list_append(l, ); 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 = + 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); @@ -5198,7 +5198,7 @@ sql_update_jun2023(Client c, mvc *sql, s if (wr) wr->system =
MonetDB: default - Add a minus to the module search path.
Changeset: 65d4616042ef for MonetDB URL: https://dev.monetdb.org/hg/MonetDB/rev/65d4616042ef Modified Files: monetdb5/extras/rapi/rapi.R Branch: default Log Message: Add a minus to the module search path. diffs (12 lines): diff --git a/monetdb5/extras/rapi/rapi.R b/monetdb5/extras/rapi/rapi.R --- a/monetdb5/extras/rapi/rapi.R +++ b/monetdb5/extras/rapi/rapi.R @@ -57,7 +57,7 @@ rewireFunc("q", quit, "base") rm(rewireFunc) loopback_query <- function(query) { - dyn.load(file.path(MONETDB_LIBDIR, paste0("monetdb5", MONETDB_VERSION), "lib_rapi.so")) + dyn.load(file.path(MONETDB_LIBDIR, paste0("monetdb5-", MONETDB_VERSION), "lib_rapi.so")) res <- .Call("RAPIloopback", paste0(query, "\n;"), package="lib_rapi") if (is.character(res)) { stop(res) ___ checkin-list mailing list -- checkin-list@monetdb.org To unsubscribe send an email to checkin-list-le...@monetdb.org
MonetDB: default - Add missing minus in path name.
Changeset: 6e1d39ce866c for MonetDB URL: https://dev.monetdb.org/hg/MonetDB/rev/6e1d39ce866c Modified Files: tools/mserver/mserver5.c Branch: default Log Message: Add missing minus in path name. diffs (12 lines): diff --git a/tools/mserver/mserver5.c b/tools/mserver/mserver5.c --- a/tools/mserver/mserver5.c +++ b/tools/mserver/mserver5.c @@ -681,7 +681,7 @@ main(int argc, char **av) *p = '\0'; for (int i = 0; libdirs[i] != NULL; i++) { int len = snprintf(prmodpath, sizeof(prmodpath), - "%s%c%s%cmonetdb5%s", + "%s%c%s%cmonetdb5-%s", binpath, DIR_SEP, libdirs[i], DIR_SEP, MONETDB_VERSION); if (len == -1 || len >= FILENAME_MAX) ___ checkin-list mailing list -- checkin-list@monetdb.org To unsubscribe send an email to checkin-list-le...@monetdb.org
MonetDB: default - Use CMake target property to create versioned...
Changeset: 27d52e3434e7 for MonetDB URL: https://dev.monetdb.org/hg/MonetDB/rev/27d52e3434e7 Modified Files: MonetDB.spec NT/mkodbcwxs.py NT/mksqlwxs.py clients/NT/mclient.bat.in clients/NT/msqldump.bat.in clients/mapiclient/CMakeLists.txt clients/mapilib/CMakeLists.txt clients/mapilib/monetdb-mapi.pc.in common/stream/CMakeLists.txt common/stream/monetdb-stream.pc.in gdk/CMakeLists.txt gdk/monetdb-gdk.pc.in geom/monetdb5/CMakeLists.txt monetdb5/NT/M5server.bat.in monetdb5/extras/mal_optimizer_template/CMakeLists.txt monetdb5/extras/rapi/CMakeLists.txt monetdb5/modules/kernel/CMakeLists.txt monetdb5/tools/CMakeLists.txt monetdb5/tools/monetdb5.pc.in sql/backends/monet5/CMakeLists.txt sql/backends/monet5/UDF/capi/CMakeLists.txt sql/backends/monet5/UDF/pyapi3/CMakeLists.txt sql/backends/monet5/UDF/udf/CMakeLists.txt sql/backends/monet5/generator/CMakeLists.txt sql/backends/monet5/vaults/csv/CMakeLists.txt sql/backends/monet5/vaults/fits/CMakeLists.txt sql/backends/monet5/vaults/netcdf/CMakeLists.txt sql/backends/monet5/vaults/shp/CMakeLists.txt tools/merovingian/client/CMakeLists.txt tools/merovingian/daemon/CMakeLists.txt tools/merovingian/daemon/config/monetdbd.service.in tools/mserver/CMakeLists.txt Branch: default Log Message: Use CMake target property to create versioned binary + symlink. Also, add a dash to the .so names before the version number so that they look like the names CMake uses for the binaries. diffs (truncated from 584 to 300 lines): diff --git a/MonetDB.spec b/MonetDB.spec --- a/MonetDB.spec +++ b/MonetDB.spec @@ -548,7 +548,7 @@ embedded library (%{name}-embedded). %defattr(-,root,root) %{_libdir}/libmonetdb5*.so.* %{_libdir}/libmonetdbsql*.so* -%dir %{_libdir}/monetdb5%{version} +%dir %{_libdir}/monetdb5-%{version} %if %{with cintegration} %{_libdir}/monetdb5*/lib_capi.so %endif @@ -939,11 +939,6 @@ rm -f %{buildroot}%{_libdir}/monetdb5*/l rm -f %{buildroot}%{_bindir}/monetdb_mtest.sh rm -rf %{buildroot}%{_datadir}/monetdb # /cmake -for f in monetdbd monetdb mserver5 mclient msqldump; do -mv %{buildroot}%{_bindir}/${f} %{buildroot}%{_bindir}/${f}%{version} -ln -s ${f}%{version} %{buildroot}%{_bindir}/${f} -done - if [ -x /usr/sbin/hardlink ]; then /usr/sbin/hardlink -cv %{buildroot}%{_datadir}/selinux else diff --git a/NT/mkodbcwxs.py b/NT/mkodbcwxs.py --- a/NT/mkodbcwxs.py +++ b/NT/mkodbcwxs.py @@ -89,10 +89,10 @@ def main(): id = 1 print(r'') id = comp(features, id, 14, - [rf'bin\mapi{version}.dll', rf'lib\mapi{version}.pdb', + [rf'bin\mapi-{version}.dll', rf'lib\mapi-{version}.pdb', r'lib\MonetODBC.dll', r'lib\MonetODBC.pdb', r'lib\MonetODBCs.dll', r'lib\MonetODBCs.pdb', - rf'bin\stream{version}.dll', rf'lib\stream{version}.pdb', + rf'bin\stream-{version}.dll', rf'lib\stream-{version}.pdb', vcpkg.format(r'bin\iconv-2.dll'), vcpkg.format(r'bin\bz2.dll'), vcpkg.format(r'bin\charset-1.dll'), # for iconv-2.dll diff --git a/NT/mksqlwxs.py b/NT/mksqlwxs.py --- a/NT/mksqlwxs.py +++ b/NT/mksqlwxs.py @@ -102,12 +102,12 @@ def main(): print(r' ') print(r'') print(r'') -print(rf' ') +print(rf' ') print(r'') print(r' ') print(r'') print(r'') -print(rf' ') +print(rf' ') print(r'') print(r' ') print(r'') @@ -153,12 +153,12 @@ def main(): [r'bin\mclient.exe', r'bin\mserver5.exe', r'bin\msqldump.exe', - rf'bin\bat{version}.dll', - rf'bin\mapi{version}.dll', - rf'bin\monetdb5{version}.dll', + rf'bin\bat-{version}.dll', + rf'bin\mapi-{version}.dll', + rf'bin\monetdb5-{version}.dll', r'bin\monetdbe.dll', - rf'bin\monetdbsql{version}.dll', - rf'bin\stream{version}.dll', + rf'bin\monetdbsql-{version}.dll', + rf'bin\stream-{version}.dll', vcpkg.format(r'bin\iconv-2.dll'), vcpkg.format(r'bin\bz2.dll'), vcpkg.format(r'bin\charset-1.dll'), # for iconv-2.dll @@ -174,11 +174,11 @@ def main(): [r'bin\mclient.pdb', r'bin\mserver5.pdb', r'bin\msqldump.pdb', - rf'lib\bat{version}.pdb', - rf'lib\mapi{version}.pdb', - rf'lib\monetdb5{version}.pdb', - rf'lib\monetdbsql{version}.pdb', - rf'lib\stream{version}.pdb']) + rf'lib\bat-{version}.pdb', +
MonetDB: default - Add some casts.
Changeset: 65d648432f63 for MonetDB URL: https://dev.monetdb.org/hg/MonetDB/rev/65d648432f63 Modified Files: sql/backends/monet5/generator/generator.c Branch: default Log Message: Add some casts. diffs (39 lines): diff --git a/sql/backends/monet5/generator/generator.c b/sql/backends/monet5/generator/generator.c --- a/sql/backends/monet5/generator/generator.c +++ b/sql/backends/monet5/generator/generator.c @@ -275,7 +275,7 @@ VLTgenerator_table_(BAT **result, Client v = (date *) Tloc(bn, 0); for (c = 0; c < n && f < l; c++) { *v++ = f; - f = date_add_day(f, s); + f = date_add_day(f, (int) s); if (is_date_nil(f)) { BBPreclaim(bn); throw(MAL, "generator.table", SQLSTATE(22003) "overflow in calculation"); @@ -635,7 +635,7 @@ VLTgenerator_subselect(Client cntxt, Mal n++; } } - tsf = date_add_day(tsf, tss); + tsf = date_add_day(tsf, (int) tss); if (is_date_nil(tsf)) { BBPreclaim(cand); BBPreclaim(bn); @@ -1052,7 +1052,7 @@ str VLTgenerator_thetasubselect(Client c c++; } } - val = date_add_day(val, s); + val = date_add_day(val, (int) s); if (is_date_nil(val)) { BBPreclaim(cand); BBPreclaim(bn); @@ -1308,7 +1308,7 @@ str VLTgenerator_projection(Client cntxt for(; cnt-- > 0; o++){ t = ((int) (ol == NULL ? o : ol[o])) * s; - val = date_add_day(f, t); + val = date_add_day(f, (int) t); if (is_date_nil(val)) { BBPunfix(b->batCacheid); BBPreclaim(bn); ___ checkin-list mailing list -- checkin-list@monetdb.org To unsubscribe send an email to checkin-list-le...@monetdb.org
MonetDB: default - Updated spec file so that we can build compat...
Changeset: b08535a1b139 for MonetDB URL: https://dev.monetdb.org/hg/MonetDB/rev/b08535a1b139 Modified Files: MonetDB.spec Branch: default Log Message: Updated spec file so that we can build compat packages (--with compat). diffs (232 lines): diff --git a/MonetDB.spec b/MonetDB.spec --- a/MonetDB.spec +++ b/MonetDB.spec @@ -8,8 +8,12 @@ # Copyright August 2008 - 2023 MonetDB B.V.; # Copyright 1997 - July 2008 CWI. -%global name MonetDB %global version 11.50.0 + +%bcond_with compat + +%global name MonetDB%{?with_compat:%version} + %{!?buildno: %global buildno %(date +%Y%m%d)} # Use bcond_with to add a --with option; i.e., "without" is default. @@ -91,7 +95,7 @@ Group: Applications/Databases License: MPL-2.0 URL: https://www.monetdb.org/ BugURL: https://github.com/MonetDB/MonetDB/issues -Source: https://www.monetdb.org/downloads/sources/Dec2023-SP3/%{name}-%{version}.tar.bz2 +Source: https://www.monetdb.org/downloads/sources/Dec2023-SP3/MonetDB-%{version}.tar.bz2 # The Fedora packaging document says we need systemd-rpm-macros for # the _unitdir and _tmpfilesdir macros to exist; however on RHEL 7 @@ -117,7 +121,9 @@ BuildRequires: unixODBC-devel BuildRequires: readline-devel %else BuildRequires: pkgconfig(bzip2) +%if %{without compat} BuildRequires: pkgconfig(odbc) +%endif BuildRequires: pkgconfig(readline) %endif %if %{with fits} @@ -178,6 +184,7 @@ more client packages. %defattr(-,root,root) %{_libdir}/libbat*.so.* +%if %{without compat} %package devel Summary: MonetDB development files Group: Applications/Databases @@ -204,6 +211,7 @@ functionality of MonetDB. %{_includedir}/monetdb/monet*.h %{_libdir}/libbat*.so %{_libdir}/pkgconfig/monetdb-gdk.pc +%endif %package stream Summary: MonetDB stream library @@ -225,6 +233,7 @@ various other components. %defattr(-,root,root) %{_libdir}/libstream*.so.* +%if %{without compat} %package stream-devel Summary: MonetDB stream library Group: Applications/Databases @@ -249,6 +258,7 @@ library. %{_includedir}/monetdb/stream.h %{_includedir}/monetdb/stream_socket.h %{_libdir}/pkgconfig/monetdb-stream.pc +%endif %package client-lib Summary: MonetDB - Monet Database Management System Client Programs @@ -300,9 +310,12 @@ MonetDB, you will very likely need this %defattr(-,root,root) %{_bindir}/mclient* %{_bindir}/msqldump* +%if %{without compat} %{_mandir}/man1/mclient.1* %{_mandir}/man1/msqldump.1* +%endif +%if %{without compat} %package client-devel Summary: MonetDB - Monet Database Management System Client Programs Group: Applications/Databases @@ -325,7 +338,9 @@ This package contains the files needed t %{_includedir}/monetdb/mapi*.h %{_includedir}/monetdb/msettings.h %{_libdir}/pkgconfig/monetdb-mapi.pc +%endif +%if %{without compat} %package client-odbc Summary: MonetDB ODBC driver Group: Applications/Databases @@ -364,7 +379,9 @@ fi %defattr(-,root,root) %{_libdir}/libMonetODBC.so %{_libdir}/libMonetODBCs.so +%endif +%if %{without compat} %package client-tests Summary: MonetDB Client tests package Group: Applications/Databases @@ -412,6 +429,7 @@ developer. %{_bindir}/malsample.pl %{_bindir}/sqlsample.php %{_bindir}/sqlsample.pl +%endif %if %{with geos} %package geom @@ -586,16 +604,21 @@ exit 0 %files server %defattr(-,root,root) +%if %{without compat} %{_sysusersdir}/monetdb.conf %attr(2750,monetdb,monetdb) %dir %{_localstatedir}/lib/monetdb %attr(2770,monetdb,monetdb) %dir %{_localstatedir}/monetdb5 %attr(2770,monetdb,monetdb) %dir %{_localstatedir}/monetdb5/dbfarm +%endif %{_bindir}/mserver5* +%if %{without compat} %{_mandir}/man1/mserver5.1* %dir %{_datadir}/doc/MonetDB %docdir %{_datadir}/doc/MonetDB %{_datadir}/doc/MonetDB/* +%endif +%if %{without compat} %package server-devel Summary: MonetDB development files Group: Applications/Databases @@ -620,6 +643,7 @@ used from the MAL level. %{_includedir}/monetdb/mel.h %{_libdir}/libmonetdb5*.so %{_libdir}/pkgconfig/monetdb5.pc +%endif %package SQL Summary: MonetDB SQL server modules @@ -654,6 +678,7 @@ configuration. %files SQL %defattr(-,root,root) %{_bindir}/monetdb* +%if %{without compat} %dir %attr(775,monetdb,monetdb) %{_localstatedir}/log/monetdb %dir %attr(775,monetdb,monetdb) %{_rundir}/monetdb # RHEL >= 7, and all current Fedora @@ -667,7 +692,9 @@ configuration. %dir %{_datadir}/doc/MonetDB-SQL %docdir %{_datadir}/doc/MonetDB-SQL %{_datadir}/doc/MonetDB-SQL/* +%endif +%if %{without compat} %package SQL-devel Summary: MonetDB SQL server modules development files Group: Applications/Databases @@ -688,7 +715,9 @@ This package contains files needed to de %{_includedir}/monetdb/rel_*.h %{_includedir}/monetdb/sql*.h %{_includedir}/monetdb/store_*.h +%endif +%if %{without compat} %package embedded Summary: MonetDB as an embedded library Group: Applications/Databases @@ -754,7 +783,9 @@ Group: Applications/Databases Requires: %{name}-client-tests = %{version}-%{release}
MonetDB: Dec2023 - Move looking up function pointer out of the i...
Changeset: efc00e7b6e61 for MonetDB URL: https://dev.monetdb.org/hg/MonetDB/rev/efc00e7b6e61 Modified Files: gdk/gdk_calc_convert.c gdk/gdk_hash.c Branch: Dec2023 Log Message: Move looking up function pointer out of the inner loop. diffs (78 lines): diff --git a/gdk/gdk_calc_convert.c b/gdk/gdk_calc_convert.c --- a/gdk/gdk_calc_convert.c +++ b/gdk/gdk_calc_convert.c @@ -865,6 +865,7 @@ convert_str_fix(BATiter *bi, int tp, voi return 0; } + int (*atomcmp)(const void *, const void *) = ATOMcompare(tp); TIMEOUT_LOOP(ci->ncand, timeoffset) { oid x = canditer_next(ci) - candoff; const char *s = BUNtvar(*bi, x); @@ -878,7 +879,7 @@ convert_str_fix(BATiter *bi, int tp, voi goto conversion_failed; } assert(len == ATOMsize(tp)); - if (ATOMcmp(tp, dst, nil) == 0) + if (atomcmp(dst, nil) == 0) nils++; } dst = (void *) ((char *) dst + len); diff --git a/gdk/gdk_hash.c b/gdk/gdk_hash.c --- a/gdk/gdk_hash.c +++ b/gdk/gdk_hash.c @@ -899,7 +899,8 @@ BAThash_impl(BAT *restrict b, struct can case TYPE_uuid: starthash(uuid); break; - default: + default: { + int (*atomcmp)(const void *, const void *) = ATOMcompare(h->type); TIMEOUT_LOOP(p, timeoffset) { const void *restrict v = BUNtail(bi, o - b->hseqbase); c = hash_any(h, v); @@ -913,8 +914,7 @@ BAThash_impl(BAT *restrict b, struct can for (hb = hget; hb != BUN_NONE; hb = HASHgetlink(h, hb)) { - if (ATOMcmp(h->type, - v, + if (atomcmp(v, BUNtail(bi, hb)) == 0) break; } @@ -928,6 +928,7 @@ BAThash_impl(BAT *restrict b, struct can GOTO_LABEL_TIMEOUT_HANDLER(bailout)); break; } + } TRC_DEBUG_IF(ACCELERATOR) if (p < cnt1) TRC_DEBUG_ENDIF(ACCELERATOR, "%s: abort starthash with " @@ -975,7 +976,8 @@ BAThash_impl(BAT *restrict b, struct can case TYPE_uuid: finishhash(uuid); break; - default: + default: { + int (*atomcmp)(const void *, const void *) = ATOMcompare(h->type); TIMEOUT_LOOP(ci->ncand - p, timeoffset) { const void *restrict v = BUNtail(bi, o - b->hseqbase); c = hash_any(h, v); @@ -985,7 +987,7 @@ BAThash_impl(BAT *restrict b, struct can for (hb = hget; hb != BUN_NONE; hb = HASHgetlink(h, hb)) { - if (ATOMcmp(h->type, v, BUNtail(bi, hb)) == 0) + if (atomcmp(v, BUNtail(bi, hb)) == 0) break; } h->nunique += hb == BUN_NONE; @@ -999,6 +1001,7 @@ BAThash_impl(BAT *restrict b, struct can GOTO_LABEL_TIMEOUT_HANDLER(bailout)); break; } + } bat_iterator_end(); /* if the number of unique values is equal to the bat count, * all values are necessarily distinct */ ___ checkin-list mailing list -- checkin-list@monetdb.org To unsubscribe send an email to checkin-list-le...@monetdb.org
MonetDB: ascii-flag - Closing branch ascii-flag.
Changeset: 772d4d7ddbd5 for MonetDB URL: https://dev.monetdb.org/hg/MonetDB/rev/772d4d7ddbd5 Branch: ascii-flag Log Message: Closing branch ascii-flag. ___ checkin-list mailing list -- checkin-list@monetdb.org To unsubscribe send an email to checkin-list-le...@monetdb.org
MonetDB: default - Merge branch ascii-flag into default.
Changeset: 3b2c82d4448b for MonetDB URL: https://dev.monetdb.org/hg/MonetDB/rev/3b2c82d4448b Branch: default Log Message: Merge branch ascii-flag into default. diffs (truncated from 19798 to 300 lines): 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 @@ -34319,6 +34319,16 @@ pattern batstr.asciify(X_0:bat[:str], X_ BATSTRasciify; Transform BAT of strings from UTF8 to ASCII batstr +caseFold +pattern batstr.caseFold(X_0:bat[:str]):bat[:str] +STRbatCaseFold; +Fold the case of a string. +batstr +caseFold +pattern batstr.caseFold(X_0:bat[:str], X_1:bat[:oid]):bat[:str] +STRbatCaseFold; +Fold the case of a string. +batstr contains pattern batstr.contains(X_0:bat[:str], X_1:bat[:str]):bat[:bit] BATSTRcontains; @@ -50299,6 +50309,11 @@ command str.asciify(X_0:str):str STRasciify; Transform string from UTF8 to ASCII str +caseFold +command str.caseFold(X_0:str):str +STRcasefold; +Fold the case of a string. +str contains pattern str.contains(X_0:str, X_1:str):bit STRcontains; @@ -50379,11 +50394,6 @@ pattern str.endswithselect(X_0:bat[:str] STRendswithselect; Select all head values of the first input BAT for which the@tail value end with the given suffix + icase. str -epilogue -command str.epilogue():void -STRepilogue; -(empty) -str insert command str.insert(X_0:str, X_1:int, X_2:int, X_3:str):str STRinsert; diff --git a/clients/Tests/MAL-signatures.test b/clients/Tests/MAL-signatures.test --- a/clients/Tests/MAL-signatures.test +++ b/clients/Tests/MAL-signatures.test @@ -25409,6 +25409,16 @@ pattern batstr.asciify(X_0:bat[:str], X_ BATSTRasciify; Transform BAT of strings from UTF8 to ASCII batstr +caseFold +pattern batstr.caseFold(X_0:bat[:str]):bat[:str] +STRbatCaseFold; +Fold the case of a string. +batstr +caseFold +pattern batstr.caseFold(X_0:bat[:str], X_1:bat[:oid]):bat[:str] +STRbatCaseFold; +Fold the case of a string. +batstr contains pattern batstr.contains(X_0:bat[:str], X_1:bat[:str]):bat[:bit] BATSTRcontains; @@ -38664,6 +38674,11 @@ command str.asciify(X_0:str):str STRasciify; Transform string from UTF8 to ASCII str +caseFold +command str.caseFold(X_0:str):str +STRcasefold; +Fold the case of a string. +str contains pattern str.contains(X_0:str, X_1:str):bit STRcontains; @@ -38744,11 +38759,6 @@ pattern str.endswithselect(X_0:bat[:str] STRendswithselect; Select all head values of the first input BAT for which the@tail value end with the given suffix + icase. str -epilogue -command str.epilogue():void -STRepilogue; -(empty) -str insert command str.insert(X_0:str, X_1:int, X_2:int, X_3:str):str STRinsert; 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 @@ -16,6 +16,7 @@ BAT *BATallnotequal_grp2(BAT *l, BAT *r, BAT *BATanyequal_grp(BAT *l, BAT *r, BAT *g, BAT *e, BAT *s); BAT *BATanyequal_grp2(BAT *l, BAT *r, BAT *rid, BAT *g, BAT *e, BAT *s); gdk_return BATappend(BAT *b, BAT *n, BAT *s, bool force) __attribute__((__warn_unused_result__)); +BAT *BATasciify(BAT *b, BAT *s); void BATassertProps(BAT *b); atomDesc BATatoms[MAXATOMS]; BAT *BATattach(int tt, const char *heapfile, role_t role); @@ -108,6 +109,7 @@ dbl BATcalcvariance_population(dbl *avgp dbl BATcalcvariance_sample(dbl *avgp, BAT *b); BAT *BATcalcxor(BAT *b1, BAT *b2, BAT *s1, BAT *s2); BAT *BATcalcxorcst(BAT *b, const ValRecord *v, BAT *s); +BAT *BATcasefold(BAT *b, BAT *s); bool BATcheckorderidx(BAT *b); gdk_return BATclear(BAT *b, bool force); void BATcommit(BAT *b, BUN size); @@ -204,6 +206,8 @@ gdk_return BATsum(void *res, int tp, BAT const char *BATtailname(const BAT *b); gdk_return BATthetajoin(BAT **r1p, BAT **r2p, BAT *l, BAT *r, BAT *sl, BAT *sr, int op, bool nil_matches, BUN estimate) __attribute__((__warn_unused_result__)); BAT *BATthetaselect(BAT *b, BAT *s, const void *val, const char *op); +BAT *BATtolower(BAT *b, BAT *s); +BAT *BATtoupper(BAT *b, BAT *s); void BATtseqbase(BAT *b, oid o); BAT *BATunique(BAT *b, BAT *s); BAT *BATunmask(BAT *b); @@ -265,7 +269,9 @@ gdk_return GDKanalyticalntile(BAT *r, BA gdk_return GDKanalyticalprod(BAT *r, BAT *p, BAT *o, BAT *b, BAT *s, BAT *e, int tp1, int tp2, int frame_type); gdk_return GDKanalyticalsum(BAT *r, BAT *p, BAT *o, BAT *b, BAT *s, BAT *e, int tp1, int tp2, int frame_type); gdk_return GDKanalyticalwindowbounds(BAT *r, BAT *b, BAT *p, BAT *l, const void *restrict bound, int tp1, int tp2, int unit, bool preceding, oid first_half); +gdk_return GDKasciify(char **restrict buf, size_t *restrict buflen, const char *restrict s); int GDKatomcnt; +gdk_return GDKcasefold(char **restrict buf, size_t *restrict buflen, const char *restrict s); void GDKclrerr(void); gdk_return GDKcopyenv(BAT **key, BAT **val, bool writable); gdk_return GDKcreatedir(const char *nme); @@ -317,8 +323,13 @@
MonetDB: ascii-flag - Merge with default branch.
Changeset: 48157ba5cd44 for MonetDB URL: https://dev.monetdb.org/hg/MonetDB/rev/48157ba5cd44 Modified Files: common/stream/CMakeLists.txt common/stream/monetdb-stream.pc.in Branch: ascii-flag Log Message: Merge with default branch. diffs (truncated from 2231 to 300 lines): diff --git a/.hgtags b/.hgtags --- a/.hgtags +++ b/.hgtags @@ -826,3 +826,4 @@ dcc8c702e685a4faf21ccf663028d1bc3d1165d1 d656785f49ee62c19705722aa6b7c171904c64d5 Dec2023_7 d656785f49ee62c19705722aa6b7c171904c64d5 Dec2023_SP2_release 9a694c41042503a22d6c92aeab5bc4ca1912b62e Dec2023_9 +9a694c41042503a22d6c92aeab5bc4ca1912b62e Dec2023_SP3_release diff --git a/ChangeLog b/ChangeLog --- a/ChangeLog +++ b/ChangeLog @@ -2,6 +2,9 @@ # This file is updated with Maddlog * Wed May 8 2024 Sjoerd Mullender +- The shared library (.dll aka .so files) now have the version number + as part of the name. This should allow the building of compatibility + versions that can be installed in parallel to the latest version. - Some of the Debian/Ubuntu packages have been renamed. The old monetdb5 names have been changed to plain monetdb, and libmonetdb5-server-* packages have been renamed monetdb-*. diff --git a/MonetDB.spec b/MonetDB.spec --- a/MonetDB.spec +++ b/MonetDB.spec @@ -176,7 +176,7 @@ more client packages. %files %license COPYING %defattr(-,root,root) -%{_libdir}/libbat.so.* +%{_libdir}/libbat*.so.* %package devel Summary: MonetDB development files @@ -202,7 +202,7 @@ functionality of MonetDB. %{_includedir}/monetdb/mstring.h %exclude %{_includedir}/monetdb/monetdbe.h %{_includedir}/monetdb/monet*.h -%{_libdir}/libbat.so +%{_libdir}/libbat*.so %{_libdir}/pkgconfig/monetdb-gdk.pc %package stream @@ -223,7 +223,7 @@ various other components. %files stream %license COPYING %defattr(-,root,root) -%{_libdir}/libstream.so.* +%{_libdir}/libstream*.so.* %package stream-devel Summary: MonetDB stream library @@ -245,7 +245,7 @@ library. %files stream-devel %defattr(-,root,root) %dir %{_includedir}/monetdb -%{_libdir}/libstream.so +%{_libdir}/libstream*.so %{_includedir}/monetdb/stream.h %{_includedir}/monetdb/stream_socket.h %{_libdir}/pkgconfig/monetdb-stream.pc @@ -273,7 +273,7 @@ you will very likely need this package. %files client-lib %license COPYING %defattr(-,root,root) -%{_libdir}/libmapi.so.* +%{_libdir}/libmapi*.so.* %package client Summary: MonetDB - Monet Database Management System Client Programs @@ -298,8 +298,8 @@ MonetDB, you will very likely need this %files client %license COPYING %defattr(-,root,root) -%{_bindir}/mclient -%{_bindir}/msqldump +%{_bindir}/mclient* +%{_bindir}/msqldump* %{_mandir}/man1/mclient.1* %{_mandir}/man1/msqldump.1* @@ -321,7 +321,7 @@ This package contains the files needed t %files client-devel %defattr(-,root,root) %dir %{_includedir}/monetdb -%{_libdir}/libmapi.so +%{_libdir}/libmapi*.so %{_includedir}/monetdb/mapi*.h %{_includedir}/monetdb/msettings.h %{_libdir}/pkgconfig/monetdb-mapi.pc @@ -433,7 +433,7 @@ extensions for %{name}-server. %files geom %defattr(-,root,root) -%{_libdir}/monetdb5/lib_geom.so +%{_libdir}/monetdb5*/lib_geom.so %endif %if %{with rintegration} @@ -457,8 +457,8 @@ install it. %files R %defattr(-,root,root) -%{_libdir}/monetdb5/rapi.R -%{_libdir}/monetdb5/lib_rapi.so +%{_libdir}/monetdb5*/rapi.R +%{_libdir}/monetdb5*/lib_rapi.so %endif %if %{with py3integration} @@ -483,7 +483,7 @@ install it. %files python3 %defattr(-,root,root) -%{_libdir}/monetdb5/lib_pyapi3.so +%{_libdir}/monetdb5*/lib_pyapi3.so %endif %if %{with fits} @@ -503,7 +503,7 @@ format. %files cfitsio %defattr(-,root,root) -%{_libdir}/monetdb5/lib_fits.so +%{_libdir}/monetdb5*/lib_fits.so %endif %package libs @@ -528,14 +528,14 @@ embedded library (%{name}-embedded). %files libs %defattr(-,root,root) -%{_libdir}/libmonetdb5.so.* -%{_libdir}/libmonetdbsql.so* -%dir %{_libdir}/monetdb5 +%{_libdir}/libmonetdb5*.so.* +%{_libdir}/libmonetdbsql*.so* +%dir %{_libdir}/monetdb5%{version} %if %{with cintegration} -%{_libdir}/monetdb5/lib_capi.so +%{_libdir}/monetdb5*/lib_capi.so %endif -%{_libdir}/monetdb5/lib_csv.so -%{_libdir}/monetdb5/lib_generator.so +%{_libdir}/monetdb5*/lib_csv.so +%{_libdir}/monetdb5*/lib_generator.so %package server Summary: MonetDB - Monet Database Management System @@ -590,7 +590,7 @@ exit 0 %attr(2750,monetdb,monetdb) %dir %{_localstatedir}/lib/monetdb %attr(2770,monetdb,monetdb) %dir %{_localstatedir}/monetdb5 %attr(2770,monetdb,monetdb) %dir %{_localstatedir}/monetdb5/dbfarm -%{_bindir}/mserver5 +%{_bindir}/mserver5* %{_mandir}/man1/mserver5.1* %dir %{_datadir}/doc/MonetDB %docdir %{_datadir}/doc/MonetDB @@ -618,7 +618,7 @@ used from the MAL level. %defattr(-,root,root) %{_includedir}/monetdb/mal*.h %{_includedir}/monetdb/mel.h -%{_libdir}/libmonetdb5.so +%{_libdir}/libmonetdb5*.so %{_libdir}/pkgconfig/monetdb5.pc %package SQL @@ -653,8 +653,7 @@ configuration.