[Monetdb-developers] [Monetdb-sql-checkins] sql/src/server sql_parser.mx, Nov2008, 1.296.2.1, 1.296.2.2

Sjoerd Mullender sjoerd at acm.org
Tue Nov 18 09:18:53 CET 2008


Niels Nes wrote:
> Update of /cvsroot/monetdb/sql/src/server
> In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv6758/src/server
> 
> Modified Files:
>       Tag: Nov2008
> 	sql_parser.mx 
> Log Message:
> we don't have lng sizes in types
> 
> 
> U sql_parser.mx
> Index: sql_parser.mx
> ===================================================================
> RCS file: /cvsroot/monetdb/sql/src/server/sql_parser.mx,v
> retrieving revision 1.296.2.1
> retrieving revision 1.296.2.2
> diff -u -d -r1.296.2.1 -r1.296.2.2
> --- sql_parser.mx	17 Nov 2008 22:29:45 -0000	1.296.2.1
> +++ sql_parser.mx	18 Nov 2008 08:09:21 -0000	1.296.2.2
> @@ -4166,7 +4166,7 @@
>  			{ 
>  			  lng d = $3;
                          ^^^
>  			  if (d > 18) {
> -				char *msg = sql_message("decimal of " LLFMT " digits are not supported", d);
> +				char *msg = sql_message("decimal of %d digits are not supported", d);
                                                                    ^^
One change too many or one too few?

>  				yyerror(msg);
>  				_DELETE(msg);
>  				$$.type = NULL;
> @@ -4177,14 +4177,14 @@
>  			}
>   |  sqlDECIMAL '(' nonzero ',' posint ')'
>  			{ 
> -			  lng d = $3;
> -			  lng s = $5;
> +			  int d = $3;
> +			  int s = $5;
>  			  if (s >= d || s + d > 18) {
>  				char *msg = NULL;
>  				if (s >= d)
> -					msg = sql_message("scale (" LLFMT ") should be less than precision (" LLFMT ")", s, d);
> +					msg = sql_message("scale (%d) should be less than precision (%d)", s, d);
>  				else
> -					msg = sql_message("decimal(" LLFMT ","LLFMT") isn't supported because P="LLFMT" + S="LLFMT" > 18", d, s, d, s);
> +					msg = sql_message("decimal(%d,%d) isn't supported because P=%d + S=%d > 18", d, s, d, s);
>  				yyerror(msg);
>  				_DELETE(msg);
>  				$$.type = NULL;
> @@ -4210,7 +4210,7 @@
>  			}
>   |  sqlFLOAT '(' intval ',' intval ')'
>  			{ if ($5 >= $3) {
> -				char *msg = sql_message("precision(" LLFMT ") should be less than number of digits(" LLFMT ")", $5, $3);
> +				char *msg = sql_message("precision(%d) should be less than number of digits(%d)", $5, $3);
>  
>  				yyerror(msg);
>  				_DELETE(msg);
> @@ -4241,7 +4241,7 @@
>  			{ sql_find_subtype(&$$, $1, $3, 0); }
>   | type_alias '(' intval ',' intval ')'
>  			{ if ($5 >= $3) {
> -				char *msg = sql_message("precision(" LLFMT ") should be less than number of digits(" LLFMT ")", $5, $3);
> +				char *msg = sql_message("precision(%d) should be less than number of digits(%d)", $5, $3);
>  
>  				yyerror(msg);
>  				_DELETE(msg);
> 
> 
> -------------------------------------------------------------------------
> This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
> Build the coolest Linux based applications with Moblin SDK & win great prizes
> Grand prize is a trip for two to an Open Source event anywhere in the world
> http://moblin-contest.org/redirect.php?banner_id=100&url=/
> _______________________________________________
> Monetdb-sql-checkins mailing list
> Monetdb-sql-checkins at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/monetdb-sql-checkins


-- 
Sjoerd Mullender

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 369 bytes
Desc: OpenPGP digital signature
URL: <http://www.monetdb.org/pipermail/developers-list/attachments/20081118/b1f9ef0f/attachment.sig>


More information about the developers-list mailing list