Update of /cvsroot/monetdb/sql/src/backends/monet5
In directory sc8-pr-cvs16:/tmp/cvs-serv13657/src/backends/monet5
Modified Files:
sql.mx sql_scenario.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_scenario.mx
===================================================================
RCS file: /cvsroot/monetdb/sql/src/backends/monet5/sql_scenario.mx,v
retrieving revision 1.261
retrieving revision 1.262
diff -u -d -r1.261 -r1.262
--- sql_scenario.mx 8 May 2007 12:22:21 -0000 1.261
+++ sql_scenario.mx 13 May 2007 19:19:55 -0000 1.262
@@ -375,6 +375,8 @@
m= (mvc *) c->state[MAL_SCENARIO_OPTIMIZE];
res_tables_destroy(m->results);
m->results= NULL;
+ if (m->session && m->session->tr)
+ reset_functions(m->session->tr);
mvc_destroy(m);
backend_destroy((backend *) c->state[MAL_SCENARIO_PARSER]);
/* files are already closed */
Index: sql.mx
===================================================================
RCS file: /cvsroot/monetdb/sql/src/backends/monet5/sql.mx,v
retrieving revision 1.223
retrieving revision 1.224
diff -u -d -r1.223 -r1.224
--- sql.mx 13 May 2007 18:05:58 -0000 1.223
+++ sql.mx 13 May 2007 19:19:55 -0000 1.224
@@ -1767,16 +1767,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