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", &id, 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 -- [email protected]
To unsubscribe send an email to [email protected]