Changeset: 5b7fa3b01931 for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=5b7fa3b01931
Modified Files:
        clients/mapilib/mapi.c
Branch: protocol
Log Message:

Fix for empty result sets.


diffs (17 lines):

diff --git a/clients/mapilib/mapi.c b/clients/mapilib/mapi.c
--- a/clients/mapilib/mapi.c
+++ b/clients/mapilib/mapi.c
@@ -5729,7 +5729,12 @@ mapi_fetch_row(MapiHdl hdl)
                // check if we have read the entire result set
                if (result->rows_read >= result->row_count) {
                        char dummy;
-                       mnstr_readChr(hdl->mid->from, &dummy);
+                       if (result->row_count != 0) {
+                               // this flush only occurs after a chunk has 
been sent
+                               // if the result set has 0 rows, this flush 
does not occur
+                               // hence we don't need to consume it
+                               mnstr_readChr(hdl->mid->from, &dummy);
+                       }
                        bs2_resetbuf(hdl->mid->from);
                        do {
                                if ((reply = mapi_fetch_line(hdl)) == NULL)
_______________________________________________
checkin-list mailing list
checkin-list@monetdb.org
https://www.monetdb.org/mailman/listinfo/checkin-list

Reply via email to