Changeset: eb1b9781c58f for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=eb1b9781c58f
Modified Files:
clients/mapilib/mapi.c
common/stream/stream.c
monetdb5/modules/mal/mal_mapi.c
sql/backends/monet5/sql_result.c
Branch: protocol
Log Message:
new branch for protocol rewrite
diffs (79 lines):
diff --git a/clients/mapilib/mapi.c b/clients/mapilib/mapi.c
--- a/clients/mapilib/mapi.c
+++ b/clients/mapilib/mapi.c
@@ -2535,6 +2535,8 @@ mapi_reconnect(Mapi mid)
mid->connected = 1;
+ // FIXME: these need to become snappy streams (framing2)
+
if (!isa_block_stream(mid->to)) {
mid->to = block_stream(mid->to);
check_stream(mid, mid->to, mnstr_error(mid->to),
"mapi_reconnect", mid->error);
@@ -3930,6 +3932,7 @@ read_into_cache(MapiHdl hdl, int lookahe
break;
case '%':
case '#':
+ //FIXME: add new result set parsing
case '&':
if (lookahead < 0)
lookahead = 1;
diff --git a/common/stream/stream.c b/common/stream/stream.c
--- a/common/stream/stream.c
+++ b/common/stream/stream.c
@@ -3921,6 +3921,11 @@ bs_clrerr(stream *s)
mnstr_clearerr(((bs *) s->stream_data.p)->s);
}
+
+// FIXME: patch bs_read/bs_write etc
+// 10 MB max buffer size or so
+// unsigned int length or so
+
stream *
block_stream(stream *s)
{
diff --git a/monetdb5/modules/mal/mal_mapi.c b/monetdb5/modules/mal/mal_mapi.c
--- a/monetdb5/modules/mal/mal_mapi.c
+++ b/monetdb5/modules/mal/mal_mapi.c
@@ -114,6 +114,8 @@ doChallenge(void *data)
char *buf = (char *) GDKmalloc(BLOCK + 1);
char challenge[13];
char *algos;
+
+ // FIXME: make this a snappy stream as well
stream *fdin = block_stream(((struct challengedata *) data)->in);
stream *fdout = block_stream(((struct challengedata *) data)->out);
bstream *bs;
@@ -142,8 +144,10 @@ doChallenge(void *data)
/* generate the challenge string */
generateChallenge(challenge, 8, 12);
algos = mcrypt_getHashAlgorithms();
+ // FIXME: add the newproto flag to algos and rename to 'capabilities'
to hide the crime
+
/* note that we claim to speak proto 9 here for hashed passwords */
- mnstr_printf(fdout, "%s:mserver:9:%s:%s:%s:",
+ mnstr_printf(fdout, "%s:mserver:10:%s:%s:%s:",
challenge,
algos,
#ifdef WORDS_BIGENDIAN
@@ -171,6 +175,7 @@ doChallenge(void *data)
mnstr_printf(cntxt->fdout, "#SERVERlisten:client accepted\n");
mnstr_printf(cntxt->fdout, "#SERVERlisten:client string %s\n", buf);
#endif
+ // FIXME: how can we avoid this
bs = bstream_create(fdin, 128 * BLOCK);
if (bs == 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
@@ -1313,6 +1313,8 @@ mvc_export_row(backend *b, stream *s, re
return (ok) ? 0 : -1;
}
+
+//FIXME: rewrite this into something new
static int
mvc_export_table(backend *b, stream *s, res_table *t, BAT *order, BUN offset,
BUN nr, char *btag, char *sep, char *rsep, char *ssep, char *ns)
{
_______________________________________________
checkin-list mailing list
[email protected]
https://www.monetdb.org/mailman/listinfo/checkin-list