Update of /cvsroot/monetdb/sql/src/sql
In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv26670/src/sql
Modified Files:
ms_functions.sql
Log Message:
propagated changes of Friday Mar 07 2008 - Monday Mar 10 2008
from the SQL_2-22 branch to the development trunk
===================================================================
2008/03/07 - nielsnes: src/server/bin_optimizer.mx,1.10.2.1
we cannot push a limit simply through a cross product (TODO just repeat
the limit under both the inputs of the corss product, assuming no order
is needed afcourse)
===================================================================
2008/03/07 - romulog: src/test/BugTracker/Tests/All,1.80.2.6
Add tests for bugs:
range_select.SF-1907006
huge_math_expre.SF-1907048
join_table_with_floats.SF-1907060
ms_round.SF-1907063
decl_sec_tab_in_func_body.SF-1907858
coalesce_equal_coalesce.SF-1907905
like_perl.SF-1907051
sql_prepare_prob.SF-1909638
===================================================================
2008/03/08 - romulog: src/sql/ms_functions.sql,1.1.12.1
Correct the function ms_round...
Truncate does not work with floats ;)
===================================================================
Index: ms_functions.sql
===================================================================
RCS file: /cvsroot/monetdb/sql/src/sql/ms_functions.sql,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- ms_functions.sql 10 Oct 2006 17:03:27 -0000 1.1
+++ ms_functions.sql 10 Mar 2008 10:16:28 -0000 1.2
@@ -15,8 +15,8 @@
CREATE FUNCTION MS_ROUND(num float, precision int, truncat int)
RETURNS float
BEGIN
- IF (truncat = 0)
- THEN RETURN ROUND(num, precision);
- ELSE RETURN TRUNCATE(num, precision);
- END IF;
+ IF (truncat = 0)
+ THEN RETURN ROUND(num, precision);
+ ELSE RETURN ROUND(FLOOR(num), precision);
+ END IF;
END;
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Monetdb-sql-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/monetdb-sql-checkins