Update of /cvsroot/monetdb/sql/src/backends/monet5
In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv23651/backends/monet5

Modified Files:
        sql_result.mx 
Log Message:
sql_result - upgrade the handling of value parsing to align with gdk.
various tests added that call for our attention, i.e. to properly handle
varchar size bounds and typing errors.



U sql_result.mx
Index: sql_result.mx
===================================================================
RCS file: /cvsroot/monetdb/sql/src/backends/monet5/sql_result.mx,v
retrieving revision 1.100
retrieving revision 1.101
diff -u -d -r1.100 -r1.101
--- sql_result.mx       21 Dec 2008 19:38:21 -0000      1.100
+++ sql_result.mx       28 Dec 2008 09:58:46 -0000      1.101
@@ -355,15 +355,14 @@
 ptr *
 _ASCIIadt_frStr(Column *c, int type, char *s, char *e, char quote)
 {
+       int len;
        (void)quote;
-       if (type == TYPE_str) {
+       if (type == TYPE_str) 
                return TABLETstrFrStr(c, s, e);
-       } else {
-               (void)(*BATatoms[type].atomFromStr)(s, &c->len, (ptr) &c->data);
-               /* handle errors */
-               if (c->data && ATOMcmp(type, ATOMnilptr(type), c->data) == 0) 
-                       c->data = NULL;
-       }
+        
+       len = (*BATatoms[type].atomFromStr)(s, &c->len, (ptr) &c->data);
+       if ( len != e-s)
+               return NULL;
        return c->data;
 }
 


------------------------------------------------------------------------------
_______________________________________________
Monetdb-sql-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/monetdb-sql-checkins

Reply via email to