Update of /cvsroot/monetdb/sql/src/backends/monet4
In directory sc8-pr-cvs16:/tmp/cvs-serv13657/src/backends/monet4
Modified Files:
sql_server.mx
Log Message:
fixed problem with reusing function is m5, m5 correctly cleansup the
client sessions private functions. Now when sessions ends we reset
the instantiated flags.
Index: sql_server.mx
===================================================================
RCS file: /cvsroot/monetdb/sql/src/backends/monet4/sql_server.mx,v
retrieving revision 1.164
retrieving revision 1.165
diff -u -d -r1.164 -r1.165
--- sql_server.mx 1 Apr 2007 22:34:53 -0000 1.164
+++ sql_server.mx 13 May 2007 19:19:52 -0000 1.165
@@ -785,16 +785,17 @@
if (scale < *sc) {
/* the current scale is too small, increase it by adding 0's */
int d = *sc - scale; /* CANNOT be 0! */
- value *= d * 10;
+
+ value *= scales[d];
scale += d;
digits += d;
} else if (scale > *sc) {
/* the current scale is too big, decrease it by correctly
rounding */
int d = scale - *sc; /* CANNOT be 0 */
- value /= (d - 1) * 10;
- if (value % 10 >= 5)
- value += 10;
- value /= 10;
+ lng rnd = scales[d]>>1;
+
+ value += rnd;
+ value /= scales[d];
scale -= d;
digits -= d;
}
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Monetdb-sql-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/monetdb-sql-checkins