Changeset: 86e2a43ce3de for MonetDB URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=86e2a43ce3de Modified Files: MonetDB5/src/modules/mal/tablet_sql.mx Branch: default Log Message:
Merge with Jun2010 branch. Fix for bug 2615: truncate value in error message so that line and column can be seen. diffs (29 lines): diff -r 1d972a3c6dae -r 86e2a43ce3de MonetDB5/src/modules/mal/tablet_sql.mx --- a/MonetDB5/src/modules/mal/tablet_sql.mx Thu Jul 15 15:25:27 2010 +0200 +++ b/MonetDB5/src/modules/mal/tablet_sql.mx Thu Jul 15 17:11:52 2010 +0200 @@ -166,8 +166,12 @@ char *val; val = *s ? GDKstrdup(s) : GDKstrdup(""); if ( *err == NULL){ - snprintf(buf,BUFSIZ, "value '%s' from line " BUNFMT - " field %d not inserted, expecting type %s\n", val, BATcount(fmt->c[0])+1, col, fmt->type); + snprintf(buf, BUFSIZ, "value '%.*s%s' from line " BUNFMT + " field %d not inserted, expecting type %s\n", + BUFSIZ - 200, val, + strlen(val) > (size_t) BUFSIZ - 200 ? "..." : "", + BATcount(fmt->c[0])+1, + col, fmt->type); *err= GDKstrdup(buf); } GDKfree(val); @@ -185,7 +189,9 @@ return ret; bunins_failed: if (*err == NULL) { - snprintf(buf,BUFSIZ, "parsing error from line " BUNFMT " field %d not inserted\n", BATcount(fmt->c[0])+1, col); + snprintf(buf, BUFSIZ, "parsing error from line " BUNFMT + " field %d not inserted\n", + BATcount(fmt->c[0])+1, col); *err= GDKstrdup(buf); } return -1; _______________________________________________ Checkin-list mailing list Checkin-list@monetdb.org http://mail.monetdb.org/mailman/listinfo/checkin-list