Changeset: 6437e2b0ce75 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB/rev/6437e2b0ce75
Modified Files:
MonetDB.spec
sql/backends/monet5/sql_upgrades.c
Branch: default
Log Message:
Merge with Dec2025 branch.
diffs (truncated from 1069 to 300 lines):
diff --git a/MonetDB.spec b/MonetDB.spec
--- a/MonetDB.spec
+++ b/MonetDB.spec
@@ -1219,7 +1219,7 @@ rm "${RPM_BUILD_ROOT}"%{_unitdir}/monetd
ALTER USER IF EXISTS user_name ...
With IF EXISTS specified these statements will not return an error
when the object does not exists. See doc:
-
https://www.monetdb.org/documentation/user-guide/sql-manual/data-types/serial-types/
+
https://www.monetdb.org/documentation/user-guide/sql-manual/data-definition/sequence-definition/
and
https://www.monetdb.org/documentation/user-guide/sql-manual/data-definition/privileges/
diff --git a/clients/mapilib/connect.c b/clients/mapilib/connect.c
--- a/clients/mapilib/connect.c
+++ b/clients/mapilib/connect.c
@@ -519,7 +519,7 @@ mapi_handshake(Mapi mid)
close_connection(mid);
return mid->error;
}
- char *algsv[] = {
+ static const char *algsv[] = {
"RIPEMD160",
"SHA512",
"SHA384",
@@ -528,7 +528,7 @@ mapi_handshake(Mapi mid)
"SHA1",
NULL
};
- char **algs = algsv;
+ const char **algs = algsv;
/* rBuCQ9WTn3:mserver:9:RIPEMD160,SHA256,SHA1,MD5:LIT:SHA1: */
diff --git a/clients/mapilib/connect_openssl.c
b/clients/mapilib/connect_openssl.c
--- a/clients/mapilib/connect_openssl.c
+++ b/clients/mapilib/connect_openssl.c
@@ -269,7 +269,7 @@ wrap_tls(Mapi mid, SOCKET sock)
return croak_openssl(mid, __func__,
"X509_VERIFY_PARAM_set1_host");
}
- unsigned char alpn_vector[] = { 6, 'm', 'a', 'p', 'i', '/', '9' };
+ static const unsigned char alpn_vector[] = { 6, 'm', 'a', 'p', 'i',
'/', '9' };
// NOTE: these functions return 0 on success, not 1!
if (0 != SSL_set_alpn_protos(ssl, alpn_vector, sizeof(alpn_vector))) {
BIO_free_all(bio);
diff --git a/clients/mapilib/msettings.c b/clients/mapilib/msettings.c
--- a/clients/mapilib/msettings.c
+++ b/clients/mapilib/msettings.c
@@ -40,7 +40,7 @@ msettings_malloc_failed(msettings_error
int msetting_parse_bool(const char *text)
{
- static struct { const char *word; bool value; } variants[] = {
+ static const struct { const char *word; bool value; } variants[] = {
{ "true", true },
{ "false", false },
{ "yes", true },
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
@@ -172,7 +172,7 @@ socket_getoob_unix(stream *s)
static int
socket_putoob_unix(stream *s, char val)
{
- char buf[3] = {
+ const char buf[3] = {
OOBMSG0,
OOBMSG1,
val,
diff --git a/debian/changelog b/debian/changelog
--- a/debian/changelog
+++ b/debian/changelog
@@ -200,7 +200,7 @@ monetdb (11.55.1) unstable; urgency=low
ALTER USER IF EXISTS user_name ...
With IF EXISTS specified these statements will not return an error
when the object does not exists. See doc:
-
https://www.monetdb.org/documentation/user-guide/sql-manual/data-types/serial-types/
+
https://www.monetdb.org/documentation/user-guide/sql-manual/data-definition/sequence-definition/
and
https://www.monetdb.org/documentation/user-guide/sql-manual/data-definition/privileges/
diff --git a/gdk/gdk_atoms.c b/gdk/gdk_atoms.c
--- a/gdk/gdk_atoms.c
+++ b/gdk/gdk_atoms.c
@@ -1569,7 +1569,7 @@ inet6_classify(char c)
{
/* The values in this table are all one too high so the invalid
* ones can be left at 0. */
- static uint8_t table[256] = {
+ static const uint8_t table[256] = {
['0'] = 0 + 1, ['1'] = 1 + 1, ['2'] = 2 + 1,
['3'] = 3 + 1, ['4'] = 4 + 1, ['5'] = 5 + 1,
['6'] = 6 + 1, ['7'] = 7 + 1, ['8'] = 8 + 1,
diff --git a/geom/monetdb5/geom.c b/geom/monetdb5/geom.c
--- a/geom/monetdb5/geom.c
+++ b/geom/monetdb5/geom.c
@@ -2123,7 +2123,7 @@ dumpPointsPolygon(Client ctx, BAT *idBAT
const int lvlDigitsNum = 10; //MAX_UNIT = 4,294,967,295
size_t pathLength = strlen(path);
char *newPath;
- const char extraStr[] = ",";
+ static const char extraStr[] = ",";
int extraLength = 1;
//get the exterior ring of the polygon
@@ -2180,7 +2180,7 @@ dumpPointsMultiGeometry(Client ctx, BAT
unsigned int lvl = 0;
size_t pathLength = strlen(path);
char *newPath = NULL;
- const char extraStr[] = ",";
+ static const char extraStr[] = ",";
int extraLength = 1;
geometriesNum = GEOSGetNumGeometries_r(geoshandle, geosGeometry);
@@ -2724,7 +2724,7 @@ wkbAsText(Client ctx, char **txt, wkb **
allocator *ma = ctx->curprg->def->ma;
size_t len = 0;
char *wkt = NULL;
- const char sridTxt[] = "SRID:";
+ static const char sridTxt[] = "SRID:";
if (is_wkb_nil(*geomWKB) || (withSRID && is_int_nil(*withSRID))) {
*txt = (char *) str_nil;
diff --git a/monetdb5/extras/rapi/rapi.c b/monetdb5/extras/rapi/rapi.c
--- a/monetdb5/extras/rapi/rapi.c
+++ b/monetdb5/extras/rapi/rapi.c
@@ -423,7 +423,7 @@ static char *RAPIinitialize(void) {
// set some command line arguments
{
structRstart rp;
- char *rargv[] = { "R",
+ static /*const*/ char *rargv[] = { "R",
#if R_VERSION >= R_Version(4,0,0)
"--no-echo",
#else
diff --git a/monetdb5/mal/mal_embedded.c b/monetdb5/mal/mal_embedded.c
--- a/monetdb5/mal/mal_embedded.c
+++ b/monetdb5/mal/mal_embedded.c
@@ -121,7 +121,7 @@ malEmbeddedBoot(int workerlimit, int mem
MT_thread_set_qry_ctx(qc_old);
return msg;
}
- char *modules[7] = { "embedded", "sql", "generator", "udf", "csv",
"monetdb_loader" };
+ static /*const*/ char *modules[7] = { "embedded", "sql", "generator",
"udf", "csv", "monetdb_loader" };
if ((msg = malIncludeModules(c, modules, 0, !with_mapi_server, NULL))
!= MAL_SUCCEED) {
MCcloseClient(c);
MT_thread_set_qry_ctx(qc_old);
diff --git a/monetdb5/mal/mal_instruction.c b/monetdb5/mal/mal_instruction.c
--- a/monetdb5/mal/mal_instruction.c
+++ b/monetdb5/mal/mal_instruction.c
@@ -77,9 +77,6 @@ freeSymbol(Symbol s)
freeMalBlk(s->def);
s->def = NULL;
} else if (s->allocated && s->func) {
- GDKfree((char*)s->func->comment);
- GDKfree((char*)s->func->cname);
- GDKfree(s->func->args);
GDKfree(s->func);
}
GDKfree(s);
diff --git a/monetdb5/mal/mal_prelude.c b/monetdb5/mal/mal_prelude.c
--- a/monetdb5/mal/mal_prelude.c
+++ b/monetdb5/mal/mal_prelude.c
@@ -306,14 +306,12 @@ melFunction(bool command, const char *mo
fcn = s->name;
s->allocated = true;
- f = (mel_func*)GDKmalloc(sizeof(mel_func));
- mel_arg *args = (mel_arg*)GDKmalloc(sizeof(mel_arg)*argc);
- if (!f || !args) {
- GDKfree(f);
- GDKfree(args);
+ f = GDKmalloc(sizeof(mel_func) + sizeof(mel_arg [argc]));
+ if (f == NULL) {
freeSymbol(s);
return MEL_ERR;
}
+ mel_arg *args = (mel_arg *) (f + 1);
*f = (mel_func) {
.mod = mod,
.fcn = fcn,
@@ -326,8 +324,8 @@ melFunction(bool command, const char *mo
.argc = argc,
.args = args,
.imp = imp,
- .comment = comment ? GDKstrdup(comment) : NULL,
- .cname = fname ? GDKstrdup(fname) : NULL,
+ .comment = comment,
+ .cname = fname,
};
s->def = NULL;
s->func = f;
diff --git a/monetdb5/modules/atoms/batxml.c b/monetdb5/modules/atoms/batxml.c
--- a/monetdb5/modules/atoms/batxml.c
+++ b/monetdb5/modules/atoms/batxml.c
@@ -1763,7 +1763,7 @@ AGGRsubxml(Client ctx, bat *retval, cons
#endif /* HAVE_LIBXML */
#include "mel.h"
-mel_func batxml_init_funcs[] = {
+static mel_func batxml_init_funcs[] = {
command("batxml", "xml", BATXMLstr2xml, false, "Cast the string to an xml
compliant string.", args(1,2, batarg("",xml),batarg("src",str))),
command("batxml", "str", BATXMLxml2str, false, "Cast the xml to a string.",
args(1,2, batarg("",str),batarg("src",xml))),
command("batxml", "document", BATXMLdocument, false, "Parse the string as an
XML document.", args(1,2, batarg("",xml),batarg("src",str))),
diff --git a/monetdb5/modules/atoms/inet-46.c b/monetdb5/modules/atoms/inet-46.c
--- a/monetdb5/modules/atoms/inet-46.c
+++ b/monetdb5/modules/atoms/inet-46.c
@@ -1197,7 +1197,7 @@ INETinet6containssymmetricinet6_bulk(Cli
}
#include "mel.h"
-mel_func inet46_init_funcs[] = {
+static mel_func inet46_init_funcs[] = {
command("calc", "inet4", INETinet42inet4, false, "", args(1,2,
arg("",inet4),arg("u",inet4))),
command("calc", "inet4", INETstr2inet4, false, "Coerce a string to an inet4,
validating its format", args(1,2, arg("",inet4),arg("s",str))),
command("batcalc", "inet4", INETinet42inet4_bulk, false, "", args(1,3,
batarg("",inet4),batarg("u",inet4),batarg("c",oid))),
diff --git a/monetdb5/modules/atoms/inet.c b/monetdb5/modules/atoms/inet.c
--- a/monetdb5/modules/atoms/inet.c
+++ b/monetdb5/modules/atoms/inet.c
@@ -826,10 +826,10 @@ INETnull(void)
}
#include "mel.h"
-mel_atom inet_init_atoms[] = {
+static mel_atom inet_init_atoms[] = {
{ .name="inet", .basetype="lng", .size=sizeof(inet), .null=INETnull,
.cmp=INETcompare, .equal=INETequal, .fromstr=INETfromString,
.tostr=INETtoString, }, { .cmp=NULL }
};
-mel_func inet_init_funcs[] = {
+static mel_func inet_init_funcs[] = {
command("inet", "new", INETnew, false, "Create an inet from a string
literal", args(1,2, arg("",inet),arg("s",str))),
command("inet", "isnil", INET_isnil, false, "Nil test for inet value",
args(1,2, arg("",bit),arg("v",inet))),
command("inet", "=", INET_comp_EQ, false, "Equality of two inets", args(1,3,
arg("",bit),arg("v",inet),arg("w",inet))),
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
@@ -2849,7 +2849,7 @@ STRcontainsjoin(Client ctx, MalBlkPtr mb
}
#include "mel.h"
-mel_func str_init_funcs[] = {
+static mel_func str_init_funcs[] = {
command("str", "str", STRtostr, false, "Noop routine.", args(1,2,
arg("",str),arg("s",str))),
command("str", "string", STRTail, false, "Return the tail
s[offset..n]\nof a string s[0..n].", args(1,3,
arg("",str),arg("s",str),arg("offset",int))),
command("str", "string3", STRSubString, false, "Return substring
s[offset..offset+count] of a string s[0..n]", args(1,4,
arg("",str),arg("s",str),arg("offset",int),arg("count",int))),
diff --git a/monetdb5/modules/atoms/streams.c b/monetdb5/modules/atoms/streams.c
--- a/monetdb5/modules/atoms/streams.c
+++ b/monetdb5/modules/atoms/streams.c
@@ -239,11 +239,11 @@ bstream_read_wrapwrap(Client ctx, int *r
}
#include "mel.h"
-mel_atom streams_init_atoms[] = {
+static mel_atom streams_init_atoms[] = {
{ .name="streams", .basetype="ptr", },
{ .name="bstream", .basetype="ptr", }, { .cmp=NULL }
};
-mel_func streams_init_funcs[] = {
+static mel_func streams_init_funcs[] = {
command("streams", "openReadBytes", mnstr_open_rstreamwrap, true, "open a
file stream for reading", args(1,2, arg("",streams),arg("filename",str))),
command("streams", "openWriteBytes", mnstr_open_wstreamwrap, true, "open a
file stream for writing", args(1,2, arg("",streams),arg("filename",str))),
command("streams", "openRead", mnstr_open_rastreamwrap, true, "open ascii
file stream for reading", args(1,2, arg("",streams),arg("filename",str))),
diff --git a/monetdb5/modules/atoms/url.c b/monetdb5/modules/atoms/url.c
--- a/monetdb5/modules/atoms/url.c
+++ b/monetdb5/modules/atoms/url.c
@@ -1033,10 +1033,10 @@ BATextractURLHost(Client ctx, bat *res,
#include "mel.h"
-mel_atom url_init_atoms[] = {
+static mel_atom url_init_atoms[] = {
{ .name="url", .basetype="str", .fromstr=URLfromString, .tostr=URLtoString,
}, { .cmp=NULL }
};
-mel_func url_init_funcs[] = {
+static mel_func url_init_funcs[] = {
command("url", "url", URLnew, false, "Create an URL from a string literal",
args(1,2, arg("",url),arg("s",str))),
command("url", "url", URLnoop, false, "Create an URL from a string literal",
args(1,2, arg("",url),arg("s",url))),
command("calc", "url", URLnew, false, "Create an URL from a string literal",
args(1,2, arg("",url),arg("s",str))),
diff --git a/monetdb5/modules/atoms/uuid.c b/monetdb5/modules/atoms/uuid.c
--- a/monetdb5/modules/atoms/uuid.c
+++ b/monetdb5/modules/atoms/uuid.c
@@ -492,7 +492,7 @@ UUIDuuid2str_bulk(Client ctx, bat *res,
}
#include "mel.h"
-mel_func uuid_init_funcs[] = {
+static mel_func uuid_init_funcs[] = {
command("uuid", "new", UUIDgenerateUuid, true, "Generate a new uuid",
args(1,1, arg("",uuid))),
command("uuid", "new", UUIDgenerateUuidInt, false, "Generate a new uuid
(dummy version for side effect free multiplex loop)", args(1,2,
arg("",uuid),arg("d",int))),
pattern("batuuid", "new", UUIDgenerateUuidInt_bulk, false, "Generate a new
uuid (dummy version for side effect free multiplex loop)", args(1,2,
batarg("",uuid),batarg("d",int))),
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
@@ -912,10 +912,10 @@ XMLepilogue(Client ctx, void *ret)
#endif /* HAVE_LIBXML */
#include "mel.h"
-mel_atom xml_init_atoms[] = {
+static mel_atom xml_init_atoms[] = {
{ .name="xml", .basetype="str", .fromstr=XMLfromString, .tostr=XMLtoString,
}, { .cmp=NULL }
};
_______________________________________________
checkin-list mailing list -- [email protected]
To unsubscribe send an email to [email protected]