Changeset: badbb7e570f1 for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=badbb7e570f1
Modified Files:
        sql/server/rel_dump.c
Branch: Mar2011
Log Message:

Off-by-one error.
lastpos is the index of the first character on the line, pos is the
index of the newline.  Then the difference of the two does not include
the newline, so don't subtract 1 for a newline.


diffs (12 lines):

diff --git a/sql/server/rel_dump.c b/sql/server/rel_dump.c
--- a/sql/server/rel_dump.c
+++ b/sql/server/rel_dump.c
@@ -534,7 +534,7 @@
        mnstr_printf(fd, "%% .plan # table_name\n");
        mnstr_printf(fd, "%% rel # name\n");
        mnstr_printf(fd, "%% clob # type\n");
-       mnstr_printf(fd, "%% " SZFMT " # length\n", len - 2 /* remove = and \n 
*/);
+       mnstr_printf(fd, "%% " SZFMT " # length\n", len - 1 /* remove = */);
 
        /* output the data */
        mnstr_printf(fd, "%s\n", b->buf + 1 /* omit starting \n */);
_______________________________________________
Checkin-list mailing list
[email protected]
http://mail.monetdb.org/mailman/listinfo/checkin-list

Reply via email to