Changeset: d04024f54648 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB/rev/d04024f54648
Modified Files:
clients/mapiclient/msqldump.c
Branch: Dec2023
Log Message:
Support URL's to allow encrypted sqldumping
msqldump -d monetdbs://localhost:43000/demo
diffs (27 lines):
diff --git a/clients/mapiclient/msqldump.c b/clients/mapiclient/msqldump.c
--- a/clients/mapiclient/msqldump.c
+++ b/clients/mapiclient/msqldump.c
@@ -203,7 +203,11 @@ main(int argc, char **argv)
passwd = passwd_allocated;
}
- mid = mapi_mapi(host, port, user, passwd, "sql", dbname);
+ if (dbname != NULL && strchr(dbname, ':') != NULL) {
+ mid = mapi_mapiuri(dbname, user, passwd, "sql");
+ } else {
+ mid = mapi_mapi(host, port, user, passwd, "sql", dbname);
+ }
free(user_allocated);
user_allocated = NULL;
free(passwd_allocated);
@@ -215,6 +219,10 @@ main(int argc, char **argv)
fprintf(stderr, "failed to allocate Mapi structure\n");
exit(2);
}
+ if (mapi_error(mid)) {
+ mapi_explain(mid, stderr);
+ exit(2);
+ }
mapi_set_time_zone(mid, 0);
mapi_reconnect(mid);
if (mapi_error(mid)) {
_______________________________________________
checkin-list mailing list -- [email protected]
To unsubscribe send an email to [email protected]