Changeset: eb65fd02d465 for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=eb65fd02d465
Modified Files:
        MonetDB5/src/modules/mal/tablet_sql.mx
Branch: default
Log Message:

Merge with Jun2010 branch.


diffs (38 lines):

diff -r 4a8a7f464e53 -r eb65fd02d465 MonetDB5/ChangeLog.Jun2010
--- a/MonetDB5/ChangeLog.Jun2010        Mon Aug 30 11:47:11 2010 +0200
+++ b/MonetDB5/ChangeLog.Jun2010        Mon Aug 30 14:41:28 2010 +0200
@@ -1,3 +1,8 @@
 # ChangeLog file for MonetDB5
 # This file is updated with Maddlog
 
+* Mon Aug 30 2010 Sjoerd Mullender <sjo...@acm.org>
+- When attempting to insert incorrect UTF-8 sequences in a COPY INTO
+  statement, the error message was truncated.  This is now fixed.
+  Bug 2575.
+
diff -r 4a8a7f464e53 -r eb65fd02d465 MonetDB5/src/modules/mal/tablet_sql.mx
--- a/MonetDB5/src/modules/mal/tablet_sql.mx    Mon Aug 30 11:47:11 2010 +0200
+++ b/MonetDB5/src/modules/mal/tablet_sql.mx    Mon Aug 30 14:41:28 2010 +0200
@@ -166,12 +166,16 @@
                char *val;
                val = *s ? GDKstrdup(s) : GDKstrdup("");
                if ( *err == NULL){
-                       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);
+                       if (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) < 0)
+                               snprintf(buf, BUFSIZ, "value from line " BUNFMT
+                                                " field %d not inserted, 
expecting type %s\n",
+                                                BATcount(fmt->c[0])+1,
+                                                col, fmt->type);
                        *err= GDKstrdup(buf);
                }
                GDKfree(val);
_______________________________________________
Checkin-list mailing list
Checkin-list@monetdb.org
http://mail.monetdb.org/mailman/listinfo/checkin-list

Reply via email to