Update of /cvsroot/monetdb/clients/src/mapiclient
In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv7644
Modified Files:
MapiClient.mx
Log Message:
After handling (or not handling) a \ command, continue with reading
the next input line, don't ever send the \ line to the server.
When an empty line is sent from the server, handle it as any other
line. This fixes a bug introduced in revision 1.49 which caused
MonetDB4/src/mapi/Tests/monet_BATs to fail.
Don't attempt reading another line after mapi_fetch_line returned
NULL.
Index: MapiClient.mx
===================================================================
RCS file: /cvsroot/monetdb/clients/src/mapiclient/MapiClient.mx,v
retrieving revision 1.61
retrieving revision 1.62
diff -u -d -r1.61 -r1.62
--- MapiClient.mx 18 Aug 2007 21:29:40 -0000 1.61
+++ MapiClient.mx 20 Aug 2007 11:38:34 -0000 1.62
@@ -1264,6 +1264,7 @@
showCommands();
continue;
}
+ continue;
}
}
@@ -1355,11 +1356,12 @@
}
} else {
nononsense:
- if ((reply = mapi_result_error(hdl)) != NULL) {
+ if ((reply = mapi_result_error(hdl)) != NULL)
mapi_explain_result(hdl, stderr);
- }
- if (pagewidth >= 0 && (reply =
mapi_fetch_line(hdl)) != NULL) {
- if (*reply == '%') {
+
+ while ((reply = mapi_fetch_line(hdl)) != NULL) {
+ if (pagewidth >= 0 && *reply == '%') {
+ /* should only maybe happen in
the first iteration */
switch (formatter) {
case XMLformatter:
XMLrenderer(hdl);
@@ -1371,10 +1373,8 @@
SQLrenderer(hdl);
break;
}
- } else
- fprintf(toConsole, "%s\n",
reply);
- }
- while ((reply = mapi_fetch_line(hdl)) != NULL
&& *reply) {
+ break;
+ }
if ((mode == XQUERY || mode == MAL) &&
*reply == '=')
reply++;
/* we know when the MAL debugger
becomes active and finishes */
-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
Monetdb-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/monetdb-checkins