db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mi...@apache.org
Subject svn commit: r960617 - in /db/derby/code/branches/10.5: ./ java/testing/org/apache/derbyTesting/functionTests/tests/lang/GeneratedColumnsTest.java
Date Mon, 05 Jul 2010 15:04:34 GMT
Author: mikem
Date: Mon Jul  5 15:04:34 2010
New Revision: 960617

URL: http://svn.apache.org/viewvc?rev=960617&view=rev
Log:
DERBY-4425: NPE with INSERT .. SELECT .. UNION and generated expressions

backporting change #831319 from trunk to 10.5.

This patch adds a test which confirms that DERBY-4425 is fixed. The code
change which resolved DERBY-4425 was performed as part of fixing DERBY-4419,
since the same code change fixes both symptoms, so this is a test-only patch.

subversion revision 831304 contains the DERBY-4419 code change. 


Modified:
    db/derby/code/branches/10.5/   (props changed)
    db/derby/code/branches/10.5/java/testing/org/apache/derbyTesting/functionTests/tests/lang/GeneratedColumnsTest.java

Propchange: db/derby/code/branches/10.5/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Mon Jul  5 15:04:34 2010
@@ -1,2 +1,2 @@
 /db/derby/code/branches/10.6:957000
-/db/derby/code/trunk:757811,769596,769602,769606,769962,772090,772337,772449,772534,774281,777105,779681,782991,785131,785139,785163,785570,785662,788369,788670,788674,788968,789264,790218,791027,792434,793089,793588,794106,794303,794955,795166,795459,796020,796027,796316,796372,797147,798347,798742,800523,803548,803948,805696,808494,808850,809643,810860,812669,816531,816536,819006,822289,823659,824694,829022,829410,831304,832379,833430,835286,881074,881444,882732,884163,887246,892912,897161,898635,901165,901648,901760,903108,908418,909176,911315,915733,916075,916897,918359,921028,927430,928065,942286,942476,942480,942587,946794,948045,948069,951346,954748,955001,955634,956075,956445,956659,958163,959550
+/db/derby/code/trunk:757811,769596,769602,769606,769962,772090,772337,772449,772534,774281,777105,779681,782991,785131,785139,785163,785570,785662,788369,788670,788674,788968,789264,790218,791027,792434,793089,793588,794106,794303,794955,795166,795459,796020,796027,796316,796372,797147,798347,798742,800523,803548,803948,805696,808494,808850,809643,810860,812669,816531,816536,819006,822289,823659,824694,829022,829410,831304,831319,832379,833430,835286,881074,881444,882732,884163,887246,892912,897161,898635,901165,901648,901760,903108,908418,909176,911315,915733,916075,916897,918359,921028,927430,928065,942286,942476,942480,942587,946794,948045,948069,951346,954748,955001,955634,956075,956445,956659,958163,959550

Modified: db/derby/code/branches/10.5/java/testing/org/apache/derbyTesting/functionTests/tests/lang/GeneratedColumnsTest.java
URL: http://svn.apache.org/viewvc/db/derby/code/branches/10.5/java/testing/org/apache/derbyTesting/functionTests/tests/lang/GeneratedColumnsTest.java?rev=960617&r1=960616&r2=960617&view=diff
==============================================================================
--- db/derby/code/branches/10.5/java/testing/org/apache/derbyTesting/functionTests/tests/lang/GeneratedColumnsTest.java
(original)
+++ db/derby/code/branches/10.5/java/testing/org/apache/derbyTesting/functionTests/tests/lang/GeneratedColumnsTest.java
Mon Jul  5 15:04:34 2010
@@ -5419,6 +5419,21 @@ public class GeneratedColumnsTest extend
 
     }
 
+    public void test_derby_4425()
+        throws Exception
+    {
+        Connection conn = getConnection();
+        goodStatement(conn, "create table t4425_1(x int)");
+        goodStatement(conn, "create table t4425_2(x int)");
+        goodStatement(conn, "insert into t4425_1 values 1,2");
+        goodStatement(conn, "insert into t4425_2 values 2,3");
+        goodStatement(conn, "create table t4425_3 (x int, " +
+                "y generated always as (2*x))");
+        goodStatement(conn, "insert into t4425_3(x) " +
+                "select * from t4425_1 union select * from t4425_2");
+        assertResults(conn, "select * from t4425_3",
+                new String[][] { {"1","2"},{"2","4"},{"3","6"}}, false);
+    }
 
     ///////////////////////////////////////////////////////////////////////////////////
     //



Mime
View raw message