[prev in list] [next in list] [prev in thread] [next in thread] 

List:       monetdb-developers
Subject:    Re: [Monetdb-developers] [Monetdb-sql-checkins]
From:       Sjoerd Mullender <sjoerd () acm ! org>
Date:       2009-10-06 13:38:05
Message-ID: 4ACB483D.7050800 () acm ! org
[Download RAW message or body]

[Attachment #2 (multipart/signed)]


Shouldn't this have gone to the Nov2009 branch?

Martin Kersten wrote:
> Update of /cvsroot/monetdb/sql/src/backends/monet5
> In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv7452
> 
> Modified Files:
> 	sql_result.mx 
> Log Message:
> The loader now properly recognizes decimals read as integer values.
> 
> 
> U sql_result.mx
> Index: sql_result.mx
> ===================================================================
> RCS file: /cvsroot/monetdb/sql/src/backends/monet5/sql_result.mx,v
> retrieving revision 1.127
> retrieving revision 1.128
> diff -u -d -r1.127 -r1.128
> --- sql_result.mx	23 Sep 2009 07:36:21 -0000	1.127
> +++ sql_result.mx	6 Oct 2009 13:30:13 -0000	1.128
> @@ -381,8 +381,17 @@
>  	}
>  	 
>  	len = (*BATatoms[type].atomFromStr)(s, &c->len, (ptr) &c->data);
> -	if (len == 0 || len != e-s)
> +	if (len == 0 || len != e-s){
> +		/* decimals can be converted to integers when *.000 */
> +		if ( s[len++] == '.')
> +		switch( type ){
> +		case TYPE_bte: case TYPE_int: case TYPE_lng: case TYPE_sht:
> +			while (s[len]=='0') len++;
> +			if ( s[len] == 0)
> +				return c->data;
> +		}
>  		return NULL;
> +	}
>  	return c->data;
>  }
>  
> 
> 
> ------------------------------------------------------------------------------
> Come build with us! The BlackBerry&reg; Developer Conference in SF, CA
> is the only developer event you need to attend this year. Jumpstart your
> developing skills, take BlackBerry mobile applications to market and stay 
> ahead of the curve. Join us from November 9&#45;12, 2009. Register now&#33;
> http://p.sf.net/sfu/devconf
> _______________________________________________
> Monetdb-sql-checkins mailing list
> Monetdb-sql-checkins@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/monetdb-sql-checkins


-- 
Sjoerd Mullender


["signature.asc" (application/pgp-signature)]

------------------------------------------------------------------------------
Come build with us! The BlackBerry&reg; Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9&#45;12, 2009. Register now&#33;
http://p.sf.net/sfu/devconf

_______________________________________________
Monetdb-developers mailing list
Monetdb-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/monetdb-developers


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic