You are viewing a plain text version of this content. The canonical link for it is here.
Posted to derby-commits@db.apache.org by km...@apache.org on 2013/04/10 04:02:46 UTC
svn commit: r1466316 [3/3] - in /db/derby/code/branches/10.8.3.1_testcompat:
./ java/testing/org/apache/derbyTesting/functionTests/master/
java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/
java/testing/org/apache/derbyTesting/functionTe...
Modified: db/derby/code/branches/10.8.3.1_testcompat/java/testing/org/apache/derbyTesting/functionTests/master/positionedDelUpd.out
URL: http://svn.apache.org/viewvc/db/derby/code/branches/10.8.3.1_testcompat/java/testing/org/apache/derbyTesting/functionTests/master/positionedDelUpd.out?rev=1466316&r1=1466315&r2=1466316&view=diff
==============================================================================
--- db/derby/code/branches/10.8.3.1_testcompat/java/testing/org/apache/derbyTesting/functionTests/master/positionedDelUpd.out (original)
+++ db/derby/code/branches/10.8.3.1_testcompat/java/testing/org/apache/derbyTesting/functionTests/master/positionedDelUpd.out Wed Apr 10 02:02:45 2013
@@ -53,13 +53,13 @@ ij> -- this should succeed
get cursor c0 as 'select * from t1 for update';
ij> next c0;
I |V |D |T
-------------------------------------------------------
+--------------------------------------------------------
1 |1111111111|1.1E12 |11:11:11
ij> delete from t1 where current of c0;
1 row inserted/updated/deleted
ij> select * from t1;
I |V |D |T
-------------------------------------------------------
+--------------------------------------------------------
ij> close c0;
ij> -- restore t1
delete from t1;
@@ -69,7 +69,7 @@ ij> insert into t1 select * from t1_copy
1 row inserted/updated/deleted
ij> select * from t1;
I |V |D |T
-------------------------------------------------------
+--------------------------------------------------------
1 |1111111111|1.1E12 |11:11:11
ij> -- .same table name
-- .cursor before 1st row
@@ -87,7 +87,7 @@ ij> insert into t1 select * from t1_copy
1 row inserted/updated/deleted
ij> select * from t1;
I |V |D |T
-------------------------------------------------------
+--------------------------------------------------------
1 |1111111111|1.1E12 |11:11:11
ij> -- .non-existant table
delete from not_exists where current of c1;
@@ -105,7 +105,7 @@ ij> insert into t1 select * from t1_copy
1 row inserted/updated/deleted
ij> select * from t1;
I |V |D |T
-------------------------------------------------------
+--------------------------------------------------------
1 |1111111111|1.1E12 |11:11:11
ij> -- .match correlation name
-- (this one should fail, since correlation name)
@@ -125,7 +125,7 @@ ij> -- .target cursor after last row
get cursor c4 as 'select * from t1 for update';
ij> next c4;
I |V |D |T
-------------------------------------------------------
+--------------------------------------------------------
1 |1111111111|1.1E12 |11:11:11
ij> next c4;
No current row
@@ -143,13 +143,13 @@ ij> -- .target cursor on row
get cursor c6 as 'select * from t1 for update';
ij> next c6;
I |V |D |T
-------------------------------------------------------
+--------------------------------------------------------
1 |1111111111|1.1E12 |11:11:11
ij> delete from t1 where current of c6;
1 row inserted/updated/deleted
ij> select * from t1;
I |V |D |T
-------------------------------------------------------
+--------------------------------------------------------
ij> close c6;
ij> -- restore t1
delete from t1;
@@ -159,18 +159,18 @@ ij> insert into t1 select * from t1_copy
1 row inserted/updated/deleted
ij> select * from t1;
I |V |D |T
-------------------------------------------------------
+--------------------------------------------------------
1 |1111111111|1.1E12 |11:11:11
ij> -- .target cursor on row deleted by another cursor
get cursor c7 as 'select * from t1 for update';
ij> next c7;
I |V |D |T
-------------------------------------------------------
+--------------------------------------------------------
1 |1111111111|1.1E12 |11:11:11
ij> get cursor c8 as 'select * from t1 for update';
ij> next c8;
I |V |D |T
-------------------------------------------------------
+--------------------------------------------------------
1 |1111111111|1.1E12 |11:11:11
ij> delete from t1 where current of c7;
1 row inserted/updated/deleted
@@ -178,7 +178,7 @@ ij> delete from t1 where current of c8;
ERROR 24000: Invalid cursor state - no current row.
ij> select * from t1;
I |V |D |T
-------------------------------------------------------
+--------------------------------------------------------
ij> close c7;
ij> close c8;
ij> -- restore t1
@@ -189,13 +189,13 @@ ij> insert into t1 select * from t1_copy
1 row inserted/updated/deleted
ij> select * from t1;
I |V |D |T
-------------------------------------------------------
+--------------------------------------------------------
1 |1111111111|1.1E12 |11:11:11
ij> -- .target cursor on already deleted row
get cursor c9 as 'select * from t1 for update';
ij> next c9;
I |V |D |T
-------------------------------------------------------
+--------------------------------------------------------
1 |1111111111|1.1E12 |11:11:11
ij> delete from t1 where current of c9;
1 row inserted/updated/deleted
@@ -203,7 +203,7 @@ ij> delete from t1 where current of c9;
ERROR 24000: Invalid cursor state - no current row.
ij> select * from t1;
I |V |D |T
-------------------------------------------------------
+--------------------------------------------------------
ij> close c9;
ij> -- restore t1
delete from t1;
@@ -213,26 +213,26 @@ ij> insert into t1 select * from t1_copy
1 row inserted/updated/deleted
ij> select * from t1;
I |V |D |T
-------------------------------------------------------
+--------------------------------------------------------
1 |1111111111|1.1E12 |11:11:11
ij> -- delete to row which was subject to searched update
-- (row still within cursor qualification)
get cursor c10 as 'select * from t1 for update';
ij> next c10;
I |V |D |T
-------------------------------------------------------
+--------------------------------------------------------
1 |1111111111|1.1E12 |11:11:11
ij> update t1 set i = i + 1;
1 row inserted/updated/deleted
ij> select * from t1;
I |V |D |T
-------------------------------------------------------
+--------------------------------------------------------
2 |1111111111|1.1E12 |11:11:11
ij> delete from t1 where current of c10;
1 row inserted/updated/deleted
ij> select * from t1;
I |V |D |T
-------------------------------------------------------
+--------------------------------------------------------
ij> close c10;
ij> -- restore t1
delete from t1;
@@ -242,26 +242,26 @@ ij> insert into t1 select * from t1_copy
1 row inserted/updated/deleted
ij> select * from t1;
I |V |D |T
-------------------------------------------------------
+--------------------------------------------------------
1 |1111111111|1.1E12 |11:11:11
ij> -- delete to row which was subject to searched update
-- (row becomes outside of cursor qualification)
get cursor c10a as 'select * from t1 where i = 1 for update';
ij> next c10a;
I |V |D |T
-------------------------------------------------------
+--------------------------------------------------------
1 |1111111111|1.1E12 |11:11:11
ij> update t1 set i = i + 1;
1 row inserted/updated/deleted
ij> select * from t1;
I |V |D |T
-------------------------------------------------------
+--------------------------------------------------------
2 |1111111111|1.1E12 |11:11:11
ij> delete from t1 where current of c10a;
ERROR 24000: Invalid cursor state - no current row.
ij> select * from t1;
I |V |D |T
-------------------------------------------------------
+--------------------------------------------------------
2 |1111111111|1.1E12 |11:11:11
ij> close c10a;
ij> -- restore t1
@@ -271,26 +271,26 @@ ij> insert into t1 select * from t1_copy
1 row inserted/updated/deleted
ij> select * from t1;
I |V |D |T
-------------------------------------------------------
+--------------------------------------------------------
1 |1111111111|1.1E12 |11:11:11
ij> -- delete to row which was subject to positioned update
-- (row becomes outside of cursor qualification)
get cursor c11 as 'select * from t1 where i = 1 for update';
ij> next c11;
I |V |D |T
-------------------------------------------------------
+--------------------------------------------------------
1 |1111111111|1.1E12 |11:11:11
ij> update t1 set i = i + 1 where current of c11;
1 row inserted/updated/deleted
ij> select * from t1;
I |V |D |T
-------------------------------------------------------
+--------------------------------------------------------
2 |1111111111|1.1E12 |11:11:11
ij> delete from t1 where current of c11;
ERROR 24000: Invalid cursor state - no current row.
ij> select * from t1;
I |V |D |T
-------------------------------------------------------
+--------------------------------------------------------
2 |1111111111|1.1E12 |11:11:11
ij> close c11;
ij> -- restore t1
@@ -300,14 +300,14 @@ ij> insert into t1 select * from t1_copy
1 row inserted/updated/deleted
ij> select * from t1;
I |V |D |T
-------------------------------------------------------
+--------------------------------------------------------
1 |1111111111|1.1E12 |11:11:11
ij> -- delete to row which was subject to 2 searched updates
-- (1st puts row outside of cursor qualification, 2nd restores it)
get cursor c12 as 'select * from t1 where i = 1 for update';
ij> next c12;
I |V |D |T
-------------------------------------------------------
+--------------------------------------------------------
1 |1111111111|1.1E12 |11:11:11
ij> update t1 set i = i + 1;
1 row inserted/updated/deleted
@@ -315,13 +315,13 @@ ij> update t1 set i = 1;
1 row inserted/updated/deleted
ij> select * from t1;
I |V |D |T
-------------------------------------------------------
+--------------------------------------------------------
1 |1111111111|1.1E12 |11:11:11
ij> delete from t1 where current of c12;
1 row inserted/updated/deleted
ij> select * from t1;
I |V |D |T
-------------------------------------------------------
+--------------------------------------------------------
ij> close c12;
ij> -- restore t1
delete from t1;
@@ -331,7 +331,7 @@ ij> insert into t1 select * from t1_copy
1 row inserted/updated/deleted
ij> select * from t1;
I |V |D |T
-------------------------------------------------------
+--------------------------------------------------------
1 |1111111111|1.1E12 |11:11:11
ij> -- positioned delete on table with index (#724)
create table t5 (c1 int, c2 int);
@@ -441,19 +441,19 @@ ij> -- this should succeed
get cursor c0 as 'select * from t1 for update';
ij> next c0;
I |V |D |T
-------------------------------------------------------
+--------------------------------------------------------
1 |1111111111|1.1E12 |11:11:11
ij> update t1 set i = 999 where current of c0;
1 row inserted/updated/deleted
ij> select * from t1;
I |V |D |T
-------------------------------------------------------
+--------------------------------------------------------
999 |1111111111|1.1E12 |11:11:11
ij> update t1 set i = 1 where current of c0;
1 row inserted/updated/deleted
ij> select * from t1;
I |V |D |T
-------------------------------------------------------
+--------------------------------------------------------
1 |1111111111|1.1E12 |11:11:11
ij> close c0;
ij> -- .same table name
@@ -492,7 +492,7 @@ ij> -- .target cursor after last row
get cursor c4 as 'select * from t1 for update';
ij> next c4;
I |V |D |T
-------------------------------------------------------
+--------------------------------------------------------
1 |1111111111|1.1E12 |11:11:11
ij> next c4;
No current row
@@ -510,20 +510,20 @@ ij> -- .target cursor on row
get cursor c6 as 'select * from t1 for update';
ij> next c6;
I |V |D |T
-------------------------------------------------------
+--------------------------------------------------------
1 |1111111111|1.1E12 |11:11:11
ij> update t1 set i = i + 1 where current of c6;
1 row inserted/updated/deleted
ij> select * from t1;
I |V |D |T
-------------------------------------------------------
+--------------------------------------------------------
2 |1111111111|1.1E12 |11:11:11
ij> -- .consecutive updates to same row in cursor, keeping it in the cursor qual
update t1 set i = i + 1 where current of c6;
1 row inserted/updated/deleted
ij> select * from t1;
I |V |D |T
-------------------------------------------------------
+--------------------------------------------------------
3 |1111111111|1.1E12 |11:11:11
ij> close c6;
ij> -- restore t1
@@ -533,18 +533,18 @@ ij> insert into t1 select * from t1_copy
1 row inserted/updated/deleted
ij> select * from t1;
I |V |D |T
-------------------------------------------------------
+--------------------------------------------------------
1 |1111111111|1.1E12 |11:11:11
ij> -- .target cursor on row deleted by another cursor
get cursor c7 as 'select * from t1 for update';
ij> next c7;
I |V |D |T
-------------------------------------------------------
+--------------------------------------------------------
1 |1111111111|1.1E12 |11:11:11
ij> get cursor c8 as 'select * from t1 for update';
ij> next c8;
I |V |D |T
-------------------------------------------------------
+--------------------------------------------------------
1 |1111111111|1.1E12 |11:11:11
ij> delete from t1 where current of c7;
1 row inserted/updated/deleted
@@ -552,7 +552,7 @@ ij> update t1 set i = i + 1 where curren
ERROR 24000: Invalid cursor state - no current row.
ij> select * from t1;
I |V |D |T
-------------------------------------------------------
+--------------------------------------------------------
ij> close c7;
ij> close c8;
ij> -- restore t1
@@ -563,13 +563,13 @@ ij> insert into t1 select * from t1_copy
1 row inserted/updated/deleted
ij> select * from t1;
I |V |D |T
-------------------------------------------------------
+--------------------------------------------------------
1 |1111111111|1.1E12 |11:11:11
ij> -- .target cursor on already deleted row
get cursor c9 as 'select * from t1 for update';
ij> next c9;
I |V |D |T
-------------------------------------------------------
+--------------------------------------------------------
1 |1111111111|1.1E12 |11:11:11
ij> delete from t1 where current of c9;
1 row inserted/updated/deleted
@@ -577,7 +577,7 @@ ij> update t1 set i = i + 1 where curren
ERROR 24000: Invalid cursor state - no current row.
ij> select * from t1;
I |V |D |T
-------------------------------------------------------
+--------------------------------------------------------
ij> close c9;
ij> -- restore t1
delete from t1;
@@ -587,26 +587,26 @@ ij> insert into t1 select * from t1_copy
1 row inserted/updated/deleted
ij> select * from t1;
I |V |D |T
-------------------------------------------------------
+--------------------------------------------------------
1 |1111111111|1.1E12 |11:11:11
ij> -- update to row which was subject to searched update
-- (row still within cursor qualification)
get cursor c10 as 'select * from t1 for update';
ij> next c10;
I |V |D |T
-------------------------------------------------------
+--------------------------------------------------------
1 |1111111111|1.1E12 |11:11:11
ij> update t1 set i = i + 1;
1 row inserted/updated/deleted
ij> select * from t1;
I |V |D |T
-------------------------------------------------------
+--------------------------------------------------------
2 |1111111111|1.1E12 |11:11:11
ij> update t1 set i = i + 2 where current of c10;
1 row inserted/updated/deleted
ij> select * from t1;
I |V |D |T
-------------------------------------------------------
+--------------------------------------------------------
4 |1111111111|1.1E12 |11:11:11
ij> close c10;
ij> -- restore t1
@@ -616,26 +616,26 @@ ij> insert into t1 select * from t1_copy
1 row inserted/updated/deleted
ij> select * from t1;
I |V |D |T
-------------------------------------------------------
+--------------------------------------------------------
1 |1111111111|1.1E12 |11:11:11
ij> -- update to row which was subject to searched update
-- (row becomes outside of cursor qualification)
get cursor c10a as 'select * from t1 where i = 1 for update';
ij> next c10a;
I |V |D |T
-------------------------------------------------------
+--------------------------------------------------------
1 |1111111111|1.1E12 |11:11:11
ij> update t1 set i = i + 1;
1 row inserted/updated/deleted
ij> select * from t1;
I |V |D |T
-------------------------------------------------------
+--------------------------------------------------------
2 |1111111111|1.1E12 |11:11:11
ij> update t1 set i = i + 2 where current of c10a;
ERROR 24000: Invalid cursor state - no current row.
ij> select * from t1;
I |V |D |T
-------------------------------------------------------
+--------------------------------------------------------
2 |1111111111|1.1E12 |11:11:11
ij> close c10a;
ij> -- restore t1
@@ -645,26 +645,26 @@ ij> insert into t1 select * from t1_copy
1 row inserted/updated/deleted
ij> select * from t1;
I |V |D |T
-------------------------------------------------------
+--------------------------------------------------------
1 |1111111111|1.1E12 |11:11:11
ij> -- update to row which was subject to positioned update
-- (row becomes outside of cursor qualification)
get cursor c11 as 'select * from t1 where i = 1 for update';
ij> next c11;
I |V |D |T
-------------------------------------------------------
+--------------------------------------------------------
1 |1111111111|1.1E12 |11:11:11
ij> update t1 set i = i + 1 where current of c11;
1 row inserted/updated/deleted
ij> select * from t1;
I |V |D |T
-------------------------------------------------------
+--------------------------------------------------------
2 |1111111111|1.1E12 |11:11:11
ij> update t1 set i = i + 2 where current of c11;
ERROR 24000: Invalid cursor state - no current row.
ij> select * from t1;
I |V |D |T
-------------------------------------------------------
+--------------------------------------------------------
2 |1111111111|1.1E12 |11:11:11
ij> close c11;
ij> -- restore t1
@@ -674,14 +674,14 @@ ij> insert into t1 select * from t1_copy
1 row inserted/updated/deleted
ij> select * from t1;
I |V |D |T
-------------------------------------------------------
+--------------------------------------------------------
1 |1111111111|1.1E12 |11:11:11
ij> -- update to row which was subject to 2 searched updates
-- (1st puts row outside of cursor qualification, 2nd restores it)
get cursor c12 as 'select * from t1 where i = 1 for update';
ij> next c12;
I |V |D |T
-------------------------------------------------------
+--------------------------------------------------------
1 |1111111111|1.1E12 |11:11:11
ij> update t1 set i = i + 1;
1 row inserted/updated/deleted
@@ -689,13 +689,13 @@ ij> update t1 set i = 1;
1 row inserted/updated/deleted
ij> select * from t1;
I |V |D |T
-------------------------------------------------------
+--------------------------------------------------------
1 |1111111111|1.1E12 |11:11:11
ij> update t1 set i = i + 2 where current of c12;
1 row inserted/updated/deleted
ij> select * from t1;
I |V |D |T
-------------------------------------------------------
+--------------------------------------------------------
3 |1111111111|1.1E12 |11:11:11
ij> -- negative test - try to update a non-existant column
update t1 set notacolumn = i + 1 where current of c12;
@@ -708,7 +708,7 @@ ij> insert into t1 select * from t1_copy
1 row inserted/updated/deleted
ij> select * from t1;
I |V |D |T
-------------------------------------------------------
+--------------------------------------------------------
1 |1111111111|1.1E12 |11:11:11
ij> -- update column not in SELECT list, but in FOR UPDATE OF list
get cursor c13 as 'select i from t1 for update of v';
@@ -720,14 +720,14 @@ ij> update t1 set v = '999' where curren
1 row inserted/updated/deleted
ij> select * from t1;
I |V |D |T
-------------------------------------------------------
+--------------------------------------------------------
1 |999 |1.1E12 |11:11:11
ij> -- update column not in FOR UPDATE OF list (negative test)
update t1 set i = 999 where current of c13;
ERROR 42X31: Column 'I' is not in the FOR UPDATE list of cursor 'C13'.
ij> select * from t1;
I |V |D |T
-------------------------------------------------------
+--------------------------------------------------------
1 |999 |1.1E12 |11:11:11
ij> close c13;
ij> -- restore t1
@@ -737,7 +737,7 @@ ij> insert into t1 select * from t1_copy
1 row inserted/updated/deleted
ij> select * from t1;
I |V |D |T
-------------------------------------------------------
+--------------------------------------------------------
1 |1111111111|1.1E12 |11:11:11
ij> -- update a non-referenced column
get cursor c14 as 'select i from t1 for update';
@@ -749,7 +749,7 @@ ij> update t1 set v = '999' where curren
1 row inserted/updated/deleted
ij> select * from t1;
I |V |D |T
-------------------------------------------------------
+--------------------------------------------------------
1 |999 |1.1E12 |11:11:11
ij> close c14;
ij> -- restore t1
@@ -759,7 +759,7 @@ ij> insert into t1 select * from t1_copy
1 row inserted/updated/deleted
ij> select * from t1;
I |V |D |T
-------------------------------------------------------
+--------------------------------------------------------
1 |1111111111|1.1E12 |11:11:11
ij> -- .update columns in list in order different from the list's
get cursor c15 as 'select i, v from t1 for update of i, v';
@@ -771,7 +771,7 @@ ij> update t1 set v = '999', i = 888 whe
1 row inserted/updated/deleted
ij> select * from t1;
I |V |D |T
-------------------------------------------------------
+--------------------------------------------------------
888 |999 |1.1E12 |11:11:11
ij> -- . show that target table name must be used as qualifier, other names not allowed
update t1 set t1.v = '998' where current of c15;
@@ -780,7 +780,7 @@ ij> update t1 set t2.v = '997' where cur
ERROR 42X55: Table name 'T2' should be the same as 'T1'.
ij> select * from t1;
I |V |D |T
-------------------------------------------------------
+--------------------------------------------------------
888 |998 |1.1E12 |11:11:11
ij> close c15;
ij> -- restore t1
@@ -790,7 +790,7 @@ ij> insert into t1 select * from t1_copy
1 row inserted/updated/deleted
ij> select * from t1;
I |V |D |T
-------------------------------------------------------
+--------------------------------------------------------
1 |1111111111|1.1E12 |11:11:11
ij> -- .update only 1 column in the list
get cursor c16 as 'select i, v from t1 for update of i, v';
@@ -802,7 +802,7 @@ ij> update t1 set v = '999' where curren
1 row inserted/updated/deleted
ij> select * from t1;
I |V |D |T
-------------------------------------------------------
+--------------------------------------------------------
1 |999 |1.1E12 |11:11:11
ij> close c16;
ij> -- restore t1
@@ -812,7 +812,7 @@ ij> insert into t1 select * from t1_copy
1 row inserted/updated/deleted
ij> select * from t1;
I |V |D |T
-------------------------------------------------------
+--------------------------------------------------------
1 |1111111111|1.1E12 |11:11:11
ij> -- .try to update through a closed cursor
get cursor c17 as 'select i, v from t1 for update of i, v';
@@ -825,7 +825,7 @@ ij> update t1 set v = '999' where curren
ERROR 42X30: Cursor 'C17' not found. Verify that autocommit is off.
ij> select * from t1;
I |V |D |T
-------------------------------------------------------
+--------------------------------------------------------
1 |1111111111|1.1E12 |11:11:11
ij> -- a positioned update requires a named target table.
-- if we prepare the positioned update, close the underlying cursor
@@ -884,7 +884,7 @@ ij> -- now, reopen c1 on a table without
get cursor c1 as 'select * from t1 for update';
ij> next c1;
I |V |D |T
-------------------------------------------------------
+--------------------------------------------------------
1 |1111111111|1.1E12 |11:11:11
ij> execute u1;
ERROR 42X29: Update table 'T3' is not the target of cursor 'C1'.
@@ -1188,4 +1188,4 @@ ij> -- clean up
autocommit on;
ij> drop table test1;
0 rows inserted/updated/deleted
-ij>
+ij>
\ No newline at end of file
Modified: db/derby/code/branches/10.8.3.1_testcompat/java/testing/org/apache/derbyTesting/functionTests/master/select.out
URL: http://svn.apache.org/viewvc/db/derby/code/branches/10.8.3.1_testcompat/java/testing/org/apache/derbyTesting/functionTests/master/select.out?rev=1466316&r1=1466315&r2=1466316&view=diff
==============================================================================
--- db/derby/code/branches/10.8.3.1_testcompat/java/testing/org/apache/derbyTesting/functionTests/master/select.out (original)
+++ db/derby/code/branches/10.8.3.1_testcompat/java/testing/org/apache/derbyTesting/functionTests/master/select.out Wed Apr 10 02:02:45 2013
@@ -178,7 +178,7 @@ ij> INSERT INTO CONTENT.RATING VALUES(5,
1 row inserted/updated/deleted
ij> select S.DESCRIPTION, FAV.MAXRATE, C.TITLE, C.URL FROM CONTENT.RATING R, CONTENT.CONTENT C, CONTENT.STYLE S, CONTENT.CONTENT_STYLE CS, (select S.ID, max(rating) from CONTENT.RATING R, CONTENT.CONTENT C, CONTENT.STYLE S, CONTENT.CONTENT_STYLE CS group by S.ID) AS FAV(FID,MAXRATE) where R.ID = C.ID AND C.ID = CS.CONTENT_ID AND CS.STYLE_ID = FAV.FID AND FAV.FID = S.ID AND FAV.MAXRATE = R.RATING;
DESCRIPTION |MAXRATE |TITLE |URL
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
BIRD |4.5 |title1 |http://url.1
CAR |4.5 |title1 |http://url.1
ij> drop table content.rating;
@@ -217,4 +217,4 @@ ij> select SYS."S1.T1".d1 from "S1.T1";
ERROR 42X04: Column 'SYS.S1.T1.D1' is either not in any table in the FROM list or appears within a join specification and is outside the scope of the join specification or appears in a HAVING clause and is not in the GROUP BY list. If this is a CREATE or ALTER TABLE statement then 'SYS.S1.T1.D1' is not a column in the target table.
ij> select SYS."S1.T1".d1 from "S1.T1" t1;
ERROR 42X04: Column 'SYS.S1.T1.D1' is either not in any table in the FROM list or appears within a join specification and is outside the scope of the join specification or appears in a HAVING clause and is not in the GROUP BY list. If this is a CREATE or ALTER TABLE statement then 'SYS.S1.T1.D1' is not a column in the target table.
-ij>
+ij>
\ No newline at end of file
Modified: db/derby/code/branches/10.8.3.1_testcompat/java/testing/org/apache/derbyTesting/functionTests/master/triggerRefClause.out
URL: http://svn.apache.org/viewvc/db/derby/code/branches/10.8.3.1_testcompat/java/testing/org/apache/derbyTesting/functionTests/master/triggerRefClause.out?rev=1466316&r1=1466315&r2=1466316&view=diff
==============================================================================
--- db/derby/code/branches/10.8.3.1_testcompat/java/testing/org/apache/derbyTesting/functionTests/master/triggerRefClause.out (original)
+++ db/derby/code/branches/10.8.3.1_testcompat/java/testing/org/apache/derbyTesting/functionTests/master/triggerRefClause.out Wed Apr 10 02:02:45 2013
@@ -141,11 +141,11 @@ ij> insert into allTypes1 values (0, 10,
1 row inserted/updated/deleted
ij> select * from allTypes1;
I |TN |S |L |C |V |LVC |D |R |F |DT |T |TS |B |BV |LBV |DC |N
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
0 |10 |100 |1000000 |duplicate |this is duplicated |also duplicated |200.0 |200.0 |200.0 |1992-01-01|12:30:30|xxxxxxFILTERED-TIMESTAMPxxxxx|12af|0f0f|1234 |111.11 |222.2000
ij> select * from allTypes2;
I |TN |S |L |C |V |LVC |D |R |F |DT |T |TS |B |BV |LBV |DC |N
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
0 |10 |100 |1000000 |duplicate |this is duplicated |also duplicated |200.0 |200.0 |200.0 |1992-01-01|12:30:30|xxxxxxFILTERED-TIMESTAMPxxxxx|12af|0f0f|1234 |111.11 |222.2000
ij> commit;
ij> drop trigger t1;
Modified: db/derby/code/branches/10.8.3.1_testcompat/java/testing/org/apache/derbyTesting/functionTests/master/union.out
URL: http://svn.apache.org/viewvc/db/derby/code/branches/10.8.3.1_testcompat/java/testing/org/apache/derbyTesting/functionTests/master/union.out?rev=1466316&r1=1466315&r2=1466316&view=diff
==============================================================================
--- db/derby/code/branches/10.8.3.1_testcompat/java/testing/org/apache/derbyTesting/functionTests/master/union.out (original)
+++ db/derby/code/branches/10.8.3.1_testcompat/java/testing/org/apache/derbyTesting/functionTests/master/union.out Wed Apr 10 02:02:45 2013
@@ -78,7 +78,7 @@ ij> values (1, 2, 3, 4) union values (1,
1 |2 |3 |4
ij> select * from t1 union select * from t2;
I |S |D |R |C10 |C30 |VC10 |VC30
--------------------------------------------------------------------------------------------------------------------------------------------
+-----------------------------------------------------------------------------------------------------------------------------------------------
1 |1 |10.0 |10.0 |11111 |11111 11 |11111 |11111 11
2 |2 |20.0 |20.0 |22222 |22222 22 |22222 |22222 22
3 |3 |30.0 |30.0 |33333 |33333 33 |33333 |33333 33
@@ -86,13 +86,13 @@ I |S |D
NULL |NULL |NULL |NULL |NULL |NULL |NULL |NULL
ij> select * from t1 union select * from t1;
I |S |D |R |C10 |C30 |VC10 |VC30
--------------------------------------------------------------------------------------------------------------------------------------------
+-----------------------------------------------------------------------------------------------------------------------------------------------
1 |1 |10.0 |10.0 |11111 |11111 11 |11111 |11111 11
2 |2 |20.0 |20.0 |22222 |22222 22 |22222 |22222 22
NULL |NULL |NULL |NULL |NULL |NULL |NULL |NULL
ij> select * from t1 union select * from t2 union select * from dups;
I |S |D |R |C10 |C30 |VC10 |VC30
--------------------------------------------------------------------------------------------------------------------------------------------
+-----------------------------------------------------------------------------------------------------------------------------------------------
1 |1 |10.0 |10.0 |11111 |11111 11 |11111 |11111 11
2 |2 |20.0 |20.0 |22222 |22222 22 |22222 |22222 22
3 |3 |30.0 |30.0 |33333 |33333 33 |33333 |33333 33
@@ -100,7 +100,7 @@ I |S |D
NULL |NULL |NULL |NULL |NULL |NULL |NULL |NULL
ij> select * from t1 union select i, s, d, r, c10, c30, vc10, vc30 from t2;
I |S |D |R |C10 |C30 |VC10 |VC30
--------------------------------------------------------------------------------------------------------------------------------------------
+-----------------------------------------------------------------------------------------------------------------------------------------------
1 |1 |10.0 |10.0 |11111 |11111 11 |11111 |11111 11
2 |2 |20.0 |20.0 |22222 |22222 22 |22222 |22222 22
3 |3 |30.0 |30.0 |33333 |33333 33 |33333 |33333 33
@@ -109,7 +109,7 @@ NULL |NULL |NULL
ij> select * from t1 union select i, s, d, r, c10, c30, vc10, vc30 from t2
union select * from dups;
I |S |D |R |C10 |C30 |VC10 |VC30
--------------------------------------------------------------------------------------------------------------------------------------------
+-----------------------------------------------------------------------------------------------------------------------------------------------
1 |1 |10.0 |10.0 |11111 |11111 11 |11111 |11111 11
2 |2 |20.0 |20.0 |22222 |22222 22 |22222 |22222 22
3 |3 |30.0 |30.0 |33333 |33333 33 |33333 |33333 33
@@ -377,7 +377,7 @@ insert into insert_test select * from t1
5 rows inserted/updated/deleted
ij> select * from insert_test;
I |S |D |R |C10 |C30 |VC10 |VC30
--------------------------------------------------------------------------------------------------------------------------------------------
+-----------------------------------------------------------------------------------------------------------------------------------------------
1 |1 |10.0 |10.0 |11111 |11111 11 |11111 |11111 11
2 |2 |20.0 |20.0 |22222 |22222 22 |22222 |22222 22
3 |3 |30.0 |30.0 |33333 |33333 33 |33333 |33333 33
@@ -389,7 +389,7 @@ ij> insert into insert_test (s, i) value
2 rows inserted/updated/deleted
ij> select * from insert_test;
I |S |D |R |C10 |C30 |VC10 |VC30
--------------------------------------------------------------------------------------------------------------------------------------------
+-----------------------------------------------------------------------------------------------------------------------------------------------
1 |2 |NULL |NULL |NULL |NULL |NULL |NULL
3 |4 |NULL |NULL |NULL |NULL |NULL |NULL
ij> delete from insert_test;
@@ -399,7 +399,7 @@ insert into insert_test (vc30) select vc
5 rows inserted/updated/deleted
ij> select * from insert_test;
I |S |D |R |C10 |C30 |VC10 |VC30
--------------------------------------------------------------------------------------------------------------------------------------------
+-----------------------------------------------------------------------------------------------------------------------------------------------
NULL |NULL |NULL |NULL |NULL |NULL |NULL |11111
NULL |NULL |NULL |NULL |NULL |NULL |NULL |22222
NULL |NULL |NULL |NULL |NULL |NULL |NULL |33333 33
@@ -416,7 +416,7 @@ ij> insert into insert_test (c30)
5 rows inserted/updated/deleted
ij> select * from insert_test;
I |S |D |R |C10 |C30 |VC10 |VC30
--------------------------------------------------------------------------------------------------------------------------------------------
+-----------------------------------------------------------------------------------------------------------------------------------------------
NULL |NULL |NULL |NULL |NULL |11111 |NULL |NULL
NULL |NULL |NULL |NULL |NULL |22222 |NULL |NULL
NULL |NULL |NULL |NULL |NULL |33333 33 |NULL |NULL
@@ -427,7 +427,7 @@ ij> delete from insert_test;
ij> -- test NormalizeResultSet generation
select i, d from t1 union select d, i from t2;
1 |2
----------------------------------------------
+-------------------------------------------------
1.0 |10.0
2.0 |20.0
30.0 |3.0
@@ -467,7 +467,7 @@ values (1) union values (1.1);
1.1
ij> values (1) union values (1.1e1);
1
-----------------------
+------------------------
1.0
11.0
ij> values (1.1) union values (1);
@@ -477,7 +477,7 @@ ij> values (1.1) union values (1);
1.1
ij> values (1.1e1) union values (1);
1
-----------------------
+------------------------
1.0
11.0
ij> -- negative cases
@@ -551,7 +551,7 @@ ij> values (1, 2, 3, 4) union all values
9 |10 |11 |12
ij> select * from t1 union all select * from t2;
I |S |D |R |C10 |C30 |VC10 |VC30
--------------------------------------------------------------------------------------------------------------------------------------------
+-----------------------------------------------------------------------------------------------------------------------------------------------
NULL |NULL |NULL |NULL |NULL |NULL |NULL |NULL
1 |1 |10.0 |10.0 |11111 |11111 11 |11111 |11111 11
2 |2 |20.0 |20.0 |22222 |22222 22 |22222 |22222 22
@@ -560,7 +560,7 @@ NULL |NULL |NULL
4 |4 |40.0 |40.0 |44444 |44444 44 |44444 |44444 44
ij> select * from t1 union all select i, s, d, r, c10, c30, vc10, vc30 from t2;
I |S |D |R |C10 |C30 |VC10 |VC30
--------------------------------------------------------------------------------------------------------------------------------------------
+-----------------------------------------------------------------------------------------------------------------------------------------------
NULL |NULL |NULL |NULL |NULL |NULL |NULL |NULL
1 |1 |10.0 |10.0 |11111 |11111 11 |11111 |11111 11
2 |2 |20.0 |20.0 |22222 |22222 22 |22222 |22222 22
@@ -787,7 +787,7 @@ insert into insert_test select * from t1
6 rows inserted/updated/deleted
ij> select * from insert_test;
I |S |D |R |C10 |C30 |VC10 |VC30
--------------------------------------------------------------------------------------------------------------------------------------------
+-----------------------------------------------------------------------------------------------------------------------------------------------
NULL |NULL |NULL |NULL |NULL |NULL |NULL |NULL
1 |1 |10.0 |10.0 |11111 |11111 11 |11111 |11111 11
2 |2 |20.0 |20.0 |22222 |22222 22 |22222 |22222 22
@@ -800,7 +800,7 @@ ij> insert into insert_test (s, i) value
2 rows inserted/updated/deleted
ij> select * from insert_test;
I |S |D |R |C10 |C30 |VC10 |VC30
--------------------------------------------------------------------------------------------------------------------------------------------
+-----------------------------------------------------------------------------------------------------------------------------------------------
1 |2 |NULL |NULL |NULL |NULL |NULL |NULL
3 |4 |NULL |NULL |NULL |NULL |NULL |NULL
ij> delete from insert_test;
@@ -811,7 +811,7 @@ insert into insert_test select s, i, r,
6 rows inserted/updated/deleted
ij> select * from insert_test;
I |S |D |R |C10 |C30 |VC10 |VC30
--------------------------------------------------------------------------------------------------------------------------------------------
+-----------------------------------------------------------------------------------------------------------------------------------------------
NULL |NULL |NULL |NULL |NULL |NULL |NULL |NULL
1 |1 |10.0 |10.0 |11111 |11111 11 |11111 |11111 11
2 |2 |20.0 |20.0 |22222 |22222 22 |22222 |22222 22
@@ -834,7 +834,7 @@ ij> insert into insert_test (vc30) selec
6 rows inserted/updated/deleted
ij> select * from insert_test;
I |S |D |R |C10 |C30 |VC10 |VC30
--------------------------------------------------------------------------------------------------------------------------------------------
+-----------------------------------------------------------------------------------------------------------------------------------------------
NULL |NULL |NULL |NULL |NULL |NULL |NULL |NULL
NULL |NULL |NULL |NULL |NULL |NULL |NULL |11111
NULL |NULL |NULL |NULL |NULL |NULL |NULL |22222
@@ -852,7 +852,7 @@ ij> insert into insert_test (c30)
9 rows inserted/updated/deleted
ij> select * from insert_test;
I |S |D |R |C10 |C30 |VC10 |VC30
--------------------------------------------------------------------------------------------------------------------------------------------
+-----------------------------------------------------------------------------------------------------------------------------------------------
NULL |NULL |NULL |NULL |NULL |NULL |NULL |NULL
NULL |NULL |NULL |NULL |NULL |11111 |NULL |NULL
NULL |NULL |NULL |NULL |NULL |22222 |NULL |NULL
@@ -867,7 +867,7 @@ ij> delete from insert_test;
ij> -- test NormalizeResultSet generation
select i, d from t1 union all select d, i from t2;
1 |2
----------------------------------------------
+-------------------------------------------------
NULL |NULL
1.0 |10.0
2.0 |20.0
Modified: db/derby/code/branches/10.8.3.1_testcompat/java/testing/org/apache/derbyTesting/functionTests/master/valuesclause.out
URL: http://svn.apache.org/viewvc/db/derby/code/branches/10.8.3.1_testcompat/java/testing/org/apache/derbyTesting/functionTests/master/valuesclause.out?rev=1466316&r1=1466315&r2=1466316&view=diff
==============================================================================
--- db/derby/code/branches/10.8.3.1_testcompat/java/testing/org/apache/derbyTesting/functionTests/master/valuesclause.out (original)
+++ db/derby/code/branches/10.8.3.1_testcompat/java/testing/org/apache/derbyTesting/functionTests/master/valuesclause.out Wed Apr 10 02:02:45 2013
@@ -171,14 +171,14 @@ ij> prepare v2 as 'values (1, 1, ?), (1e
ij> execute v2 using 'values (''ghi'', 1, 2)';
IJ WARNING: Autocommit may close using result set
1 |2 |3
----------------------------------------
+-----------------------------------------
1.0 |1 |ghi
1.0 |1 |abc
2.0 |0 |def
ij> execute v2 using 'values (cast(null as char(3)), cast(null as smallint), cast(null as float))';
IJ WARNING: Autocommit may close using result set
1 |2 |3
----------------------------------------
+-----------------------------------------
1.0 |1 |NULL
1.0 |NULL |abc
NULL |0 |def
@@ -245,7 +245,7 @@ ij> insert into insert_test2 values (1,
3 rows inserted/updated/deleted
ij> select * from insert_test2;
I |S |D |R |C10 |C30 |VC10 |VC30
--------------------------------------------------------------------------------------------------------------------------------------------
+-----------------------------------------------------------------------------------------------------------------------------------------------
1 |1 |10.0 |10.0 |111 |1111111111 |111 |111111111
2 |2 |200.0 |200.0 |222 |2222222222 |222 |222222222
3 |3 |3000.0 |3000.0 |333 |3333333333 |333 |333333333
@@ -257,7 +257,7 @@ ij> insert into insert_test2 values (1,
3 rows inserted/updated/deleted
ij> select * from insert_test2;
I |S |D |R |C10 |C30 |VC10 |VC30
--------------------------------------------------------------------------------------------------------------------------------------------
+-----------------------------------------------------------------------------------------------------------------------------------------------
1 |1 |NULL |NULL |NULL |NULL |NULL |NULL
2 |2 |NULL |NULL |NULL |NULL |NULL |NULL
3 |3 |NULL |NULL |NULL |NULL |NULL |NULL
@@ -269,7 +269,7 @@ ij> insert into insert_test2 values (1,
3 rows inserted/updated/deleted
ij> select * from insert_test2;
I |S |D |R |C10 |C30 |VC10 |VC30
--------------------------------------------------------------------------------------------------------------------------------------------
+-----------------------------------------------------------------------------------------------------------------------------------------------
1 |NULL |NULL |NULL |NULL |NULL |NULL |NULL
NULL |2 |NULL |NULL |NULL |NULL |NULL |NULL
3 |NULL |NULL |NULL |NULL |NULL |NULL |NULL
@@ -281,7 +281,7 @@ ij> insert into insert_test2 (r, d) valu
3 rows inserted/updated/deleted
ij> select * from insert_test2;
I |S |D |R |C10 |C30 |VC10 |VC30
--------------------------------------------------------------------------------------------------------------------------------------------
+-----------------------------------------------------------------------------------------------------------------------------------------------
NULL |NULL |10.0 |100.0 |NULL |NULL |NULL |NULL
NULL |NULL |20.0 |200.0 |NULL |NULL |NULL |NULL
NULL |NULL |30.0 |300.0 |NULL |NULL |NULL |NULL
@@ -306,7 +306,7 @@ IJ WARNING: Autocommit may close using r
3 rows inserted/updated/deleted
ij> select * from insert_test2;
I |S |D |R |C10 |C30 |VC10 |VC30
--------------------------------------------------------------------------------------------------------------------------------------------
+-----------------------------------------------------------------------------------------------------------------------------------------------
1 |1 |10.0 |10.0 |111 |1111111111 |111 |111111111
2 |2 |200.0 |200.0 |222 |2222222222 |222 |222222222
3 |3 |3000.0 |3000.0 |333 |3333333333 |333 |333333333
@@ -677,4 +677,4 @@ select * from t3 group by i having (valu
ERROR 42X07: Null is only allowed in a VALUES clause within an INSERT statement.
ij> drop table t3;
0 rows inserted/updated/deleted
-ij>
+ij>
\ No newline at end of file
Modified: db/derby/code/branches/10.8.3.1_testcompat/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/PrepStmtMetaDataTest.java
URL: http://svn.apache.org/viewvc/db/derby/code/branches/10.8.3.1_testcompat/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/PrepStmtMetaDataTest.java?rev=1466316&r1=1466315&r2=1466316&view=diff
==============================================================================
--- db/derby/code/branches/10.8.3.1_testcompat/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/PrepStmtMetaDataTest.java (original)
+++ db/derby/code/branches/10.8.3.1_testcompat/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/PrepStmtMetaDataTest.java Wed Apr 10 02:02:45 2013
@@ -237,7 +237,7 @@ public class PrepStmtMetaDataTest extend
assertEquals(5, rsmd.getScale(4));
// COLUMN 5 REAL
assertEquals("java.lang.Float", rsmd.getColumnClassName(5));
- assertEquals(13, rsmd.getColumnDisplaySize(5));
+ assertEquals(15, rsmd.getColumnDisplaySize(5));
assertEquals("REALCOL", rsmd.getColumnLabel(5));
assertEquals(java.sql.Types.REAL,rsmd.getColumnType(5));
assertEquals("REAL", rsmd.getColumnTypeName(5));
@@ -246,7 +246,7 @@ public class PrepStmtMetaDataTest extend
// COLUMN 6 DOUBLE
assertEquals("java.lang.Double", rsmd.getColumnClassName(6));
- assertEquals(22, rsmd.getColumnDisplaySize(6));
+ assertEquals(24, rsmd.getColumnDisplaySize(6));
assertEquals("DOUBLECOL", rsmd.getColumnLabel(6));
assertEquals(java.sql.Types.DOUBLE,rsmd.getColumnType(6));
assertEquals("DOUBLE", rsmd.getColumnTypeName(6));
Modified: db/derby/code/branches/10.8.3.1_testcompat/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/ResultSetMiscTest.java
URL: http://svn.apache.org/viewvc/db/derby/code/branches/10.8.3.1_testcompat/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/ResultSetMiscTest.java?rev=1466316&r1=1466315&r2=1466316&view=diff
==============================================================================
--- db/derby/code/branches/10.8.3.1_testcompat/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/ResultSetMiscTest.java (original)
+++ db/derby/code/branches/10.8.3.1_testcompat/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/ResultSetMiscTest.java Wed Apr 10 02:02:45 2013
@@ -125,7 +125,7 @@ public class ResultSetMiscTest extends B
assertFalse(met.isCurrency(3));
assertEquals(ResultSetMetaData.columnNullable, met.isNullable(3));
assertTrue(met.isSigned(3));
- assertEquals(13, met.getColumnDisplaySize(3));
+ assertEquals(15, met.getColumnDisplaySize(3));
assertEquals("R", met.getColumnLabel(3));
assertEquals("R", met.getColumnName(3));
// beetle 5323
@@ -150,7 +150,7 @@ public class ResultSetMiscTest extends B
assertFalse(met.isCurrency(4));
assertEquals(ResultSetMetaData.columnNullable, met.isNullable(4));
assertTrue(met.isSigned(4));
- assertEquals(22, met.getColumnDisplaySize(4));
+ assertEquals(24, met.getColumnDisplaySize(4));
assertEquals("D", met.getColumnLabel(4));
assertEquals("D", met.getColumnName(4));
// beetle 5323
Modified: db/derby/code/branches/10.8.3.1_testcompat/java/testing/org/apache/derbyTesting/functionTests/tests/lang/MathTrigFunctionsTest.java
URL: http://svn.apache.org/viewvc/db/derby/code/branches/10.8.3.1_testcompat/java/testing/org/apache/derbyTesting/functionTests/tests/lang/MathTrigFunctionsTest.java?rev=1466316&r1=1466315&r2=1466316&view=diff
==============================================================================
--- db/derby/code/branches/10.8.3.1_testcompat/java/testing/org/apache/derbyTesting/functionTests/tests/lang/MathTrigFunctionsTest.java (original)
+++ db/derby/code/branches/10.8.3.1_testcompat/java/testing/org/apache/derbyTesting/functionTests/tests/lang/MathTrigFunctionsTest.java Wed Apr 10 02:02:45 2013
@@ -33,15 +33,20 @@ public class MathTrigFunctionsTest exten
private static final boolean debugFlag = false;
- private static final double SMALLEST_NEG_DERBY_DOUBLE = -1.79769E+308;
+ private static final double
+ PRE_DERBY_3398_SMALLEST_NEG_DERBY_DOUBLE = -1.79769E+308;
- private static final double SMALL_NEG_DOUBLE = -1.79768E+308;
+ private static final double
+ SMALL_NEG_DOUBLE = -1.79768E+308;
- private static final double SMALLEST_POS_DERBY_DOUBLE = 2.225E-307;
+ private static final double
+ PRE_DERBY_3398_SMALLEST_POS_DERBY_DOUBLE = 2.225E-307;
- private static final double LARGEST_POS_DERBY_DOUBLE = 1.79769E+308;
+ private static final double
+ PRE_DERBY_3398_LARGEST_POS_DERBY_DOUBLE = 1.79769E+308;
- private static final double LARGEST_NEG_DERBY_DOUBLE = -2.225E-307;
+ private static final double
+ PRE_DERBY_3398_LARGEST_NEG_DERBY_DOUBLE = -2.225E-307;
private static final double[] testRadians = { -0.000000001, -0.25,
0.000000001, 0.25, 0.5, 0.0, 1.0, 2.0, java.lang.StrictMath.PI,
@@ -51,19 +56,26 @@ public class MathTrigFunctionsTest exten
0.25, -0.25, 0.5, 0.0, -0.0, 1.0, -1.0 };
private static final double[] logValues = { 0.000000001, 0.25, 0.5, 1.0,
- 45.0, 90.0, 135.0, 180.0, 270, SMALLEST_POS_DERBY_DOUBLE,
- LARGEST_POS_DERBY_DOUBLE };
+ 45.0, 90.0, 135.0, 180.0, 270, PRE_DERBY_3398_SMALLEST_POS_DERBY_DOUBLE,
+ PRE_DERBY_3398_LARGEST_POS_DERBY_DOUBLE };
- private static final double[] testValues = { SMALLEST_NEG_DERBY_DOUBLE,
- SMALL_NEG_DOUBLE, SMALLEST_POS_DERBY_DOUBLE,
- LARGEST_POS_DERBY_DOUBLE, LARGEST_NEG_DERBY_DOUBLE, 0.000000001,
+ private static final double[] testValues = {
+ PRE_DERBY_3398_SMALLEST_NEG_DERBY_DOUBLE,
+ SMALL_NEG_DOUBLE,
+ PRE_DERBY_3398_SMALLEST_POS_DERBY_DOUBLE,
+ PRE_DERBY_3398_LARGEST_POS_DERBY_DOUBLE,
+ PRE_DERBY_3398_LARGEST_NEG_DERBY_DOUBLE,
+ 0.000000001,
-0.000000001, 0.25, -0.25, 0.5, 0.0, -0.0, 1.0, -1.0, 2.0, 3.0,
java.lang.StrictMath.PI, 2 * java.lang.StrictMath.PI, 4.0, 45.0,
90.0, 135.0, 180.0, 270 };
- private static final double[] testValuesTwo = { SMALLEST_NEG_DERBY_DOUBLE,
- SMALL_NEG_DOUBLE, SMALLEST_POS_DERBY_DOUBLE,
- LARGEST_NEG_DERBY_DOUBLE, 0.000000001, -0.000000001, 0.25, -0.25,
+ private static final double[] testValuesTwo = {
+ PRE_DERBY_3398_SMALLEST_NEG_DERBY_DOUBLE,
+ SMALL_NEG_DOUBLE,
+ PRE_DERBY_3398_SMALLEST_POS_DERBY_DOUBLE,
+ PRE_DERBY_3398_LARGEST_NEG_DERBY_DOUBLE,
+ 0.000000001, -0.000000001, 0.25, -0.25,
0.5, 0.0, -0.0, 1.0, -1.0, 2.0, 3.0, java.lang.StrictMath.PI,
2 * java.lang.StrictMath.PI, 4.0, 45.0, 90.0, 135.0, 180.0, 270 };
@@ -477,9 +489,10 @@ public class MathTrigFunctionsTest exten
}
try {
- getValue(ps, SMALLEST_NEG_DERBY_DOUBLE);
+ // Yields -Infinity, so thould throw.
+ getValue(ps, PRE_DERBY_3398_SMALLEST_NEG_DERBY_DOUBLE);
fail("DEGREES: Out of range test failed, input value is: "
- + SMALLEST_NEG_DERBY_DOUBLE);
+ + PRE_DERBY_3398_SMALLEST_NEG_DERBY_DOUBLE);
} catch (SQLException sqlE) {
// "ERROR 22003: The resulting value is outside the range for the
// data type DOUBLE.";
@@ -488,9 +501,10 @@ public class MathTrigFunctionsTest exten
sqlE);
}
try {
- getValue(psFN, SMALLEST_NEG_DERBY_DOUBLE);
+ // Yields -Infinity, so thould throw.
+ getValue(psFN, PRE_DERBY_3398_SMALLEST_NEG_DERBY_DOUBLE);
fail("DEGREES: Out of range test failed, input value is: "
- + SMALLEST_NEG_DERBY_DOUBLE);
+ + PRE_DERBY_3398_SMALLEST_NEG_DERBY_DOUBLE);
} catch (SQLException sqlE) {
// "ERROR 22003: The resulting value is outside the range for the
// data type DOUBLE.";
@@ -503,6 +517,10 @@ public class MathTrigFunctionsTest exten
psFN.close();
}
+ // 2.2250738585072014E-308 remove when we move to compile with source level
+ // Java 6. Cf Double.MIN_NORMAL.
+ final static double DOUBLE_MIN_NORMAL = 2.2250738585072014E-308;
+
/**
* Tests the RADIANS function which converts a DOUBLE PRECISION number from
* degrees to radians.
@@ -549,28 +567,26 @@ public class MathTrigFunctionsTest exten
}
- try {
- getValue(ps, SMALLEST_POS_DERBY_DOUBLE);
- fail("RADIANS: Out of range test failed, input value is: "
- + SMALLEST_NEG_DERBY_DOUBLE);
- } catch (SQLException sqlE) {
- // "ERROR 22003: The resulting value is outside the range for the
- // data type DOUBLE.";
- assertSQLState(
- SQLStateConstants.DATA_EXCEPTION_NUMERIC_VALUE_OUT_OF_RANGE,
- sqlE);
- }
- try {
- getValue(psFN, SMALLEST_POS_DERBY_DOUBLE);
- fail("RADIANS: Out of range test failed, input value is: "
- + SMALLEST_NEG_DERBY_DOUBLE);
- } catch (SQLException sqlE) {
- // "ERROR 22003: The resulting value is outside the range for the
- // data type DOUBLE.";
- assertSQLState(
- SQLStateConstants.DATA_EXCEPTION_NUMERIC_VALUE_OUT_OF_RANGE,
- sqlE);
+ // Numbers below verified by using lava.lang.StrictMath.toRadians
+ // outside Derby context. First number: argument to ps and psFN, second
+ // number: expected result.
+ double[][] inOut = new double[][] {
+ {180.0d, java.lang.StrictMath.PI},
+ {PRE_DERBY_3398_SMALLEST_NEG_DERBY_DOUBLE, -3.1375609430176863E306},
+ {DOUBLE_MIN_NORMAL, 3.8834864931005E-310},
+ {Double.MIN_VALUE, 0.0d},
+ {Double.MAX_VALUE, 3.1375664143845866E306},
+ {PRE_DERBY_3398_SMALLEST_POS_DERBY_DOUBLE, 3.88335758568738E-309},
+ {PRE_DERBY_3398_LARGEST_NEG_DERBY_DOUBLE, -3.88335758568738E-309},
+ };
+
+ for (int i=0; i < inOut.length; i++) {
+ double dv = getValue(ps, inOut[i][0]);
+ assertEquals(inOut[i][1], dv, 0.0d);
+ dv = getValue(psFN, inOut[i][0]);
+ assertEquals(inOut[i][1], dv, 0.0d);
}
+
ps.close();
psFN.close();
}
@@ -617,9 +633,9 @@ public class MathTrigFunctionsTest exten
}
try {
- getValue(ps, LARGEST_POS_DERBY_DOUBLE);
+ getValue(ps, PRE_DERBY_3398_LARGEST_POS_DERBY_DOUBLE);
fail("EXP: Out of range test failed, input value is: "
- + LARGEST_POS_DERBY_DOUBLE);
+ + PRE_DERBY_3398_LARGEST_POS_DERBY_DOUBLE);
} catch (SQLException sqlE) {
// "ERROR 22003: The resulting value is outside the range for the
// data type DOUBLE.";
@@ -628,9 +644,9 @@ public class MathTrigFunctionsTest exten
sqlE);
}
try {
- getValue(psFN, LARGEST_POS_DERBY_DOUBLE);
+ getValue(psFN, PRE_DERBY_3398_LARGEST_POS_DERBY_DOUBLE);
fail("EXP: Out of range test failed, input value is: "
- + LARGEST_POS_DERBY_DOUBLE);
+ + PRE_DERBY_3398_LARGEST_POS_DERBY_DOUBLE);
} catch (SQLException sqlE) {
// "ERROR 22003: The resulting value is outside the range for the
// data type DOUBLE.";
Modified: db/derby/code/branches/10.8.3.1_testcompat/java/testing/org/apache/derbyTesting/functionTests/tests/lang/floattypes.sql
URL: http://svn.apache.org/viewvc/db/derby/code/branches/10.8.3.1_testcompat/java/testing/org/apache/derbyTesting/functionTests/tests/lang/floattypes.sql?rev=1466316&r1=1466315&r2=1466316&view=diff
==============================================================================
--- db/derby/code/branches/10.8.3.1_testcompat/java/testing/org/apache/derbyTesting/functionTests/tests/lang/floattypes.sql (original)
+++ db/derby/code/branches/10.8.3.1_testcompat/java/testing/org/apache/derbyTesting/functionTests/tests/lang/floattypes.sql Wed Apr 10 02:02:45 2013
@@ -1056,7 +1056,7 @@ insert into fake values -11;
-- ============================================================
--- DB2 MAX_VALUES (first succeed, second fail)
+-- DB2 MAX_VALUES (first succeed, second used to fail)
insert into fake values( -3.4019E+38 );
insert into fake values( -3.4021E+38 );
insert into fake values -21;
@@ -1065,7 +1065,7 @@ insert into fake values( +3.4019E+38 );
insert into fake values( +3.4021E+38 );
insert into fake values -22;
--- DB2 MIN_VALUES (first fail, second succeed)
+-- DB2 MIN_VALUES (first used to fail, second succeed)
insert into fake values( -1.1749E-37 );
insert into fake values( -1.1751E-37 );
insert into fake values -23;
@@ -1074,7 +1074,7 @@ insert into fake values( +1.1749E-37 );
insert into fake values( +1.1751E-37 );
insert into fake values -24;
--- CS (fail)
+-- CS (used to fail pre DERBY-3398)
insert into fake values( -3.4028234E38 );
insert into fake values( -3.40282349E38 );
insert into fake values( -3.40282351E38 );
@@ -1133,7 +1133,7 @@ values cast(5e-37 / 1e300 as real);
values cast(cast(0.0e0 as real) - cast(0.0e0 as real) as real);
values cast(cast(1.0e-30 as real) - cast(1.0e-30 as real) as real);
--- java (and CS previously) rounded result to zero, but now gives errors like DB2 (fail)
+-- used to fail pre DERBY-3398
values cast(cast(5e-37 as real) - cast(4e-37 as real) as real);
values cast(5e-37 - 4e-37 as real);
values cast(5e-37 - 4.99e-37 as real);
@@ -1172,8 +1172,8 @@ insert into t1 values -1.401298464324817
insert into t1 values +1.40129846432481700e-46;
select * from t1;
--- these 2 insert statements should raise an error msg in compat mode
--- because the values are greater db2's limits (fail)
+-- these 2 insert statements used to raise error pre DERBY-3398
+-- because the values were greater than db2's limits
insert into t1 values 3.40282346638528860e+38;
insert into t1 values -3.40282346638528860e+38;
select * from t1;
@@ -1188,8 +1188,8 @@ insert into t1 values -1.401298464324817
insert into t1 values +1.40129846432481700e-46;
select * from t1;
--- these 2 insert statements raise ERROR 22003 because
--- the values are greater db2's limits (fail)
+-- these 2 insert statements used to raise error pre DERBY-3398
+-- because the values were greater than db2's limits
insert into t1 values 3.40282346638528860e+38;
insert into t1 values -3.40282346638528860e+38;
select * from t1;
@@ -1238,4 +1238,4 @@ values cast ('123.' as DECIMAL(6,2));
values cast ('1e' as DECIMAL(6,2));
values cast ('1e1.0' as DECIMAL(6,2));
values cast ('.3' as DECIMAL(6,2));
-values cast ('' as DECIMAL(6,2));
\ No newline at end of file
+values cast ('' as DECIMAL(6,2));