db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From d..@apache.org
Subject svn commit: r358163 [2/4] - in /db/derby/code/trunk/java: client/org/apache/derby/client/am/ client/org/apache/derby/client/net/ drda/org/apache/derby/impl/drda/ engine/org/apache/derby/iapi/reference/ engine/org/apache/derby/impl/sql/compile/ testing/...
Date Wed, 21 Dec 2005 00:54:02 GMT
Modified: db/derby/code/trunk/java/drda/org/apache/derby/impl/drda/SQLTypes.java
URL: http://svn.apache.org/viewcvs/db/derby/code/trunk/java/drda/org/apache/derby/impl/drda/SQLTypes.java?rev=358163&r1=358162&r2=358163&view=diff
==============================================================================
--- db/derby/code/trunk/java/drda/org/apache/derby/impl/drda/SQLTypes.java (original)
+++ db/derby/code/trunk/java/drda/org/apache/derby/impl/drda/SQLTypes.java Tue Dec 20 16:53:42 2005
@@ -22,73 +22,13 @@
 
 import java.sql.Types;
 import java.sql.SQLException;
+import org.apache.derby.iapi.reference.DRDAConstants;
 import org.apache.derby.iapi.reference.JDBC30Translation;
 
 
 
 public class SQLTypes {
 
-  //----------------------------------------------------------------------------
-  protected final static int DB2_SQLTYPE_DATE = 384;        // DATE
-  protected final static int DB2_SQLTYPE_NDATE = 385;
-  protected final static int DB2_SQLTYPE_TIME = 388;        // TIME
-  protected final static int DB2_SQLTYPE_NTIME = 389;
-  protected final static int DB2_SQLTYPE_TIMESTAMP = 392;   // TIMESTAMP
-  protected final static int DB2_SQLTYPE_NTIMESTAMP = 393;
-  protected final static int DB2_SQLTYPE_DATALINK = 396;    // DATALINK
-  protected final static int DB2_SQLTYPE_NDATALINK = 397;
-
-  protected final static int DB2_SQLTYPE_BLOB = 404;        // BLOB
-  protected final static int DB2_SQLTYPE_NBLOB = 405;
-  protected final static int DB2_SQLTYPE_CLOB = 408;        // CLOB
-  protected final static int DB2_SQLTYPE_NCLOB = 409;
-  protected final static int DB2_SQLTYPE_DBCLOB = 412;      // DBCLOB
-  protected final static int DB2_SQLTYPE_NDBCLOB = 413;
-
-  protected final static int DB2_SQLTYPE_VARCHAR = 448;     // VARCHAR(i) - varying length string
-  protected final static int DB2_SQLTYPE_NVARCHAR = 449;
-  protected final static int DB2_SQLTYPE_CHAR = 452;        // CHAR(i) - fixed length
-  protected final static int DB2_SQLTYPE_NCHAR = 453;
-  protected final static int DB2_SQLTYPE_LONG = 456;        // LONG VARCHAR - varying length string
-  protected final static int DB2_SQLTYPE_NLONG = 457;
-  protected final static int DB2_SQLTYPE_CSTR = 460;        // SBCS - null terminated
-  protected final static int DB2_SQLTYPE_NCSTR = 461;
-  protected final static int DB2_SQLTYPE_VARGRAPH = 464;    // VARGRAPHIC(i) - varying length
-                                                  // graphic string (2 byte length)
-  protected final static int DB2_SQLTYPE_NVARGRAPH = 465;
-  protected final static int DB2_SQLTYPE_GRAPHIC = 468;     // GRAPHIC(i) - fixed length graphic string                                                             */
-  protected final static int DB2_SQLTYPE_NGRAPHIC = 469;
-  protected final static int DB2_SQLTYPE_LONGRAPH = 472;    // LONG VARGRAPHIC(i) - varying length graphic string                                              */
-  protected final static int DB2_SQLTYPE_NLONGRAPH = 473;
-  protected final static int DB2_SQLTYPE_LSTR = 476;        // varying length string for Pascal (1-byte length)                                                     */
-  protected final static int DB2_SQLTYPE_NLSTR = 477;
-
-  protected final static int DB2_SQLTYPE_FLOAT = 480;       // FLOAT - 4 or 8 byte floating point
-  protected final static int DB2_SQLTYPE_NFLOAT = 481;
-  protected final static int DB2_SQLTYPE_DECIMAL = 484;     // DECIMAL (m,n)
-  protected final static int DB2_SQLTYPE_NDECIMAL = 485;
-  protected final static int DB2_SQLTYPE_ZONED = 488;       // Zoned Decimal -> DECIMAL(m,n)
-  protected final static int DB2_SQLTYPE_NZONED = 489;
-
-  protected final static int DB2_SQLTYPE_BIGINT = 492;      // BIGINT - 8-byte signed integer
-  protected final static int DB2_SQLTYPE_NBIGINT = 493;
-  protected final static int DB2_SQLTYPE_INTEGER = 496;     // INTEGER
-  protected final static int DB2_SQLTYPE_NINTEGER = 497;
-  protected final static int DB2_SQLTYPE_SMALL = 500;       // SMALLINT - 2-byte signed integer                                                                    */
-  protected final static int DB2_SQLTYPE_NSMALL = 501;
-
-  protected final static int DB2_SQLTYPE_NUMERIC = 504;     // NUMERIC -> DECIMAL (m,n)
-  protected final static int DB2_SQLTYPE_NNUMERIC = 505;
-
-  protected final static int DB2_SQLTYPE_ROWID = 904;           // ROWID
-  protected final static int DB2_SQLTYPE_NROWID = 905;
-  protected final static int DB2_SQLTYPE_BLOB_LOCATOR = 960;    // BLOB locator
-  protected final static int DB2_SQLTYPE_NBLOB_LOCATOR = 961;
-  protected final static int DB2_SQLTYPE_CLOB_LOCATOR = 964;    // CLOB locator
-  protected final static int DB2_SQLTYPE_NCLOB_LOCATOR = 965;
-  protected final static int DB2_SQLTYPE_DBCLOB_LOCATOR = 968;  // DBCLOB locator
-  protected final static int DB2_SQLTYPE_NDBCLOB_LOCATOR = 969;
-
   // define final statics for the fdoca type codes here!!!
 
   // hide the default constructor
@@ -108,13 +48,15 @@
   static protected int mapDB2SqlTypeToJdbcType (int sqlType, long length, int ccsid)
   {
     switch (getNonNullableSqlType (sqlType)) { // mask the isNullable bit
-    case DB2_SQLTYPE_SMALL:
+    case DRDAConstants.DB2_SQLTYPE_BOOLEAN:
+      return JDBC30Translation.BOOLEAN;
+    case DRDAConstants.DB2_SQLTYPE_SMALL:
       return java.sql.Types.SMALLINT;
-    case DB2_SQLTYPE_INTEGER:
+    case DRDAConstants.DB2_SQLTYPE_INTEGER:
       return java.sql.Types.INTEGER;
-    case DB2_SQLTYPE_BIGINT:
+    case DRDAConstants.DB2_SQLTYPE_BIGINT:
       return java.sql.Types.BIGINT;
-    case DB2_SQLTYPE_FLOAT:
+    case DRDAConstants.DB2_SQLTYPE_FLOAT:
       if (length == 16)                  // can map to either NUMERIC or DECIMAL!!! @sxg
         return java.sql.Types.DECIMAL;
       else if (length == 8)              // can map to either DOUBLE or FLOAT!!! @sxg
@@ -124,46 +66,46 @@
       else
         return 0;
         //throw new BugCheckException ("Encountered unexpected float length");
-    case DB2_SQLTYPE_DECIMAL:            // can map to either NUMERIC or DECIMAL!!! @sxg
-    case DB2_SQLTYPE_ZONED:              // can map to either NUMERIC or DECIMAL!!! @sxg
-    case DB2_SQLTYPE_NUMERIC:            // can map to either NUMERIC or DECIMAL!!! @sxg
+    case DRDAConstants.DB2_SQLTYPE_DECIMAL:            // can map to either NUMERIC or DECIMAL!!! @sxg
+    case DRDAConstants.DB2_SQLTYPE_ZONED:              // can map to either NUMERIC or DECIMAL!!! @sxg
+    case DRDAConstants.DB2_SQLTYPE_NUMERIC:            // can map to either NUMERIC or DECIMAL!!! @sxg
       return java.sql.Types.DECIMAL;
-    case DB2_SQLTYPE_CHAR:    // mixed and single byte
+    case DRDAConstants.DB2_SQLTYPE_CHAR:    // mixed and single byte
       if (ccsid == 0xffff || ccsid == 0) // we think UW returns 0, and 390 returns 0xffff, doublecheck !!!
         return java.sql.Types.BINARY;
       else
         return java.sql.Types.CHAR;
-    case DB2_SQLTYPE_CSTR:    // SBCS null terminated 
-    case DB2_SQLTYPE_GRAPHIC: // fixed character DBCS
+    case DRDAConstants.DB2_SQLTYPE_CSTR:    // SBCS null terminated 
+    case DRDAConstants.DB2_SQLTYPE_GRAPHIC: // fixed character DBCS
       return java.sql.Types.CHAR;
     // use ccsid to distinguish between BINARY and CHAR, VARBINARY and VARCHAR, LONG... !!! -j/p/s
-    case DB2_SQLTYPE_VARGRAPH:  // variable character DBCS
-    case DB2_SQLTYPE_VARCHAR:   // variable character SBCS/Mixed
+    case DRDAConstants.DB2_SQLTYPE_VARGRAPH:  // variable character DBCS
+    case DRDAConstants.DB2_SQLTYPE_VARCHAR:   // variable character SBCS/Mixed
       if (ccsid == 0xffff || ccsid == 0) // we think UW returns 0, and 390 returns 0xffff, doublecheck !!!
         return java.sql.Types.VARBINARY;
       else
         return java.sql.Types.VARCHAR;
-    case DB2_SQLTYPE_LSTR:      // pascal string SBCS/Mixed
+    case DRDAConstants.DB2_SQLTYPE_LSTR:      // pascal string SBCS/Mixed
       return java.sql.Types.VARCHAR;
-    case DB2_SQLTYPE_LONGRAPH:  // long varchar DBCS
-    case DB2_SQLTYPE_LONG:      // long varchar SBCS/Mixed
+    case DRDAConstants.DB2_SQLTYPE_LONGRAPH:  // long varchar DBCS
+    case DRDAConstants.DB2_SQLTYPE_LONG:      // long varchar SBCS/Mixed
       if (ccsid == 0xffff || ccsid == 0) // we think UW returns 0, and 390 returns 0xffff, doublecheck !!!
         return java.sql.Types.LONGVARBINARY;
       else
         return java.sql.Types.LONGVARCHAR;
-    case DB2_SQLTYPE_DATE:
+    case DRDAConstants.DB2_SQLTYPE_DATE:
       return java.sql.Types.DATE;
-    case DB2_SQLTYPE_TIME:
+    case DRDAConstants.DB2_SQLTYPE_TIME:
       return java.sql.Types.TIME;
-    case DB2_SQLTYPE_TIMESTAMP:
+    case DRDAConstants.DB2_SQLTYPE_TIMESTAMP:
       return java.sql.Types.TIMESTAMP;
-    case DB2_SQLTYPE_CLOB:    // large object character SBCS/Mixed
-    case DB2_SQLTYPE_DBCLOB:  // large object character DBCS
+    case DRDAConstants.DB2_SQLTYPE_CLOB:    // large object character SBCS/Mixed
+    case DRDAConstants.DB2_SQLTYPE_DBCLOB:  // large object character DBCS
       return java.sql.Types.CLOB;
-    case DB2_SQLTYPE_BLOB:    // large object bytes
-		case DB2_SQLTYPE_BLOB_LOCATOR:
-		case DB2_SQLTYPE_CLOB_LOCATOR:
-		case DB2_SQLTYPE_DBCLOB_LOCATOR:
+    case DRDAConstants.DB2_SQLTYPE_BLOB:    // large object bytes
+		case DRDAConstants.DB2_SQLTYPE_BLOB_LOCATOR:
+		case DRDAConstants.DB2_SQLTYPE_CLOB_LOCATOR:
+		case DRDAConstants.DB2_SQLTYPE_DBCLOB_LOCATOR:
       return java.sql.Types.BLOB;
     default:
       //throw new BugCheckException ("Encountered unexpected type code");
@@ -190,7 +132,7 @@
   * @exception SQLException thrown for unrecognized SQLType
   */
 
- static protected int mapJdbcTypeToDB2SqlType (int jdbctype, boolean nullable,
+ static protected int mapJdbcTypeToDB2SqlType (AppRequester appRequester, int jdbctype, boolean nullable,
 											   int[] outlen)
 	 throws SQLException
   {
@@ -200,49 +142,52 @@
 		  nullAddVal =1; 
 	  
 	  // Call FdocaConstants just to get the length
-	  FdocaConstants.mapJdbcTypeToDrdaType(jdbctype,nullable,outlen);
+	  FdocaConstants.mapJdbcTypeToDrdaType( appRequester, jdbctype,nullable,outlen);
 
+	  jdbctype = FdocaConstants.clipJdbcType( appRequester, jdbctype );
+	  
 	  switch(jdbctype)
 	  {
 		  case JDBC30Translation.BOOLEAN:
+			  return DRDAConstants.DB2_SQLTYPE_BOOLEAN + nullAddVal;
 		  case java.sql.Types.BIT:
 		  case java.sql.Types.TINYINT:
 		  case java.sql.Types.SMALLINT:
-			  return DB2_SQLTYPE_SMALL + nullAddVal;
+			  return DRDAConstants.DB2_SQLTYPE_SMALL + nullAddVal;
 		  case java.sql.Types.INTEGER:
-			  return DB2_SQLTYPE_INTEGER + nullAddVal;
+			  return DRDAConstants.DB2_SQLTYPE_INTEGER + nullAddVal;
 		  case java.sql.Types.BIGINT:
-			  return DB2_SQLTYPE_BIGINT + nullAddVal;
+			  return DRDAConstants.DB2_SQLTYPE_BIGINT + nullAddVal;
 		  case java.sql.Types.DOUBLE:
 		  case java.sql.Types.REAL:
-			  return DB2_SQLTYPE_FLOAT + nullAddVal;
+			  return DRDAConstants.DB2_SQLTYPE_FLOAT + nullAddVal;
 		  case java.sql.Types.DECIMAL:
 		  case java.sql.Types.NUMERIC:
-			  return DB2_SQLTYPE_DECIMAL + nullAddVal;
+			  return DRDAConstants.DB2_SQLTYPE_DECIMAL + nullAddVal;
 		  case java.sql.Types.DATE:
-			  return DB2_SQLTYPE_DATE + nullAddVal;
+			  return DRDAConstants.DB2_SQLTYPE_DATE + nullAddVal;
 		  case java.sql.Types.TIME:
-			  return DB2_SQLTYPE_TIME + nullAddVal;
+			  return DRDAConstants.DB2_SQLTYPE_TIME + nullAddVal;
 		  case java.sql.Types.TIMESTAMP:
-			  return DB2_SQLTYPE_TIMESTAMP + nullAddVal;
+			  return DRDAConstants.DB2_SQLTYPE_TIMESTAMP + nullAddVal;
 		  case java.sql.Types.CHAR:
-			  return  DB2_SQLTYPE_CHAR + nullAddVal;    // null terminated SBCS/Mixed
+			  return  DRDAConstants.DB2_SQLTYPE_CHAR + nullAddVal;    // null terminated SBCS/Mixed
 		  case java.sql.Types.BINARY:
-			  return DB2_SQLTYPE_CHAR + nullAddVal;
+			  return DRDAConstants.DB2_SQLTYPE_CHAR + nullAddVal;
 
 		  case java.sql.Types.VARCHAR:
 		  case java.sql.Types.VARBINARY:
-			  return  DB2_SQLTYPE_VARCHAR + nullAddVal;			  
+			  return  DRDAConstants.DB2_SQLTYPE_VARCHAR + nullAddVal;			  
 		  case java.sql.Types.LONGVARBINARY:
-			  return DB2_SQLTYPE_LONG + nullAddVal;
+			  return DRDAConstants.DB2_SQLTYPE_LONG + nullAddVal;
 		  case java.sql.Types.JAVA_OBJECT:
-			  return DB2_SQLTYPE_LONG + nullAddVal;
+			  return DRDAConstants.DB2_SQLTYPE_LONG + nullAddVal;
 		  case java.sql.Types.BLOB:
-			  return DB2_SQLTYPE_BLOB + nullAddVal;
+			  return DRDAConstants.DB2_SQLTYPE_BLOB + nullAddVal;
 		  case java.sql.Types.CLOB:
-			  return DB2_SQLTYPE_CLOB + nullAddVal;
+			  return DRDAConstants.DB2_SQLTYPE_CLOB + nullAddVal;
 		  case java.sql.Types.LONGVARCHAR:
-			  return DB2_SQLTYPE_LONG + nullAddVal;
+			  return DRDAConstants.DB2_SQLTYPE_LONG + nullAddVal;
 		  case java.sql.Types.ARRAY:
 		  case java.sql.Types.DISTINCT:
 		  case java.sql.Types.NULL:

Added: db/derby/code/trunk/java/engine/org/apache/derby/iapi/reference/DRDAConstants.java
URL: http://svn.apache.org/viewcvs/db/derby/code/trunk/java/engine/org/apache/derby/iapi/reference/DRDAConstants.java?rev=358163&view=auto
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/iapi/reference/DRDAConstants.java (added)
+++ db/derby/code/trunk/java/engine/org/apache/derby/iapi/reference/DRDAConstants.java Tue Dec 20 16:53:42 2005
@@ -0,0 +1,215 @@
+/*
+
+   Derby - Class org.apache.derby.iapi.reference.DRDAConstants
+
+   Copyright 2005 The Apache Software Foundation or its licensors, as applicable.
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+   See the License for the specific language governing permissions and
+   limitations under the License.
+
+ */
+/**
+ * <p>
+ * Machinery shared across Derby DRDA clients and server.
+ * </p>
+ * @author Rick
+ */
+
+package org.apache.derby.iapi.reference;
+
+public	interface	DRDAConstants
+{
+	/////////////////////////////////////////////////////////////
+	//
+	//	CONSTANTS
+	//
+	/////////////////////////////////////////////////////////////
+
+	//
+	// Derby Product Identifiers as defined by the Open Group.
+	// See http://www.opengroup.org/dbiop/prodid.htm for the
+	// list of legal DRDA Product Identifiers.
+	//
+	public	static	final	String	DERBY_DRDA_SERVER_ID = "CSS";
+	public	static	final	String	DERBY_DRDA_CLIENT_ID = "DNC";
+	
+	///////////////////////
+	//
+	// DRDA Type constants.
+	//
+	///////////////////////
+
+	public	static final int DRDA_TYPE_INTEGER = 0x02;
+	public	static final int DRDA_TYPE_NINTEGER = 0x03;
+	public	static final int DRDA_TYPE_SMALL = 0x04;
+	public	static final int DRDA_TYPE_NSMALL = 0x05;
+	public	static final int DRDA_TYPE_1BYTE_INT = 0x06;
+	public	static final int DRDA_TYPE_N1BYTE_INT = 0x07;
+	public	static final int DRDA_TYPE_FLOAT16 = 0x08;
+	public	static final int DRDA_TYPE_NFLOAT16 = 0x09;
+	public	static final int DRDA_TYPE_FLOAT8 = 0x0A;
+	public	static final int DRDA_TYPE_NFLOAT8 = 0x0B;
+	public	static final int DRDA_TYPE_FLOAT4 = 0x0C;
+	public	static final int DRDA_TYPE_NFLOAT4 = 0x0D;
+	public	static final int DRDA_TYPE_DECIMAL = 0x0E;
+	public	static final int DRDA_TYPE_NDECIMAL = 0x0F;
+	public	static final int DRDA_TYPE_ZDECIMAL = 0x10;
+	public	static final int DRDA_TYPE_NZDECIMAL = 0x11;
+	public	static final int DRDA_TYPE_NUMERIC_CHAR = 0x12;
+	public	static final int DRDA_TYPE_NNUMERIC_CHAR = 0x13;
+	public	static final int DRDA_TYPE_RSET_LOC = 0x14;
+	public	static final int DRDA_TYPE_NRSET_LOC = 0x15;
+	public	static final int DRDA_TYPE_INTEGER8 = 0x16;
+	public	static final int DRDA_TYPE_NINTEGER8 = 0x17;
+	public	static final int DRDA_TYPE_LOBLOC = 0x18;
+	public	static final int DRDA_TYPE_NLOBLOC = 0x19;
+	public	static final int DRDA_TYPE_CLOBLOC = 0x1A;
+	public	static final int DRDA_TYPE_NCLOBLOC = 0x1B;
+	public	static final int DRDA_TYPE_DBCSCLOBLOC = 0x1C;
+	public	static final int DRDA_TYPE_NDBCSCLOBLOC = 0x1D;
+	public	static final int DRDA_TYPE_ROWID = 0x1E;
+	public	static final int DRDA_TYPE_NROWID = 0x1F;
+	public	static final int DRDA_TYPE_DATE = 0x20;
+	public	static final int DRDA_TYPE_NDATE = 0x21;
+	public	static final int DRDA_TYPE_TIME = 0x22;
+	public	static final int DRDA_TYPE_NTIME = 0x23;
+	public	static final int DRDA_TYPE_TIMESTAMP = 0x24;
+	public	static final int DRDA_TYPE_NTIMESTAMP = 0x25;
+	public	static final int DRDA_TYPE_FIXBYTE = 0x26;
+	public	static final int DRDA_TYPE_NFIXBYTE = 0x27;
+	public	static final int DRDA_TYPE_VARBYTE = 0x28;
+	public	static final int DRDA_TYPE_NVARBYTE = 0x29;
+	public	static final int DRDA_TYPE_LONGVARBYTE = 0x2A;
+	public	static final int DRDA_TYPE_NLONGVARBYTE = 0x2B;
+	public	static final int DRDA_TYPE_NTERMBYTE = 0x2C;
+	public	static final int DRDA_TYPE_NNTERMBYTE = 0x2D;
+	public	static final int DRDA_TYPE_CSTR = 0x2E;
+	public	static final int DRDA_TYPE_NCSTR = 0x2F;
+	public	static final int DRDA_TYPE_CHAR = 0x30;
+	public	static final int DRDA_TYPE_NCHAR = 0x31;
+	public	static final int DRDA_TYPE_VARCHAR = 0x32;
+	public	static final int DRDA_TYPE_NVARCHAR = 0x33;
+	public	static final int DRDA_TYPE_LONG = 0x34;
+	public	static final int DRDA_TYPE_NLONG = 0x35;
+	public	static final int DRDA_TYPE_GRAPHIC = 0x36;
+	public	static final int DRDA_TYPE_NGRAPHIC = 0x37;
+	public	static final int DRDA_TYPE_VARGRAPH = 0x38;
+	public	static final int DRDA_TYPE_NVARGRAPH = 0x39;
+	public	static final int DRDA_TYPE_LONGRAPH = 0x3A;
+	public	static final int DRDA_TYPE_NLONGRAPH = 0x3B;
+	public	static final int DRDA_TYPE_MIX = 0x3C;
+	public	static final int DRDA_TYPE_NMIX = 0x3D;
+	public	static final int DRDA_TYPE_VARMIX = 0x3E;
+	public	static final int DRDA_TYPE_NVARMIX = 0x3F;
+	public	static final int DRDA_TYPE_LONGMIX = 0x40;
+	public	static final int DRDA_TYPE_NLONGMIX = 0x41;
+	public	static final int DRDA_TYPE_CSTRMIX = 0x42;
+	public	static final int DRDA_TYPE_NCSTRMIX = 0x43;
+	public	static final int DRDA_TYPE_PSCLBYTE = 0x44;
+	public	static final int DRDA_TYPE_NPSCLBYTE = 0x45;
+	public	static final int DRDA_TYPE_LSTR = 0x46;
+	public	static final int DRDA_TYPE_NLSTR = 0x47;
+	public	static final int DRDA_TYPE_LSTRMIX = 0x48;
+	public	static final int DRDA_TYPE_NLSTRMIX = 0x49;
+	public	static final int DRDA_TYPE_SDATALINK = 0x4C;
+	public	static final int DRDA_TYPE_NSDATALINK = 0x4D;
+	public	static final int DRDA_TYPE_MDATALINK = 0x4E;
+	public	static final int DRDA_TYPE_NMDATALINK = 0x4F;
+
+	// --- Override LIDs 0x50 - 0xAF
+	public	static final int DRDA_TYPE_LOBBYTES = 0xC8;
+	public	static final int DRDA_TYPE_NLOBBYTES = 0xC9;
+	public	static final int DRDA_TYPE_LOBCSBCS = 0xCA;
+	public	static final int DRDA_TYPE_NLOBCSBCS = 0xCB;
+	public	static final int DRDA_TYPE_LOBCDBCS = 0xCC;
+	public	static final int DRDA_TYPE_NLOBCDBCS = 0xCD;
+	public	static final int DRDA_TYPE_LOBCMIXED = 0xCE;
+	public	static final int DRDA_TYPE_NLOBCMIXED = 0xCF;
+
+	// Experimental types. These codes will change when the Open Group
+	// publishes an addendum to the DRDA spec covering these
+	// datatypes.
+	
+	public	static final int DRDA_TYPE_BOOLEAN = 0xD0;
+	public	static final int DRDA_TYPE_NBOOLEAN = 0xD1;
+	
+	///////////////////////
+	//
+	// DB2 datatypes
+	//
+	///////////////////////
+
+	public	static final  int DB2_SQLTYPE_DATE = 384;        // DATE
+	public	static final  int DB2_SQLTYPE_NDATE = 385;
+	public	static final  int DB2_SQLTYPE_TIME = 388;        // TIME
+	public	static final  int DB2_SQLTYPE_NTIME = 389;
+	public	static final  int DB2_SQLTYPE_TIMESTAMP = 392;   // TIMESTAMP
+	public	static final  int DB2_SQLTYPE_NTIMESTAMP = 393;
+	public	static final  int DB2_SQLTYPE_DATALINK = 396;    // DATALINK
+	public	static final  int DB2_SQLTYPE_NDATALINK = 397;
+
+	public	static final  int DB2_SQLTYPE_BLOB = 404;        // BLOB
+	public	static final  int DB2_SQLTYPE_NBLOB = 405;
+	public	static final  int DB2_SQLTYPE_CLOB = 408;        // CLOB
+	public	static final  int DB2_SQLTYPE_NCLOB = 409;
+	public	static final  int DB2_SQLTYPE_DBCLOB = 412;      // DBCLOB
+	public	static final  int DB2_SQLTYPE_NDBCLOB = 413;
+
+	public	static final  int DB2_SQLTYPE_VARCHAR = 448;     // VARCHAR(i) - varying length string
+	public	static final  int DB2_SQLTYPE_NVARCHAR = 449;
+	public	static final  int DB2_SQLTYPE_CHAR = 452;        // CHAR(i) - fixed length
+	public	static final  int DB2_SQLTYPE_NCHAR = 453;
+	public	static final  int DB2_SQLTYPE_LONG = 456;        // LONG VARCHAR - varying length string
+	public	static final  int DB2_SQLTYPE_NLONG = 457;
+	public	static final  int DB2_SQLTYPE_CSTR = 460;        // SBCS - null terminated
+	public	static final  int DB2_SQLTYPE_NCSTR = 461;
+	public	static final  int DB2_SQLTYPE_VARGRAPH = 464;    // VARGRAPHIC(i) - varying length
+                                                  // graphic string (2 byte length)
+	public	static final  int DB2_SQLTYPE_NVARGRAPH = 465;
+	public	static final  int DB2_SQLTYPE_GRAPHIC = 468;     // GRAPHIC(i) - fixed length graphic string                                                             */
+	public	static final  int DB2_SQLTYPE_NGRAPHIC = 469;
+	public	static final  int DB2_SQLTYPE_LONGRAPH = 472;    // LONG VARGRAPHIC(i) - varying length graphic string                                              */
+	public	static final  int DB2_SQLTYPE_NLONGRAPH = 473;
+	public	static final  int DB2_SQLTYPE_LSTR = 476;        // varying length string for Pascal (1-byte length)                                                     */
+	public	static final  int DB2_SQLTYPE_NLSTR = 477;
+
+	public	static final  int DB2_SQLTYPE_FLOAT = 480;       // FLOAT - 4 or 8 byte floating point
+	public	static final  int DB2_SQLTYPE_NFLOAT = 481;
+	public	static final  int DB2_SQLTYPE_DECIMAL = 484;     // DECIMAL (m,n)
+	public	static final  int DB2_SQLTYPE_NDECIMAL = 485;
+	public	static final  int DB2_SQLTYPE_ZONED = 488;       // Zoned Decimal -> DECIMAL(m,n)
+	public	static final  int DB2_SQLTYPE_NZONED = 489;
+
+	public	static final  int DB2_SQLTYPE_BIGINT = 492;      // BIGINT - 8-byte signed integer
+	public	static final  int DB2_SQLTYPE_NBIGINT = 493;
+	public	static final  int DB2_SQLTYPE_INTEGER = 496;     // INTEGER
+	public	static final  int DB2_SQLTYPE_NINTEGER = 497;
+	public	static final  int DB2_SQLTYPE_SMALL = 500;       // SMALLINT - 2-byte signed integer                                                                    */
+	public	static final  int DB2_SQLTYPE_NSMALL = 501;
+
+	public	static final  int DB2_SQLTYPE_NUMERIC = 504;     // NUMERIC -> DECIMAL (m,n)
+	public	static final  int DB2_SQLTYPE_NNUMERIC = 505;
+
+	public	static final  int DB2_SQLTYPE_ROWID = 904;           // ROWID
+	public	static final  int DB2_SQLTYPE_NROWID = 905;
+	public	static final  int DB2_SQLTYPE_BLOB_LOCATOR = 960;    // BLOB locator
+	public	static final  int DB2_SQLTYPE_NBLOB_LOCATOR = 961;
+	public	static final  int DB2_SQLTYPE_CLOB_LOCATOR = 964;    // CLOB locator
+	public	static final  int DB2_SQLTYPE_NCLOB_LOCATOR = 965;
+	public	static final  int DB2_SQLTYPE_DBCLOB_LOCATOR = 968;  // DBCLOB locator
+	public	static final  int DB2_SQLTYPE_NDBCLOB_LOCATOR = 969;
+
+	// extensions to the db2 datatypes
+    public	static final  int DB2_SQLTYPE_BOOLEAN = 1000;     // BOOLEAN
+    public	static final  int DB2_SQLTYPE_NBOOLEAN = 1001;
+
+}

Propchange: db/derby/code/trunk/java/engine/org/apache/derby/iapi/reference/DRDAConstants.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/sqlgrammar.jj
URL: http://svn.apache.org/viewcvs/db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/sqlgrammar.jj?rev=358163&r1=358162&r2=358163&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/sqlgrammar.jj (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/sqlgrammar.jj Tue Dec 20 16:53:42 2005
@@ -3299,7 +3299,7 @@
 	ResultSetNode		resultSetNode = null;
 }
 {
-	<CALL> value = primaryExpression(true)
+	<CALL> value = primaryExpression()
 	{
 		if (! (value instanceof JavaToSQLValueNode) ||
 			! (((JavaToSQLValueNode) value).getJavaValueNode() instanceof MethodCallNode))
@@ -3367,10 +3367,8 @@
 /*
  * <A NAME="primaryExpression">primaryExpression</A>
  * 
- * @param inSelectClause will be true if this method got called while parsing the select or values clause
- * If in select or values clause, we do not want to allow boolean values.
  */
-ValueNode primaryExpression(boolean inSelectClause) throws StandardException :
+ValueNode primaryExpression() throws StandardException :
 {
 	ValueNode			value = null;
 }
@@ -3386,7 +3384,7 @@
 		return value;
 	}
 |
-	value = primaryExpressionXX(inSelectClause)
+	value = primaryExpressionXX()
 	{
 		return value;
 	}
@@ -3743,7 +3741,6 @@
 	typeDescriptor = datetimeType()
 | <BOOLEAN>
 {
-	checkInternalFeature(TypeId.BOOLEAN_NAME);
 	typeDescriptor = new DataTypeDescriptor(TypeId.BOOLEAN_ID, true);
 }
 |
@@ -4927,7 +4924,7 @@
 {
 	//true to additiveExpression ensures that for the derived columns, we will not allow boolean values inside (), 
 	//eg (2 > 1) should be disallowed in the select clause
-	columnExpression = additiveExpression(null, 0, true) 
+	columnExpression = additiveExpression(null, 0) 
 			[ columnName = asClause() ]
 	{ 
 		/*
@@ -4967,17 +4964,15 @@
 /*
  * <A NAME="valueExpression">valueExpression</A>
  * 
- * @param inSelectClause will be true if this method got called while parsing the select or values clause
- * If in select or values clause, we do not want to allow boolean values.
  */
 ValueNode
-valueExpression(boolean inSelectClause) throws StandardException :
+valueExpression() throws StandardException :
 {
 	ValueNode	leftOperand;
 }
 {
-	leftOperand = orExpression(null, inSelectClause)
-		(<OR> leftOperand = orExpression(leftOperand, inSelectClause) ) *
+	leftOperand = orExpression(null)
+		(<OR> leftOperand = orExpression(leftOperand) ) *
 	{
 
 		return leftOperand;
@@ -4986,18 +4981,15 @@
 	
 /*
  * <A NAME="orExpression">orExpression</A>
- * 
- * @param inSelectClause will be true if this method got called while parsing the select or values clause
- * If in select or values clause, we do not want to allow boolean values.
  */
 ValueNode
-orExpression(ValueNode farLeftOperand, boolean inSelectClause) throws StandardException :
+orExpression(ValueNode farLeftOperand) throws StandardException :
 {
 	ValueNode	leftOperand;
 }
 {
-	leftOperand = andExpression(null, inSelectClause)
-		(<AND> leftOperand = andExpression(leftOperand, inSelectClause)) *
+	leftOperand = andExpression(null)
+		(<AND> leftOperand = andExpression(leftOperand)) *
 	{
 		if (farLeftOperand == null)
 		{
@@ -5016,12 +5008,9 @@
 
 /*
  * <A NAME="andExpression">andExpression</A>
- * 
- * @param inSelectClause will be true if this method got called while parsing the select or values clause
- * If in select or values clause, we do not want to allow boolean values.
  */
 ValueNode
-andExpression(ValueNode farLeftOperand, boolean inSelectClause) throws StandardException :
+andExpression(ValueNode farLeftOperand) throws StandardException :
 {
 	Token		tok = null;
 	ValueNode	test;
@@ -5029,7 +5018,7 @@
 {
 	//LOOKAHEAD required to tell that NOT is not part of a class name
 	[ LOOKAHEAD({getToken(1).kind == NOT && !(getToken(2).kind == PERIOD ||
-			getToken(2).kind == DOUBLE_COLON)}) tok = <NOT> ] test = isSearchCondition(inSelectClause) 
+			getToken(2).kind == DOUBLE_COLON)}) tok = <NOT> ] test = isSearchCondition() 
 	{
 		/* Put the NOT on top of test */
 		if (tok != null)
@@ -5054,12 +5043,9 @@
 
 /*
  * <A NAME="isSearchCondition">isSearchCondition</A>
- * 
- * @param inSelectClause will be true if this method got called while parsing the select or values clause
- * If in select or values clause, we do not want to allow boolean values.
  */
 ValueNode
-isSearchCondition(boolean inSelectClause) throws StandardException :
+isSearchCondition() throws StandardException :
 {
 	ValueNode	result;
 	ValueNode	booleanPrimary;
@@ -5068,7 +5054,7 @@
 	Token		truthValue = null;
 }
 {
-	booleanPrimary = booleanPrimary(inSelectClause)
+	booleanPrimary = booleanPrimary()
 	[
 		isToken = <IS> [ notToken = <NOT> ] <NULL>
 	]
@@ -5097,18 +5083,15 @@
 
 /*
  * <A NAME="booleanPrimary">booleanPrimary</A>
- * 
- * @param inSelectClause will be true if this method got called while parsing the select or values clause
- * If in select or values clause, we do not want to allow boolean values.
  */
 ValueNode
-booleanPrimary(boolean inSelectClause) throws StandardException :
+booleanPrimary() throws StandardException :
 {
 	ValueNode	primary;
 	ValueNode	searchCondition;
 }
 {
-	primary = predicate(inSelectClause)
+	primary = predicate()
 	{
 		return	primary;
 	}
@@ -5116,18 +5099,15 @@
 
 /*
  * <A NAME="predicate">predicate</A>
- * 
- * @param inSelectClause will be true if this method got called while parsing the select or values clause
- * If in select or values clause, we do not want to allow boolean values.
  */
 ValueNode
-predicate(boolean inSelectClause) throws StandardException :
+predicate() throws StandardException :
 {
 	ValueNode	value;
 }
 {
 	(
-		value = additiveExpression(null, 0, inSelectClause) |
+		value = additiveExpression(null, 0) |
 		value = existsExpression()
 	)
 	(
@@ -5135,7 +5115,7 @@
 		// start with NOT, and what follows a predicate() can also start
 		// with NOT
 		LOOKAHEAD( { remainingPredicateFollows() } )
-		value = remainingPredicate(value, inSelectClause)
+		value = remainingPredicate(value)
 	)*
 	{
 		return value;
@@ -5157,22 +5137,19 @@
 
 /*
  * <A NAME="remainingPredicates">remainingPredicates</A>
- * 
- * @param inSelectClause will be true if this method got called while parsing the select or values clause
- * If in select or values clause, we do not want to allow boolean values.
  */
 ValueNode
-remainingPredicate(ValueNode value, boolean inSelectClause) throws StandardException :
+remainingPredicate(ValueNode value) throws StandardException :
 {
 	Token tok = null;
 }
 {
-	value = remainingNonNegatablePredicate(value, inSelectClause)
+	value = remainingNonNegatablePredicate(value)
 	{
 		return value;
 	}
 |
-	[ tok = <NOT> ] value = remainingNegatablePredicate(value, inSelectClause)
+	[ tok = <NOT> ] value = remainingNegatablePredicate(value)
 	{
 		/* Put the NOT on top of the tree */
 		if (tok != null)
@@ -5189,12 +5166,9 @@
 
 /*
  * <A NAME="remainingNonNegatablePredicate">remainingNonNegatablePredicate</A>
- * 
- * @param inSelectClause will be true if this method got called while parsing the select or values clause
- * If in select or values clause, we do not want to allow boolean values.
  */
 ValueNode 
-remainingNonNegatablePredicate(ValueNode leftOperand, boolean inSelectClause) throws StandardException :
+remainingNonNegatablePredicate(ValueNode leftOperand) throws StandardException :
 {
 	int			operator;
 	String		javaClassName;
@@ -5219,7 +5193,7 @@
 		)
 		|
 		(
-			leftOperand = additiveExpression(leftOperand, operator, inSelectClause)
+			leftOperand = additiveExpression(leftOperand, operator)
 		)
 	)
 	{
@@ -5229,12 +5203,9 @@
 
 /*
  * <A NAME="remainingNegatablePredicate">remainingNegatablePredicate</A>
- * 
- * @param inSelectClause will be true if this method got called while parsing the select or values clause
- * If in select or values clause, we do not want to allow boolean values.
  */
 ValueNode 
-remainingNegatablePredicate(ValueNode leftOperand, boolean inSelectClause) throws StandardException :
+remainingNegatablePredicate(ValueNode leftOperand) throws StandardException :
 {
 	ValueNode	tree = null;
 	ValueNode	likePattern;
@@ -5248,10 +5219,10 @@
 		return tree;
 	}
 |
-	<LIKE> likePattern = additiveExpression(null, 0, inSelectClause)
+	<LIKE> likePattern = additiveExpression(null, 0)
             [
-                <ESCAPE> escapeValue = additiveExpression(null, 0, inSelectClause) |
-                <LEFT_BRACE> <ESCAPE> escapeValue = additiveExpression(null, 0, inSelectClause) <RIGHT_BRACE>
+                <ESCAPE> escapeValue = additiveExpression(null, 0) |
+                <LEFT_BRACE> <ESCAPE> escapeValue = additiveExpression(null, 0) <RIGHT_BRACE>
             ]
 	{
 		tree = (ValueNode) nodeFactory.getNode(
@@ -5264,8 +5235,8 @@
 		return tree;
 	}
 |
-	<BETWEEN> betweenLeft = additiveExpression(null, 0, inSelectClause) <AND>
-			betweenRight = additiveExpression(null, 0, inSelectClause)
+	<BETWEEN> betweenLeft = additiveExpression(null, 0) <AND>
+			betweenRight = additiveExpression(null, 0)
 	{
 		ValueNodeList betweenList = (ValueNodeList) nodeFactory.getNode(
 													C_NodeTypes.VALUE_NODE_LIST,
@@ -5327,21 +5298,18 @@
 
 /*
  * <A NAME="additiveExpression">additiveExpression</A>
- * 
- * @param inSelectClause will be true if this method got called while parsing the select or values clause
- * If in select or values clause, we do not want to allow boolean values.
  */
 ValueNode
-additiveExpression(ValueNode farLeftOperand, int compOp, boolean inSelectClause) throws StandardException :
+additiveExpression(ValueNode farLeftOperand, int compOp) throws StandardException :
 {
 	ValueNode	leftOperand;
 	int			operator;
 	int			nodeType;
 }
 {
-	leftOperand = multiplicativeExpression(null, 0, inSelectClause)  			
+	leftOperand = multiplicativeExpression(null, 0)  			
 			(operator = additiveOperator() 			 
-				leftOperand = multiplicativeExpression(leftOperand, operator, inSelectClause) )*
+				leftOperand = multiplicativeExpression(leftOperand, operator) )*
 	{
 		if (farLeftOperand == null)
 			return leftOperand;
@@ -5408,20 +5376,17 @@
 
 /*
  * <A NAME="multiplicativeExpression">multiplicativeExpression</A>
- * 
- * @param inSelectClause will be true if this method got called while parsing the select or values clause
- * If in select or values clause, we do not want to allow boolean values.
  */
 ValueNode
-multiplicativeExpression(ValueNode farLeftOperand, int additiveOperator, boolean inSelectClause) throws StandardException :
+multiplicativeExpression(ValueNode farLeftOperand, int additiveOperator) throws StandardException :
 {
 	ValueNode	leftOperand;
 	int			multOp;
 }
 {
-	leftOperand = unaryExpression(null, 0, inSelectClause) 
+	leftOperand = unaryExpression(null, 0) 
 				(multOp = multiplicativeOperator() 
-				 leftOperand = unaryExpression(leftOperand, multOp, inSelectClause) )*
+				 leftOperand = unaryExpression(leftOperand, multOp) )*
 	{
 		if (farLeftOperand == null)
 			return leftOperand;
@@ -5477,12 +5442,9 @@
 
 /*
  * <A NAME="unaryExpression">unaryExpression</A>
- * 
- * @param inSelectClause will be true if this method got called while parsing the select or values clause
- * If in select or values clause, we do not want to allow boolean values.
  */
 ValueNode
-unaryExpression(ValueNode farLeftOperand, int multiplicativeOperator, boolean inSelectClause) throws StandardException :
+unaryExpression(ValueNode farLeftOperand, int multiplicativeOperator) throws StandardException :
 {
 	ValueNode	value;
 	String		sign = null;
@@ -5505,7 +5467,7 @@
 				   } )
 		sign = sign()
 	]
-	value = primaryExpression(inSelectClause)
+	value = primaryExpression()
 	{
 		if ("-".equals(sign))
 		{
@@ -5558,17 +5520,14 @@
 
 /*
  * <A NAME="primaryExpressionXX">primaryExpressionXX</A>
- * 
- * @param inSelectClause will be true if this method got called while parsing the select or values clause
- * If in select or values clause, we do not want to allow boolean values.
  */
 ValueNode
-primaryExpressionXX(boolean inSelectClause) throws StandardException :
+primaryExpressionXX() throws StandardException :
 {
 	ValueNode	value;
 }
 {
-	value = primary(inSelectClause)
+	value = primary()
 	  ( value = nonStaticMethodCallOrFieldAccess(value)) *	
 	{
 		return value;
@@ -5721,7 +5680,7 @@
 	ValueNode	parameter;
 }
 {
-	parameter = additiveExpression(null,0,false)
+	parameter = additiveExpression(null,0)
 	{
 		parameterList.addElement(parameter);
 	}
@@ -5734,12 +5693,9 @@
 
 /*
  * <A NAME="primary">primary</A>
- * 
- * @param inSelectClause will be true if this method got called while parsing the select or values clause
- * If in select or values clause, we do not want to allow boolean values.
  */
 ValueNode
-primary(boolean inSelectClause) throws StandardException :
+primary() throws StandardException :
 {
 	String		javaClassName;
 	ValueNode	value;
@@ -5753,7 +5709,7 @@
 		return value;
 	}
 |
-	value = valueExpressionPrimary(inSelectClause)
+	value = valueExpressionPrimary()
 	{
 		return value;
 	}
@@ -5870,7 +5826,7 @@
 	}
 |
 	/* Escaped function substring() */
-    <SUBSTRING> <LEFT_PAREN> value = additiveExpression(null, 0, false) <COMMA> startPosition = additiveExpression(null, 0, false) [ <COMMA> length = additiveExpression(null, 0, false) ] <RIGHT_PAREN>
+    <SUBSTRING> <LEFT_PAREN> value = additiveExpression(null, 0) <COMMA> startPosition = additiveExpression(null, 0) [ <COMMA> length = additiveExpression(null, 0) ] <RIGHT_PAREN>
 	{
         return getSubstringNode(value, startPosition, length, Boolean.FALSE);
 	}
@@ -5898,8 +5854,8 @@
     /* CONCAT( string1, string2 )
      * CONCAT is not a reserved word.
      */
-    <CONCAT> <LEFT_PAREN> str1 = additiveExpression(null,0,false) <COMMA> 
-            str2 = additiveExpression(null,0,false) <RIGHT_PAREN>
+    <CONCAT> <LEFT_PAREN> str1 = additiveExpression(null,0) <COMMA> 
+            str2 = additiveExpression(null,0) <RIGHT_PAREN>
     {
         return (ValueNode) nodeFactory.getNode(
                             C_NodeTypes.CONCATENATION_OPERATOR_NODE,
@@ -5936,8 +5892,8 @@
 }
 {
     <TIMESTAMPADD> <LEFT_PAREN> intervalType = jdbcIntervalType() <COMMA>
-       count = additiveExpression(null,0,false) <COMMA>
-       tstamp1 = additiveExpression(null,0,false) <RIGHT_PAREN>
+       count = additiveExpression(null,0) <COMMA>
+       tstamp1 = additiveExpression(null,0) <RIGHT_PAREN>
     {
         return (ValueNode) nodeFactory.getNode( C_NodeTypes.TIMESTAMP_ADD_FN_NODE,
                                                 tstamp1,
@@ -5949,8 +5905,8 @@
     }
 |
     <TIMESTAMPDIFF> <LEFT_PAREN> intervalType = jdbcIntervalType() <COMMA>
-       tstamp1 = additiveExpression(null,0,false) <COMMA>
-       tstamp2 = additiveExpression(null,0,false) <RIGHT_PAREN>
+       tstamp1 = additiveExpression(null,0) <COMMA>
+       tstamp2 = additiveExpression(null,0) <RIGHT_PAREN>
     {
         return (ValueNode) nodeFactory.getNode( C_NodeTypes.TIMESTAMP_DIFF_FN_NODE,
                                                 tstamp2,
@@ -6040,7 +5996,7 @@
 		return value;
     }
 |
-    <SQRT> <LEFT_PAREN> value = additiveExpression(null,0,false) <RIGHT_PAREN>
+    <SQRT> <LEFT_PAREN> value = additiveExpression(null,0) <RIGHT_PAREN>
     {
         return (ValueNode)nodeFactory.getNode(
                 C_NodeTypes.SQRT_OPERATOR_NODE,
@@ -6096,7 +6052,7 @@
 	ValueNode	expression;
 }
 {
-	expression = additiveExpression(null,0,false)
+	expression = additiveExpression(null,0)
 	{
 		expressionList.addElement(expression);
 	}
@@ -6111,7 +6067,7 @@
     ValueNode value;
 }
 {
-    <LEFT_PAREN> value = additiveExpression(null,0,false) <RIGHT_PAREN>
+    <LEFT_PAREN> value = additiveExpression(null,0) <RIGHT_PAREN>
     {
         return (ValueNode)nodeFactory.getNode(
                 C_NodeTypes.ABSOLUTE_OPERATOR_NODE,
@@ -6129,8 +6085,8 @@
 	ValueNode int2;
 }
 {
-    <LEFT_PAREN> int1 = additiveExpression(null,0,false) <COMMA> 
-            int2 = additiveExpression(null,0,false) <RIGHT_PAREN>
+    <LEFT_PAREN> int1 = additiveExpression(null,0) <COMMA> 
+            int2 = additiveExpression(null,0) <RIGHT_PAREN>
     {
         return (ValueNode)nodeFactory.getNode(
                 C_NodeTypes.MOD_OPERATOR_NODE,
@@ -6172,12 +6128,12 @@
     ValueNode	length = null;
 }
 {
-	<SUBSTR> <LEFT_PAREN> value = additiveExpression(null,0,false) <COMMA> startPosition = additiveExpression(null,0,false) [ <COMMA> length = additiveExpression(null,0,false) ] <RIGHT_PAREN>
+	<SUBSTR> <LEFT_PAREN> value = additiveExpression(null,0) <COMMA> startPosition = additiveExpression(null,0) [ <COMMA> length = additiveExpression(null,0) ] <RIGHT_PAREN>
 	{
         return getSubstringNode( value, startPosition, length, Boolean.FALSE );
 	}
 |
-	( upperTok = <UPPER> | lowerTok = <LOWER> ) <LEFT_PAREN> value = additiveExpression(null,0,false) <RIGHT_PAREN>
+	( upperTok = <UPPER> | lowerTok = <LOWER> ) <LEFT_PAREN> value = additiveExpression(null,0) <RIGHT_PAREN>
 	{
 		return (ValueNode) nodeFactory.getNode(
 					C_NodeTypes.SIMPLE_STRING_OPERATOR_NODE,
@@ -6186,7 +6142,7 @@
 					getContextManager());
 	}
 |
-	( upperTok = <UCASE> | lowerTok = <LCASE> ) <LEFT_PAREN> value = additiveExpression(null,0,false) <RIGHT_PAREN>
+	( upperTok = <UCASE> | lowerTok = <LCASE> ) <LEFT_PAREN> value = additiveExpression(null,0) <RIGHT_PAREN>
 	{
 		return (ValueNode) nodeFactory.getNode(
 					C_NodeTypes.SIMPLE_STRING_OPERATOR_NODE,
@@ -6203,9 +6159,9 @@
     /* LOCATE( string1, string2[, start] )
      * LOCATE is a SQLJ reserved word.
      */
-    <LOCATE> <LEFT_PAREN> str1 = additiveExpression(null,0,false) <COMMA>
-            str2 = additiveExpression(null,0,false)
-            [ <COMMA> value = additiveExpression(null,0,false) ]
+    <LOCATE> <LEFT_PAREN> str1 = additiveExpression(null,0) <COMMA>
+            str2 = additiveExpression(null,0)
+            [ <COMMA> value = additiveExpression(null,0) ]
             <RIGHT_PAREN>
     {
 		// if start is missing, start is equal to 1
@@ -6232,7 +6188,7 @@
 	Integer		trimType;
 }
 {
-	trimType = trimType() <LEFT_PAREN> source = additiveExpression(null,0,false) <RIGHT_PAREN>
+	trimType = trimType() <LEFT_PAREN> source = additiveExpression(null,0) <RIGHT_PAREN>
 	{
 		return (ValueNode) nodeFactory.getNode(
 									C_NodeTypes.TRIM_OPERATOR_NODE,
@@ -6262,12 +6218,9 @@
 
 /*
  * <A NAME="valueExpressionPrimary">valueExpressionPrimary</A>
- * 
- * @param inSelectClause will be true if this method got called while parsing the select or values clause
- * If in select or values clause, we do not want to allow boolean values.
  */
 ValueNode
-valueExpressionPrimary(boolean inSelectClause) throws StandardException :
+valueExpressionPrimary() throws StandardException :
 {
 	ValueNode	value;
 	int			tokKind;
@@ -6354,10 +6307,10 @@
 		** is supplied.
 		*/
 		// without the following check, select/values (c1>c2) will not be caught
-		LOOKAHEAD({inSelectClause})
-		value = additiveExpression(null,0, inSelectClause)
-		| //following will happen if we are not coming here for select/values clause
-		value = valueExpression(inSelectClause)
+		//LOOKAHEAD({inSelectClause})
+		//value = additiveExpression(null,0)
+		//|
+		value = valueExpression()
 	)
 	<RIGHT_PAREN>
 	{
@@ -6501,7 +6454,7 @@
 		return value;
 	}
 |
-	<LENGTH> <LEFT_PAREN> value = additiveExpression(null,0, false) <RIGHT_PAREN>
+	<LENGTH> <LEFT_PAREN> value = additiveExpression(null,0) <RIGHT_PAREN>
 	{
 		ContextManager	localCM = getContextManager();
                 if( isJDBCEscape)
@@ -6549,7 +6502,7 @@
 		return value;
 	}
 	|
-	 dts = numericFunctionType() <LEFT_PAREN> operand = additiveExpression(null,0, false) <RIGHT_PAREN>
+	 dts = numericFunctionType() <LEFT_PAREN> operand = additiveExpression(null,0) <RIGHT_PAREN>
 	  {
 			value = (ValueNode) nodeFactory.getNode(
 									C_NodeTypes.CAST_NODE,
@@ -6560,7 +6513,7 @@
 
 			return value;
 	  }
-	 | charType = charOrVarchar() <LEFT_PAREN> operand = additiveExpression(null,0, false) [ <COMMA> length = length() ] <RIGHT_PAREN>
+	 | charType = charOrVarchar() <LEFT_PAREN> operand = additiveExpression(null,0) [ <COMMA> length = length() ] <RIGHT_PAREN>
 	{
 		// Always check db2 limits for this function. It's new
 		checkTypeLimits(charType,length);
@@ -6641,7 +6594,7 @@
 	boolean wsOption;
 }
 {
-	value = additiveExpression(null,0,false) wsOption = xmlPreserveWhitespace() {
+	value = additiveExpression(null,0) wsOption = xmlPreserveWhitespace() {
 		return (ValueNode) nodeFactory.getNode(
 					C_NodeTypes.XML_PARSE_OPERATOR_NODE,
 					value,
@@ -6704,7 +6657,7 @@
 	DataTypeDescriptor targetType;
 }
 {
-	value = additiveExpression(null,0,false)
+	value = additiveExpression(null,0)
 		targetType = xmlSerializeTargetType()
 	{
 		return (ValueNode) nodeFactory.getNode(
@@ -6767,8 +6720,8 @@
 	ValueNode xmlValue;
 }
 {
-	xpathExpr = additiveExpression(null,0,false)
-		xmlPassingMechanism() xmlValue = additiveExpression(null, 0, false)
+	xpathExpr = additiveExpression(null,0)
+		xmlPassingMechanism() xmlValue = additiveExpression(null, 0)
 	{
 		return (ValueNode) nodeFactory.getNode(
 					C_NodeTypes.XML_EXISTS_OPERATOR_NODE,
@@ -6844,7 +6797,7 @@
      * NOTE: If you add a new rule here, you must add the appropriate
      *    LOOKAHEAD rule to miscBuiltins().
      */
-        <TIME> <LEFT_PAREN> value = additiveExpression(null,0, false) <RIGHT_PAREN>
+        <TIME> <LEFT_PAREN> value = additiveExpression(null,0) <RIGHT_PAREN>
 	{
 		return (ValueNode) nodeFactory.getNode(
 							C_NodeTypes.CAST_NODE,
@@ -6853,7 +6806,7 @@
                                                         getContextManager());
         }
 |
-        <DATE> <LEFT_PAREN> value = additiveExpression(null,0, false) <RIGHT_PAREN>
+        <DATE> <LEFT_PAREN> value = additiveExpression(null,0) <RIGHT_PAREN>
 	{
 		return (ValueNode) nodeFactory.getNode(
 							C_NodeTypes.UNARY_DATE_TIMESTAMP_OPERATOR_NODE,
@@ -6862,12 +6815,12 @@
                                                         getContextManager());
         }
 |
-        <TIMESTAMP> <LEFT_PAREN> value = additiveExpression(null,0, false) timestampNode = timestampFunctionCompletion( value)
+        <TIMESTAMP> <LEFT_PAREN> value = additiveExpression(null,0) timestampNode = timestampFunctionCompletion( value)
 	{
                 return timestampNode;
         }
 |
-        field = datetimeField() <LEFT_PAREN> value = additiveExpression(null,0, false) <RIGHT_PAREN>
+        field = datetimeField() <LEFT_PAREN> value = additiveExpression(null,0) <RIGHT_PAREN>
 	{
 		return (ValueNode) nodeFactory.getNode(
 								C_NodeTypes.EXTRACT_OPERATOR_NODE,
@@ -6896,7 +6849,7 @@
                                                         getContextManager());
         }
 |
-        <COMMA> timeValue = additiveExpression(null,0, false) <RIGHT_PAREN>
+        <COMMA> timeValue = additiveExpression(null,0) <RIGHT_PAREN>
 	{
 		return (ValueNode) nodeFactory.getNode(
 							C_NodeTypes.TIMESTAMP_OPERATOR_NODE,
@@ -6924,6 +6877,11 @@
 	{
 		return tok;
 	}
+|
+	tok = <UNKNOWN>
+	{
+		return tok;
+	}
 }
 
 /*
@@ -7380,7 +7338,7 @@
 	ValueNode columnExpression;
 } 
 {
-	columnExpression = additiveExpression(null,0,true)
+	columnExpression = additiveExpression(null,0)
 	{
 		return (OrderByColumn) nodeFactory.getNode(
 								C_NodeTypes.ORDER_BY_COLUMN,
@@ -7509,7 +7467,7 @@
 	ValueNode	valueNode;
 }
 {
-	valueNode = additiveExpression(null,0, false) 
+	valueNode = additiveExpression(null,0) 
 	{
 		return valueNode;
 	}
@@ -7734,7 +7692,7 @@
 	ValueNode	value;
 }
 {
-	value = additiveExpression(null, 0, true)
+	value = additiveExpression(null, 0)
 	{
 		resultColumns.addResultColumn(
 			(ResultColumn) nodeFactory.getNode(
@@ -7883,7 +7841,7 @@
 	ValueNode valueNode;
 }
 {
-	valueNode = additiveExpression(null, 0, false)
+	valueNode = additiveExpression(null, 0)
 	{
 		inList.addElement(valueNode);
 	}
@@ -8715,7 +8673,7 @@
 }
 {
 	/* valueExpression() was searchCondition() */
-	<ON> joinClause = valueExpression(false)
+	<ON> joinClause = valueExpression()
 	{
 		return joinClause;
 	}
@@ -8867,7 +8825,7 @@
 	ValueNode	value;
 }
 {
-	[ distinct = setQuantifier() ] value = additiveExpression(null, 0, false)
+	[ distinct = setQuantifier() ] value = additiveExpression(null, 0)
 	{
 		return (ValueNode) nodeFactory.getNode(
 								C_NodeTypes.AGGREGATE_NODE,
@@ -8985,7 +8943,7 @@
 	ValueNode value;
 }
 {
-	value = additiveExpression(null, 0, false)
+	value = additiveExpression(null, 0)
 	{
 		return value;
 	}
@@ -9023,7 +8981,7 @@
 }
 {
 	/* valueExpression() was searchCondition() */
-	value = valueExpression(false)
+	value = valueExpression()
 	{
 		endToken = getToken(0);
 
@@ -9083,7 +9041,7 @@
 }
 {
 	/* valueExpression() was searchCondition() */
-	<HAVING> value = valueExpression(false)
+	<HAVING> value = valueExpression()
 	{
 		return value;
 	}
@@ -10052,12 +10010,20 @@
 |
 	tok = booleanLiteral()
 	{
-		checkInternalFeature(tok.image);
-		return (ValueNode) nodeFactory.getNode(
-									C_NodeTypes.BOOLEAN_CONSTANT_NODE,
-									StringUtil.SQLEqualsIgnoreCase(tok.image, "true") ?
-										Boolean.TRUE : Boolean.FALSE,
+		if ( StringUtil.SQLEqualsIgnoreCase(tok.image, "unknown") )
+		{
+			return (ValueNode) nodeFactory.getNode(
+									C_NodeTypes.UNTYPED_NULL_CONSTANT_NODE,
 									getContextManager());
+		}
+		else
+		{
+			return (ValueNode) nodeFactory.getNode(
+ 									C_NodeTypes.BOOLEAN_CONSTANT_NODE,
+ 									StringUtil.SQLEqualsIgnoreCase(tok.image, "true") ?
+ 										Boolean.TRUE : Boolean.FALSE,
+ 									getContextManager());
+		}
 	}
 /*
 	JDBC and ODBC do not support the interval type, so let's not do it
@@ -10356,7 +10322,7 @@
 {
 	/* valueExpression() was searchCondition() */
 	<CHECK>  beginToken = 
-		<LEFT_PAREN> value = valueExpression(false) endToken = <RIGHT_PAREN>
+		<LEFT_PAREN> value = valueExpression() endToken = <RIGHT_PAREN>
 	{
 		if (columnName != null)
 		{
@@ -10785,7 +10751,7 @@
 		return value;
 	}
 |
-	<NULLIF> <LEFT_PAREN> leftExpression = additiveExpression(null, 0, false) <COMMA> rightExpression = additiveExpression(null, 0, false) <RIGHT_PAREN>
+	<NULLIF> <LEFT_PAREN> leftExpression = additiveExpression(null, 0) <COMMA> rightExpression = additiveExpression(null, 0) <RIGHT_PAREN>
 	{
 		// "NULLIF(L, R)" is the same as "L=R ? untyped NULL : L"
 		// An impl assumption here is that Cloudscape can promote CHAR to any comparable datatypes such as numeric
@@ -10858,8 +10824,8 @@
 	ValueNode	   elseExpr;
 }
 {
-	<WHEN> expr = orExpression(null, false) 
-		   (<OR> expr = orExpression(expr, false) )*
+	<WHEN> expr = orExpression(null) 
+		   (<OR> expr = orExpression(expr) )*
 	<THEN> thenExpr = thenElseExpression()
 	elseExpr = caseExpression()
 	{
@@ -10896,7 +10862,7 @@
 										getContextManager()));
 	}
 |
-	expr = additiveExpression(null, 0, false)
+	expr = additiveExpression(null, 0)
 	{
 		return expr;
 	}

Modified: db/derby/code/trunk/java/testing/build.xml
URL: http://svn.apache.org/viewcvs/db/derby/code/trunk/java/testing/build.xml?rev=358163&r1=358162&r2=358163&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/build.xml (original)
+++ db/derby/code/trunk/java/testing/build.xml Tue Dec 20 16:53:42 2005
@@ -45,6 +45,7 @@
     <ant dir="${derby.testing.src.dir}/${derby.testing.functest.dir}/util"/> 
     <ant dir="${derby.testing.src.dir}/${derby.testing.functest.dir}/tests/junitTests/compatibility"/> 
     <ant dir="${derby.testing.src.dir}/${derby.testing.functest.dir}/tests/junitTests/derbyNet"/>
+    <ant dir="${derby.testing.src.dir}/${derby.testing.functest.dir}/tests/junitTests/lang"/>
     <ant dir="${derby.testing.src.dir}/${derby.testing.functest.dir}/tests/jdbcapi"/> 
     <ant dir="${derby.testing.src.dir}/${derby.testing.functest.dir}/tests/lang"/> 
     <ant dir="${derby.testing.src.dir}/${derby.testing.functest.dir}/tests/store"/> 

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/DerbyNetClient/metadata.out
URL: http://svn.apache.org/viewcvs/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/DerbyNetClient/metadata.out?rev=358163&r1=358162&r2=358163&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/DerbyNetClient/metadata.out (original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/DerbyNetClient/metadata.out Tue Dec 20 16:53:42 2005
@@ -407,43 +407,43 @@
 getCrossReference('','badschema','LOUIE','','APP','REFTAB' ):
 PKTABLE_CAT[VARCHAR],PKTABLE_SCHEM[VARCHAR],PKTABLE_NAME[VARCHAR],PKCOLUMN_NAME[VARCHAR],FKTABLE_CAT[VARCHAR],FKTABLE_SCHEM[VARCHAR],FKTABLE_NAME[VARCHAR],FKCOLUMN_NAME[VARCHAR],KEY_SEQ[SMALLINT],UPDATE_RULE[SMALLINT],DELETE_RULE[SMALLINT],FK_NAME[VARCHAR],PK_NAME[VARCHAR],DEFERRABILITY[SMALLINT]
 getTypeInfo():
-TYPE_NAME[VARCHAR],DATA_TYPE[SMALLINT],PRECISION[INTEGER],LITERAL_PREFIX[VARCHAR],LITERAL_SUFFIX[VARCHAR],CREATE_PARAMS[VARCHAR],NULLABLE[INTEGER],CASE_SENSITIVE[SMALLINT],SEARCHABLE[INTEGER],UNSIGNED_ATTRIBUTE[SMALLINT],FIXED_PREC_SCALE[SMALLINT],AUTO_INCREMENT[SMALLINT],LOCAL_TYPE_NAME[VARCHAR],MINIMUM_SCALE[INTEGER],MAXIMUM_SCALE[INTEGER],SQL_DATA_TYPE[INTEGER],SQL_DATETIME_SUB[INTEGER],NUM_PREC_RADIX[INTEGER]
-BIGINT,-5,19,null,null,null,1,0,2,0,0,1,BIGINT,0,0,null,null,10
-LONG VARCHAR FOR BIT DATA,-4,32700,X',',null,1,0,2,1,0,0,LONG VARCHAR FOR BIT DATA,null,null,null,null,null
-VARCHAR () FOR BIT DATA,-3,32762,X',',length,1,0,2,1,0,0,VARCHAR () FOR BIT DATA,null,null,null,null,null
-CHAR () FOR BIT DATA,-2,254,X',',length,1,0,2,1,0,0,CHAR () FOR BIT DATA,null,null,null,null,null
-LONG VARCHAR,-1,32700,',',null,1,1,3,1,0,0,LONG VARCHAR,null,null,null,null,null
-LONG NVARCHAR,-1,32700,',',null,1,1,3,1,0,0,LONG NVARCHAR,null,null,null,null,null
-CHAR,1,254,',',length,1,1,3,1,0,0,CHAR,null,null,null,null,null
-NATIONAL CHAR,1,2147483647,',',length,1,1,3,1,0,0,NATIONAL CHAR,null,null,null,null,null
-NUMERIC,2,31,null,null,precision,scale,1,0,2,0,1,0,NUMERIC,0,32767,null,null,10
-DECIMAL,3,31,null,null,precision,scale,1,0,2,0,1,0,DECIMAL,0,32767,null,null,10
-INTEGER,4,10,null,null,null,1,0,2,0,0,1,INTEGER,0,0,null,null,10
-SMALLINT,5,5,null,null,null,1,0,2,0,0,1,SMALLINT,0,0,null,null,10
-FLOAT,6,52,null,null,precision,1,0,2,0,0,0,FLOAT,null,null,null,null,2
-REAL,7,23,null,null,null,1,0,2,0,0,0,REAL,null,null,null,null,2
-DOUBLE,8,52,null,null,null,1,0,2,0,0,0,DOUBLE,null,null,null,null,2
-VARCHAR,12,32672,',',length,1,1,3,1,0,0,VARCHAR,null,null,null,null,null
-NATIONAL CHAR VARYING,12,2147483647,',',length,1,1,3,1,0,0,NATIONAL CHAR VARYING,null,null,null,null,null
-DATE,91,10,DATE',',null,1,0,2,1,0,0,DATE,0,0,null,null,10
-TIME,92,8,TIME',',null,1,0,2,1,0,0,TIME,0,0,null,null,10
-TIMESTAMP,93,26,TIMESTAMP',',null,1,0,2,1,0,0,TIMESTAMP,0,6,null,null,10
-BLOB,2004,2147483647,null,null,length,1,0,1,null,0,null,BLOB,null,null,null,null,null
-CLOB,2005,2147483647,',',length,1,1,1,null,0,null,CLOB,null,null,null,null,null
+TYPE_NAME[VARCHAR],DATA_TYPE[SMALLINT],PRECISION[INTEGER],LITERAL_PREFIX[VARCHAR],LITERAL_SUFFIX[VARCHAR],CREATE_PARAMS[VARCHAR],NULLABLE[INTEGER],CASE_SENSITIVE[BOOLEAN],SEARCHABLE[INTEGER],UNSIGNED_ATTRIBUTE[BOOLEAN],FIXED_PREC_SCALE[BOOLEAN],AUTO_INCREMENT[BOOLEAN],LOCAL_TYPE_NAME[VARCHAR],MINIMUM_SCALE[INTEGER],MAXIMUM_SCALE[INTEGER],SQL_DATA_TYPE[INTEGER],SQL_DATETIME_SUB[INTEGER],NUM_PREC_RADIX[INTEGER]
+BIGINT,-5,19,null,null,null,1,false,2,false,false,true,BIGINT,0,0,null,null,10
+LONG VARCHAR FOR BIT DATA,-4,32700,X',',null,1,false,2,true,false,false,LONG VARCHAR FOR BIT DATA,null,null,null,null,null
+VARCHAR () FOR BIT DATA,-3,32762,X',',length,1,false,2,true,false,false,VARCHAR () FOR BIT DATA,null,null,null,null,null
+CHAR () FOR BIT DATA,-2,254,X',',length,1,false,2,true,false,false,CHAR () FOR BIT DATA,null,null,null,null,null
+LONG VARCHAR,-1,32700,',',null,1,true,3,true,false,false,LONG VARCHAR,null,null,null,null,null
+LONG NVARCHAR,-1,32700,',',null,1,true,3,true,false,false,LONG NVARCHAR,null,null,null,null,null
+CHAR,1,254,',',length,1,true,3,true,false,false,CHAR,null,null,null,null,null
+NATIONAL CHAR,1,2147483647,',',length,1,true,3,true,false,false,NATIONAL CHAR,null,null,null,null,null
+NUMERIC,2,31,null,null,precision,scale,1,false,2,false,true,false,NUMERIC,0,32767,null,null,10
+DECIMAL,3,31,null,null,precision,scale,1,false,2,false,true,false,DECIMAL,0,32767,null,null,10
+INTEGER,4,10,null,null,null,1,false,2,false,false,true,INTEGER,0,0,null,null,10
+SMALLINT,5,5,null,null,null,1,false,2,false,false,true,SMALLINT,0,0,null,null,10
+FLOAT,6,52,null,null,precision,1,false,2,false,false,false,FLOAT,null,null,null,null,2
+REAL,7,23,null,null,null,1,false,2,false,false,false,REAL,null,null,null,null,2
+DOUBLE,8,52,null,null,null,1,false,2,false,false,false,DOUBLE,null,null,null,null,2
+VARCHAR,12,32672,',',length,1,true,3,true,false,false,VARCHAR,null,null,null,null,null
+NATIONAL CHAR VARYING,12,2147483647,',',length,1,true,3,true,false,false,NATIONAL CHAR VARYING,null,null,null,null,null
+DATE,91,10,DATE',',null,1,false,2,true,false,false,DATE,0,0,null,null,10
+TIME,92,8,TIME',',null,1,false,2,true,false,false,TIME,0,0,null,null,10
+TIMESTAMP,93,26,TIMESTAMP',',null,1,false,2,true,false,false,TIMESTAMP,0,6,null,null,10
+BLOB,2004,2147483647,null,null,length,1,false,1,null,false,null,BLOB,null,null,null,null,null
+CLOB,2005,2147483647,',',length,1,true,1,null,false,null,CLOB,null,null,null,null,null
 getIndexInfo():
-TABLE_CAT[VARCHAR],TABLE_SCHEM[VARCHAR],TABLE_NAME[VARCHAR],NON_UNIQUE[SMALLINT],INDEX_QUALIFIER[VARCHAR],INDEX_NAME[VARCHAR],TYPE[SMALLINT],ORDINAL_POSITION[INTEGER],COLUMN_NAME[VARCHAR],ASC_OR_DESC[CHAR],CARDINALITY[INTEGER],PAGES[INTEGER],FILTER_CONDITION[VARCHAR]
-,SYS,SYSCOLUMNS,0,,SYSCOLUMNS_INDEX1,3,1,REFERENCEID,A,null,null,null
-,SYS,SYSCOLUMNS,0,,SYSCOLUMNS_INDEX1,3,2,COLUMNNAME,A,null,null,null
+TABLE_CAT[VARCHAR],TABLE_SCHEM[VARCHAR],TABLE_NAME[VARCHAR],NON_UNIQUE[BOOLEAN],INDEX_QUALIFIER[VARCHAR],INDEX_NAME[VARCHAR],TYPE[SMALLINT],ORDINAL_POSITION[INTEGER],COLUMN_NAME[VARCHAR],ASC_OR_DESC[CHAR],CARDINALITY[INTEGER],PAGES[INTEGER],FILTER_CONDITION[VARCHAR]
+,SYS,SYSCOLUMNS,false,,SYSCOLUMNS_INDEX1,3,1,REFERENCEID,A,null,null,null
+,SYS,SYSCOLUMNS,false,,SYSCOLUMNS_INDEX1,3,2,COLUMNNAME,A,null,null,null
 getIndexInfo():
-TABLE_CAT[VARCHAR],TABLE_SCHEM[VARCHAR],TABLE_NAME[VARCHAR],NON_UNIQUE[SMALLINT],INDEX_QUALIFIER[VARCHAR],INDEX_NAME[VARCHAR],TYPE[SMALLINT],ORDINAL_POSITION[INTEGER],COLUMN_NAME[VARCHAR],ASC_OR_DESC[CHAR],CARDINALITY[INTEGER],PAGES[INTEGER],FILTER_CONDITION[VARCHAR]
-,SYS,SYSCOLUMNS,0,,SYSCOLUMNS_INDEX1,3,1,REFERENCEID,A,null,null,null
-,SYS,SYSCOLUMNS,0,,SYSCOLUMNS_INDEX1,3,2,COLUMNNAME,A,null,null,null
-,SYS,SYSCOLUMNS,1,,SYSCOLUMNS_INDEX2,3,1,COLUMNDEFAULTID,A,null,null,null
+TABLE_CAT[VARCHAR],TABLE_SCHEM[VARCHAR],TABLE_NAME[VARCHAR],NON_UNIQUE[BOOLEAN],INDEX_QUALIFIER[VARCHAR],INDEX_NAME[VARCHAR],TYPE[SMALLINT],ORDINAL_POSITION[INTEGER],COLUMN_NAME[VARCHAR],ASC_OR_DESC[CHAR],CARDINALITY[INTEGER],PAGES[INTEGER],FILTER_CONDITION[VARCHAR]
+,SYS,SYSCOLUMNS,false,,SYSCOLUMNS_INDEX1,3,1,REFERENCEID,A,null,null,null
+,SYS,SYSCOLUMNS,false,,SYSCOLUMNS_INDEX1,3,2,COLUMNNAME,A,null,null,null
+,SYS,SYSCOLUMNS,true,,SYSCOLUMNS_INDEX2,3,1,COLUMNDEFAULTID,A,null,null,null
 getIndexInfo():
-TABLE_CAT[VARCHAR],TABLE_SCHEM[VARCHAR],TABLE_NAME[VARCHAR],NON_UNIQUE[SMALLINT],INDEX_QUALIFIER[VARCHAR],INDEX_NAME[VARCHAR],TYPE[SMALLINT],ORDINAL_POSITION[INTEGER],COLUMN_NAME[VARCHAR],ASC_OR_DESC[CHAR],CARDINALITY[INTEGER],PAGES[INTEGER],FILTER_CONDITION[VARCHAR]
-,SYS,SYSTABLES,0,,SYSTABLES_INDEX1,3,1,TABLENAME,A,null,null,null
-,SYS,SYSTABLES,0,,SYSTABLES_INDEX1,3,2,SCHEMAID,A,null,null,null
-,SYS,SYSTABLES,0,,SYSTABLES_INDEX2,3,1,TABLEID,A,null,null,null
+TABLE_CAT[VARCHAR],TABLE_SCHEM[VARCHAR],TABLE_NAME[VARCHAR],NON_UNIQUE[BOOLEAN],INDEX_QUALIFIER[VARCHAR],INDEX_NAME[VARCHAR],TYPE[SMALLINT],ORDINAL_POSITION[INTEGER],COLUMN_NAME[VARCHAR],ASC_OR_DESC[CHAR],CARDINALITY[INTEGER],PAGES[INTEGER],FILTER_CONDITION[VARCHAR]
+,SYS,SYSTABLES,false,,SYSTABLES_INDEX1,3,1,TABLENAME,A,null,null,null
+,SYS,SYSTABLES,false,,SYSTABLES_INDEX1,3,2,SCHEMAID,A,null,null,null
+,SYS,SYSTABLES,false,,SYSTABLES_INDEX2,3,1,TABLEID,A,null,null,null
 getColumns('SYSTABLES'):
 TABLE_CAT[VARCHAR],TABLE_SCHEM[VARCHAR],TABLE_NAME[VARCHAR],COLUMN_NAME[VARCHAR],DATA_TYPE[SMALLINT],TYPE_NAME[VARCHAR],COLUMN_SIZE[INTEGER],BUFFER_LENGTH[INTEGER],DECIMAL_DIGITS[INTEGER],NUM_PREC_RADIX[INTEGER],NULLABLE[INTEGER],REMARKS[VARCHAR],COLUMN_DEF[VARCHAR],SQL_DATA_TYPE[INTEGER],SQL_DATETIME_SUB[INTEGER],CHAR_OCTET_LENGTH[INTEGER],ORDINAL_POSITION[INTEGER],IS_NULLABLE[VARCHAR]
 ,SYS,SYSTABLES,TABLEID,1,CHAR,36,null,null,null,0,,null,null,null,72,1,NO

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/DerbyNetClient/syscat.out
URL: http://svn.apache.org/viewcvs/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/DerbyNetClient/syscat.out?rev=358163&r1=358162&r2=358163&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/DerbyNetClient/syscat.out (original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/DerbyNetClient/syscat.out Tue Dec 20 16:53:42 2005
@@ -266,62 +266,62 @@
 from sys.systables t, sys.sysconglomerates c
 where t.TABLEID=c.TABLEID
 order by TABLENAME, ISINDEX;
-TABLENAME |ISIND&
+TABLENAME |ISIN&
 -----
-SYSALIASES |0     
-SYSALIASES |1     
-SYSALIASES |1     
-SYSALIASES |1     
-SYSCHECKS |0     
-SYSCHECKS |1     
-SYSCOLPERMS |0     
-SYSCOLPERMS |1     
-SYSCOLUMNS |0     
-SYSCOLUMNS |1     
-SYSCOLUMNS |1     
-SYSCONGLOMERATES |0     
-SYSCONGLOMERATES |1     
-SYSCONGLOMERATES |1     
-SYSCONGLOMERATES |1     
-SYSCONSTRAINTS |0     
-SYSCONSTRAINTS |1     
-SYSCONSTRAINTS |1     
-SYSCONSTRAINTS |1     
-SYSDEPENDS |0     
-SYSDEPENDS |1     
-SYSDEPENDS |1     
-SYSDUMMY1 |0     
-SYSFILES |0     
-SYSFILES |1     
-SYSFILES |1     
-SYSFOREIGNKEYS |0     
-SYSFOREIGNKEYS |1     
-SYSFOREIGNKEYS |1     
-SYSKEYS |0     
-SYSKEYS |1     
-SYSREQUIREDPERM |0     
-SYSREQUIREDPERM |1     
-SYSROUTINEPERMS |0     
-SYSROUTINEPERMS |1     
-SYSSCHEMAS |0     
-SYSSCHEMAS |1     
-SYSSCHEMAS |1     
-SYSSTATEMENTS |0     
-SYSSTATEMENTS |1     
-SYSSTATEMENTS |1     
-SYSSTATISTICS |0     
-SYSSTATISTICS |1     
-SYSTABLEPERMS |0     
-SYSTABLEPERMS |1     
-SYSTABLES |0     
-SYSTABLES |1     
-SYSTABLES |1     
-SYSTRIGGERS |0     
-SYSTRIGGERS |1     
-SYSTRIGGERS |1     
-SYSTRIGGERS |1     
-SYSVIEWS |0     
-SYSVIEWS |1     
+SYSALIASES |false
+SYSALIASES |true 
+SYSALIASES |true 
+SYSALIASES |true 
+SYSCHECKS |false
+SYSCHECKS |true 
+SYSCOLPERMS |false
+SYSCOLPERMS |true 
+SYSCOLUMNS |false
+SYSCOLUMNS |true 
+SYSCOLUMNS |true 
+SYSCONGLOMERATES |false
+SYSCONGLOMERATES |true 
+SYSCONGLOMERATES |true 
+SYSCONGLOMERATES |true 
+SYSCONSTRAINTS |false
+SYSCONSTRAINTS |true 
+SYSCONSTRAINTS |true 
+SYSCONSTRAINTS |true 
+SYSDEPENDS |false
+SYSDEPENDS |true 
+SYSDEPENDS |true 
+SYSDUMMY1 |false
+SYSFILES |false
+SYSFILES |true 
+SYSFILES |true 
+SYSFOREIGNKEYS |false
+SYSFOREIGNKEYS |true 
+SYSFOREIGNKEYS |true 
+SYSKEYS |false
+SYSKEYS |true 
+SYSREQUIREDPERM |false
+SYSREQUIREDPERM |true 
+SYSROUTINEPERMS |false
+SYSROUTINEPERMS |true 
+SYSSCHEMAS |false
+SYSSCHEMAS |true 
+SYSSCHEMAS |true 
+SYSSTATEMENTS |false
+SYSSTATEMENTS |true 
+SYSSTATEMENTS |true 
+SYSSTATISTICS |false
+SYSSTATISTICS |true 
+SYSTABLEPERMS |false
+SYSTABLEPERMS |true 
+SYSTABLES |false
+SYSTABLES |true 
+SYSTABLES |true 
+SYSTRIGGERS |false
+SYSTRIGGERS |true 
+SYSTRIGGERS |true 
+SYSTRIGGERS |true 
+SYSVIEWS |false
+SYSVIEWS |true 
 ij> create table t (i int, s smallint);
 0 rows inserted/updated/deleted
 ij> select TABLENAME, TABLETYPE from sys.systables;
@@ -483,63 +483,63 @@
 from sys.systables t, sys.sysconglomerates c
 where t.TABLEID=c.TABLEID
 order by TABLENAME, ISINDEX;
-TABLENAME |ISIND&
+TABLENAME |ISIN&
 -----
-SYSALIASES |0     
-SYSALIASES |1     
-SYSALIASES |1     
-SYSALIASES |1     
-SYSCHECKS |0     
-SYSCHECKS |1     
-SYSCOLPERMS |0     
-SYSCOLPERMS |1     
-SYSCOLUMNS |0     
-SYSCOLUMNS |1     
-SYSCOLUMNS |1     
-SYSCONGLOMERATES |0     
-SYSCONGLOMERATES |1     
-SYSCONGLOMERATES |1     
-SYSCONGLOMERATES |1     
-SYSCONSTRAINTS |0     
-SYSCONSTRAINTS |1     
-SYSCONSTRAINTS |1     
-SYSCONSTRAINTS |1     
-SYSDEPENDS |0     
-SYSDEPENDS |1     
-SYSDEPENDS |1     
-SYSDUMMY1 |0     
-SYSFILES |0     
-SYSFILES |1     
-SYSFILES |1     
-SYSFOREIGNKEYS |0     
-SYSFOREIGNKEYS |1     
-SYSFOREIGNKEYS |1     
-SYSKEYS |0     
-SYSKEYS |1     
-SYSREQUIREDPERM |0     
-SYSREQUIREDPERM |1     
-SYSROUTINEPERMS |0     
-SYSROUTINEPERMS |1     
-SYSSCHEMAS |0     
-SYSSCHEMAS |1     
-SYSSCHEMAS |1     
-SYSSTATEMENTS |0     
-SYSSTATEMENTS |1     
-SYSSTATEMENTS |1     
-SYSSTATISTICS |0     
-SYSSTATISTICS |1     
-SYSTABLEPERMS |0     
-SYSTABLEPERMS |1     
-SYSTABLES |0     
-SYSTABLES |1     
-SYSTABLES |1     
-SYSTRIGGERS |0     
-SYSTRIGGERS |1     
-SYSTRIGGERS |1     
-SYSTRIGGERS |1     
-SYSVIEWS |0     
-SYSVIEWS |1     
-T |0     
+SYSALIASES |false
+SYSALIASES |true 
+SYSALIASES |true 
+SYSALIASES |true 
+SYSCHECKS |false
+SYSCHECKS |true 
+SYSCOLPERMS |false
+SYSCOLPERMS |true 
+SYSCOLUMNS |false
+SYSCOLUMNS |true 
+SYSCOLUMNS |true 
+SYSCONGLOMERATES |false
+SYSCONGLOMERATES |true 
+SYSCONGLOMERATES |true 
+SYSCONGLOMERATES |true 
+SYSCONSTRAINTS |false
+SYSCONSTRAINTS |true 
+SYSCONSTRAINTS |true 
+SYSCONSTRAINTS |true 
+SYSDEPENDS |false
+SYSDEPENDS |true 
+SYSDEPENDS |true 
+SYSDUMMY1 |false
+SYSFILES |false
+SYSFILES |true 
+SYSFILES |true 
+SYSFOREIGNKEYS |false
+SYSFOREIGNKEYS |true 
+SYSFOREIGNKEYS |true 
+SYSKEYS |false
+SYSKEYS |true 
+SYSREQUIREDPERM |false
+SYSREQUIREDPERM |true 
+SYSROUTINEPERMS |false
+SYSROUTINEPERMS |true 
+SYSSCHEMAS |false
+SYSSCHEMAS |true 
+SYSSCHEMAS |true 
+SYSSTATEMENTS |false
+SYSSTATEMENTS |true 
+SYSSTATEMENTS |true 
+SYSSTATISTICS |false
+SYSSTATISTICS |true 
+SYSTABLEPERMS |false
+SYSTABLEPERMS |true 
+SYSTABLES |false
+SYSTABLES |true 
+SYSTABLES |true 
+SYSTRIGGERS |false
+SYSTRIGGERS |true 
+SYSTRIGGERS |true 
+SYSTRIGGERS |true 
+SYSVIEWS |false
+SYSVIEWS |true 
+T |false
 ij> -- > 30 char table and column names
 create table t234567890123456789012345678901234567890
 (c23456789012345678901234567890 int);

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/aggregate.out
URL: http://svn.apache.org/viewcvs/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/aggregate.out?rev=358163&r1=358162&r2=358163&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/aggregate.out (original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/aggregate.out Tue Dec 20 16:53:42 2005
@@ -213,9 +213,15 @@
 0          
 WARNING 01003: Null values were eliminated from the argument of a column function.
 ij> -- binary list operator
--- beetle 5571 - transient boolean type not allowed in DB2
 select (1 in (1,2)), count(c1) from t1 group by c1;
-ERROR 42X01: Syntax error: Encountered "in" at line 3, column 11.
+1    |2          
+-----------------
+true |1          
+true |1          
+true |1          
+true |1          
+true |0          
+WARNING 01003: Null values were eliminated from the argument of a column function.
 ij> select count((1 in (1,2))) from t1 group by c1;
 1          
 -----------

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/db2Compatibility.out
URL: http://svn.apache.org/viewcvs/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/db2Compatibility.out?rev=358163&r1=358162&r2=358163&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/db2Compatibility.out (original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/db2Compatibility.out Tue Dec 20 16:53:42 2005
@@ -134,10 +134,8 @@
 ij> drop schema "sysok" restrict;
 0 rows inserted/updated/deleted
 ij> -- data types not supported
-create table NOTYPE(i int, b BOOLEAN);
-ERROR 42X01: Syntax error: BOOLEAN.
-ij> create table NOTYPE(i int, b TINYINT);
-ERROR 42X01: Syntax error: Encountered "" at line 1, column 30.
+create table NOTYPE(i int, b TINYINT);
+ERROR 42X01: Syntax error: Encountered "" at line 2, column 30.
 ij> create table NOTYPE(i int, b java.lang.String);
 ERROR 42X01: Syntax error: Encountered "" at line 1, column 30.
 ij> create table NOTYPE(i int, b com.acme.Address);
@@ -406,10 +404,8 @@
 0 rows inserted/updated/deleted
 ij> -- INSTANCEOF in where clause of select, delete, update,
 -- beetle 5224
-create table t1 (i int, s smallint, c10 char(10), vc30 varchar(30), b boolean);
-ERROR 42X01: Syntax error: BOOLEAN.
-ij> create table mm (x org.apache.derbyTesting.functionTests.util.ManyMethods);
-ERROR 42X01: Syntax error: Encountered "" at line 1, column 20.
+create table mm (x org.apache.derbyTesting.functionTests.util.ManyMethods);
+ERROR 42X01: Syntax error: Encountered "" at line 3, column 20.
 ij> create table sc (x org.apache.derbyTesting.functionTests.util.SubClass);
 ERROR 42X01: Syntax error: Encountered "" at line 1, column 20.
 ij> select i from t1 where i instanceof java.lang.Integer;
@@ -456,9 +452,6 @@
 ERROR 42X01: Syntax error: Encountered "bit" at line 3, column 29.
 ij> create table testtype2(col1 bit varying(10));
 ERROR 42X01: Syntax error: Encountered "bit" at line 1, column 29.
-ij> -- boolean datatype already disabled
-create table testtype3(col1 boolean);
-ERROR 42X01: Syntax error: BOOLEAN.
 ij> create table testtype4(col1 LONG NVARCHAR);
 ERROR 0A000: Feature not implemented: LONG NVARCHAR.
 ij> create table testtype5(col1 LONG VARBINARY);
@@ -913,21 +906,6 @@
 ij> -- (4) USING should be disabled in INNER JOIN of SELECT statement
 SELECT * FROM t1 RIGHT OUTER JOIN t2 USING (col1);
 ERROR 42X01: Syntax error: Encountered "USING" at line 2, column 38.
-ij> -- (5) TRUE and FALSE constants should be disabled in WHERE clause of SELECT statement
-SELECT * FROM t1 INNER JOIN t2 ON t1.col1 = t2.col1 WHERE true;
-ERROR 42X01: Syntax error: true.
-ij> SELECT * FROM t1 INNER JOIN t2 ON t1.col1 = t2.col1 WHERE false;
-ERROR 42X01: Syntax error: false.
-ij> -- (5) TRUE and FALSE constants should be disabled in WHERE clause of DELETE statement
-DELETE FROM t1 where true;
-ERROR 42X01: Syntax error: true.
-ij> DELETE FROM t1 where false;
-ERROR 42X01: Syntax error: false.
-ij> -- (5) TRUE and FALSE constants should be disabled in WHERE clause of DELETE statement
-UPDATE t2 SET col1 = NULL WHERE true;
-ERROR 42X01: Syntax error: true.
-ij> UPDATE t2 SET col1 = NULL WHERE false;
-ERROR 42X01: Syntax error: false.
 ij> -- (6) AT ISOLATION clause should be disabled in SELECT statement
 -- AT ISOLATION not supported in both Cloudscape and DB2 mode and that is why rather than getting feature not implemented, we will get syntax error
 SELECT * FROM t1 AT ISOLATION READ UNCOMMITTED;

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/implicitConversions.out
URL: http://svn.apache.org/viewcvs/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/implicitConversions.out?rev=358163&r1=358162&r2=358163&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/implicitConversions.out (original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/implicitConversions.out Tue Dec 20 16:53:42 2005
@@ -2596,9 +2596,15 @@
 ij> values 'a', 1.1;
 ERROR 42X61: Types 'CHAR' and 'DECIMAL' are not UNION compatible.
 ij> values true, 'a';
-ERROR 42X01: Syntax error: true.
+1    
+-----
+true 
+true 
 ij> values 'a', true;
-ERROR 42X01: Syntax error: true.
+1    
+-----
+true 
+true 
 ij> values date('1996-09-09'), 'a';
 1         
 ----------

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/logop.out
URL: http://svn.apache.org/viewcvs/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/logop.out?rev=358163&r1=358162&r2=358163&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/logop.out (original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/logop.out Tue Dec 20 16:53:42 2005
@@ -251,18 +251,25 @@
 X          
 -----------
 1          
-ij> -- following NOTs in select clause won't work because it results in a transient boolean datatype
-select not ( (1 = 1) or (2 = 2) ) and (3 = 4) from s;
-ERROR 42X01: Syntax error: Encountered "not" at line 2, column 8.
+ij> select ( not ( (1 = 1) or (2 = 2) ) and (3 = 4) ) from s;
+1    
+-----
+false
 ij> --
-select not ( ( (1 = 1) or (2 = 2) ) and (3 = 4) ) from s;
-ERROR 42X01: Syntax error: Encountered "not" at line 2, column 8.
+select ( not ( ( (1 = 1) or (2 = 2) ) and (3 = 4) ) ) from s;
+1    
+-----
+true 
 ij> --
-select (1 = 2) and not ( (3 = 3) or (4 = 4) ) from s;
-ERROR 42X01: Syntax error: Encountered "=" at line 2, column 11.
+select ( (1 = 2) and not ( (3 = 3) or (4 = 4) ) ) from s;
+1    
+-----
+false
 ij> --
-select not ( (1 = 2) and ( (3 = 3) or (4 = 4) ) ) from s;
-ERROR 42X01: Syntax error: Encountered "not" at line 2, column 8.
+select ( not ( (1 = 2) and ( (3 = 3) or (4 = 4) ) ) ) from s;
+1    
+-----
+true 
 ij> -- Ands under ands under ands ...
 select * from s where not (	( ( ((1=1) and (1=1)) and ((1=1) and (1=1)) ) and
 						      ( ((1=1) and (1=1)) and ((1=1) and (1=1)) ) ) and

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/schemas.out
URL: http://svn.apache.org/viewcvs/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/schemas.out?rev=358163&r1=358162&r2=358163&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/schemas.out (original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/schemas.out Tue Dec 20 16:53:42 2005
@@ -717,12 +717,18 @@
 I          |S     |C                             |VC                            
 --------------------------------------------------------------------------------
 ij> -- correlated subqueries
--- negative tests
--- exists disallowed in select clause
 select (exists (select * from test.ttt 
-				where iii = (select 11 from test.tt where ii = i and ii <> 1)) ) from test.s;
-ERROR 42X01: Syntax error: Encountered "exists" at line 6, column 9.
-ij> -- multiple matches at parent level
+				where iii = (select 11 from test.tt where ii = i and ii <> 1)) )
+a
+from test.s
+order by a;
+A    
+-----
+NULL 
+NULL 
+true 
+ij> -- negative tests
+-- multiple matches at parent level
 select * from test.s, test.t where exists (select i from test.tt);
 ERROR 42X03: Column name 'I' is in more than one table in the FROM list.
 ij> -- match is against base table, but not derived column list

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/subquery.out
URL: http://svn.apache.org/viewcvs/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/subquery.out?rev=358163&r1=358162&r2=358163&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/subquery.out (original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/subquery.out Tue Dec 20 16:53:42 2005
@@ -466,12 +466,24 @@
 I          |S     |C                             |VC                            |B                   
 -----------------------------------------------------------------------------------------------------
 ij> -- select list
-select i in (select i from t) from s;
-ERROR 42X01: Syntax error: Encountered "in" at line 2, column 10.
-ij> select i in (select i from t where 1 = 0) from s;
-ERROR 42X01: Syntax error: Encountered "in" at line 1, column 10.
-ij> select (i in (select i from t where 1 = 0)) is null from s;
-ERROR 42X01: Syntax error: Encountered "in" at line 1, column 11.
+select ( i in (select i from t) ) a from s order by a;
+A    
+-----
+false
+true 
+true 
+ij> select ( i in (select i from t where 1 = 0) ) a from s order by a;
+A    
+-----
+false
+false
+false
+ij> select ( (i in (select i from t where 1 = 0)) is null ) a from s order by a;
+A    
+-----
+false
+false
+false
 ij> -- subquery under an or
 select i from s where i = -1 or i in (select i from t);
 I          

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/valuesclause.out
URL: http://svn.apache.org/viewcvs/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/valuesclause.out?rev=358163&r1=358162&r2=358163&view=diff
==============================================================================
--- 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 Tue Dec 20 16:53:42 2005
@@ -160,22 +160,34 @@
 ij> remove v2;
 ij> -- type precedence tests. tinyint not supported by DB2 Cloudscape
 values (1 = 1.2);
-ERROR 42X01: Syntax error: Encountered "=" at line 2, column 11.
+1    
+-----
+false
 ij> -- this test runs in SPS mode too, hence adding a comment line before the sql, so we get correct column number in error message in both SPS and non-SPS mode
 values (1.2 = 1);
-ERROR 42X01: Syntax error: Encountered "=" at line 2, column 13.
+1    
+-----
+false
 ij> -- this test runs in SPS mode too, hence adding a comment line before the sql, so we get correct column number in error message in both SPS and non-SPS mode
 values (1 = cast(1 as bigint));
-ERROR 42X01: Syntax error: Encountered "=" at line 2, column 11.
+1    
+-----
+true 
 ij> -- this test runs in SPS mode too, hence adding a comment line before the sql, so we get correct column number in error message in both SPS and non-SPS mode
 values (1 = cast(1 as smallint));
-ERROR 42X01: Syntax error: Encountered "=" at line 2, column 11.
+1    
+-----
+true 
 ij> -- this test runs in SPS mode too, hence adding a comment line before the sql, so we get correct column number in error message in both SPS and non-SPS mode
 values (cast(1 as bigint) = 1);
-ERROR 42X01: Syntax error: Encountered "=" at line 2, column 27.
+1    
+-----
+true 
 ij> -- this test runs in SPS mode too, hence adding a comment line before the sql, so we get correct column number in error message in both SPS and non-SPS mode
 values (cast(1 as smallint) = 1);
-ERROR 42X01: Syntax error: Encountered "=" at line 2, column 29.
+1    
+-----
+true 
 ij> -- inserts
 create table insert_test1 (c1 int);
 0 rows inserted/updated/deleted
@@ -421,10 +433,14 @@
 ERROR 42X01: Syntax error: Encountered "=" at line 2, column 10.
 ij> -- this test runs in SPS mode too, hence adding a comment line before the sql, so we get correct column number in error message in both SPS and non-SPS mode
 values (nullif('abc','a') = 'abc');
-ERROR 42X01: Syntax error: Encountered "=" at line 2, column 27.
+1    
+-----
+true 
 ij> -- this test runs in SPS mode too, hence adding a comment line before the sql, so we get correct column number in error message in both SPS and non-SPS mode
 select (nullif('abc','a') = 'abc') from t1;
-ERROR 42X01: Syntax error: Encountered "=" at line 2, column 27.
+1    
+-----
+true 
 ij> -- this test runs in SPS mode too, hence adding a comment line before the sql, so we get correct column number in error message in both SPS and non-SPS mode
 select c11 = any (select c11 from t1) from t1;
 ERROR 42X01: Syntax error: Encountered "=" at line 2, column 12.
@@ -454,16 +470,24 @@
 ERROR 42X01: Syntax error: Encountered "<=" at line 2, column 10.
 ij> -- this test runs in SPS mode too, hence adding a comment line before the sql, so we get correct column number in error message in both SPS and non-SPS mode
 values (1>1);
-ERROR 42X01: Syntax error: Encountered ">" at line 2, column 10.
+1    
+-----
+false
 ij> -- this test runs in SPS mode too, hence adding a comment line before the sql, so we get correct column number in error message in both SPS and non-SPS mode
 select (c1 < 2) from t1;
-ERROR 42X01: Syntax error: Encountered "<" at line 2, column 12.
+1    
+-----
+true 
 ij> -- this test runs in SPS mode too, hence adding a comment line before the sql, so we get correct column number in error message in both SPS and non-SPS mode
 values (1 between 2 and 5);
-ERROR 42X01: Syntax error: Encountered "between" at line 2, column 11.
+1    
+-----
+false
 ij> -- this test runs in SPS mode too, hence adding a comment line before the sql, so we get correct column number in error message in both SPS and non-SPS mode
 select (c1 between 1 and 3) from t1;
-ERROR 42X01: Syntax error: Encountered "between" at line 2, column 12.
+1    
+-----
+true 
 ij> -- boolean expression LIKE disallowed in values and select clause
 prepare ll1 as 'values ''asdf'' like ?';
 ERROR 42X01: Syntax error: Encountered "like" at line 1, column 15.
@@ -512,7 +536,7 @@
 ERROR 42X01: Syntax error: Encountered "is" at line 2, column 33.
 ij> -- this test runs in SPS mode too, hence adding a comment line before the sql, so we get correct column number in error message in both SPS and non-SPS mode
 select c1, (c1=1? cast(null as int) : c1) is null from t1;
-ERROR 42X01: Syntax error: Encountered "=" at line 2, column 15.
+ERROR 42X01: Syntax error: Encountered "?" at line 2, column 17.
 ij> -- try few tests in cloudscape mode for boolean expressions in values or select clause
 -- this test runs in SPS mode too, hence adding a comment line before the sql, so we get correct column number in error message in both SPS and non-SPS mode
 values new java.lang.String() = '';

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/suites/derbylang.runall
URL: http://svn.apache.org/viewcvs/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/suites/derbylang.runall?rev=358163&r1=358162&r2=358163&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/suites/derbylang.runall (original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/suites/derbylang.runall Tue Dec 20 16:53:42 2005
@@ -1,6 +1,7 @@
 jdbcapi/metadata.java
 jdbcapi/metadataMultiConn.java
 jdbcapi/odbc_metadata.java
+junitTests/lang/LangSuite.java
 lang/AIjdbc.java
 lang/CharUTF8.java
 lang/ConcurrentImplicitCreateSchema.java



Mime
View raw message