db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kmars...@apache.org
Subject svn commit: r558801 - in /db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests: master/ tests/jdbcapi/ tests/lang/ tests/nist/
Date Mon, 23 Jul 2007 17:11:25 GMT
Author: kmarsden
Date: Mon Jul 23 10:11:21 2007
New Revision: 558801

URL: http://svn.apache.org/viewvc?view=rev&rev=558801
Log:
DERBY-2962 Change functional tests to use casts for System table queries to avoid conversion errors when run with TERRITORY_BASED collation


Modified:
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/LOB.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/dml058.out
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/dml061.out
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/ejbql.out
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/floattypes.out
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/miscerrors.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/update.out
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/views.out
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/xts730.out
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/BatchUpdateTest.java
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/ParameterMetaDataJdbc30Test.java
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/ErrorCodeTest.java
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/FullCollationTests.java
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/JitTest.java
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/LOB.sql
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/ProcedureInTriggerTest.java
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/ReleaseCompileLocksTest.java
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/ResultSetsFromPreparedStatementTest.java
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/cast.sql
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/ejbql.sql
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/floattypes.sql
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/miscerrors.sql
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/schemas.sql
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/update.sql
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/views.sql
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/nist/dml058.sql
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/nist/dml061.sql
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/nist/xts730.sql

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/LOB.out
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/LOB.out?view=diff&rev=558801&r1=558800&r2=558801
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/LOB.out (original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/LOB.out Mon Jul 23 10:11:21 2007
@@ -694,7 +694,7 @@
 0 rows inserted/updated/deleted
 ij> SELECT CAST (TABLENAME AS CHAR(10)) AS T, CAST (COLUMNNAME AS CHAR(10)) AS C, CAST (COLUMNDATATYPE AS CHAR(30)) AS Y
 	FROM SYS.SYSTABLES T, SYS.SYSSCHEMAS S, SYS.SYSCOLUMNS C
-	WHERE S.SCHEMAID = T.SCHEMAID AND S.SCHEMANAME = 'DB2LIM'
+	WHERE S.SCHEMAID = T.SCHEMAID AND CAST(S.SCHEMANAME AS VARCHAR(128))= 'DB2LIM'
 	AND C.REFERENCEID = T.TABLEID
 	ORDER BY 1;
 T         |C         |Y                             

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?view=diff&rev=558801&r1=558800&r2=558801
==============================================================================
--- 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 Mon Jul 23 10:11:21 2007
@@ -1659,20 +1659,20 @@
 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 'BLOB'.
-ij> select cast (aliasinfo as CLOB) from sys.sysaliases where alias = 'INSTALL_JAR';
+ij> select cast (aliasinfo as CLOB) from sys.sysaliases where CAST(alias AS VARCHAR(128))  = 'INSTALL_JAR';
 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 'CLOB'.
 ij> -- Java casts to character types excluding CLOB are supported using Object.toString
-select cast (aliasinfo as CHAR(240)) from sys.sysaliases where alias = 'INSTALL_JAR';
+select cast (aliasinfo as CHAR(240)) from sys.sysaliases where CAST(alias AS VARCHAR(128)) = 'INSTALL_JAR';
 1                                                                                                                               
 --------------------------------------------------------------------------------------------------------------------------------
 INSTALL_JAR(IN URL VARCHAR(256),IN JAR VARCHAR(128),IN DEPLOY INTEGER) LANGUAGE JAVA PARAMETER STYLE JAVA MODIFIES SQL DATA    &
-ij> select cast (aliasinfo as VARCHAR(240)) from sys.sysaliases where alias = 'INSTALL_JAR';
+ij> select cast (aliasinfo as VARCHAR(240)) from sys.sysaliases where CAST(alias AS VARCHAR(128)) = 'INSTALL_JAR';
 1                                                                                                                               
 --------------------------------------------------------------------------------------------------------------------------------
 INSTALL_JAR(IN URL VARCHAR(256),IN JAR VARCHAR(128),IN DEPLOY INTEGER) LANGUAGE JAVA PARAMETER STYLE JAVA MODIFIES SQL DATA     
-ij> select cast (aliasinfo as LONG VARCHAR) from sys.sysaliases where alias = 'INSTALL_JAR';
+ij> select cast (aliasinfo as LONG VARCHAR) from sys.sysaliases where CAST(alias AS VARCHAR(128)) = 'INSTALL_JAR';
 1                                                                                                                               
 --------------------------------------------------------------------------------------------------------------------------------
 INSTALL_JAR(IN URL VARCHAR(256),IN JAR VARCHAR(128),IN DEPLOY INTEGER) LANGUAGE JAVA PARAMETER STYLE JAVA MODIFIES SQL DATA     

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/dml058.out
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/dml058.out?view=diff&rev=558801&r1=558800&r2=558801
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/dml058.out (original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/dml058.out Mon Jul 23 10:11:21 2007
@@ -238,7 +238,7 @@
 
 -- setup
      INSERT INTO T4
-          VALUES(USER,100,'good','luck');
+          VALUES(CAST(USER AS VARCHAR(128)),100,'good','luck');
 1 row inserted/updated/deleted
 ij> -- PASS:0255 If 1 row is inserted?
 
@@ -257,7 +257,7 @@
 ij> -- PASS:0255 If 1 row is inserted?
 
      UPDATE T4
-          SET STR110 = USER
+          SET STR110 = CAST(USER AS VARCHAR(128))
           WHERE NUM6 = 101;
 1 row inserted/updated/deleted
 ij> -- PASS:0255 If 1 row is updated?
@@ -291,7 +291,7 @@
 
      SELECT STR110 
           FROM T4
-          WHERE STR110 = USER;
+          WHERE STR110 = CAST(USER AS VARCHAR(128));
 STR110                                                                                                        
 --------------------------------------------------------------------------------------------------------------
 HU                                                                                                            
@@ -304,7 +304,7 @@
 ij> -- PASS:0256 If 1 row is inserted?
 
      DELETE FROM T4
-            WHERE STR110 = USER;
+            WHERE STR110 = CAST(USER AS VARCHAR(128));
 1 row inserted/updated/deleted
 ij> -- PASS:0256 If 1 row is deleted?
 

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/dml061.out
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/dml061.out?view=diff&rev=558801&r1=558800&r2=558801
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/dml061.out (original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/dml061.out Mon Jul 23 10:11:21 2007
@@ -186,7 +186,7 @@
 
           SELECT COUNT(*)
           FROM STAFF
-          WHERE EMPNAME IN (USER,'Betty','Carmen');
+          WHERE EMPNAME IN (CAST(USER AS VARCHAR(128)),'Betty','Carmen');
 1          
 -----------
 3          

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/ejbql.out
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/ejbql.out?view=diff&rev=558801&r1=558800&r2=558801
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/ejbql.out (original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/ejbql.out Mon Jul 23 10:11:21 2007
@@ -715,7 +715,7 @@
 1                     |2            
 ------------------------------------
 ij> select columnname, columndatatype
-from sys.syscolumns c, sys.systables t where c.referenceid = t.tableid and t.tablename='MYFLOAT';
+from sys.syscolumns c, sys.systables t where c.referenceid = t.tableid and CAST(t.tablename AS VARCHAR(128)) ='MYFLOAT';
 COLUMNNAME                                                                                                                      |COLUMNDATATYPE 
 ------------------------------------------------------------------------------------------------------------------------------------------------
 A                                                                                                                               |DOUBLE         
@@ -3236,7 +3236,7 @@
 1                     |2                     
 ---------------------------------------------
 ij> select columnname, columndatatype
-from sys.syscolumns c, sys.systables t where c.referenceid = t.tableid and t.tablename='MYFLOAT';
+from sys.syscolumns c, sys.systables t where c.referenceid = t.tableid and CAST(t.tablename AS VARCHAR(128)) = 'MYFLOAT';
 COLUMNNAME                                                                                                                      |COLUMNDATATYPE 
 ------------------------------------------------------------------------------------------------------------------------------------------------
 A                                                                                                                               |DOUBLE         

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/floattypes.out
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/floattypes.out?view=diff&rev=558801&r1=558800&r2=558801
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/floattypes.out (original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/floattypes.out Mon Jul 23 10:11:21 2007
@@ -30,7 +30,7 @@
 0 rows inserted/updated/deleted
 ij> select columndatatype 
 	from sys.syscolumns 
-	where columnname like 'TMPCOL%';
+	where CAST(columnname AS VARCHAR(128)) like 'TMPCOL%';
 COLUMNDATATYPE 
 ---------------
 DECIMAL(8,4)   
@@ -366,7 +366,7 @@
 1 row inserted/updated/deleted
 ij> select columnname, columndatatype 
        from sys.syscolumns c, sys.systables t 
-       where c.referenceid = t .tableid and t.tablename='TMP';
+       where c.referenceid = t .tableid and CAST(t.tablename AS VARCHAR(128)) ='TMP';
 COLUMNNAME                                                                                                                      |COLUMNDATATYPE 
 ------------------------------------------------------------------------------------------------------------------------------------------------
 X                                                                                                                               |DOUBLE         
@@ -1626,7 +1626,7 @@
 0 rows inserted/updated/deleted
 ij> select columnname, columndatatype 
 from sys.syscolumns c, sys.systables t
-where c.referenceid = t.tableid and t.tablename='T';
+where c.referenceid = t.tableid and CAST(t.tablename AS VARCHAR(128)) ='T';
 COLUMNNAME                                                                                                                      |COLUMNDATATYPE 
 ------------------------------------------------------------------------------------------------------------------------------------------------
 D                                                                                                                               |DOUBLE         

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/miscerrors.out
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/miscerrors.out?view=diff&rev=558801&r1=558800&r2=558801
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/miscerrors.out (original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/miscerrors.out Mon Jul 23 10:11:21 2007
@@ -53,18 +53,19 @@
 1          
 -----------
 1          
-ij> select SQL_TEXT from syscs_diag.statement_cache where SQL_TEXT LIKE '%932432%';
+ij> select SQL_TEXT from syscs_diag.statement_cache where CAST(SQL_TEXT AS LONG VARCHAR) LIKE '%932432%';
 SQL_TEXT                                                                                                                        
 --------------------------------------------------------------------------------------------------------------------------------
-select SQL_TEXT from syscs_diag.statement_cache where SQL_TEXT LIKE '%932432%'                                                  
+select SQL_TEXT from syscs_diag.statement_cache where CAST(SQL_TEXT AS LONG VARCHAR) LIKE '%932432%'                            
 ij> VALUES FRED932432;
 ERROR 42X04: Column 'FRED932432' is either not in any table in the FROM list or appears within a join specification and is outside the scope of the join specification or appears in a HAVING clause and is not in the GROUP BY list. If this is a CREATE or ALTER TABLE  statement then 'FRED932432' is not a column in the target table.
 ij> SELECT * FROM BILL932432;
 ERROR 42X05: Table/View 'BILL932432' does not exist.
 ij> SELECT 932432;
 ERROR 42X01: Syntax error: Encountered "<EOF>" at line 1, column 13.
-ij> select SQL_TEXT from syscs_diag.statement_cache where SQL_TEXT LIKE '%932432%';
+ij> select SQL_TEXT from syscs_diag.statement_cache where CAST(SQL_TEXT  AS LONG VARCHAR) LIKE '%932432%';
 SQL_TEXT                                                                                                                        
 --------------------------------------------------------------------------------------------------------------------------------
-select SQL_TEXT from syscs_diag.statement_cache where SQL_TEXT LIKE '%932432%'                                                  
+select SQL_TEXT from syscs_diag.statement_cache where CAST(SQL_TEXT AS LONG VARCHAR) LIKE '%932432%'                            
+select SQL_TEXT from syscs_diag.statement_cache where CAST(SQL_TEXT  AS LONG VARCHAR) LIKE '%932432%'                           
 ij> 

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?view=diff&rev=558801&r1=558800&r2=558801
==============================================================================
--- 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 Mon Jul 23 10:11:21 2007
@@ -400,7 +400,7 @@
 ij> -- verify it
 select schemaname, authorizationid 
 	from sys.sysschemas 
-	where schemaname = 'TEST';
+	where CAST(schemaname AS VARCHAR(128)) = 'TEST';
 SCHEMANAME                                                                                                                      |AUTHORIZATIONID                                                                                                                 
 -----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
 TEST                                                                                                                            |APP                                                                                                                             
@@ -416,7 +416,7 @@
 ij> -- verify it
 select schemaname, tablename, descriptor
 	from sys.sysschemas s, sys.sysconglomerates c , sys.systables t
-	where t.tablename = 'SAMPLETAB' 
+	where CAST(t.tablename AS VARCHAR(128)) = 'SAMPLETAB' 
 		and s.schemaid = c.schemaid
 		and c.tableid = t.tableid;
 SCHEMANAME                                                                                                                      |TABLENAME                                                                                                                       |DESCRIPTOR     
@@ -446,7 +446,7 @@
 --
 select schemaname, tablename, descriptor as descr
 from sys.sysschemas s, sys.sysconglomerates c , sys.systables t
-where t.tablename = 'SAMPLETAB' 
+where CAST(t.tablename AS VARCHAR(128)) = 'SAMPLETAB' 
 	and s.schemaid = c.schemaid
 	and c.tableid = t.tableid
 order by schemaname, tablename;
@@ -931,7 +931,7 @@
 ij> -- check declare of a temp table does not create a SESSION schema.
 DECLARE GLOBAL TEMPORARY TABLE SESSION.ISCT(c21 int) on commit delete rows not logged;
 0 rows inserted/updated/deleted
-ij> select count(*) from SYS.SYSSCHEMAS WHERE SCHEMANAME = 'SESSION';
+ij> select count(*) from SYS.SYSSCHEMAS WHERE CAST(SCHEMANAME AS VARCHAR(128)) = 'SESSION';
 1          
 -----------
 0          

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/update.out
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/update.out?view=diff&rev=558801&r1=558800&r2=558801
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/update.out (original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/update.out Mon Jul 23 10:11:21 2007
@@ -438,7 +438,7 @@
 ij> -- default read committed isolation level
 update tab1 set c2 = c2 + 3 where c1 = 1;
 1 row inserted/updated/deleted
-ij> select type, mode from syscs_diag.lock_table where tablename = 'TAB1' order by type;
+ij> select type, mode from syscs_diag.lock_table where CAST(tablename AS VARCHAR(128)) = 'TAB1' order by type;
 TYPE |MODE
 ----------
 ROW  |X   
@@ -449,7 +449,7 @@
 0 rows inserted/updated/deleted
 ij> update tab1 set c2 = c2 + 3 where c1 = 1;
 1 row inserted/updated/deleted
-ij> select type, mode from syscs_diag.lock_table where tablename = 'TAB1' order by type;
+ij> select type, mode from syscs_diag.lock_table where CAST(tablename AS VARCHAR(128))  = 'TAB1' order by type;
 TYPE |MODE
 ----------
 ROW  |X   

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/views.out
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/views.out?view=diff&rev=558801&r1=558800&r2=558801
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/views.out (original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/views.out Mon Jul 23 10:11:21 2007
@@ -252,7 +252,7 @@
 0 rows inserted/updated/deleted
 ij> -- verify the consistency of the indexes on the system catalogs
 select tablename, SYSCS_UTIL.SYSCS_CHECK_TABLE('SYS', tablename)
-from sys.systables where tabletype = 'S' and tablename != 'SYSDUMMY1';
+from sys.systables where CAST(tabletype AS CHAR(1)) = 'S' and CAST(tablename AS VARCHAR(128)) != 'SYSDUMMY1';
 TABLENAME                                                                                                                       |2          
 --------------------------------------------------------------------------------------------------------------------------------------------
 SYSCONGLOMERATES                                                                                                                |1          
@@ -318,7 +318,7 @@
 0 rows inserted/updated/deleted
 ij> -- verify the consistency of the indexes on the system catalogs
 select tablename, SYSCS_UTIL.SYSCS_CHECK_TABLE('SYS', tablename)
-from sys.systables where tabletype = 'S' and tablename != 'SYSDUMMY1';
+from sys.systables where CAST(tabletype as CHAR(1)) = 'S' and CAST(tablename  as VARCHAR(128)) != 'SYSDUMMY1';
 TABLENAME                                                                                                                       |2          
 --------------------------------------------------------------------------------------------------------------------------------------------
 SYSCONGLOMERATES                                                                                                                |1          

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/xts730.out
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/xts730.out?view=diff&rev=558801&r1=558800&r2=558801
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/xts730.out (original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/xts730.out Mon Jul 23 10:11:21 2007
@@ -45,24 +45,24 @@
 
    COMMIT WORK;
 ij> --O   SELECT  COUNT(*)  
-   SELECT   tablename 
+   SELECT   CAST(tablename AS VARCHAR(128))
 --O         FROM INFORMATION_SCHEMA.TABLES
 	from sys.systables
 --O         WHERE TABLE_SCHEMA = 'CTS1' 
 	where
 --O         AND TABLE_TYPE = 'BASE TABLE'
-          TABLETYPE = 'T'
+          CAST(TABLETYPE AS CHAR(1)) = 'T'
 --O         AND ( TABLE_NAME = 'LONGIDENTIFIERSAAAA'
 --O            OR TABLE_NAME = 'longidentifiersaaab'
 --O            OR TABLE_NAME = '0"LONGIDENTIFIERS_1'
 --O            OR TABLE_NAME = '0"LONGIDENTIFIERS_2'
 --O            OR TABLE_NAME = 'lngIDENTIFIER% .,()' );
-         AND ( TABLENAME = 'LONGIDENTIFIERSAAAA'
-            OR TABLENAME = 'longidentifiersaaab'
-            OR TABLENAME = '0"LONGIDENTIFIERS_1'
-            OR TABLENAME = '0"LONGIDENTIFIERS_2'
-            OR TABLENAME = 'lngIDENTIFIER% .,()' );
-TABLENAME                                                                                                                       
+         AND ( CAST(TABLENAME AS VARCHAR(128)) = 'LONGIDENTIFIERSAAAA'
+            OR CAST(TABLENAME AS VARCHAR(128)) = 'longidentifiersaaab'
+            OR CAST(TABLENAME AS VARCHAR(128)) = '0"LONGIDENTIFIERS_1'
+            OR CAST(TABLENAME AS VARCHAR(128)) = '0"LONGIDENTIFIERS_2'
+            OR CAST(TABLENAME AS VARCHAR(128)) = 'lngIDENTIFIER% .,()' );
+1                                                                                                                               
 --------------------------------------------------------------------------------------------------------------------------------
 LONGIDENTIFIERSAAAA                                                                                                             
 longidentifiersaaab                                                                                                             

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/BatchUpdateTest.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/BatchUpdateTest.java?view=diff&rev=558801&r1=558800&r2=558801
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/BatchUpdateTest.java (original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/BatchUpdateTest.java Mon Jul 23 10:11:21 2007
@@ -246,10 +246,10 @@
         int expectedCount[] = {0,0,0};
         assertBatchUpdateCounts(expectedCount, stmt.executeBatch());
         ResultSet rs = stmt.executeQuery(
-            "select count(*) from SYS.SYSTABLES where tablename like 'DDL%'");
+            "select count(*) from SYS.SYSTABLES where CAST(tablename AS VARCHAR(128)) like 'DDL%'");
         JDBC.assertSingleValueResultSet(rs, "2");
         rs = stmt.executeQuery(
-            "select count(*) from SYS.SYSALIASES where alias like 'DDL%'");
+            "select count(*) from SYS.SYSALIASES where CAST(alias AS VARCHAR(128)) like 'DDL%'");
         JDBC.assertSingleValueResultSet(rs, "1");
         stmt.close();
 

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/ParameterMetaDataJdbc30Test.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/ParameterMetaDataJdbc30Test.java?view=diff&rev=558801&r1=558800&r2=558801
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/ParameterMetaDataJdbc30Test.java (original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/ParameterMetaDataJdbc30Test.java Mon Jul 23 10:11:21 2007
@@ -230,7 +230,7 @@
       		 * getParameterMetaData().
 		 */
       		ps = prepareStatement("select * from sys.systables where " +
-             			      " tablename like ? and tableID like ?");
+             			      " CAST(tablename AS VARCHAR(128)) like ? and CAST(tableID AS CHAR(36)) like ?");
       		ps.setString (1, "SYS%");
       		ps.setString (2, "8000001%");
       		paramMetaData = ps.getParameterMetaData();
@@ -263,7 +263,7 @@
 
       		//variation 1, testing DERBY-44 
       		PreparedStatement ps = prepareStatement("select * from sys.systables " +
-							"where tablename like ? escape ?");
+							"where CAST(tablename AS VARCHAR(128)) like ? escape CAST(? AS VARCHAR(128))");
       		ps.setString (1, "SYS%");
       		ps.setString (2, "");
       		ParameterMetaData paramMetaData = ps.getParameterMetaData();
@@ -304,8 +304,8 @@
                  * orig: ps = con.prepareStatement("execute statement systab using values('SYS%','8000001%')");
 		 */
       		PreparedStatement ps = prepareStatement("select * from sys.systables " + 
-							"where tablename like 'SYS%' and " + 
-							"tableID like '8000001%'");
+							"where CAST(tablename AS VARCHAR(128)) like 'SYS%' and " + 
+							"CAST(tableID AS VARCHAR(128)) like '8000001%'");
 
       		ParameterMetaData paramMetaData = ps.getParameterMetaData();
 		assertEquals("Unexpected parameter count", 0, paramMetaData.getParameterCount());

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/ErrorCodeTest.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/ErrorCodeTest.java?view=diff&rev=558801&r1=558800&r2=558801
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/ErrorCodeTest.java (original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/ErrorCodeTest.java Mon Jul 23 10:11:21 2007
@@ -85,7 +85,7 @@
        // -- test ErrorMessages VTI        
         rs = s.executeQuery(
             "select * from SYSCS_DIAG.error_Messages  where "
-            + "sql_state = '07000'");
+            + "CAST(sql_state AS CHAR(5)) = '07000'");
          
         String [][] expRS = new String [][]
         {

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/FullCollationTests.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/FullCollationTests.java?view=diff&rev=558801&r1=558800&r2=558801
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/FullCollationTests.java (original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/FullCollationTests.java Mon Jul 23 10:11:21 2007
@@ -38,9 +38,6 @@
     /**
      * Return a suite that uses a single use database with
      * a primary fixture from this test plus all tests
-     * @param locale Locale to use for the database
-     * @param baseFixture Base fixture from this test.
-     * @return suite of tests to run for the given locale
      */
     public static Test suite() 
     {
@@ -49,6 +46,7 @@
         suite.addTest(org.apache.derbyTesting.functionTests.tests.lang._Suite.suite());
         suite.addTest(org.apache.derbyTesting.functionTests.tests.jdbcapi._Suite.suite());
         suite.addTest(org.apache.derbyTesting.functionTests.tests.store._Suite.suite());
+        
         return Decorator.territoryCollatedDatabase(suite, "no_NO");
     }
 

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/JitTest.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/JitTest.java?view=diff&rev=558801&r1=558800&r2=558801
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/JitTest.java (original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/JitTest.java Mon Jul 23 10:11:21 2007
@@ -54,7 +54,7 @@
     } catch (Exception e) {
     	System.out.println("FAIL -- unexpected exception "+e);
     	JDBCDisplayUtil.ShowException(System.out, e);
-      	e.printStackTrace();
+      	e.printStackTrace(System.out);
     }
   }
   
@@ -128,7 +128,7 @@
   		Statement stmt = conn.createStatement();
   		ResultSet rs =stmt.executeQuery("select count(autoincrementstart) from"+
   				" sys.syscolumns c, sys.systables t, sys.sysschemas s WHERE"+
-				" t.schemaid =  s.schemaid and s.schemaname = 'APP' and"+
+				" t.schemaid =  s.schemaid and CAST(s.schemaname AS VARCHAR(128))= 'APP' and"+
 				" autoincrementstart > " +  maxautoincrementstart);
 
   		rs.next();
@@ -141,8 +141,8 @@
   		{
   			rs =stmt.executeQuery("select tablename, columnname,"+
   					" autoincrementstart from sys.syscolumns c, sys.systables t,"+
-					" sys.sysschemas s WHERE t.schemaid = s.schemaid and"+
-					" s.schemaname = 'APP' and autoincrementstart > 2 ORDER"+
+					" CAST(sys.sysschemas AS VARCHAR(128)) s WHERE t.schemaid = s.schemaid and"+
+					" CAST(s.schemaname AS VARCHAR(128)) = 'APP' and autoincrementstart > 2 ORDER"+
 					" BY tablename");
   			while (rs.next())
   			{
@@ -169,7 +169,7 @@
   		System.out.println("Drop all tables in APP schema");
   		ResultSet rs = stmt1.executeQuery("SELECT tablename from sys.systables"+
   				" t, sys.sysschemas s where t.schemaid = s.schemaid and"+
-				" s.schemaname = 'APP'");
+				" CAST(s.schemaname AS VARCHAR(128)) = 'APP'");
 
   		while (rs.next())
   		{

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/LOB.sql
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/LOB.sql?view=diff&rev=558801&r1=558800&r2=558801
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/LOB.sql (original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/LOB.sql Mon Jul 23 10:11:21 2007
@@ -441,7 +441,7 @@
 
 SELECT CAST (TABLENAME AS CHAR(10)) AS T, CAST (COLUMNNAME AS CHAR(10)) AS C, CAST (COLUMNDATATYPE AS CHAR(30)) AS Y
 	FROM SYS.SYSTABLES T, SYS.SYSSCHEMAS S, SYS.SYSCOLUMNS C
-	WHERE S.SCHEMAID = T.SCHEMAID AND S.SCHEMANAME = 'DB2LIM'
+	WHERE S.SCHEMAID = T.SCHEMAID AND CAST(S.SCHEMANAME AS VARCHAR(128))= 'DB2LIM'
 	AND C.REFERENCEID = T.TABLEID
 	ORDER BY 1;
 

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/ProcedureInTriggerTest.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/ProcedureInTriggerTest.java?view=diff&rev=558801&r1=558800&r2=558801
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/ProcedureInTriggerTest.java (original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/ProcedureInTriggerTest.java Mon Jul 23 10:11:21 2007
@@ -308,25 +308,25 @@
         Statement s = createStatement();
         ResultSet rs;
         assertStatementError("42Y03",s,"create trigger call_non_existent_proc1 AFTER insert on t2 for each ROW call non_existent_proc()");
-          rs = s.executeQuery("select count(*) from SYS.SYSTRIGGERS where triggername='CALL_NON_EXISTENT_PROC1'");
+          rs = s.executeQuery("select count(*) from SYS.SYSTRIGGERS where CAST(triggername AS VARCHAR(128))='CALL_NON_EXISTENT_PROC1'");
           JDBC.assertFullResultSet(rs, new String[][] {{"0"}});
           assertStatementError("42Y03",s,"create trigger call_proc_with_non_existent_proc2 AFTER insert on t2 for each ROW call new_schema.non_existent_proc()");
-          rs = s.executeQuery("select count(*) from SYS.SYSTRIGGERS where triggername='CALL_NON_EXISTENT_PROC2'");
+          rs = s.executeQuery("select count(*) from SYS.SYSTRIGGERS where CAST(triggername AS VARCHAR(128))='CALL_NON_EXISTENT_PROC2'");
           JDBC.assertFullResultSet(rs, new String[][] {{"0"}});
           assertStatementError("42Y07",s,"create trigger call_proc_in_non_existent_schema AFTER insert on t2 for each ROW call non_existent_schema.non_existent_proc()");
-          rs = s.executeQuery("select count(*) from SYS.SYSTRIGGERS where triggername='CALL_PROC_IN_NON_EXISTENT_SCHEMA'");
+          rs = s.executeQuery("select count(*) from SYS.SYSTRIGGERS where CAST(triggername AS VARCHAR(128))='CALL_PROC_IN_NON_EXISTENT_SCHEMA'");
           JDBC.assertFullResultSet(rs, new String[][] {{"0"}});
           assertStatementError("42X50",s,"create trigger call_proc_using_non_existent_method AFTER insert on t2 for each ROW call proc_using_non_existent_method()");
-          rs = s.executeQuery("select count(*) from SYS.SYSTRIGGERS where triggername='CALL_PROC_WITH_NON_EXISTENT_METHOD'");
+          rs = s.executeQuery("select count(*) from SYS.SYSTRIGGERS where CAST(triggername as VARCHAR(128))='CALL_PROC_WITH_NON_EXISTENT_METHOD'");
           JDBC.assertFullResultSet(rs, new String[][] {{"0"}});
           assertStatementError("42Y03",s,"create trigger call_non_existent_proc1 no cascade BEFORE insert on t2 for each ROW call non_existent_proc()");
-          rs = s.executeQuery("select count(*) from SYS.SYSTRIGGERS where triggername='CALL_NON_EXISTENT_PROC1'");
+          rs = s.executeQuery("select count(*) from SYS.SYSTRIGGERS where CAST(triggername AS VARCHAR(128))='CALL_NON_EXISTENT_PROC1'");
           JDBC.assertFullResultSet(rs, new String[][] {{"0"}});
           assertStatementError("42Y07",s,"create trigger call_proc_in_non_existent_schema no cascade BEFORE insert on t2 for each ROW call non_existent_schema.non_existent_proc()");
-          rs = s.executeQuery("select count(*) from SYS.SYSTRIGGERS where triggername='CALL_PROC_IN_NON_EXISTENT_SCHEMA'");
+          rs = s.executeQuery("select count(*) from SYS.SYSTRIGGERS where CAST(triggername AS VARCHAR(128))='CALL_PROC_IN_NON_EXISTENT_SCHEMA'");
           JDBC.assertFullResultSet(rs, new String[][] {{"0"}});      
           assertStatementError("42X50",s,"create trigger call_proc_using_non_existent_method no cascade BEFORE insert on t2 for each ROW call proc_using_non_existent_method()");
-          rs = s.executeQuery("select count(*) from SYS.SYSTRIGGERS where triggername='CALL_PROC_WITH_NON_EXISTENT_METHOD'");
+          rs = s.executeQuery("select count(*) from SYS.SYSTRIGGERS where CAST(triggername AS VARCHAR(128))='CALL_PROC_WITH_NON_EXISTENT_METHOD'");
           JDBC.assertFullResultSet(rs, new String[][] {{"0"}});
           //--- triggers must not allow dynamic parameters (?)
           
@@ -413,7 +413,7 @@
          expectedRows = new String[][] { {"5","two"},{"6","four"},{"8","eight"}};
          JDBC.assertFullResultSet(rs, expectedRows);
          //--- check trigger is not created
-         rs = s.executeQuery("select count(*) from SYS.SYSTRIGGERS where triggername='TEST_TRIG'");
+         rs = s.executeQuery("select count(*) from SYS.SYSTRIGGERS where  CAST(triggername AS VARCHAR(128))='TEST_TRIG'");
          JDBC.assertFullResultSet(rs, new String[][] {{"0"}});
          s.execute("drop trigger create_trigger_trig");
          //--- create a trigger to test we cannot drop it from a procedure called by a trigger
@@ -424,7 +424,7 @@
          rs = s.executeQuery("select * from t2");
          JDBC.assertFullResultSet(rs,new String[][] {{"1","2"}, {"2","4"}});
          //--- check trigger is not dropped
-         rs = s.executeQuery("select count(*) from SYS.SYSTRIGGERS where triggername='TEST_TRIG'");
+         rs = s.executeQuery("select count(*) from SYS.SYSTRIGGERS where CAST(triggername AS VARCHAR(128))='TEST_TRIG'");
          JDBC.assertFullResultSet(rs, new String[][] {{"1"}});
          s.execute("drop trigger drop_trigger_trig");
          //- use procedures which create/drop index on trigger table and some other table
@@ -435,7 +435,7 @@
          rs = s.executeQuery("select * from t2");
          JDBC.assertFullResultSet(rs,new String[][] {{"1","2"}, {"2","4"}});
          // -- check index is not created
-         rs = s.executeQuery("select count(*) from SYS.SYSCONGLOMERATES where CONGLOMERATENAME='IX' and ISINDEX=1");
+         rs = s.executeQuery("select count(*) from SYS.SYSCONGLOMERATES where CAST(CONGLOMERATENAME AS VARCHAR(128))='IX' and ISINDEX=1");
          JDBC.assertFullResultSet(rs, new String [][] {{"0"}});
          s.execute("drop trigger create_index_trig");
          //--- create an index to test we cannot drop it from a procedure called by a trigger
@@ -447,7 +447,7 @@
          expectedRows = new String[][] { {"5","two"},{"6","four"},{"8","eight"}};
          JDBC.assertFullResultSet(rs, expectedRows);
          // -- check index is not dropped
-         rs = s.executeQuery("select count(*) from SYS.SYSCONGLOMERATES where CONGLOMERATENAME='IX' and ISINDEX=1");
+         rs = s.executeQuery("select count(*) from SYS.SYSCONGLOMERATES where CAST(CONGLOMERATENAME AS VARCHAR(128))='IX' and ISINDEX=1");
          JDBC.assertFullResultSet(rs, new String[][] {{"1"}});
          s.close();
     }

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/ReleaseCompileLocksTest.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/ReleaseCompileLocksTest.java?view=diff&rev=558801&r1=558800&r2=558801
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/ReleaseCompileLocksTest.java (original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/ReleaseCompileLocksTest.java Mon Jul 23 10:11:21 2007
@@ -105,7 +105,7 @@
 
         	JDBC.assertFullResultSet(stmt.executeQuery(
         		"select (dmlstatic()) from sys.systables where " +
-        		"tablename = 'SYSCONGLOMERATES'"), new String[][] {{"1"}});
+        		"CAST(tablename AS VARCHAR(128))= 'SYSCONGLOMERATES'"), new String[][] {{"1"}});
 
                 JDBC.assertEmpty(stmt.executeQuery("select TYPE, MODE, TABLENAME, LOCKNAME, STATE from syscs_diag.lock_table order by 1"));
 		commit();
@@ -116,7 +116,7 @@
 
 		JDBC.assertFullResultSet(stmt.executeQuery(
         		"select (insertstatic()) from sys.systables where " +
-        		"tablename = 'SYSCONGLOMERATES'"), new String[][] {{"1"}});
+        		"CAST(tablename AS VARCHAR(128)) = 'SYSCONGLOMERATES'"), new String[][] {{"1"}});
 
                 JDBC.assertEmpty(stmt.executeQuery("select TYPE, MODE, TABLENAME, LOCKNAME, STATE from syscs_diag.lock_table order by 1"));
 

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/ResultSetsFromPreparedStatementTest.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/ResultSetsFromPreparedStatementTest.java?view=diff&rev=558801&r1=558800&r2=558801
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/ResultSetsFromPreparedStatementTest.java (original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/ResultSetsFromPreparedStatementTest.java Mon Jul 23 10:11:21 2007
@@ -416,7 +416,7 @@
     private boolean hasTableXLock(String table) throws SQLException {
         PreparedStatement ps = prepareStatement(
             "select count(*) from syscs_diag.lock_table where tablename=? " +
-            "and type='TABLE' and mode='X'");
+            "and CAST(type AS CHAR(5))='TABLE' and CAST(mode AS CHAR(1))='X'");
         ps.setString(1, table);
         ResultSet rs = ps.executeQuery();
         assertTrue(rs.next());

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/cast.sql
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/cast.sql?view=diff&rev=558801&r1=558800&r2=558801
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/cast.sql (original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/cast.sql Mon Jul 23 10:11:21 2007
@@ -721,9 +721,9 @@
 select cast (aliasinfo as VARCHAR(30) FOR BIT DATA) from sys.sysaliases;
 select cast (aliasinfo as LONG VARCHAR FOR BIT DATA) from sys.sysaliases;
 select cast (aliasinfo as BLOB) from sys.sysaliases;
-select cast (aliasinfo as CLOB) from sys.sysaliases where alias = 'INSTALL_JAR';
+select cast (aliasinfo as CLOB) from sys.sysaliases where CAST(alias AS VARCHAR(128))  = 'INSTALL_JAR';
 
 -- Java casts to character types excluding CLOB are supported using Object.toString
-select cast (aliasinfo as CHAR(240)) from sys.sysaliases where alias = 'INSTALL_JAR';
-select cast (aliasinfo as VARCHAR(240)) from sys.sysaliases where alias = 'INSTALL_JAR';
-select cast (aliasinfo as LONG VARCHAR) from sys.sysaliases where alias = 'INSTALL_JAR';
+select cast (aliasinfo as CHAR(240)) from sys.sysaliases where CAST(alias AS VARCHAR(128)) = 'INSTALL_JAR';
+select cast (aliasinfo as VARCHAR(240)) from sys.sysaliases where CAST(alias AS VARCHAR(128)) = 'INSTALL_JAR';
+select cast (aliasinfo as LONG VARCHAR) from sys.sysaliases where CAST(alias AS VARCHAR(128)) = 'INSTALL_JAR';

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/ejbql.sql
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/ejbql.sql?view=diff&rev=558801&r1=558800&r2=558801
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/ejbql.sql (original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/ejbql.sql Mon Jul 23 10:11:21 2007
@@ -154,7 +154,7 @@
 create table myfloat( a float, b float(23) );
 select abs(a), abs(b) from myfloat;
 select columnname, columndatatype
-from sys.syscolumns c, sys.systables t where c.referenceid = t.tableid and t.tablename='MYFLOAT';
+from sys.syscolumns c, sys.systables t where c.referenceid = t.tableid and CAST(t.tablename AS VARCHAR(128)) ='MYFLOAT';
 insert into myfloat values (null, null), (+0, +0), (-0, -0), (+1, +1), (-1, -1),
 (100000000, 100000000), (-100000000, -100000000), (null, null),
 (1.79769E+308, 3.402E+38),
@@ -966,7 +966,7 @@
 create table myfloat( a float, b float(23) );
 select sqrt(a), sqrt(b) from myfloat;
 select columnname, columndatatype
-from sys.syscolumns c, sys.systables t where c.referenceid = t.tableid and t.tablename='MYFLOAT';
+from sys.syscolumns c, sys.systables t where c.referenceid = t.tableid and CAST(t.tablename AS VARCHAR(128)) = 'MYFLOAT';
 insert into myfloat values (null, null), (+0, +0), (-0, -0), (+1, +1), (100000000, 100000000), (null, null),
 (1.79769E+308, 3.402E+38),
 (2.225E-307, 1.175E-37);

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/floattypes.sql
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/floattypes.sql?view=diff&rev=558801&r1=558800&r2=558801
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/floattypes.sql (original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/floattypes.sql Mon Jul 23 10:11:21 2007
@@ -28,7 +28,7 @@
 create table tmp (tmpcoldecimal dec(8,4), tmpcolnumeric numeric);
 select columndatatype 
 	from sys.syscolumns 
-	where columnname like 'TMPCOL%';
+	where CAST(columnname AS VARCHAR(128)) like 'TMPCOL%';
 drop table tmp;
 
 -- Negative tests, bad precision/scale
@@ -176,7 +176,7 @@
 insert into tmp values (1);
 select columnname, columndatatype 
        from sys.syscolumns c, sys.systables t 
-       where c.referenceid = t .tableid and t.tablename='TMP';
+       where c.referenceid = t .tableid and CAST(t.tablename AS VARCHAR(128)) ='TMP';
 drop table tmp;
 
 -- cast dec as as a numeric type in a select list
@@ -742,7 +742,7 @@
 
 select columnname, columndatatype 
 from sys.syscolumns c, sys.systables t
-where c.referenceid = t.tableid and t.tablename='T';
+where c.referenceid = t.tableid and CAST(t.tablename AS VARCHAR(128)) ='T';
 
 -- invalid float values
 insert into t(r) values 'NaN';

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/miscerrors.sql
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/miscerrors.sql?view=diff&rev=558801&r1=558800&r2=558801
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/miscerrors.sql (original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/miscerrors.sql Mon Jul 23 10:11:21 2007
@@ -48,10 +48,10 @@
 -- see that statements that fail at parse or bind time
 -- are not put in the statment cache;
 values 1;
-select SQL_TEXT from syscs_diag.statement_cache where SQL_TEXT LIKE '%932432%';
+select SQL_TEXT from syscs_diag.statement_cache where CAST(SQL_TEXT AS LONG VARCHAR) LIKE '%932432%';
 
 VALUES FRED932432;
 SELECT * FROM BILL932432;
 SELECT 932432;
 
-select SQL_TEXT from syscs_diag.statement_cache where SQL_TEXT LIKE '%932432%';
+select SQL_TEXT from syscs_diag.statement_cache where CAST(SQL_TEXT  AS LONG VARCHAR) LIKE '%932432%';

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/schemas.sql
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/schemas.sql?view=diff&rev=558801&r1=558800&r2=558801
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/schemas.sql (original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/schemas.sql Mon Jul 23 10:11:21 2007
@@ -244,7 +244,7 @@
 -- verify it
 select schemaname, authorizationid 
 	from sys.sysschemas 
-	where schemaname = 'TEST';
+	where CAST(schemaname AS VARCHAR(128)) = 'TEST';
 
 -- create a table in test
 set schema test;
@@ -255,7 +255,7 @@
 -- verify it
 select schemaname, tablename, descriptor
 	from sys.sysschemas s, sys.sysconglomerates c , sys.systables t
-	where t.tablename = 'SAMPLETAB' 
+	where CAST(t.tablename AS VARCHAR(128)) = 'SAMPLETAB' 
 		and s.schemaid = c.schemaid
 		and c.tableid = t.tableid;
 
@@ -277,7 +277,7 @@
 --
 select schemaname, tablename, descriptor as descr
 from sys.sysschemas s, sys.sysconglomerates c , sys.systables t
-where t.tablename = 'SAMPLETAB' 
+where CAST(t.tablename AS VARCHAR(128)) = 'SAMPLETAB' 
 	and s.schemaid = c.schemaid
 	and c.tableid = t.tableid
 order by schemaname, tablename;
@@ -570,7 +570,7 @@
 
 -- check declare of a temp table does not create a SESSION schema.
 DECLARE GLOBAL TEMPORARY TABLE SESSION.ISCT(c21 int) on commit delete rows not logged;
-select count(*) from SYS.SYSSCHEMAS WHERE SCHEMANAME = 'SESSION';
+select count(*) from SYS.SYSSCHEMAS WHERE CAST(SCHEMANAME AS VARCHAR(128)) = 'SESSION';
 drop table SESSION.ISCT;
 
 drop table B5146.DT;

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/update.sql
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/update.sql?view=diff&rev=558801&r1=558800&r2=558801
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/update.sql (original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/update.sql Mon Jul 23 10:11:21 2007
@@ -256,13 +256,13 @@
 
 -- default read committed isolation level
 update tab1 set c2 = c2 + 3 where c1 = 1;
-select type, mode from syscs_diag.lock_table where tablename = 'TAB1' order by type;
+select type, mode from syscs_diag.lock_table where CAST(tablename AS VARCHAR(128)) = 'TAB1' order by type;
 rollback;
 
 -- serializable isolation level
 set current isolation to SERIALIZABLE;
 update tab1 set c2 = c2 + 3 where c1 = 1;
-select type, mode from syscs_diag.lock_table where tablename = 'TAB1' order by type;
+select type, mode from syscs_diag.lock_table where CAST(tablename AS VARCHAR(128))  = 'TAB1' order by type;
 rollback;
 
 autocommit on;

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/views.sql
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/views.sql?view=diff&rev=558801&r1=558800&r2=558801
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/views.sql (original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/views.sql Mon Jul 23 10:11:21 2007
@@ -132,7 +132,7 @@
 
 -- verify the consistency of the indexes on the system catalogs
 select tablename, SYSCS_UTIL.SYSCS_CHECK_TABLE('SYS', tablename)
-from sys.systables where tabletype = 'S' and tablename != 'SYSDUMMY1';
+from sys.systables where CAST(tabletype AS CHAR(1)) = 'S' and CAST(tablename AS VARCHAR(128)) != 'SYSDUMMY1';
 
 -- test inserts from a view
 insert into insert_test select * from sv5;
@@ -160,7 +160,7 @@
 
 -- verify the consistency of the indexes on the system catalogs
 select tablename, SYSCS_UTIL.SYSCS_CHECK_TABLE('SYS', tablename)
-from sys.systables where tabletype = 'S' and tablename != 'SYSDUMMY1';
+from sys.systables where CAST(tabletype as CHAR(1)) = 'S' and CAST(tablename  as VARCHAR(128)) != 'SYSDUMMY1';
 
 -- bug 2745
 CREATE TABLE orgtable (

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/nist/dml058.sql
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/nist/dml058.sql?view=diff&rev=558801&r1=558800&r2=558801
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/nist/dml058.sql (original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/nist/dml058.sql Mon Jul 23 10:11:21 2007
@@ -188,7 +188,7 @@
 
 -- setup
      INSERT INTO T4
-          VALUES(USER,100,'good','luck');
+          VALUES(CAST(USER AS VARCHAR(128)),100,'good','luck');
 -- PASS:0255 If 1 row is inserted?
 
      SELECT STR110 
@@ -202,7 +202,7 @@
 -- PASS:0255 If 1 row is inserted?
 
      UPDATE T4
-          SET STR110 = USER
+          SET STR110 = CAST(USER AS VARCHAR(128))
           WHERE NUM6 = 101;
 -- PASS:0255 If 1 row is updated?
 
@@ -230,7 +230,7 @@
 
      SELECT STR110 
           FROM T4
-          WHERE STR110 = USER;
+          WHERE STR110 = CAST(USER AS VARCHAR(128));
 -- PASS:0256 If STR110 = 'HU'?
 
 -- setup
@@ -239,7 +239,7 @@
 -- PASS:0256 If 1 row is inserted?
 
      DELETE FROM T4
-            WHERE STR110 = USER;
+            WHERE STR110 = CAST(USER AS VARCHAR(128));
 -- PASS:0256 If 1 row is deleted?
 
      SELECT COUNT(*)

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/nist/dml061.sql
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/nist/dml061.sql?view=diff&rev=558801&r1=558800&r2=558801
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/nist/dml061.sql (original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/nist/dml061.sql Mon Jul 23 10:11:21 2007
@@ -155,7 +155,7 @@
 
           SELECT COUNT(*)
           FROM STAFF
-          WHERE EMPNAME IN (USER,'Betty','Carmen'); 
+          WHERE EMPNAME IN (CAST(USER AS VARCHAR(128)),'Betty','Carmen'); 
 -- PASS:0278 If count = 3?
 
 -- restore

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/nist/xts730.sql
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/nist/xts730.sql?view=diff&rev=558801&r1=558800&r2=558801
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/nist/xts730.sql (original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/nist/xts730.sql Mon Jul 23 10:11:21 2007
@@ -44,23 +44,23 @@
    COMMIT WORK;
 
 --O   SELECT  COUNT(*)  
-   SELECT   tablename 
+   SELECT   CAST(tablename AS VARCHAR(128))
 --O         FROM INFORMATION_SCHEMA.TABLES
 	from sys.systables
 --O         WHERE TABLE_SCHEMA = 'CTS1' 
 	where
 --O         AND TABLE_TYPE = 'BASE TABLE'
-          TABLETYPE = 'T'
+          CAST(TABLETYPE AS CHAR(1)) = 'T'
 --O         AND ( TABLE_NAME = 'LONGIDENTIFIERSAAAA'
 --O            OR TABLE_NAME = 'longidentifiersaaab'
 --O            OR TABLE_NAME = '0"LONGIDENTIFIERS_1'
 --O            OR TABLE_NAME = '0"LONGIDENTIFIERS_2'
 --O            OR TABLE_NAME = 'lngIDENTIFIER% .,()' );
-         AND ( TABLENAME = 'LONGIDENTIFIERSAAAA'
-            OR TABLENAME = 'longidentifiersaaab'
-            OR TABLENAME = '0"LONGIDENTIFIERS_1'
-            OR TABLENAME = '0"LONGIDENTIFIERS_2'
-            OR TABLENAME = 'lngIDENTIFIER% .,()' );
+         AND ( CAST(TABLENAME AS VARCHAR(128)) = 'LONGIDENTIFIERSAAAA'
+            OR CAST(TABLENAME AS VARCHAR(128)) = 'longidentifiersaaab'
+            OR CAST(TABLENAME AS VARCHAR(128)) = '0"LONGIDENTIFIERS_1'
+            OR CAST(TABLENAME AS VARCHAR(128)) = '0"LONGIDENTIFIERS_2'
+            OR CAST(TABLENAME AS VARCHAR(128)) = 'lngIDENTIFIER% .,()' );
 -- PASS:7030 If COUNT = 5?
 
 --O   SELECT TABLE_NAME FROM INFORMATION_SCHEMA.TABLES



Mime
View raw message