Update of /cvsroot/monetdb/sql/src/backends/monet5
In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv21978/src/backends/monet5
Modified Files:
Tag: SQL_2-20
sql.mx
Log Message:
fixed bug in handling null in str_2dec functions
this fixes the bug:
[ 1833286 ] Decimal / NUMERIC (9,2) won't allow initial NULL value
Index: sql.mx
===================================================================
RCS file: /cvsroot/monetdb/sql/src/backends/monet5/sql.mx,v
retrieving revision 1.234.2.1
retrieving revision 1.234.2.2
diff -u -d -r1.234.2.1 -r1.234.2.2
--- sql.mx 10 Oct 2007 09:20:44 -0000 1.234.2.1
+++ sql.mx 16 Nov 2007 20:40:26 -0000 1.234.2.2
@@ -1867,8 +1867,13 @@
lng value = 0;
if (!dot) {
- throw(SQL, "@1",
- "\"%s\" is no decimal value (doesn't contain a '.')",
*val);
+ if (GDK_STRNIL(*val)) {
+ *res = @1_nil;
+ return MAL_SUCCEED;
+ } else {
+ throw(SQL, "@1",
+ "\"%s\" is no decimal value (doesn't contain a
'.')", *val);
+ }
}
value = decimal_from_str(s);
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Monetdb-sql-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/monetdb-sql-checkins