Changeset: e09cd7f3fff4 for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=e09cd7f3fff4
Modified Files:
Branch: default
Log Message:
Merge with Apr2012 branch.
diffs (65 lines):
diff --git a/common/stream/stream.c b/common/stream/stream.c
--- a/common/stream/stream.c
+++ b/common/stream/stream.c
@@ -2400,7 +2400,9 @@ bs_flush(stream *ss)
#ifdef WORDS_BIGENDIAN
blksize = short_int_SWAP(blksize);
#endif
- if ((!mnstr_writeSht(s->s, blksize) || s->s->write(s->s,
s->buf, 1, s->nr) != (ssize_t) s->nr)) {
+ if ((!mnstr_writeSht(s->s, blksize) ||
+ (s->nr > 0 &&
+ s->s->write(s->s, s->buf, 1, s->nr) != (ssize_t) s->nr)))
{
ss->errnr = MNSTR_WRITE_ERROR;
return -1;
}
diff --git a/monetdb5/mal/mal_interpreter.mx b/monetdb5/mal/mal_interpreter.mx
--- a/monetdb5/mal/mal_interpreter.mx
+++ b/monetdb5/mal/mal_interpreter.mx
@@ -2363,7 +2363,7 @@ if (ret != MAL_SUCCEED) {
@2;
}
/*
- * Exceptions are catched based on their name, which is part of the
+ * Exceptions are caught based on their name, which is part of the
* exception message. The ANYexception variable catches all.
*/
exceptionVar = -1;
diff --git a/monetdb5/optimizer/opt_pipes.c b/monetdb5/optimizer/opt_pipes.c
--- a/monetdb5/optimizer/opt_pipes.c
+++ b/monetdb5/optimizer/opt_pipes.c
@@ -636,11 +636,17 @@ compileOptimizer(Client cntxt, str name)
MSinitClientPrg(c, "user", pipes[j].name);
msg = compileString(&sym, c, pipes[j].def);
if ( msg != MAL_SUCCEED){
+ c->errbuf = NULL;
+ c->mythread = 0;
MCcloseClient(c);
return msg;
}
pipes[j].mb = copyMalBlk(sym->def);
}
+ /* don't cleanup thread info since the thread continues to
+ * exist, just this client record is closed */
+ c->errbuf = NULL;
+ c->mythread = 0;
MCcloseClient(c);
msg = validateOptimizerPipes();
if ( msg != MAL_SUCCEED)
diff --git a/sql/backends/monet5/sql_scenario.c
b/sql/backends/monet5/sql_scenario.c
--- a/sql/backends/monet5/sql_scenario.c
+++ b/sql/backends/monet5/sql_scenario.c
@@ -1710,11 +1710,12 @@ cleanup_engine:
char *n = NULL;
char *o = msg;
while ((n = strchr(o, '\n')) != NULL) {
- *n++ = '\0';
+ *n = '\0';
mnstr_printf(c->fdout, "!%s\n",
getExceptionMessage(o));
+ *n++ = '\n';
o = n;
}
- if (strlen(o) != 0)
+ if (*o != 0)
mnstr_printf(c->fdout, "!%s\n",
getExceptionMessage(o));
}
showErrors(c);
_______________________________________________
Checkin-list mailing list
[email protected]
http://mail.monetdb.org/mailman/listinfo/checkin-list