Changeset: 701c0fa97235 for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=701c0fa97235
Modified Files:
        clients/ChangeLog.Aug2011
        clients/mapiclient/mclient.c
Branch: Aug2011
Log Message:

mclient: write errors to stderr, not stdout

Additionally, flush stdout before writing the error to stderr.


diffs (28 lines):

diff --git a/clients/ChangeLog.Aug2011 b/clients/ChangeLog.Aug2011
--- a/clients/ChangeLog.Aug2011
+++ b/clients/ChangeLog.Aug2011
@@ -1,6 +1,10 @@
 # ChangeLog file for clients
 # This file is updated with Maddlog
 
+* Fri Aug 26 2011 Fabian Groffen <[email protected]>
+- Made error messages from the server in mclient go to stderr, instead
+  of stdout.
+
 * Thu Aug 18 2011 Sjoerd Mullender <[email protected]>
 - Implemented SQL_ATTR_METADATA_ID attribute.  The attribute is used
   in SQLColumns, SQLProcedures, and SQLTablePrivileges.
diff --git a/clients/mapiclient/mclient.c b/clients/mapiclient/mclient.c
--- a/clients/mapiclient/mclient.c
+++ b/clients/mapiclient/mclient.c
@@ -1365,8 +1365,9 @@ format_result(Mapi mid, MapiHdl hdl, cha
        do {
                /* handle errors first */
                if ((reply = mapi_result_error(hdl)) != NULL) {
+                       mnstr_flush(toConsole);
                        if (formatter == TABLEformatter) {
-                               mnstr_printf(toConsole, "%s", reply);
+                               fprintf(stderr, "%s", reply);
                        } else {
                                mapi_explain_result(hdl, stderr);
                        }
_______________________________________________
Checkin-list mailing list
[email protected]
http://mail.monetdb.org/mailman/listinfo/checkin-list

Reply via email to