Update of /cvsroot/monetdb/sql/src/server
In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv28690/src/server
Modified Files:
sql_parser.mx
Log Message:
propagated changes of Tuesday Aug 04 2009 - Wednesday Aug 05 2009
from the Aug2009 branch to the development trunk
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2009/08/04 - nielsnes: src/server/sql_parser.mx,1.312.2.3
fixed bug, ie handle 0.0 correctly as a decimal(1,0)
fixed bug, ie decimal(d,s) d < 19 and s < d (not d+s < 19)
make sure we flush all inserts to disk when we restart the log
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Index: sql_parser.mx
===================================================================
RCS file: /cvsroot/monetdb/sql/src/server/sql_parser.mx,v
retrieving revision 1.314
retrieving revision 1.315
diff -u -d -r1.314 -r1.315
--- sql_parser.mx 4 Aug 2009 14:06:08 -0000 1.314
+++ sql_parser.mx 5 Aug 2009 08:51:47 -0000 1.315
@@ -3847,6 +3847,8 @@
int scale = digits - (int) (dot-s);
sql_subtype t;
+ if (digits <= 0)
+ digits = 1;
if (digits <= 18) {
double val = strtod($1,NULL);
lng value = decimal_from_str(s);
@@ -4263,12 +4265,12 @@
{
int d = $3;
int s = $5;
- if (s > d || s + d > 18) {
+ if (s > d || d > 18) {
char *msg = NULL;
if (s > d)
msg = sql_message("scale (%d) should be
less or equal to the precision (%d)", s, d);
else
- msg = sql_message("decimal(%d,%d) isn't
supported because P=%d + S=%d > 18", d, s, d, s);
+ msg = sql_message("decimal(%d,%d) isn't
supported because P=%d > 18", d, s, d);
yyerror(msg);
_DELETE(msg);
$$.type = NULL;
------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now. http://p.sf.net/sfu/bobj-july
_______________________________________________
Monetdb-sql-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/monetdb-sql-checkins