Changeset: 029b6200f5e4 for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=029b6200f5e4
Modified Files:
clients/mapilib/mapi.c
Branch: Aug2011
Log Message:
mclient: in case of a multi-line query fed in parts, remember subsequent lines
as well.
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
@@ -4264,6 +4264,13 @@ mapi_query_part(MapiHdl hdl, const char
/* remember the query just for the error messages */
if (hdl->query == NULL) {
hdl->query = strdup(query);
+ } else {
+ size_t sz = strlen(hdl->query);
+ char *q;
+
+ if (sz < 512 &&
+ (q = realloc(hdl->query, sz + size + 1)) != NULL)
+ hdl->query = strcat(q, query);
}
if (mid->trace == MAPI_TRACE) {
_______________________________________________
Checkin-list mailing list
[email protected]
http://mail.monetdb.org/mailman/listinfo/checkin-list