db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From abr...@apache.org
Subject svn commit: r498689 - in /db/derby/code/trunk/java: engine/org/apache/derby/impl/sql/compile/SubqueryNode.java testing/org/apache/derbyTesting/functionTests/master/valuesclause.out testing/org/apache/derbyTesting/functionTests/tests/lang/valuesclause.sql
Date Mon, 22 Jan 2007 16:46:00 GMT
Author: abrown
Date: Mon Jan 22 08:45:57 2007
New Revision: 498689

URL: http://svn.apache.org/viewvc?view=rev&rev=498689
Log:
DERBY-2218: Follow-up patch for additional tests plus removal of an
unneeded call to bindResultColumns in SubqueryNode.

Contributed by Yip Ng (yipng168@gmail.com)

Modified:
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/SubqueryNode.java
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/valuesclause.out
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/valuesclause.sql

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/SubqueryNode.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/SubqueryNode.java?view=diff&rev=498689&r1=498688&r2=498689
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/SubqueryNode.java (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/SubqueryNode.java Mon
Jan 22 08:45:57 2007
@@ -489,8 +489,6 @@
 			/* Bind the expression in the SELECT list */
 			resultSet.bindTargetExpressions(fromList);
 
-			resultSet.bindResultColumns(fromList);
-
 			/* 
 			 * reject any untyped nulls in the EXISTS subquery before 
 			 * SELECT TRUE transformation. 

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/valuesclause.out
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/valuesclause.out?view=diff&rev=498689&r1=498688&r2=498689
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/valuesclause.out
(original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/valuesclause.out
Mon Jan 22 08:45:57 2007
@@ -557,4 +557,27 @@
 1          
 -----------
 1          
+ij> -- DERBY-2218
+drop table t3;
+ERROR 42Y55: 'DROP TABLE' cannot be performed on 'T3' because it does not exist.
+ij> create table t3 (i int);
+0 rows inserted/updated/deleted
+ij> -- expect errors
+-- where clause
+select * from t3 where (values null);
+ERROR 42X07: Null is only allowed in a VALUES clause within an INSERT statement.
+ij> -- order by clause
+select * from t3 order by (values null);
+ERROR 42X07: Null is only allowed in a VALUES clause within an INSERT statement.
+ij> -- result column
+select (values null) from t3;
+ERROR 42X07: Null is only allowed in a VALUES clause within an INSERT statement.
+ij> -- group by clause
+select * from t3 group by (values null);
+ERROR 42X07: Null is only allowed in a VALUES clause within an INSERT statement.
+ij> -- having clause
+select * from t3 group by i having (values null);
+ERROR 42X07: Null is only allowed in a VALUES clause within an INSERT statement.
+ij> drop table t3;
+0 rows inserted/updated/deleted
 ij> 

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/valuesclause.sql
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/valuesclause.sql?view=diff&rev=498689&r1=498688&r2=498689
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/valuesclause.sql
(original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/valuesclause.sql
Mon Jan 22 08:45:57 2007
@@ -326,3 +326,24 @@
 -- DERBY-1587
 VALUES INTEGER(1.5);
 VALUES INT(1.5);
+
+-- DERBY-2218
+drop table t3;
+create table t3 (i int);
+-- expect errors
+-- where clause
+select * from t3 where (values null);
+
+-- order by clause
+select * from t3 order by (values null);
+
+-- result column
+select (values null) from t3;
+
+-- group by clause
+select * from t3 group by (values null);
+
+-- having clause
+select * from t3 group by i having (values null); 
+
+drop table t3;



Mime
View raw message