db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mi...@apache.org
Subject svn commit: r437487 - in /db/derby/code/branches/10.2/java/testing/org/apache/derbyTesting/functionTests: master/predicatePushdown.out tests/lang/predicatePushdown.sql
Date Mon, 28 Aug 2006 00:34:08 GMT
Author: mikem
Date: Sun Aug 27 17:34:07 2006
New Revision: 437487

URL: http://svn.apache.org/viewvc?rev=437487&view=rev
Log:
DERBY-1681
merging change 437380 from trunk to 10.2 branch:

DERBY-1691
contributed by Army Brown

Adding extra tests for this issue, fix already committed.

Note that the test cases which were added for DERBY-1633 actually already
demonstrate the problem reported (and now fixed) in this issue. This checkin
is a dedicated test case for this issue.



Modified:
    db/derby/code/branches/10.2/java/testing/org/apache/derbyTesting/functionTests/master/predicatePushdown.out
    db/derby/code/branches/10.2/java/testing/org/apache/derbyTesting/functionTests/tests/lang/predicatePushdown.sql

Modified: db/derby/code/branches/10.2/java/testing/org/apache/derbyTesting/functionTests/master/predicatePushdown.out
URL: http://svn.apache.org/viewvc/db/derby/code/branches/10.2/java/testing/org/apache/derbyTesting/functionTests/master/predicatePushdown.out?rev=437487&r1=437486&r2=437487&view=diff
==============================================================================
--- db/derby/code/branches/10.2/java/testing/org/apache/derbyTesting/functionTests/master/predicatePushdown.out
(original)
+++ db/derby/code/branches/10.2/java/testing/org/apache/derbyTesting/functionTests/master/predicatePushdown.out
Sun Aug 27 17:34:07 2006
@@ -10521,7 +10521,90 @@
 t3stuff:|6         |6          |t3stuff:  |6         |6          
 t3stuff:|9         |9          |morestuff:|9         |9          
 t3stuff:|9         |9          |t3stuff:  |9         |9          
-ij> -- Clean-up from DERBY-1633.
+ij> -- DERBY-1681: 
+-- In order to reproduce the issue described in DERBY-1681
+-- we have to have a minimum amount of data in the tables;
+-- if we have too little, then somehow that affects the
+-- plan and we won't see the incorrect results.
+insert into t1 select * from t2;
+3 rows inserted/updated/deleted
+ij> insert into t2 select * from t3;
+3 rows inserted/updated/deleted
+ij> insert into t3 select * from t1;
+5 rows inserted/updated/deleted
+ij> insert into t1 select * from t2;
+6 rows inserted/updated/deleted
+ij> insert into t2 select * from t3;
+8 rows inserted/updated/deleted
+ij> insert into t3 select * from t1;
+11 rows inserted/updated/deleted
+ij> insert into t1 select * from t2;
+14 rows inserted/updated/deleted
+ij> insert into t2 select * from t3;
+19 rows inserted/updated/deleted
+ij> insert into t3 select * from t1;
+25 rows inserted/updated/deleted
+ij> insert into t1 select * from t2;
+33 rows inserted/updated/deleted
+ij> insert into t2 select * from t3;
+44 rows inserted/updated/deleted
+ij> insert into t3 select * from t1;
+58 rows inserted/updated/deleted
+ij> -- Now can just run one of the queries from DERBY-1633 to test
+-- the fix.  Before DERBY-1681 this query would return 84 rows
+-- and it was clear that the predicate wasn't being enforced;
+-- after the fix, we should only see 42 rows and for every row
+-- the first and second column should be equal.
+select topview4.col3, x1.col3 from
+  topview x1
+    left join
+      topview4
+    on topview4.col3 = x1.col3;
+COL3      |COL3      
+---------------------
+1         |1         
+1         |1         
+2         |2         
+2         |2         
+3         |3         
+3         |3         
+4         |4         
+4         |4         
+6         |6         
+6         |6         
+8         |8         
+8         |8         
+9         |9         
+9         |9         
+1         |1         
+1         |1         
+2         |2         
+2         |2         
+3         |3         
+3         |3         
+4         |4         
+4         |4         
+6         |6         
+6         |6         
+8         |8         
+8         |8         
+9         |9         
+9         |9         
+1         |1         
+1         |1         
+2         |2         
+2         |2         
+3         |3         
+3         |3         
+4         |4         
+4         |4         
+6         |6         
+6         |6         
+8         |8         
+8         |8         
+9         |9         
+9         |9         
+ij> -- Clean-up from DERBY-1633 and DERBY-1681.
 drop view topview;
 0 rows inserted/updated/deleted
 ij> drop view topview2;

Modified: db/derby/code/branches/10.2/java/testing/org/apache/derbyTesting/functionTests/tests/lang/predicatePushdown.sql
URL: http://svn.apache.org/viewvc/db/derby/code/branches/10.2/java/testing/org/apache/derbyTesting/functionTests/tests/lang/predicatePushdown.sql?rev=437487&r1=437486&r2=437487&view=diff
==============================================================================
--- db/derby/code/branches/10.2/java/testing/org/apache/derbyTesting/functionTests/tests/lang/predicatePushdown.sql
(original)
+++ db/derby/code/branches/10.2/java/testing/org/apache/derbyTesting/functionTests/tests/lang/predicatePushdown.sql
Sun Aug 27 17:34:07 2006
@@ -1106,7 +1106,38 @@
   left join topview5 --DERBY-PROPERTIES joinStrategy=NESTEDLOOP
   on topview5.col3 = x1.col3;
 
--- Clean-up from DERBY-1633.
+-- DERBY-1681: 
+-- In order to reproduce the issue described in DERBY-1681
+-- we have to have a minimum amount of data in the tables;
+-- if we have too little, then somehow that affects the
+-- plan and we won't see the incorrect results.
+
+insert into t1 select * from t2;
+insert into t2 select * from t3;
+insert into t3 select * from t1;
+insert into t1 select * from t2;
+insert into t2 select * from t3;
+insert into t3 select * from t1;
+insert into t1 select * from t2;
+insert into t2 select * from t3;
+insert into t3 select * from t1;
+insert into t1 select * from t2;
+insert into t2 select * from t3;
+insert into t3 select * from t1;
+
+-- Now can just run one of the queries from DERBY-1633 to test
+-- the fix.  Before DERBY-1681 this query would return 84 rows
+-- and it was clear that the predicate wasn't being enforced;
+-- after the fix, we should only see 42 rows and for every row
+-- the first and second column should be equal.
+
+select topview4.col3, x1.col3 from
+  topview x1
+    left join
+      topview4
+    on topview4.col3 = x1.col3;
+
+-- Clean-up from DERBY-1633 and DERBY-1681.
 
 drop view topview;
 drop view topview2;



Mime
View raw message