Changeset: 8c897acb0521 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=8c897acb0521
Modified Files:
monetdb5/mal/mal_function.c
Branch: default
Log Message:
No need to calculate the exact size of MAL listing for the client.
diffs (21 lines):
diff --git a/monetdb5/mal/mal_function.c b/monetdb5/mal/mal_function.c
--- a/monetdb5/mal/mal_function.c
+++ b/monetdb5/mal/mal_function.c
@@ -503,6 +503,8 @@ void
listFunction(stream *fd, MalBlkPtr mb, MalStkPtr stk, int flg, int first, int
size)
{
int i;
+ int sample = 256;
+
if (mb == NULL) {
mnstr_printf(fd, "# function definition missing\n");
return;
@@ -519,7 +521,7 @@ listFunction(stream *fd, MalBlkPtr mb, M
mnstr_printf(fd, "%% .explain # table_name\n");
mnstr_printf(fd, "%% mal # name\n");
mnstr_printf(fd, "%% clob # type\n");
- for (i = first; i < first +size && i < mb->stop; i++) {
+ for (i = first; i < first +size && i < mb->stop && sample-- >
0; i++) {
ps = instruction2str(mb, stk, getInstrPtr(mb, i), flg);
if (ps) {
size_t l = strlen(ps);
_______________________________________________
checkin-list mailing list
[email protected]
https://www.monetdb.org/mailman/listinfo/checkin-list