Changeset: 19db48c96891 for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=19db48c96891
Modified Files:
        
Branch: default
Log Message:

Merged from Dec2011


diffs (98 lines):

diff --git a/clients/mapiclient/mclient.c b/clients/mapiclient/mclient.c
--- a/clients/mapiclient/mclient.c
+++ b/clients/mapiclient/mclient.c
@@ -1014,6 +1014,8 @@ SQLdebugRendering(MapiHdl hdl)
                mnstr_printf(toConsole, "%s\n", reply);
                if (strncmp(reply, "mdb>#EOD", 8) == 0) {
                        cnt = 0;
+                       while ((reply = fetch_line(hdl)))
+                               mnstr_printf(toConsole, "%s\n", reply);
                        break;
                }
        }
diff --git a/tools/merovingian/ChangeLog.Dec2011 
b/tools/merovingian/ChangeLog.Dec2011
--- a/tools/merovingian/ChangeLog.Dec2011
+++ b/tools/merovingian/ChangeLog.Dec2011
@@ -1,5 +1,9 @@
 # ChangeLog file for sql/src/backends/monet5/merovingian
-# This file is updated with mchangelog
+# This file is updated with Maddlog
+
+* Fri Feb 17 2012 Fabian Groffen <[email protected]>
+- Fixed a bug in the multiplex-funnel where certain clients would abort
+  on responses for update queries.
 
 * Mon Jan 30 2012 Fabian Groffen <[email protected]>
 - Fixed problem where version and mserver properties for monetdbd were
diff --git a/tools/merovingian/daemon/monetdbd.1.in 
b/tools/merovingian/daemon/monetdbd.1.in
--- a/tools/merovingian/daemon/monetdbd.1.in
+++ b/tools/merovingian/daemon/monetdbd.1.in
@@ -1,7 +1,7 @@
 .\" Process this file with
 .\" groff -man -Tascii foo.1
 .\"
-.TH MONETDBD 1 "OCTOBRE 2011" MonetDB "MonetDB Applications"
+.TH MONETDBD 1 "FEBRUARY 2012" MonetDB "MonetDB Applications"
 .SH NAME
 monetdbd \- the MonetDB Database Server daemon
 .SH SYNOPSIS
@@ -361,6 +361,21 @@ for a
 .I SELECT COUNT(*)
 query, as there are databases defined.
 .P
+Due to the two above mentioned characteristics, a multiplex-funnel has
+some limitations.  As mentioned before, transactions over multiple
+queries are likely not to result in the desired behaviour.  This is due
+to each query to the funnel is required to be self-contained.  Further,
+since for each query, the results from multiple servers have to be
+combined into one, that query must only return a single response, i.e.
+multi-statement queries are most likely causing the funnel to respond
+with an error, or return garbled results.  Last, the size of each query
+is limited to currently about 80K.  While this size should be sufficient
+for most queries, it is likely not enough for e.g. COPY INTO statements.
+Apart from the data transfer implications, such statements should not be
+used with the funnel, as the results will be undefined due to the
+limited query buffer.  Applications using the funnel should aim for
+short and single-statement queries that require no transactions.
+.P
 See the
 .I create
 command in the
diff --git a/tools/merovingian/daemon/multiplex-funnel.c 
b/tools/merovingian/daemon/multiplex-funnel.c
--- a/tools/merovingian/daemon/multiplex-funnel.c
+++ b/tools/merovingian/daemon/multiplex-funnel.c
@@ -638,13 +638,13 @@ multiplexQuery(multiplex *m, char *buf, 
                         * complement the transparency created for Q_TABLE 
results,
                         * but forget about last id data (wouldn't make sense if
                         * we'd emit multiple update counts either) */
-                       mnstr_printf(fout, "&%d %lld -1", Q_UPDATE, rlen);
+                       mnstr_printf(fout, "&%d %lld -1\n", Q_UPDATE, rlen);
                        break;
                case Q_SCHEMA:
-                       mnstr_printf(fout, "&%d", Q_SCHEMA);
+                       mnstr_printf(fout, "&%d\n", Q_SCHEMA);
                        break;
                case Q_TRANS:
-                       mnstr_printf(fout, "&%d %c", Q_TRANS, fcnt ? 't' : 'f');
+                       mnstr_printf(fout, "&%d %c\n", Q_TRANS, fcnt ? 't' : 
'f');
                        break;
        }
        mnstr_flush(fout);
@@ -661,7 +661,7 @@ multiplexThread(void *d)
        fd_set fds;
        multiplex_client *c;
        int msock = -1;
-       char buf[BLOCK + 1];
+       char buf[10 * BLOCK + 1];
        ssize_t len;
        int r, i;
        dpair p, q;
@@ -721,7 +721,7 @@ multiplexThread(void *d)
                for (c = m->clients; c != NULL; c = c->next) {
                        if (!FD_ISSET(c->sock, &fds))
                                continue;
-                       if ((len = mnstr_read(c->fdin, buf, 1, BLOCK)) < 0) {
+                       if ((len = mnstr_read(c->fdin, buf, 1, 10 * BLOCK)) < 
0) {
                                /* error, or some garbage */
                                multiplexRemoveClient(m, c);
                                /* don't crash on now stale c */
_______________________________________________
Checkin-list mailing list
[email protected]
http://mail.monetdb.org/mailman/listinfo/checkin-list

Reply via email to