Changeset: 1bd22e7b01be for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=1bd22e7b01be
Modified Files:
clients/mapilib/mapi.c
sql/backends/monet5/sql_result.c
Branch: protocol
Log Message:
Incorrect return code specified, and disable continuation messages for now for
benchmarking purposes.
diffs (66 lines):
diff --git a/clients/mapilib/mapi.c b/clients/mapilib/mapi.c
--- a/clients/mapilib/mapi.c
+++ b/clients/mapilib/mapi.c
@@ -5532,12 +5532,15 @@ mapi_fetch_row(MapiHdl hdl)
// if our cache is empty, we read data from the socket
lng nrows = 0;
// first we write a prompt to the server indicating
that we want another block of the result set
+
+#ifdef CONTINUATION_MESSAGE
if (!mnstr_writeChr(hdl->mid->to, 42) ||
mnstr_flush(hdl->mid->to)) {
hdl->mid->errorstr = strdup("Failed to write
confirm message to server.");
hdl->mid->error = 0;
fprintf(stderr, "Failure 2.\n");
return hdl->mid->error;
}
+#endif
bs2_resetbuf(hdl->mid->from); // kinda a bit evil
assert(bs2_buffer(hdl->mid->from).pos == 0);
@@ -5552,6 +5555,8 @@ mapi_fetch_row(MapiHdl hdl)
return hdl->mid->error;
}
+ assert(nrows <= result->row_count);
+
//bs2_resetbuf(hdl->mid->from);
@@ -5699,8 +5704,6 @@ mapi_fetch_field_len(MapiHdl hdl, int fn
{
int cr;
struct MapiResultSet *result;
- // FIXME
- assert(0);
mapi_hdl_check0(hdl, "mapi_fetch_field_len");
if ((result = hdl->result) == NULL ||
diff --git a/sql/backends/monet5/sql_result.c b/sql/backends/monet5/sql_result.c
--- a/sql/backends/monet5/sql_result.c
+++ b/sql/backends/monet5/sql_result.c
@@ -1873,7 +1873,8 @@ static int mvc_export_resultset_prot10(r
lng *var_col_len = NULL;
BATiter *iterators = NULL;
lng fixed_lengths = 0;
- int fres = -1;
+ int fres = 0;
+
iterators = GDKzalloc(sizeof(BATiter) * t->nr_cols);
var_col_len = GDKzalloc(sizeof(lng) * t->nr_cols);
@@ -2060,6 +2061,7 @@ static int mvc_export_resultset_prot10(r
assert(row > srow);
}
+#ifdef CONTINUATION_MESSAGE
if (!mnstr_readChr(c, &cont_req)) {
fprintf(stderr, "Received cancellation message.\n");
fres = -1;
@@ -2074,6 +2076,7 @@ static int mvc_export_resultset_prot10(r
fprintf(stderr, "Received cancellation message.\n");
break;
}
+#endif
#ifdef PROT10_DEBUG
fprintf(stderr, "Write block: %zu - %zu (out of %lld,
nrow=%lld)\n", srow, row, count, (lng)(row - srow));
_______________________________________________
checkin-list mailing list
[email protected]
https://www.monetdb.org/mailman/listinfo/checkin-list