Update of /cvsroot/monetdb/sql/src/test/BugTracker-2009/Tests
In directory 
23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv21357/src/test/BugTracker-2009/Tests

Added Files:
        Division_by_zero_error.SF-2791361.sql 
Log Message:
propagated changes of Tuesday Aug 11 2009
from the Aug2009 branch to the development trunk

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2009/08/11 - stmane:
        
src/test/BugTracker-2009/Tests/Division_by_zero_error.SF-2791361.sql,1.1.2.1

added test for
ID: 2791361 "Division by zero error"
https://sourceforge.net/tracker/?func=detail&atid=482468&aid=2791361&group_id=56967

While the other queries work fine,
`select case when (2 - 2) > 0 then (3 - 2)/(2 - 2) else 0 end as "test";`
(still) produces a
"!MALException:calc./:Illegal argument Division by zero"
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


--- NEW FILE: Division_by_zero_error.SF-2791361.sql ---
create table test2 (bla1 double, bla2 double);
insert into test2 values (1,1);
insert into test2 values (1,2);
insert into test2 values (1,3);
select case when (bla1 - bla2) > 0 then 1/(bla1 - bla2) else 0 end from test2;
select case when (bla1 - bla2) > 0 then 1/(bla1 - bla2) else 0 end from test2;
drop table test2;

CREATE TABLE "sys"."nodes_legacy" (
"id" int,
"long" double,
"lat" double,
"uid" int,
"timestamp" timestamptz(7)
);

CREATE TABLE "sys"."segments" (
"way" int,
"node1" int,
"node2" int
);

select n1.lat, n1.long, n2.lat, n2.long, case when (n2.lat - n1.lat) > 0
then (n2.long - n1.long)/(n2.lat - n1.lat) else 0 end from nodes_legacy as
n1, nodes_legacy as n2, segments where node1 = n1.id and node2 = n2.id
limit 10;

drop table "sys"."segments";
drop table "sys"."nodes_legacy";

select case when (2 - 2) > 0 then (3 - 2)/(2 - 2) else 0 end as "test";


------------------------------------------------------------------------------
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

Reply via email to