Changeset: 77ae02c05e69 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB/rev/77ae02c05e69
Modified Files:
        clients/mapiclient/mclient.c
Branch: Sep2022
Log Message:

Set size_header value before connecting.
This way the correct option is sent to the server right away.


diffs (42 lines):

diff --git a/clients/mapiclient/mclient.c b/clients/mapiclient/mclient.c
--- a/clients/mapiclient/mclient.c
+++ b/clients/mapiclient/mclient.c
@@ -3541,6 +3541,19 @@ main(int argc, char **argv)
        mapi_setAutocommit(mid, autocommit);
        if (mode == SQL && !settz)
                mapi_set_time_zone(mid, 0);
+       if (output) {
+               setFormatter(output);
+               mapi_set_size_header(mid, strcmp(output, "raw") == 0);
+               free(output);
+       } else {
+               if (mode == SQL) {
+                       setFormatter("sql");
+                       mapi_set_size_header(mid, false);
+               } else {
+                       setFormatter("raw");
+                       mapi_set_size_header(mid, true);
+               }
+       }
 
        if (mapi_error(mid) == MOK)
                mapi_reconnect(mid);    /* actually, initial connect */
@@ -3569,18 +3582,6 @@ main(int argc, char **argv)
                mapi_log(mid, logfile);
 
        mapi_trace(mid, trace);
-       if (output) {
-               setFormatter(output);
-               mapi_set_size_header(mid, strcmp(output, "raw") == 0);
-               free(output);
-       } else {
-               if (mode == SQL) {
-                       setFormatter("sql");
-               } else {
-                       setFormatter("raw");
-                       mapi_set_size_header(mid, true);
-               }
-       }
        /* give the user a welcome message with some general info */
        if (!has_fileargs && command == NULL && isatty(fileno(stdin))) {
                char *lang;
_______________________________________________
checkin-list mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to