db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rhille...@apache.org
Subject svn commit: r423976 [1/2] - 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 Thu, 20 Jul 2006 16:22:21 GMT
Author: rhillegas
Date: Thu Jul 20 09:22:18 2006
New Revision: 423976

URL: http://svn.apache.org/viewvc?rev=423976&view=rev
Log:
DERBY-1029: Commit derby-1029_v05.diff, backing out the BOOLEAN datatype introduced by DERBY-499.

Modified:
    db/derby/code/trunk/java/client/org/apache/derby/client/am/ColumnMetaData.java
    db/derby/code/trunk/java/client/org/apache/derby/client/am/CrossConverters.java
    db/derby/code/trunk/java/client/org/apache/derby/client/am/Cursor.java
    db/derby/code/trunk/java/client/org/apache/derby/client/am/DatabaseMetaData.java
    db/derby/code/trunk/java/client/org/apache/derby/client/am/SignedBinary.java
    db/derby/code/trunk/java/client/org/apache/derby/client/am/Types.java
    db/derby/code/trunk/java/client/org/apache/derby/client/net/NetStatementRequest.java
    db/derby/code/trunk/java/client/org/apache/derby/client/net/Typdef.java
    db/derby/code/trunk/java/drda/org/apache/derby/impl/drda/AppRequester.java
    db/derby/code/trunk/java/drda/org/apache/derby/impl/drda/DRDAConnThread.java
    db/derby/code/trunk/java/drda/org/apache/derby/impl/drda/FdocaConstants.java
    db/derby/code/trunk/java/drda/org/apache/derby/impl/drda/SQLTypes.java
    db/derby/code/trunk/java/engine/org/apache/derby/iapi/reference/DRDAConstants.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/sqlgrammar.jj
    db/derby/code/trunk/java/testing/build.xml
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/DerbyNetClient/jdk14/metadata.out
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/DerbyNetClient/jdk14/syscat.out
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/aggregate.out
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/cast.out
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/db2Compatibility.out
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/implicitConversions.out
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/logop.out
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/procedureInTrigger.out
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/schemas.out
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/subquery.out
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/valuesclause.out
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/suites/derbylang.runall
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/junitTests/compatibility/JDBCDriverTest.java
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/junitTests/lang/BooleanTest.java
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/junitTests/lang/LangSuite.java
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/junitTests/lang/build.xml
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/junitTests/lang/default_app.properties
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/db2Compatibility.sql
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/logop.sql
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/procedureInTrigger.sql
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/schemas.sql

Modified: db/derby/code/trunk/java/client/org/apache/derby/client/am/ColumnMetaData.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/client/org/apache/derby/client/am/ColumnMetaData.java?rev=423976&r1=423975&r2=423976&view=diff
==============================================================================
--- db/derby/code/trunk/java/client/org/apache/derby/client/am/ColumnMetaData.java (original)
+++ db/derby/code/trunk/java/client/org/apache/derby/client/am/ColumnMetaData.java Thu Jul 20 09:22:18 2006
@@ -277,8 +277,6 @@
             checkForValidColumnIndex(column);
             int jdbcType = types_[column - 1];
             switch (jdbcType) {
-            case Types.BOOLEAN:
-                return 5;
             case Types.INTEGER:
                 return 11;
             case Types.SMALLINT:
@@ -533,9 +531,6 @@
             int sqlType = sqlType_[column - 1];
 
             switch (sqlType) {
-            case DRDAConstants.DB2_SQLTYPE_BOOLEAN:
-            case DRDAConstants.DB2_SQLTYPE_NBOOLEAN:
-                return "BOOLEAN";
             case DRDAConstants.DB2_SQLTYPE_DATE:
             case DRDAConstants.DB2_SQLTYPE_NDATE:
                 return "DATE";

Modified: db/derby/code/trunk/java/client/org/apache/derby/client/am/CrossConverters.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/client/org/apache/derby/client/am/CrossConverters.java?rev=423976&r1=423975&r2=423976&view=diff
==============================================================================
--- db/derby/code/trunk/java/client/org/apache/derby/client/am/CrossConverters.java (original)
+++ db/derby/code/trunk/java/client/org/apache/derby/client/am/CrossConverters.java Thu Jul 20 09:22:18 2006
@@ -1193,7 +1193,7 @@
     //---------------------------- getString*() methods --------------------------
 
     final String getStringFromBoolean(boolean source) throws SqlException {
-        return source ? "true" : "false";
+        return source ? "1" : "0";
     }
 
     final String getStringFromBytes(byte[] bytes) throws SqlException {

Modified: db/derby/code/trunk/java/client/org/apache/derby/client/am/Cursor.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/client/org/apache/derby/client/am/Cursor.java?rev=423976&r1=423975&r2=423976&view=diff
==============================================================================
--- db/derby/code/trunk/java/client/org/apache/derby/client/am/Cursor.java (original)
+++ db/derby/code/trunk/java/client/org/apache/derby/client/am/Cursor.java Thu Jul 20 09:22:18 2006
@@ -19,7 +19,6 @@
 */
 
 package org.apache.derby.client.am;
-import org.apache.derby.iapi.reference.JDBC30Translation;
 import org.apache.derby.shared.common.reference.SQLState;
 
 import java.sql.SQLException;
@@ -358,12 +357,6 @@
     //------- the following getters are called on known column types -------------
     // Direct conversions only, cross conversions are handled by another set of getters.
 
-    // Build a Java boolean from a 1-byte signed binary representation.
-    private final boolean get_BOOLEAN(int column) {
-        return org.apache.derby.client.am.SignedBinary.getBoolean(dataBuffer_,
-                columnDataPosition_[column - 1]);
-    }
-
     // Build a Java short from a 2-byte signed binary representation.
     private final short get_SMALLINT(int column) {
         return org.apache.derby.client.am.SignedBinary.getShort(dataBuffer_,
@@ -666,8 +659,6 @@
 
     final boolean getBoolean(int column) throws SqlException {
         switch (jdbcTypes_[column - 1]) {
-        case JDBC30Translation.BOOLEAN:
-            return get_BOOLEAN(column);
         case java.sql.Types.SMALLINT:
             return agent_.crossConverters_.getBooleanFromShort(get_SMALLINT(column));
         case java.sql.Types.INTEGER:
@@ -695,8 +686,6 @@
     final byte getByte(int column) throws SqlException {
         // This needs to be changed to use jdbcTypes[]
         switch (jdbcTypes_[column - 1]) {
-        case JDBC30Translation.BOOLEAN:
-            return agent_.crossConverters_.getByteFromBoolean( getBoolean(column) );
         case java.sql.Types.SMALLINT:
             return agent_.crossConverters_.getByteFromShort(get_SMALLINT(column));
         case java.sql.Types.INTEGER:
@@ -723,8 +712,6 @@
 
     final short getShort(int column) throws SqlException {
         switch (jdbcTypes_[column - 1]) {
-        case JDBC30Translation.BOOLEAN:
-            return agent_.crossConverters_.getShortFromBoolean( getBoolean(column) );
         case java.sql.Types.SMALLINT:
             return get_SMALLINT(column);
         case java.sql.Types.INTEGER:
@@ -751,8 +738,6 @@
 
     final int getInt(int column) throws SqlException {
         switch (jdbcTypes_[column - 1]) {
-        case JDBC30Translation.BOOLEAN:
-            return agent_.crossConverters_.getIntFromBoolean( getBoolean(column) );
         case java.sql.Types.SMALLINT:
             return (int) get_SMALLINT(column);
         case java.sql.Types.INTEGER:
@@ -779,8 +764,6 @@
 
     final long getLong(int column) throws SqlException {
         switch (jdbcTypes_[column - 1]) {
-        case JDBC30Translation.BOOLEAN:
-            return agent_.crossConverters_.getLongFromBoolean( getBoolean(column) );
         case java.sql.Types.SMALLINT:
             return (long) get_SMALLINT(column);
         case java.sql.Types.INTEGER:
@@ -807,8 +790,6 @@
 
     final float getFloat(int column) throws SqlException {
         switch (jdbcTypes_[column - 1]) {
-        case JDBC30Translation.BOOLEAN:
-            return agent_.crossConverters_.getFloatFromBoolean( getBoolean(column) );
         case java.sql.Types.REAL:
             return get_FLOAT(column);
         case java.sql.Types.DOUBLE:
@@ -835,8 +816,6 @@
 
     final double getDouble(int column) throws SqlException {
         switch (jdbcTypes_[column - 1]) {
-        case JDBC30Translation.BOOLEAN:
-            return agent_.crossConverters_.getDoubleFromBoolean( getBoolean(column) );
         case java.sql.Types.REAL:
             double d = (double) get_FLOAT(column);
             return d;
@@ -865,8 +844,6 @@
 
     final java.math.BigDecimal getBigDecimal(int column) throws SqlException {
         switch (jdbcTypes_[column - 1]) {
-        case JDBC30Translation.BOOLEAN:
-            return agent_.crossConverters_.getBigDecimalFromBoolean( getBoolean(column) );
         case java.sql.Types.DECIMAL:
             return get_DECIMAL(column);
         case java.sql.Types.REAL:
@@ -951,8 +928,6 @@
         try {
             String tempString = null;
             switch (jdbcTypes_[column - 1]) {
-            case JDBC30Translation.BOOLEAN:
-                return agent_.crossConverters_.getStringFromBoolean( getBoolean(column) );
             case java.sql.Types.CHAR:
                 return getCHAR(column);
             case java.sql.Types.VARCHAR:
@@ -1216,8 +1191,6 @@
 
     public final Object getObject(int column) throws SqlException {
         switch (jdbcTypes_[column - 1]) {
-        case JDBC30Translation.BOOLEAN:
-            return new Boolean( getBoolean(column) );
         case java.sql.Types.SMALLINT:
             return new Integer(get_SMALLINT(column)); // See Table 4 in JDBC 1 spec (pg. 932 in jdbc book)
         case java.sql.Types.INTEGER:

Modified: db/derby/code/trunk/java/client/org/apache/derby/client/am/DatabaseMetaData.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/client/org/apache/derby/client/am/DatabaseMetaData.java?rev=423976&r1=423975&r2=423976&view=diff
==============================================================================
--- db/derby/code/trunk/java/client/org/apache/derby/client/am/DatabaseMetaData.java (original)
+++ db/derby/code/trunk/java/client/org/apache/derby/client/am/DatabaseMetaData.java Thu Jul 20 09:22:18 2006
@@ -2271,13 +2271,11 @@
     private boolean getMetaDataInfoBoolean(int infoCallIndex) throws SQLException {
         try
         {
-            if ( !metaDataInfoIsCached_) { metaDataInfoCall(); }
-
-            // account for fact that after 10.2 booleans are really booleans, not ints.
-            Object	metadataScrap = metaDataInfoCache_[infoCallIndex];
-
-            if ( metadataScrap instanceof Boolean ) { return ((Boolean) metadataScrap).booleanValue(); }
-            else { return ((Integer) metadataScrap).intValue() != 0; }
+			if (metaDataInfoIsCached_) {
+				return ((Integer) metaDataInfoCache_[infoCallIndex]).intValue() != 0;
+			}
+			metaDataInfoCall();
+			return ((Integer) metaDataInfoCache_[infoCallIndex]).intValue() != 0;
         }
         catch ( SqlException se )
         {

Modified: db/derby/code/trunk/java/client/org/apache/derby/client/am/SignedBinary.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/client/org/apache/derby/client/am/SignedBinary.java?rev=423976&r1=423975&r2=423976&view=diff
==============================================================================
--- db/derby/code/trunk/java/client/org/apache/derby/client/am/SignedBinary.java (original)
+++ db/derby/code/trunk/java/client/org/apache/derby/client/am/SignedBinary.java Thu Jul 20 09:22:18 2006
@@ -34,15 +34,6 @@
      */
     public final static int LITTLE_ENDIAN = 2;
 
-     /**
-     * Build a Java boolean from a byte.
-     *
-     */
-    public static final boolean getBoolean(byte[] buffer, int offset) {
-		if ( buffer[ offset ] == 0 ) { return false; }
-		else { return true; }
-    }
-	
     /**
      * Build a Java short from a 2-byte signed binary representation.
      *

Modified: db/derby/code/trunk/java/client/org/apache/derby/client/am/Types.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/client/org/apache/derby/client/am/Types.java?rev=423976&r1=423975&r2=423976&view=diff
==============================================================================
--- db/derby/code/trunk/java/client/org/apache/derby/client/am/Types.java (original)
+++ db/derby/code/trunk/java/client/org/apache/derby/client/am/Types.java Thu Jul 20 09:22:18 2006
@@ -121,8 +121,6 @@
 
     static public int mapDERBYTypeToDriverType(boolean isDescribed, int sqlType, long length, int ccsid) {
         switch (Utils.getNonNullableSqlType(sqlType)) { // mask the isNullable bit
-        case DRDAConstants.DB2_SQLTYPE_BOOLEAN:
-            return BOOLEAN;
         case DRDAConstants.DB2_SQLTYPE_SMALL:
             return SMALLINT;
         case DRDAConstants.DB2_SQLTYPE_INTEGER:

Modified: db/derby/code/trunk/java/client/org/apache/derby/client/net/NetStatementRequest.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/client/org/apache/derby/client/net/NetStatementRequest.java?rev=423976&r1=423975&r2=423976&view=diff
==============================================================================
--- db/derby/code/trunk/java/client/org/apache/derby/client/net/NetStatementRequest.java (original)
+++ db/derby/code/trunk/java/client/org/apache/derby/client/net/NetStatementRequest.java Thu Jul 20 09:22:18 2006
@@ -1044,9 +1044,6 @@
                     lidAndLengths[i][1] = 4;
                     break;
                 case java.sql.Types.BOOLEAN:
-                    lidAndLengths[i][0] = DRDAConstants.DRDA_TYPE_NBOOLEAN;
-                    lidAndLengths[i][1] = 1;
-                    break;
                 case java.sql.Types.SMALLINT:
                 case java.sql.Types.TINYINT:
                 case java.sql.Types.BIT:

Modified: db/derby/code/trunk/java/client/org/apache/derby/client/net/Typdef.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/client/org/apache/derby/client/net/Typdef.java?rev=423976&r1=423975&r2=423976&view=diff
==============================================================================
--- db/derby/code/trunk/java/client/org/apache/derby/client/net/Typdef.java (original)
+++ db/derby/code/trunk/java/client/org/apache/derby/client/net/Typdef.java Thu Jul 20 09:22:18 2006
@@ -680,10 +680,6 @@
         new FdocaSimpleDataArray(0xCE, FdocaConstants.FDOCA_TYPE_LOBCHAR, Cursor.MBCS_CLOB, CCSIDMBC, 1, 1, 8, LOBLENGTH),
         /* 0xCF null Large object char MBCS */
         new FdocaSimpleDataArray(0xCF, FdocaConstants.FDOCA_TYPE_NLOBCHAR, Cursor.MBCS_CLOB, CCSIDMBC, 1, 1, 8, LOBLENGTH),
-        /* 0xD0 boolean */
-        new FdocaSimpleDataArray(DRDAConstants.DRDA_TYPE_BOOLEAN, FdocaConstants.FDOCA_TYPE_INTEGER_BE, SignedBinary.BIG_ENDIAN, NOCCSID, 0, 0, 1, FIXEDLENGTH),
-        /* 0xD1 null boolean */
-        new FdocaSimpleDataArray(DRDAConstants.DRDA_TYPE_NBOOLEAN, FdocaConstants.FDOCA_TYPE_NINTEGER_BE, SignedBinary.BIG_ENDIAN, NOCCSID, 0, 0, 1, FIXEDLENGTH),
     };
 
     private static final int[] protocolToJdbcTypes_ = {
@@ -896,8 +892,6 @@
         0x00,
         java.sql.Types.CLOB, // 0xCE Large object char MBCS
         java.sql.Types.CLOB, // 0xCF null Large object char MBCS
-		JDBC30Translation.BOOLEAN, // 0xD0 boolean
-		JDBC30Translation.BOOLEAN, // 0xD1 null boolean
     };
 
 

Modified: db/derby/code/trunk/java/drda/org/apache/derby/impl/drda/AppRequester.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/drda/org/apache/derby/impl/drda/AppRequester.java?rev=423976&r1=423975&r2=423976&view=diff
==============================================================================
--- db/derby/code/trunk/java/drda/org/apache/derby/impl/drda/AppRequester.java (original)
+++ db/derby/code/trunk/java/drda/org/apache/derby/impl/drda/AppRequester.java Thu Jul 20 09:22:18 2006
@@ -120,19 +120,6 @@
 	}
 
 	/**
-	 * Returns true if the client supports Derby's protocol for
-	 * transmitting BOOLEAN values.
-	 */
-	protected	boolean	supportsBoolean()
-	{
-		return
-			(
-			    ( clientType == DNC_CLIENT ) &&
-			    ( greaterThanOrEqualTo( 10, 2, 0 ) )
-			);
-	}
-
-	/**
 	 * Check if the client expects QRYCLSIMP to be supported when the
 	 * protocol is LMTBLKPRC.
 	 *

Modified: db/derby/code/trunk/java/drda/org/apache/derby/impl/drda/DRDAConnThread.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/drda/org/apache/derby/impl/drda/DRDAConnThread.java?rev=423976&r1=423975&r2=423976&view=diff
==============================================================================
--- db/derby/code/trunk/java/drda/org/apache/derby/impl/drda/DRDAConnThread.java (original)
+++ db/derby/code/trunk/java/drda/org/apache/derby/impl/drda/DRDAConnThread.java Thu Jul 20 09:22:18 2006
@@ -5985,7 +5985,7 @@
 			int colType = (hasRs ? rsmeta.getColumnType(i) : pmeta.getParameterType(i));
 			int[] outlen = {-1};
 			int drdaType =
-				(hasRs ?FdocaConstants.mapJdbcTypeToDrdaType(appRequester,colType,nullable,outlen): 
+				(hasRs ?FdocaConstants.mapJdbcTypeToDrdaType(colType,nullable,outlen): 
 				 stmt.getParamDRDAType(i));
 
 			boolean isDecimal = ((drdaType | 1) == DRDAConstants.DRDA_TYPE_NDECIMAL);
@@ -6723,8 +6723,7 @@
 										ResultSetMetaData.columnNullable) : 
 			(pmeta.isNullable(jdbcElemNum) == JDBC30Translation.PARAMETER_NULLABLE);
 		
-		int sqlType = SQLTypes.mapJdbcTypeToDB2SqlType(appRequester,
-													   elemType,
+		int sqlType = SQLTypes.mapJdbcTypeToDB2SqlType(elemType,
 													   nullable,
 													   outlen);
 		
@@ -6948,9 +6947,6 @@
 			long valLength = 0;
 			switch (ndrdaType)
 			{
-			    case DRDAConstants.DRDA_TYPE_NBOOLEAN:
-					writer.writeByte( makeInt( (Boolean) val ) );
-					break;
 			    case DRDAConstants.DRDA_TYPE_NSMALL:
  					// DB2 does not have a BOOLEAN java.sql.bit type,
 					// so we need to send it as a small
@@ -7045,17 +7041,6 @@
 					writer.writeLDString(val.toString(), index);
 			}
 		}
-	}
-
- 	/**
-	 * turn a boolean into an int
-	 * @param val	boolean value
-	 * 
-	 **/
-	private	int	makeInt( Boolean val )
-	{
-		if ( val.booleanValue() ) { return 1; }
-		else { return 0; }
 	}
 
 	/**

Modified: db/derby/code/trunk/java/drda/org/apache/derby/impl/drda/FdocaConstants.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/drda/org/apache/derby/impl/drda/FdocaConstants.java?rev=423976&r1=423975&r2=423976&view=diff
==============================================================================
--- db/derby/code/trunk/java/drda/org/apache/derby/impl/drda/FdocaConstants.java (original)
+++ db/derby/code/trunk/java/drda/org/apache/derby/impl/drda/FdocaConstants.java Thu Jul 20 09:22:18 2006
@@ -132,18 +132,13 @@
 	 * @param outlen - output parameter with length of type.
 	 * @return standard drdaTypeLength. -1 if we don't know.
 	 **/
-	protected static int mapJdbcTypeToDrdaType(AppRequester appRequester, int jdbcType, boolean nullable,
+	protected static int mapJdbcTypeToDrdaType(int jdbcType, boolean nullable,
 											   int[] outlen)
 		throws SQLException
 	{
-		jdbcType = clipJdbcType( appRequester, jdbcType );
-
 		int drdaType = 0;
 		switch (jdbcType) {
 			case JDBC30Translation.BOOLEAN:
-				drdaType = DRDAConstants.DRDA_TYPE_NBOOLEAN;
-				outlen[0] = 1;
-				break;
 			case java.sql.Types.BIT:
 			case java.sql.Types.TINYINT:
 			case java.sql.Types.SMALLINT:
@@ -244,22 +239,5 @@
 		return drdaType;
 	}
 
-	/***
-	 * Convert the jdbcType to one which we know how to exchange with
-	 * the client. This depends on the version of the client.
-	 **/
-	protected	static	int	clipJdbcType( AppRequester appRequester, int original )
-	{
-		switch ( original )
-		{
-			case JDBC30Translation.BOOLEAN:
-
-				if ( appRequester.supportsBoolean() ) { return original; }
-				else { return java.sql.Types.BIT; }
-
-		    default:	return original;
-		}
-
-	}
 
 }

Modified: db/derby/code/trunk/java/drda/org/apache/derby/impl/drda/SQLTypes.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/drda/org/apache/derby/impl/drda/SQLTypes.java?rev=423976&r1=423975&r2=423976&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 Thu Jul 20 09:22:18 2006
@@ -48,8 +48,6 @@
   static protected int mapDB2SqlTypeToJdbcType (int sqlType, long length, int ccsid)
   {
     switch (getNonNullableSqlType (sqlType)) { // mask the isNullable bit
-    case DRDAConstants.DB2_SQLTYPE_BOOLEAN:
-      return JDBC30Translation.BOOLEAN;
     case DRDAConstants.DB2_SQLTYPE_SMALL:
       return java.sql.Types.SMALLINT;
     case DRDAConstants.DB2_SQLTYPE_INTEGER:
@@ -132,7 +130,7 @@
   * @exception SQLException thrown for unrecognized SQLType
   */
 
- static protected int mapJdbcTypeToDB2SqlType (AppRequester appRequester, int jdbctype, boolean nullable,
+ static protected int mapJdbcTypeToDB2SqlType (int jdbctype, boolean nullable,
 											   int[] outlen)
 	 throws SQLException
   {
@@ -142,14 +140,11 @@
 		  nullAddVal =1; 
 	  
 	  // Call FdocaConstants just to get the length
-	  FdocaConstants.mapJdbcTypeToDrdaType( appRequester, jdbctype,nullable,outlen);
+	  FdocaConstants.mapJdbcTypeToDrdaType(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:

Modified: db/derby/code/trunk/java/engine/org/apache/derby/iapi/reference/DRDAConstants.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/iapi/reference/DRDAConstants.java?rev=423976&r1=423975&r2=423976&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/iapi/reference/DRDAConstants.java (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/iapi/reference/DRDAConstants.java Thu Jul 20 09:22:18 2006
@@ -139,8 +139,8 @@
 	// 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;
+	// public	static final int DRDA_TYPE_BOOLEAN = 0xBE;
+	// public	static final int DRDA_TYPE_NBOOLEAN = 0xBF;
 	
 	///////////////////////
 	//
@@ -209,7 +209,7 @@
 	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;
+    // public	static final  int DB2_SQLTYPE_BOOLEAN = 1000;     // BOOLEAN
+    // public	static final  int DB2_SQLTYPE_NBOOLEAN = 1001;
 
 }

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/sqlgrammar.jj
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/sqlgrammar.jj?rev=423976&r1=423975&r2=423976&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 Thu Jul 20 09:22:18 2006
@@ -3313,7 +3313,7 @@
 	ResultSetNode		resultSetNode = null;
 }
 {
-	<CALL> value = primaryExpression()
+	<CALL> value = primaryExpression( true )
 	{
 		if (! (value instanceof JavaToSQLValueNode) ||
 			! (((JavaToSQLValueNode) value).getJavaValueNode() instanceof MethodCallNode))
@@ -3380,8 +3380,10 @@
 /*
  * <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() throws StandardException :
+ValueNode primaryExpression( boolean inSelectClause ) throws StandardException :
 {
 	ValueNode			value = null;
 }
@@ -3397,7 +3399,7 @@
 		return value;
 	}
 |
-	value = primaryExpressionXX()
+	value = primaryExpressionXX( inSelectClause )
 	{
 		return value;
 	}
@@ -3754,6 +3756,7 @@
 	typeDescriptor = datetimeType()
 | <BOOLEAN>
 {
+	checkInternalFeature(TypeId.BOOLEAN_NAME);
 	typeDescriptor = new DataTypeDescriptor(TypeId.BOOLEAN_ID, true);
 }
 |
@@ -4937,7 +4940,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) 
+	columnExpression = additiveExpression(null, 0, true) 
 			[ columnName = asClause() ]
 	{ 
 		/*
@@ -4977,15 +4980,17 @@
 /*
  * <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() throws StandardException :
+valueExpression( boolean inSelectClause ) throws StandardException :
 {
 	ValueNode	leftOperand;
 }
 {
-	leftOperand = orExpression(null)
-		(<OR> leftOperand = orExpression(leftOperand) ) *
+	leftOperand = orExpression(null, inSelectClause)
+		(<OR> leftOperand = orExpression(leftOperand, inSelectClause) ) *
 	{
 
 		return leftOperand;
@@ -4994,15 +4999,18 @@
 	
 /*
  * <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) throws StandardException :
+orExpression(ValueNode farLeftOperand, boolean inSelectClause) throws StandardException :
 {
 	ValueNode	leftOperand;
 }
 {
-	leftOperand = andExpression(null)
-		(<AND> leftOperand = andExpression(leftOperand)) *
+	leftOperand = andExpression(null, inSelectClause)
+		(<AND> leftOperand = andExpression(leftOperand, inSelectClause)) *
 	{
 		if (farLeftOperand == null)
 		{
@@ -5021,9 +5029,12 @@
 
 /*
  * <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) throws StandardException :
+andExpression(ValueNode farLeftOperand, boolean inSelectClause) throws StandardException :
 {
 	Token		tok = null;
 	ValueNode	test;
@@ -5031,7 +5042,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() 
+			getToken(2).kind == DOUBLE_COLON)}) tok = <NOT> ] test = isSearchCondition(inSelectClause) 
 	{
 		/* Put the NOT on top of test */
 		if (tok != null)
@@ -5056,9 +5067,12 @@
 
 /*
  * <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() throws StandardException :
+isSearchCondition( boolean inSelectClause ) throws StandardException :
 {
 	ValueNode	result;
 	ValueNode	booleanPrimary;
@@ -5067,7 +5081,7 @@
 	Token		truthValue = null;
 }
 {
-	booleanPrimary = booleanPrimary()
+	booleanPrimary = booleanPrimary(inSelectClause)
 	[
 		isToken = <IS> [ notToken = <NOT> ] <NULL>
 	]
@@ -5096,15 +5110,18 @@
 
 /*
  * <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() throws StandardException :
+booleanPrimary(boolean inSelectClause) throws StandardException :
 {
 	ValueNode	primary;
 	ValueNode	searchCondition;
 }
 {
-	primary = predicate()
+	primary = predicate(inSelectClause)
 	{
 		return	primary;
 	}
@@ -5112,15 +5129,18 @@
 
 /*
  * <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() throws StandardException :
+predicate( boolean inSelectClause ) throws StandardException :
 {
 	ValueNode	value;
 }
 {
 	(
-		value = additiveExpression(null, 0) |
+		value = additiveExpression(null, 0, inSelectClause) |
 		value = existsExpression()
 	)
 	(
@@ -5128,7 +5148,7 @@
 		// start with NOT, and what follows a predicate() can also start
 		// with NOT
 		LOOKAHEAD( { remainingPredicateFollows() } )
-		value = remainingPredicate(value)
+		value = remainingPredicate(value, inSelectClause)
 	)*
 	{
 		return value;
@@ -5150,19 +5170,22 @@
 
 /*
  * <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) throws StandardException :
+remainingPredicate(ValueNode value, boolean inSelectClause) throws StandardException :
 {
 	Token tok = null;
 }
 {
-	value = remainingNonNegatablePredicate(value)
+	value = remainingNonNegatablePredicate(value, inSelectClause)
 	{
 		return value;
 	}
 |
-	[ tok = <NOT> ] value = remainingNegatablePredicate(value)
+	[ tok = <NOT> ] value = remainingNegatablePredicate(value, inSelectClause)
 	{
 		/* Put the NOT on top of the tree */
 		if (tok != null)
@@ -5179,9 +5202,12 @@
 
 /*
  * <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) throws StandardException :
+remainingNonNegatablePredicate(ValueNode leftOperand, boolean inSelectClause) throws StandardException :
 {
 	int			operator;
 	String		javaClassName;
@@ -5206,7 +5232,7 @@
 		)
 		|
 		(
-			leftOperand = additiveExpression(leftOperand, operator)
+			leftOperand = additiveExpression(leftOperand, operator, inSelectClause)
 		)
 	)
 	{
@@ -5216,9 +5242,12 @@
 
 /*
  * <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) throws StandardException :
+remainingNegatablePredicate(ValueNode leftOperand, boolean inSelectClause) throws StandardException :
 {
 	ValueNode	tree = null;
 	ValueNode	likePattern;
@@ -5232,10 +5261,10 @@
 		return tree;
 	}
 |
-	<LIKE> likePattern = additiveExpression(null, 0)
+	<LIKE> likePattern = additiveExpression(null, 0, inSelectClause)
             [
-                <ESCAPE> escapeValue = additiveExpression(null, 0) |
-                <LEFT_BRACE> <ESCAPE> escapeValue = additiveExpression(null, 0) <RIGHT_BRACE>
+                <ESCAPE> escapeValue = additiveExpression(null, 0, inSelectClause) |
+                <LEFT_BRACE> <ESCAPE> escapeValue = additiveExpression(null, 0, inSelectClause) <RIGHT_BRACE>
             ]
 	{
 		tree = (ValueNode) nodeFactory.getNode(
@@ -5248,8 +5277,8 @@
 		return tree;
 	}
 |
-	<BETWEEN> betweenLeft = additiveExpression(null, 0) <AND>
-			betweenRight = additiveExpression(null, 0)
+	<BETWEEN> betweenLeft = additiveExpression(null, 0, inSelectClause) <AND>
+			betweenRight = additiveExpression(null, 0, inSelectClause)
 	{
 		ValueNodeList betweenList = (ValueNodeList) nodeFactory.getNode(
 													C_NodeTypes.VALUE_NODE_LIST,
@@ -5311,18 +5340,21 @@
 
 /*
  * <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) throws StandardException :
+additiveExpression(ValueNode farLeftOperand, int compOp, boolean inSelectClause) throws StandardException :
 {
 	ValueNode	leftOperand;
 	int			operator;
 	int			nodeType;
 }
 {
-	leftOperand = multiplicativeExpression(null, 0)  			
+	leftOperand = multiplicativeExpression(null, 0, inSelectClause)  			
 			(operator = additiveOperator() 			 
-				leftOperand = multiplicativeExpression(leftOperand, operator) )*
+				leftOperand = multiplicativeExpression(leftOperand, operator, inSelectClause) )*
 	{
 		if (farLeftOperand == null)
 			return leftOperand;
@@ -5389,17 +5421,20 @@
 
 /*
  * <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) throws StandardException :
+multiplicativeExpression(ValueNode farLeftOperand, int additiveOperator, boolean inSelectClause) throws StandardException :
 {
 	ValueNode	leftOperand;
 	int			multOp;
 }
 {
-	leftOperand = unaryExpression(null, 0) 
+	leftOperand = unaryExpression(null, 0, inSelectClause) 
 				(multOp = multiplicativeOperator() 
-				 leftOperand = unaryExpression(leftOperand, multOp) )*
+				 leftOperand = unaryExpression(leftOperand, multOp, inSelectClause) )*
 	{
 		if (farLeftOperand == null)
 			return leftOperand;
@@ -5455,9 +5490,12 @@
 
 /*
  * <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) throws StandardException :
+unaryExpression(ValueNode farLeftOperand, int multiplicativeOperator, boolean inSelectClause) throws StandardException :
 {
 	ValueNode	value;
 	String		sign = null;
@@ -5480,7 +5518,7 @@
 				   } )
 		sign = sign()
 	]
-	value = primaryExpression()
+	value = primaryExpression(inSelectClause)
 	{
 		if ("-".equals(sign))
 		{
@@ -5533,14 +5571,17 @@
 
 /*
  * <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() throws StandardException :
+primaryExpressionXX( boolean inSelectClause ) throws StandardException :
 {
 	ValueNode	value;
 }
 {
-	value = primary()
+	value = primary(inSelectClause)
 	  ( value = nonStaticMethodCallOrFieldAccess(value)) *	
 	{
 		return value;
@@ -5693,7 +5734,7 @@
 	ValueNode	parameter;
 }
 {
-	parameter = additiveExpression(null,0)
+	parameter = additiveExpression(null,0, false)
 	{
 		parameterList.addElement(parameter);
 	}
@@ -5706,9 +5747,12 @@
 
 /*
  * <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() throws StandardException :
+primary(boolean inSelectClause) throws StandardException :
 {
 	String		javaClassName;
 	ValueNode	value;
@@ -5722,7 +5766,7 @@
 		return value;
 	}
 |
-	value = valueExpressionPrimary()
+	value = valueExpressionPrimary(inSelectClause)
 	{
 		return value;
 	}
@@ -5839,7 +5883,7 @@
 	}
 |
 	/* Escaped function substring() */
-    <SUBSTRING> <LEFT_PAREN> value = additiveExpression(null, 0) <COMMA> startPosition = additiveExpression(null, 0) [ <COMMA> length = additiveExpression(null, 0) ] <RIGHT_PAREN>
+    <SUBSTRING> <LEFT_PAREN> value = additiveExpression(null, 0, false) <COMMA> startPosition = additiveExpression(null, 0, false) [ <COMMA> length = additiveExpression(null, 0, false) ] <RIGHT_PAREN>
 	{
         return getSubstringNode(value, startPosition, length, Boolean.FALSE);
 	}
@@ -5867,8 +5911,8 @@
     /* CONCAT( string1, string2 )
      * CONCAT is not a reserved word.
      */
-    <CONCAT> <LEFT_PAREN> str1 = additiveExpression(null,0) <COMMA> 
-            str2 = additiveExpression(null,0) <RIGHT_PAREN>
+    <CONCAT> <LEFT_PAREN> str1 = additiveExpression(null,0, false) <COMMA> 
+            str2 = additiveExpression(null,0, false) <RIGHT_PAREN>
     {
         return (ValueNode) nodeFactory.getNode(
                             C_NodeTypes.CONCATENATION_OPERATOR_NODE,
@@ -5957,8 +6001,8 @@
 }
 {
     <TIMESTAMPADD> <LEFT_PAREN> intervalType = jdbcIntervalType() <COMMA>
-       count = additiveExpression(null,0) <COMMA>
-       tstamp1 = additiveExpression(null,0) <RIGHT_PAREN>
+       count = additiveExpression(null,0,false) <COMMA>
+       tstamp1 = additiveExpression(null,0,false) <RIGHT_PAREN>
     {
         return (ValueNode) nodeFactory.getNode( C_NodeTypes.TIMESTAMP_ADD_FN_NODE,
                                                 tstamp1,
@@ -5970,8 +6014,8 @@
     }
 |
     <TIMESTAMPDIFF> <LEFT_PAREN> intervalType = jdbcIntervalType() <COMMA>
-       tstamp1 = additiveExpression(null,0) <COMMA>
-       tstamp2 = additiveExpression(null,0) <RIGHT_PAREN>
+       tstamp1 = additiveExpression(null,0,false) <COMMA>
+       tstamp2 = additiveExpression(null,0,false) <RIGHT_PAREN>
     {
         return (ValueNode) nodeFactory.getNode( C_NodeTypes.TIMESTAMP_DIFF_FN_NODE,
                                                 tstamp2,
@@ -6061,7 +6105,7 @@
 		return value;
     }
 |
-    <SQRT> <LEFT_PAREN> value = additiveExpression(null,0) <RIGHT_PAREN>
+    <SQRT> <LEFT_PAREN> value = additiveExpression(null,0,false) <RIGHT_PAREN>
     {
         return (ValueNode)nodeFactory.getNode(
                 C_NodeTypes.SQRT_OPERATOR_NODE,
@@ -6117,7 +6161,7 @@
 	ValueNode	expression;
 }
 {
-	expression = additiveExpression(null,0)
+	expression = additiveExpression(null,0,false)
 	{
 		expressionList.addElement(expression);
 	}
@@ -6132,7 +6176,7 @@
     ValueNode value;
 }
 {
-    <LEFT_PAREN> value = additiveExpression(null,0) <RIGHT_PAREN>
+    <LEFT_PAREN> value = additiveExpression(null,0, false) <RIGHT_PAREN>
     {
         return (ValueNode)nodeFactory.getNode(
                 C_NodeTypes.ABSOLUTE_OPERATOR_NODE,
@@ -6150,8 +6194,8 @@
 	ValueNode int2;
 }
 {
-    <LEFT_PAREN> int1 = additiveExpression(null,0) <COMMA> 
-            int2 = additiveExpression(null,0) <RIGHT_PAREN>
+    <LEFT_PAREN> int1 = additiveExpression(null,0,false) <COMMA> 
+            int2 = additiveExpression(null,0,false) <RIGHT_PAREN>
     {
         return (ValueNode)nodeFactory.getNode(
                 C_NodeTypes.MOD_OPERATOR_NODE,
@@ -6193,12 +6237,12 @@
     ValueNode	length = null;
 }
 {
-	<SUBSTR> <LEFT_PAREN> value = additiveExpression(null,0) <COMMA> startPosition = additiveExpression(null,0) [ <COMMA> length = additiveExpression(null,0) ] <RIGHT_PAREN>
+	<SUBSTR> <LEFT_PAREN> value = additiveExpression(null,0,false) <COMMA> startPosition = additiveExpression(null,0,false) [ <COMMA> length = additiveExpression(null,0,false) ] <RIGHT_PAREN>
 	{
         return getSubstringNode( value, startPosition, length, Boolean.FALSE );
 	}
 |
-	( upperTok = <UPPER> | lowerTok = <LOWER> ) <LEFT_PAREN> value = additiveExpression(null,0) <RIGHT_PAREN>
+	( upperTok = <UPPER> | lowerTok = <LOWER> ) <LEFT_PAREN> value = additiveExpression(null,0,false) <RIGHT_PAREN>
 	{
 		return (ValueNode) nodeFactory.getNode(
 					C_NodeTypes.SIMPLE_STRING_OPERATOR_NODE,
@@ -6207,7 +6251,7 @@
 					getContextManager());
 	}
 |
-	( upperTok = <UCASE> | lowerTok = <LCASE> ) <LEFT_PAREN> value = additiveExpression(null,0) <RIGHT_PAREN>
+	( upperTok = <UCASE> | lowerTok = <LCASE> ) <LEFT_PAREN> value = additiveExpression(null,0,false) <RIGHT_PAREN>
 	{
 		return (ValueNode) nodeFactory.getNode(
 					C_NodeTypes.SIMPLE_STRING_OPERATOR_NODE,
@@ -6224,9 +6268,9 @@
     /* LOCATE( string1, string2[, start] )
      * LOCATE is a SQLJ reserved word.
      */
-    <LOCATE> <LEFT_PAREN> str1 = additiveExpression(null,0) <COMMA>
-            str2 = additiveExpression(null,0)
-            [ <COMMA> value = additiveExpression(null,0) ]
+    <LOCATE> <LEFT_PAREN> str1 = additiveExpression(null,0,false) <COMMA>
+            str2 = additiveExpression(null,0,false)
+            [ <COMMA> value = additiveExpression(null,0,false) ]
             <RIGHT_PAREN>
     {
 		// if start is missing, start is equal to 1
@@ -6253,7 +6297,7 @@
 	Integer		trimType;
 }
 {
-	trimType = trimType() <LEFT_PAREN> source = additiveExpression(null,0) <RIGHT_PAREN>
+	trimType = trimType() <LEFT_PAREN> source = additiveExpression(null,0,false) <RIGHT_PAREN>
 	{
 		return (ValueNode) nodeFactory.getNode(
 									C_NodeTypes.TRIM_OPERATOR_NODE,
@@ -6283,9 +6327,12 @@
 
 /*
  * <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() throws StandardException :
+valueExpressionPrimary(boolean inSelectClause) throws StandardException :
 {
 	ValueNode	value;
 	int			tokKind;
@@ -6372,10 +6419,10 @@
 		** is supplied.
 		*/
 		// without the following check, select/values (c1>c2) will not be caught
-		//LOOKAHEAD({inSelectClause})
-		//value = additiveExpression(null,0)
-		//|
-		value = valueExpression()
+		LOOKAHEAD({inSelectClause})
+		value = additiveExpression(null,0, inSelectClause)
+		| //following will happen if we are not coming here for select/values clause
+		value = valueExpression(inSelectClause)
 	)
 	<RIGHT_PAREN>
 	{
@@ -6519,7 +6566,7 @@
 		return value;
 	}
 |
-	<LENGTH> <LEFT_PAREN> value = additiveExpression(null,0) <RIGHT_PAREN>
+	<LENGTH> <LEFT_PAREN> value = additiveExpression(null,0, false) <RIGHT_PAREN>
 	{
 		ContextManager	localCM = getContextManager();
                 if( isJDBCEscape)
@@ -6567,7 +6614,7 @@
 		return value;
 	}
 	|
-	 dts = numericFunctionType() <LEFT_PAREN> operand = additiveExpression(null,0) <RIGHT_PAREN>
+	 dts = numericFunctionType() <LEFT_PAREN> operand = additiveExpression(null,0, false) <RIGHT_PAREN>
 	  {
 			value = (ValueNode) nodeFactory.getNode(
 									C_NodeTypes.CAST_NODE,
@@ -6578,7 +6625,7 @@
 
 			return value;
 	  }
-	 | charType = charOrVarchar() <LEFT_PAREN> operand = additiveExpression(null,0) [ <COMMA> length = length() ] <RIGHT_PAREN>
+	 | charType = charOrVarchar() <LEFT_PAREN> operand = additiveExpression(null,0, false) [ <COMMA> length = length() ] <RIGHT_PAREN>
 	{
 		// Always check db2 limits for this function. It's new
 		checkTypeLimits(charType,length);
@@ -6659,7 +6706,7 @@
 	boolean wsOption;
 }
 {
-	value = additiveExpression(null,0) wsOption = xmlPreserveWhitespace() {
+	value = additiveExpression(null,0,false) wsOption = xmlPreserveWhitespace() {
 		return (ValueNode) nodeFactory.getNode(
 					C_NodeTypes.XML_PARSE_OPERATOR_NODE,
 					value,
@@ -6722,7 +6769,7 @@
 	DataTypeDescriptor targetType;
 }
 {
-	value = additiveExpression(null,0)
+	value = additiveExpression(null,0,false)
 		targetType = xmlSerializeTargetType()
 	{
 		return (ValueNode) nodeFactory.getNode(
@@ -6785,8 +6832,8 @@
 	ValueNode xmlValue;
 }
 {
-	xpathExpr = additiveExpression(null,0)
-		xmlPassingMechanism() xmlValue = additiveExpression(null, 0)
+	xpathExpr = additiveExpression(null,0,false)
+		xmlPassingMechanism() xmlValue = additiveExpression(null, 0, false)
 	{
 		return (ValueNode) nodeFactory.getNode(
 					C_NodeTypes.XML_EXISTS_OPERATOR_NODE,
@@ -6862,7 +6909,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) <RIGHT_PAREN>
+        <TIME> <LEFT_PAREN> value = additiveExpression(null,0, false) <RIGHT_PAREN>
 	{
 		return (ValueNode) nodeFactory.getNode(
 							C_NodeTypes.CAST_NODE,
@@ -6871,7 +6918,7 @@
                                                         getContextManager());
         }
 |
-        <DATE> <LEFT_PAREN> value = additiveExpression(null,0) <RIGHT_PAREN>
+        <DATE> <LEFT_PAREN> value = additiveExpression(null,0, false) <RIGHT_PAREN>
 	{
 		return (ValueNode) nodeFactory.getNode(
 							C_NodeTypes.UNARY_DATE_TIMESTAMP_OPERATOR_NODE,
@@ -6880,12 +6927,12 @@
                                                         getContextManager());
         }
 |
-        <TIMESTAMP> <LEFT_PAREN> value = additiveExpression(null,0) timestampNode = timestampFunctionCompletion( value)
+        <TIMESTAMP> <LEFT_PAREN> value = additiveExpression(null,0, false) timestampNode = timestampFunctionCompletion( value)
 	{
                 return timestampNode;
         }
 |
-        field = datetimeField() <LEFT_PAREN> value = additiveExpression(null,0) <RIGHT_PAREN>
+        field = datetimeField() <LEFT_PAREN> value = additiveExpression(null,0, false) <RIGHT_PAREN>
 	{
 		return (ValueNode) nodeFactory.getNode(
 								C_NodeTypes.EXTRACT_OPERATOR_NODE,
@@ -6914,7 +6961,7 @@
                                                         getContextManager());
         }
 |
-        <COMMA> timeValue = additiveExpression(null,0) <RIGHT_PAREN>
+        <COMMA> timeValue = additiveExpression(null,0, false) <RIGHT_PAREN>
 	{
 		return (ValueNode) nodeFactory.getNode(
 							C_NodeTypes.TIMESTAMP_OPERATOR_NODE,
@@ -6942,11 +6989,6 @@
 	{
 		return tok;
 	}
-|
-	tok = <UNKNOWN>
-	{
-		return tok;
-	}
 }
 
 /*
@@ -7403,7 +7445,7 @@
 	ValueNode columnExpression;
 } 
 {
-	columnExpression = additiveExpression(null,0)
+	columnExpression = additiveExpression(null,0,true)
 	{
 		return (OrderByColumn) nodeFactory.getNode(
 								C_NodeTypes.ORDER_BY_COLUMN,
@@ -7532,7 +7574,7 @@
 	ValueNode	valueNode;
 }
 {
-	valueNode = additiveExpression(null,0) 
+	valueNode = additiveExpression(null,0, false) 
 	{
 		return valueNode;
 	}
@@ -7757,7 +7799,7 @@
 	ValueNode	value;
 }
 {
-	value = additiveExpression(null, 0)
+	value = additiveExpression(null, 0, true)
 	{
 		resultColumns.addResultColumn(
 			(ResultColumn) nodeFactory.getNode(
@@ -7906,7 +7948,7 @@
 	ValueNode valueNode;
 }
 {
-	valueNode = additiveExpression(null, 0)
+	valueNode = additiveExpression(null, 0, false)
 	{
 		inList.addElement(valueNode);
 	}
@@ -8739,7 +8781,7 @@
 }
 {
 	/* valueExpression() was searchCondition() */
-	<ON> joinClause = valueExpression()
+	<ON> joinClause = valueExpression(false)
 	{
 		return joinClause;
 	}
@@ -8891,7 +8933,7 @@
 	ValueNode	value;
 }
 {
-	[ distinct = setQuantifier() ] value = additiveExpression(null, 0)
+	[ distinct = setQuantifier() ] value = additiveExpression(null, 0, false)
 	{
 		return (ValueNode) nodeFactory.getNode(
 								C_NodeTypes.AGGREGATE_NODE,
@@ -9009,7 +9051,7 @@
 	ValueNode value;
 }
 {
-	value = additiveExpression(null, 0)
+	value = additiveExpression(null, 0, false)
 	{
 		return value;
 	}
@@ -9047,7 +9089,7 @@
 }
 {
 	/* valueExpression() was searchCondition() */
-	value = valueExpression()
+	value = valueExpression(false)
 	{
 		endToken = getToken(0);
 
@@ -9107,7 +9149,7 @@
 }
 {
 	/* valueExpression() was searchCondition() */
-	<HAVING> value = valueExpression()
+	<HAVING> value = valueExpression(false)
 	{
 		return value;
 	}
@@ -10093,20 +10135,12 @@
 |
 	tok = booleanLiteral()
 	{
-		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,
+		checkInternalFeature(tok.image);
+		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
@@ -10405,7 +10439,7 @@
 {
 	/* valueExpression() was searchCondition() */
 	<CHECK>  beginToken = 
-		<LEFT_PAREN> value = valueExpression() endToken = <RIGHT_PAREN>
+		<LEFT_PAREN> value = valueExpression(false) endToken = <RIGHT_PAREN>
 	{
 		if (columnName != null)
 		{
@@ -10834,7 +10868,7 @@
 		return value;
 	}
 |
-	<NULLIF> <LEFT_PAREN> leftExpression = additiveExpression(null, 0) <COMMA> rightExpression = additiveExpression(null, 0) <RIGHT_PAREN>
+	<NULLIF> <LEFT_PAREN> leftExpression = additiveExpression(null, 0, false) <COMMA> rightExpression = additiveExpression(null, 0, false) <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
@@ -10907,8 +10941,8 @@
 	ValueNode	   elseExpr;
 }
 {
-	<WHEN> expr = orExpression(null) 
-		   (<OR> expr = orExpression(expr) )*
+	<WHEN> expr = orExpression(null, false) 
+		   (<OR> expr = orExpression(expr, false) )*
 	<THEN> thenExpr = thenElseExpression()
 	elseExpr = caseExpression()
 	{
@@ -10945,7 +10979,7 @@
 										getContextManager()));
 	}
 |
-	expr = additiveExpression(null, 0)
+	expr = additiveExpression(null, 0, false)
 	{
 		return expr;
 	}

Modified: db/derby/code/trunk/java/testing/build.xml
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/build.xml?rev=423976&r1=423975&r2=423976&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/build.xml (original)
+++ db/derby/code/trunk/java/testing/build.xml Thu Jul 20 09:22:18 2006
@@ -46,7 +46,6 @@
     <ant dir="${derby.testing.src.dir}/${derby.testing.unittest.dir}"/> 
     <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/jdk14/metadata.out
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/DerbyNetClient/jdk14/metadata.out?rev=423976&r1=423975&r2=423976&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/DerbyNetClient/jdk14/metadata.out (original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/DerbyNetClient/jdk14/metadata.out Thu Jul 20 09:22:18 2006
@@ -527,43 +527,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[INTEGER],PRECISION[INTEGER],LITERAL_PREFIX[VARCHAR],LITERAL_SUFFIX[VARCHAR],CREATE_PARAMS[VARCHAR],NULLABLE[SMALLINT],CASE_SENSITIVE[BOOLEAN],SEARCHABLE[SMALLINT],UNSIGNED_ATTRIBUTE[BOOLEAN],FIXED_PREC_SCALE[BOOLEAN],AUTO_INCREMENT[BOOLEAN],LOCAL_TYPE_NAME[VARCHAR],MINIMUM_SCALE[SMALLINT],MAXIMUM_SCALE[SMALLINT],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
+TYPE_NAME[VARCHAR],DATA_TYPE[INTEGER],PRECISION[INTEGER],LITERAL_PREFIX[VARCHAR],LITERAL_SUFFIX[VARCHAR],CREATE_PARAMS[VARCHAR],NULLABLE[SMALLINT],CASE_SENSITIVE[SMALLINT],SEARCHABLE[SMALLINT],UNSIGNED_ATTRIBUTE[SMALLINT],FIXED_PREC_SCALE[SMALLINT],AUTO_INCREMENT[SMALLINT],LOCAL_TYPE_NAME[VARCHAR],MINIMUM_SCALE[SMALLINT],MAXIMUM_SCALE[SMALLINT],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
 getIndexInfo():
-TABLE_CAT[VARCHAR],TABLE_SCHEM[VARCHAR],TABLE_NAME[VARCHAR],NON_UNIQUE[BOOLEAN],INDEX_QUALIFIER[VARCHAR],INDEX_NAME[VARCHAR],TYPE[SMALLINT],ORDINAL_POSITION[SMALLINT],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
+TABLE_CAT[VARCHAR],TABLE_SCHEM[VARCHAR],TABLE_NAME[VARCHAR],NON_UNIQUE[SMALLINT],INDEX_QUALIFIER[VARCHAR],INDEX_NAME[VARCHAR],TYPE[SMALLINT],ORDINAL_POSITION[SMALLINT],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
 getIndexInfo():
-TABLE_CAT[VARCHAR],TABLE_SCHEM[VARCHAR],TABLE_NAME[VARCHAR],NON_UNIQUE[BOOLEAN],INDEX_QUALIFIER[VARCHAR],INDEX_NAME[VARCHAR],TYPE[SMALLINT],ORDINAL_POSITION[SMALLINT],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
+TABLE_CAT[VARCHAR],TABLE_SCHEM[VARCHAR],TABLE_NAME[VARCHAR],NON_UNIQUE[SMALLINT],INDEX_QUALIFIER[VARCHAR],INDEX_NAME[VARCHAR],TYPE[SMALLINT],ORDINAL_POSITION[SMALLINT],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
 getIndexInfo():
-TABLE_CAT[VARCHAR],TABLE_SCHEM[VARCHAR],TABLE_NAME[VARCHAR],NON_UNIQUE[BOOLEAN],INDEX_QUALIFIER[VARCHAR],INDEX_NAME[VARCHAR],TYPE[SMALLINT],ORDINAL_POSITION[SMALLINT],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
+TABLE_CAT[VARCHAR],TABLE_SCHEM[VARCHAR],TABLE_NAME[VARCHAR],NON_UNIQUE[SMALLINT],INDEX_QUALIFIER[VARCHAR],INDEX_NAME[VARCHAR],TYPE[SMALLINT],ORDINAL_POSITION[SMALLINT],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
 getColumns('SYSTABLES'):
 TABLE_CAT[VARCHAR],TABLE_SCHEM[VARCHAR],TABLE_NAME[VARCHAR],COLUMN_NAME[VARCHAR],DATA_TYPE[INTEGER],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],SCOPE_CATLOG[VARCHAR],SCOPE_SCHEMA[VARCHAR],SCOPE_TABLE[VARCHAR],SOURCE_DATA_TYPE[SMALLINT],IS_AUTOINCREMENT[VARCHAR]
 ,SYS,SYSTABLES,TABLEID,1,CHAR,36,null,null,null,0,,null,null,null,72,1,NO,null,null,null,null,NO

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/DerbyNetClient/jdk14/syscat.out
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/DerbyNetClient/jdk14/syscat.out?rev=423976&r1=423975&r2=423976&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/DerbyNetClient/jdk14/syscat.out (original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/DerbyNetClient/jdk14/syscat.out Thu Jul 20 09:22:18 2006
@@ -272,65 +272,65 @@
 from sys.systables t, sys.sysconglomerates c
 where t.TABLEID=c.TABLEID
 order by TABLENAME, ISINDEX;
-TABLENAME |ISIN&
+TABLENAME |ISIND&
 -----
-SYSALIASES |false
-SYSALIASES |true 
-SYSALIASES |true 
-SYSALIASES |true 
-SYSCHECKS |false
-SYSCHECKS |true 
-SYSCOLPERMS |false
-SYSCOLPERMS |true 
-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 
-SYSROUTINEPERMS |true 
-SYSSCHEMAS |false
-SYSSCHEMAS |true 
-SYSSCHEMAS |true 
-SYSSTATEMENTS |false
-SYSSTATEMENTS |true 
-SYSSTATEMENTS |true 
-SYSSTATISTICS |false
-SYSSTATISTICS |true 
-SYSTABLEPERMS |false
-SYSTABLEPERMS |true 
-SYSTABLEPERMS |true 
-SYSTABLES |false
-SYSTABLES |true 
-SYSTABLES |true 
-SYSTRIGGERS |false
-SYSTRIGGERS |true 
-SYSTRIGGERS |true 
-SYSTRIGGERS |true 
-SYSVIEWS |false
-SYSVIEWS |true 
+SYSALIASES |0     
+SYSALIASES |1     
+SYSALIASES |1     
+SYSALIASES |1     
+SYSCHECKS |0     
+SYSCHECKS |1     
+SYSCOLPERMS |0     
+SYSCOLPERMS |1     
+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     
+SYSROUTINEPERMS |1     
+SYSSCHEMAS |0     
+SYSSCHEMAS |1     
+SYSSCHEMAS |1     
+SYSSTATEMENTS |0     
+SYSSTATEMENTS |1     
+SYSSTATEMENTS |1     
+SYSSTATISTICS |0     
+SYSSTATISTICS |1     
+SYSTABLEPERMS |0     
+SYSTABLEPERMS |1     
+SYSTABLEPERMS |1     
+SYSTABLES |0     
+SYSTABLES |1     
+SYSTABLES |1     
+SYSTRIGGERS |0     
+SYSTRIGGERS |1     
+SYSTRIGGERS |1     
+SYSTRIGGERS |1     
+SYSVIEWS |0     
+SYSVIEWS |1     
 ij> create table t (i int, s smallint);
 0 rows inserted/updated/deleted
 ij> select TABLENAME, TABLETYPE from sys.systables order by tablename;
@@ -495,66 +495,66 @@
 from sys.systables t, sys.sysconglomerates c
 where t.TABLEID=c.TABLEID
 order by TABLENAME, ISINDEX;
-TABLENAME |ISIN&
+TABLENAME |ISIND&
 -----
-SYSALIASES |false
-SYSALIASES |true 
-SYSALIASES |true 
-SYSALIASES |true 
-SYSCHECKS |false
-SYSCHECKS |true 
-SYSCOLPERMS |false
-SYSCOLPERMS |true 
-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 
-SYSROUTINEPERMS |true 
-SYSSCHEMAS |false
-SYSSCHEMAS |true 
-SYSSCHEMAS |true 
-SYSSTATEMENTS |false
-SYSSTATEMENTS |true 
-SYSSTATEMENTS |true 
-SYSSTATISTICS |false
-SYSSTATISTICS |true 
-SYSTABLEPERMS |false
-SYSTABLEPERMS |true 
-SYSTABLEPERMS |true 
-SYSTABLES |false
-SYSTABLES |true 
-SYSTABLES |true 
-SYSTRIGGERS |false
-SYSTRIGGERS |true 
-SYSTRIGGERS |true 
-SYSTRIGGERS |true 
-SYSVIEWS |false
-SYSVIEWS |true 
-T |false
+SYSALIASES |0     
+SYSALIASES |1     
+SYSALIASES |1     
+SYSALIASES |1     
+SYSCHECKS |0     
+SYSCHECKS |1     
+SYSCOLPERMS |0     
+SYSCOLPERMS |1     
+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     
+SYSROUTINEPERMS |1     
+SYSSCHEMAS |0     
+SYSSCHEMAS |1     
+SYSSCHEMAS |1     
+SYSSTATEMENTS |0     
+SYSSTATEMENTS |1     
+SYSSTATEMENTS |1     
+SYSSTATISTICS |0     
+SYSSTATISTICS |1     
+SYSTABLEPERMS |0     
+SYSTABLEPERMS |1     
+SYSTABLEPERMS |1     
+SYSTABLES |0     
+SYSTABLES |1     
+SYSTABLES |1     
+SYSTRIGGERS |0     
+SYSTRIGGERS |1     
+SYSTRIGGERS |1     
+SYSTRIGGERS |1     
+SYSVIEWS |0     
+SYSVIEWS |1     
+T |0     
 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/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/aggregate.out?rev=423976&r1=423975&r2=423976&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 Thu Jul 20 09:22:18 2006
@@ -214,14 +214,7 @@
 WARNING 01003: Null values were eliminated from the argument of a column function.
 ij> -- binary list operator
 select (1 in (1,2)), count(c1) from t1 group by c1;
-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.
+ERROR 42X01: Syntax error: Encountered "in" at line 2, column 11.
 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/cast.out
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/cast.out?rev=423976&r1=423975&r2=423976&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/cast.out (original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/cast.out Thu Jul 20 09:22:18 2006
@@ -1591,9 +1591,7 @@
 ij> -- test some casting from a java type to standard SQL types.
 -- should all fail at runtime
 select cast (aliasinfo as BOOLEAN) from sys.sysaliases;
-1    
------
-ERROR XCL12: An attempt was made to put a data value of type 'org.apache.derby.catalog.types.RoutineAliasInfo' into a data value of type 'BOOLEAN'.
+ERROR 42X01: Syntax error: BOOLEAN.
 ij> select cast (aliasinfo as SMALLINT) from sys.sysaliases;
 1     
 ------

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/db2Compatibility.out
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/db2Compatibility.out?rev=423976&r1=423975&r2=423976&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 Thu Jul 20 09:22:18 2006
@@ -134,8 +134,10 @@
 ij> drop schema "sysok" restrict;
 0 rows inserted/updated/deleted
 ij> -- data types not supported
-create table NOTYPE(i int, b TINYINT);
-ERROR 42X01: Syntax error: Encountered "" at line 2, column 30.
+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.
 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);
@@ -404,8 +406,10 @@
 0 rows inserted/updated/deleted
 ij> -- INSTANCEOF in where clause of select, delete, update,
 -- beetle 5224
-create table mm (x org.apache.derbyTesting.functionTests.util.ManyMethods);
-ERROR 42X01: Syntax error: Encountered "" at line 3, column 20.
+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.
 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;
@@ -452,6 +456,9 @@
 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);
@@ -906,6 +913,21 @@
 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/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/implicitConversions.out?rev=423976&r1=423975&r2=423976&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 Thu Jul 20 09:22:18 2006
@@ -2596,15 +2596,9 @@
 ij> values 'a', 1.1;
 ERROR 42X61: Types 'CHAR' and 'DECIMAL' are not UNION compatible.
 ij> values true, 'a';
-1    
------
-true 
-true 
+ERROR 42X01: Syntax error: true.
 ij> values 'a', true;
-1    
------
-true 
-true 
+ERROR 42X01: Syntax error: 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/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/logop.out?rev=423976&r1=423975&r2=423976&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 Thu Jul 20 09:22:18 2006
@@ -251,25 +251,18 @@
 X          
 -----------
 1          
-ij> select ( not ( (1 = 1) or (2 = 2) ) and (3 = 4) ) from s;
-1    
------
-false
+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 10.
 ij> --
 select ( not ( ( (1 = 1) or (2 = 2) ) and (3 = 4) ) ) from s;
-1    
------
-true 
+ERROR 42X01: Syntax error: Encountered "not" at line 2, column 10.
 ij> --
 select ( (1 = 2) and not ( (3 = 3) or (4 = 4) ) ) from s;
-1    
------
-false
+ERROR 42X01: Syntax error: Encountered "=" at line 2, column 13.
 ij> --
 select ( not ( (1 = 2) and ( (3 = 3) or (4 = 4) ) ) ) from s;
-1    
------
-true 
+ERROR 42X01: Syntax error: Encountered "not" at line 2, column 10.
 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/procedureInTrigger.out
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/procedureInTrigger.out?rev=423976&r1=423975&r2=423976&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/procedureInTrigger.out (original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/procedureInTrigger.out Thu Jul 20 09:22:18 2006
@@ -804,7 +804,7 @@
 1          |2          
 2          |4          
 ij> --- check index is not created
-select count(*) from SYS.SYSCONGLOMERATES where CONGLOMERATENAME='IX' and ISINDEX=true;
+select count(*) from SYS.SYSCONGLOMERATES where CONGLOMERATENAME='IX' and ISINDEX=1;
 1          
 -----------
 0          
@@ -828,7 +828,7 @@
 6          |four           
 8          |eight          
 ij> --- check index is not dropped
-select count(*) from SYS.SYSCONGLOMERATES where CONGLOMERATENAME='IX' and ISINDEX=true;
+select count(*) from SYS.SYSCONGLOMERATES where CONGLOMERATENAME='IX' and ISINDEX=1;
 1          
 -----------
 1          

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/schemas.out
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/schemas.out?rev=423976&r1=423975&r2=423976&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 Thu Jul 20 09:22:18 2006
@@ -717,16 +717,13 @@
 I          |S     |C                             |VC                            
 --------------------------------------------------------------------------------
 ij> -- correlated subqueries
+-- exists disallowed in select clause
 select (exists (select * from test.ttt 
 				where iii = (select 11 from test.tt where ii = i and ii <> 1)) )
 a
 from test.s
 order by a;
-A    
------
-NULL 
-NULL 
-true 
+ERROR 42X01: Syntax error: Encountered "exists" at line 4, column 9.
 ij> -- negative tests
 -- multiple matches at parent level
 select * from test.s, test.t where exists (select i from test.tt);

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/subquery.out
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/subquery.out?rev=423976&r1=423975&r2=423976&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 Thu Jul 20 09:22:18 2006
@@ -467,23 +467,11 @@
 -----------------------------------------------------------------------------------------------------
 ij> -- select list
 select ( i in (select i from t) ) a from s order by a;
-A    
------
-false
-true 
-true 
+ERROR 42X01: Syntax error: Encountered "in" at line 2, column 12.
 ij> select ( i in (select i from t where 1 = 0) ) a from s order by a;
-A    
------
-false
-false
-false
+ERROR 42X01: Syntax error: Encountered "in" at line 1, column 12.
 ij> select ( (i in (select i from t where 1 = 0)) is null ) a from s order by a;
-A    
------
-false
-false
-false
+ERROR 42X01: Syntax error: Encountered "in" at line 1, column 13.
 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/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/valuesclause.out?rev=423976&r1=423975&r2=423976&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 Thu Jul 20 09:22:18 2006
@@ -160,34 +160,22 @@
 ij> remove v2;
 ij> -- type precedence tests. tinyint not supported by DB2 Cloudscape
 values (1 = 1.2);
-1    
------
-false
+ERROR 42X01: Syntax error: Encountered "=" at line 2, column 11.
 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);
-1    
------
-false
+ERROR 42X01: Syntax error: Encountered "=" at line 2, column 13.
 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));
-1    
------
-true 
+ERROR 42X01: Syntax error: Encountered "=" at line 2, column 11.
 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));
-1    
------
-true 
+ERROR 42X01: Syntax error: Encountered "=" at line 2, column 11.
 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);
-1    
------
-true 
+ERROR 42X01: Syntax error: Encountered "=" at line 2, column 27.
 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);
-1    
------
-true 
+ERROR 42X01: Syntax error: Encountered "=" at line 2, column 29.
 ij> -- inserts
 create table insert_test1 (c1 int);
 0 rows inserted/updated/deleted
@@ -433,14 +421,10 @@
 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');
-1    
------
-true 
+ERROR 42X01: Syntax error: Encountered "=" at line 2, column 27.
 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;
-1    
------
-true 
+ERROR 42X01: Syntax error: Encountered "=" at line 2, column 27.
 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.
@@ -470,24 +454,16 @@
 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);
-1    
------
-false
+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
 select (c1 < 2) from t1;
-1    
------
-true 
+ERROR 42X01: Syntax error: Encountered "<" at line 2, column 12.
 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);
-1    
------
-false
+ERROR 42X01: Syntax error: Encountered "between" at line 2, column 11.
 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;
-1    
------
-true 
+ERROR 42X01: Syntax error: Encountered "between" at line 2, column 12.
 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.
@@ -536,7 +512,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 17.
+ERROR 42X01: Syntax error: Encountered "=" at line 2, column 15.
 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/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/suites/derbylang.runall?rev=423976&r1=423975&r2=423976&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 Thu Jul 20 09:22:18 2006
@@ -1,7 +1,6 @@
 jdbcapi/metadata.java
 jdbcapi/metadataMultiConn.java
 jdbcapi/odbc_metadata.java
-junitTests/lang/LangSuite.java
 lang/AIjdbc.java
 lang/AggregateClassLoading.java
 lang/CharUTF8.java



Mime
View raw message