Changeset: 026b585306c1 for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=026b585306c1
Modified Files:
sql/backends/monet5/sql_result.mx
sql/backends/monet5/sql_scenario.c
Branch: holindex
Log Message:
SQL: output-size related fixes by Niels
diffs (33 lines):
diff --git a/sql/backends/monet5/sql_result.mx
b/sql/backends/monet5/sql_result.mx
--- a/sql/backends/monet5/sql_result.mx
+++ b/sql/backends/monet5/sql_result.mx
@@ -1337,7 +1337,7 @@ mvc_export_head(mvc *m, stream *s, int r
return export_error(order);
/* row count, min(count, reply_size) */
- if (!mvc_send_int(s, (BUN) m->reply_size < count ? m->reply_size :
(int) count))
+ if (!mvc_send_int(s, (m->reply_size >= 0 && (BUN) m->reply_size <
count) ? m->reply_size : (int) count))
return export_error(order);
if (mnstr_write(s, "\n% ", 3, 1) != 1)
@@ -1463,7 +1463,7 @@ mvc_export_result(mvc *m, stream *s, int
return -1;
count = m->reply_size;
- if (count == 0 || count >= BATcount(order)) {
+ if (count <= 0 || count >= BATcount(order)) {
count = BATcount(order);
clean = 1;
}
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
@@ -467,7 +467,7 @@ SQLinitClient(Client c)
if (c->state[MAL_SCENARIO_PARSER] == 0) {
m = mvc_create(c->idx, 0, SQLdebug, c->fdin, c->fdout);
global_variables(m, "monetdb", "sys");
- if (isAdministrator(c)) /* console should return everything */
+ if (isAdministrator(c) || strcmp(c->scenario, "msql") == 0) /*
console should return everything */
m->reply_size = -1;
be = (void *) backend_create(m, c);
} else {
_______________________________________________
Checkin-list mailing list
[email protected]
http://mail.monetdb.org/mailman/listinfo/checkin-list