Update of /cvsroot/monetdb/sql/src/server
In directory sfp-cvsdas-1.v30.ch3.sourceforge.com:/tmp/cvs-serv28832/src/server
Modified Files:
sql_parser.mx
Log Message:
propagated changes of Sunday Nov 22 2009 - Saturday Nov 28 2009
from the Nov2009 branch to the development trunk
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2009/11/22 - nielsnes: src/server/sql_parser.mx,1.322.2.5
add checks for overflow on interval types
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Index: sql_parser.mx
===================================================================
RCS file: /cvsroot/monetdb/sql/src/server/sql_parser.mx,v
retrieving revision 1.325
retrieving revision 1.326
diff -u -d -r1.325 -r1.326
--- sql_parser.mx 30 Oct 2009 12:14:47 -0000 1.325
+++ sql_parser.mx 28 Nov 2009 19:57:23 -0000 1.326
@@ -4075,11 +4075,23 @@
r=sql_find_subtype(&t, "sec_interval", d, 0);
}
}
- if (!r || (tpe = parse_interval( m, $2, $3, sk, ek, &i)) < 0 ){
+ if (!r || (tpe = parse_interval( m, $2, $3, sk, ek, &i)) < 0) {
yyerror("incorrect interval");
$$ = NULL;
YYABORT;
} else {
+ /* count the number of digits in the input */
+ lng cpyval = i, inlen = 1;
+
+ cpyval /= qualifier2multiplier(ek);
+ while (cpyval /= 10)
+ inlen++;
+ if (inlen > t.digits) {
+ char *msg = sql_message("incorrect interval (%d
> %d)", inlen, t.digits);
+ yyerror(msg);
+ $$ = NULL;
+ YYABORT;
+ }
$$ = _newAtomNode( atom_int(&t, i));
}
}
------------------------------------------------------------------------------
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