Changeset: 8c79637bf83d for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=8c79637bf83d
Modified Files:
clients/src/mapilib/Mapi.mx
Branch: Jun2010
Log Message:
Fix for SQL test src/test/BugTracker-2009 dumping_tables.SF-2776908--optimizers.
Don't start a new result set if we've only had comments so far. The
test first sets the debugmask to OPTDEBUG which produces comments
before the real result. Mclient's get_schema didn't expect two result
sets for a simple query, which caused the test to fail.
diffs (41 lines):
diff -r a43a4f0e3c88 -r 8c79637bf83d clients/src/mapilib/Mapi.mx
--- a/clients/src/mapilib/Mapi.mx Tue Jul 13 10:48:57 2010 +0200
+++ b/clients/src/mapilib/Mapi.mx Tue Jul 13 10:51:23 2010 +0200
@@ -1054,6 +1054,7 @@
char *errorstr; /* error from server */
struct MapiColumn *fields;
struct MapiRowBuf cache;
+ int commentonly; /* only comments seen so far */
};
@h
@@ -1663,6 +1664,8 @@
result->cache.tuplecount = 0;
result->cache.line = NULL;
+ result->commentonly = 1;
+
return result;
}
@@ -3850,9 +3853,10 @@
nline++; /* query type */
qt = (int) strtol(nline, &nline, 0);
- if (qt != Q_BLOCK || result == NULL)
+ if (result == NULL || (qt != Q_BLOCK && !result->commentonly))
result = new_result(hdl);
result->querytype = qt;
+ result->commentonly = 0;
nline++; /* skip space */
switch (qt) {
@@ -3908,6 +3912,8 @@
n = slice_row(line, NULL, &anchors, &lens, 10, '#');
+ result->commentonly = 0;
+
tag = etag + 1;
while (*tag && isspace((int) (unsigned char) *tag))
tag++;
_______________________________________________
Checkin-list mailing list
[email protected]
http://mail.monetdb.org/mailman/listinfo/checkin-list