Update of /cvsroot/monetdb/sql/src/backends/monet5
In directory
sfp-cvsdas-1.v30.ch3.sourceforge.com:/tmp/cvs-serv31461/src/backends/monet5
Modified Files:
sql_result.mx
Log Message:
propagated changes of Monday Nov 30 2009 - Tuesday Dec 01 2009
from the Nov2009 branch to the development trunk
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2009/11/30 - nielsnes: src/backends/monet5/sql_result.mx,1.127.2.7
fix leak in sql_result.mx
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Index: sql_result.mx
===================================================================
RCS file: /cvsroot/monetdb/sql/src/backends/monet5/sql_result.mx,v
retrieving revision 1.131
retrieving revision 1.132
diff -u -d -r1.131 -r1.132
--- sql_result.mx 11 Nov 2009 09:31:52 -0000 1.131
+++ sql_result.mx 1 Dec 2009 14:32:36 -0000 1.132
@@ -281,7 +281,6 @@
sql_subtype *t = &col->type;
unsigned int i, neg = 0;
- char *p = s;
@1 *r;
@1 res = 0;
if (*s == '-'){
@@ -292,10 +291,8 @@
s++;
}
for (i = 0; i < (t->digits-t->scale) && *s != '.' && *s; i++, s++) {
- if (!*s || *s < '0' || *s > '9') {
- createException(SQL,"sql", "decimal wrong format (%s)
digit expected", p);
+ if (!*s || *s < '0' || *s > '9')
return NULL;
- }
res *= 10;
res += (*s-'0');
}
@@ -305,14 +302,11 @@
}
}
if (*s) {
- if (*s != '.') {
- createException(SQL,"sql", "decimal wrong format (%s)
'.' expected", p);
+ if (*s != '.')
return NULL;
- }
s++;
for( i = 0; *s && i < t->scale; i++, s++) {
if (*s < '0' || *s > '9') {
- createException(SQL,"sql", "decimal wrong
format (%s)", p);
return NULL;
}
res *= 10;
@@ -322,10 +316,8 @@
res *= 10;
}
}
- if (*s) {
- createException(SQL,"sql", "decimal wrong format (%s) too many
characters", p);
+ if (*s)
return NULL;
- }
r = c->data;
if (!r)
r = (@1*)GDKmalloc(sizeof(@1));
@@ -344,7 +336,6 @@
(void)e;
(void)quote;
if (s == e) {
- createException(SQL, "sql", "Decimal cannot be parsed from
%s\n", ATOMname(type));
return NULL;
} else if (type == TYPE_bte) {
@:dec_frstr(bte)@
@@ -354,8 +345,6 @@
@:dec_frstr(int)@
} else if (type == TYPE_lng) {
@:dec_frstr(lng)@
- } else {
- createException(SQL, "sql", "Decimal cannot be parsed from
%s\n", ATOMname(type));
}
return NULL;
}
------------------------------------------------------------------------------
Join us December 9, 2009 for the Red Hat Virtual Experience,
a free event focused on virtualization and cloud computing.
Attend in-depth sessions from your desk. Your couch. Anywhere.
http://p.sf.net/sfu/redhat-sfdev2dev
_______________________________________________
Monetdb-sql-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/monetdb-sql-checkins