db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From d..@apache.org
Subject svn commit: r498716 [1/2] - in /db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests: master/ suites/ tests/lang/
Date Mon, 22 Jan 2007 17:23:44 GMT
Author: djd
Date: Mon Jan 22 09:23:42 2007
New Revision: 498716

URL: http://svn.apache.org/viewvc?view=rev&rev=498716
Log:
Convert some language scripts tests to run in the JUnit environment using LangScripts.

cast, floattypes, refActions1, ejbql, synonym, tempRestrictions

Removed some old test scripts.

unlimited (not applicable test of old limited version before open sourcing)
unlimited2 (not run)
ejbql_nonSPS (subset of ejbql)

Removed:
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/unlimited.out
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/cast_app.properties
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/ejbql_app.properties
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/ejbql_nonSPS.sql
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/floattypes_app.properties
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/unlimited.sql
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/unlimited2.sql
Modified:
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/cast.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/refActions1.out
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/synonym.out
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/tempRestrictions.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/lang/LangScripts.java
    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/synonym.sql

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=498716&r1=498715&r2=498716
==============================================================================
--- 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 Jan 22 09:23:42 2007
@@ -16,15 +16,18 @@
 --
 -- tests for cast expressions
 -- refer to casting.java for a complete analysis on casting
+
 --==================================
 --
 -- simple test cases
 --
 --==================================
+
 -- shrink/grow bit and char
 -- no exceptions should be raised.
 -- once we have warnings we'll expect
 -- a warning when shrinking non space/zeros
+
 -- shrink
 values (cast ('hell' as char(2)));
 1   
@@ -352,6 +355,7 @@
 -----------------------------------------------
 9223372036854775807.9     |9223372036854775807 
 ij> --   -9223372036854775808 is Long::MIN_VALUE
+
 values (
   cast ('-9223372036854775808' as DECIMAL(24,1)),
   cast (cast ('-9223372036854775808' as DECIMAL(24,1)) as BIGINT)
@@ -629,12 +633,12 @@
 1         
 ----------
 1999-09-09
-ij> values (cast ('TIMESTAMP''xxxxxxFILTERED-TIMESTAMPxxxxx'' as timestamp));
+ij> values (cast ('TIMESTAMP''1999-09-09 11:11:11''' as timestamp));
 ERROR 22007: The syntax of the string representation of a datetime value is incorrect.
-ij> values (cast ('xxxxxxFILTERED-TIMESTAMPxxxxxas timestamp));
+ij> values (cast ('1999-09-09 11:11:11' as timestamp));
 1                         
 --------------------------
-xxxxxxFILTERED-TIMESTAMPxxxxx
+1999-09-09 11:11:11.0     
 ij> ------------------
 --date/time ->other
 ------------------
@@ -646,10 +650,10 @@
 1                   
 --------------------
 1999-09-09          
-ij> values (cast (TIMESTAMP('xxxxxxFILTERED-TIMESTAMPxxxxx)as char(40)));
+ij> values (cast (TIMESTAMP('1999-09-09 11:11:11' )as char(40)));
 1                                       
 ----------------------------------------
-xxxxxxFILTERED-TIMESTAMPxxxxx
+1999-09-09 11:11:11.0                   
 ij> values (cast (TIME('11:11:11') as varchar(20)));
 1                   
 --------------------
@@ -658,23 +662,23 @@
 1                   
 --------------------
 1999-09-09          
-ij> values (cast (TIMESTAMP('xxxxxxFILTERED-TIMESTAMPxxxxx)as varchar(40)));
+ij> values (cast (TIMESTAMP('1999-09-09 11:11:11' )as varchar(40)));
 1                                       
 ----------------------------------------
-xxxxxxFILTERED-TIMESTAMPxxxxx
+1999-09-09 11:11:11.0                   
 ij> values (cast (TIME('11:11:11') as long varchar));
 ERROR 42846: Cannot convert types 'TIME' to 'LONG VARCHAR'.
 ij> values (cast (DATE('1999-09-09') as long varchar));
 ERROR 42846: Cannot convert types 'DATE' to 'LONG VARCHAR'.
-ij> values (cast (TIMESTAMP('xxxxxxFILTERED-TIMESTAMPxxxxx)as long varchar));
+ij> values (cast (TIMESTAMP('1999-09-09 11:11:11' )as long varchar));
 ERROR 42846: Cannot convert types 'TIMESTAMP' to 'LONG VARCHAR'.
 ij> -- truncation errors
 values (cast (TIME('11:11:11') as char(2)));
 ERROR 22001: A truncation error was encountered trying to shrink CHAR '11:11:11' to length
2.
 ij> values (cast (DATE('1999-09-09') as char(2)));
 ERROR 22001: A truncation error was encountered trying to shrink CHAR '1999-09-09' to length
2.
-ij> values (cast (TIMESTAMP('xxxxxxFILTERED-TIMESTAMPxxxxx)as char(2)));
-ERROR 22001: A truncation error was encountered trying to shrink CHAR 'xxxxxxFILTERED-TIMESTAMPxxxxx'
to length 2.
+ij> values (cast (TIMESTAMP('1999-09-09 11:11:11' )as char(2)));
+ERROR 22001: A truncation error was encountered trying to shrink CHAR '1999-09-09 11:11:11.0'
to length 2.
 ij> -- to date/time
 values (cast (TIME('11:11:11') as time));
 1       
@@ -697,50 +701,50 @@
 ERROR 42846: Cannot convert types 'DATE' to 'TIME'.
 ij> values (cast (DATE('1999-09-09') as timestamp));
 ERROR 42846: Cannot convert types 'DATE' to 'TIMESTAMP'.
-ij> values (cast (TIMESTAMP('xxxxxxFILTERED-TIMESTAMPxxxxx)as date));
+ij> values (cast (TIMESTAMP('1999-09-09 11:11:11' )as date));
 1         
 ----------
 1999-09-09
-ij> values (cast (TIMESTAMP('xxxxxxFILTERED-TIMESTAMPxxxxx)as time));
+ij> values (cast (TIMESTAMP('1999-09-09 11:11:11' )as time));
 1       
 --------
 11:11:11
-ij> values (cast (TIMESTAMP('xxxxxxFILTERED-TIMESTAMPxxxxx)as timestamp));
+ij> values (cast (TIMESTAMP('1999-09-09 11:11:11' )as timestamp));
 1                         
 --------------------------
-xxxxxxFILTERED-TIMESTAMPxxxxx
+1999-09-09 11:11:11.0     
 ij> --bad
-values (cast (TIMESTAMP('xxxxxxFILTERED-TIMESTAMPxxxxx)as int));
+values (cast (TIMESTAMP('1999-09-09 11:11:11' )as int));
 ERROR 42846: Cannot convert types 'TIMESTAMP' to 'INTEGER'.
 ij> values (cast (DATE('1999-09-09') as int));
 ERROR 42846: Cannot convert types 'DATE' to 'INTEGER'.
 ij> values (cast (TIME('11:11:11') as int));
 ERROR 42846: Cannot convert types 'TIME' to 'INTEGER'.
-ij> values (cast (TIMESTAMP('xxxxxxFILTERED-TIMESTAMPxxxxx)as smallint));
+ij> values (cast (TIMESTAMP('1999-09-09 11:11:11' )as smallint));
 ERROR 42846: Cannot convert types 'TIMESTAMP' to 'SMALLINT'.
 ij> values (cast (DATE('1999-09-09') as smallint));
 ERROR 42846: Cannot convert types 'DATE' to 'SMALLINT'.
 ij> values (cast (TIME('11:11:11') as smallint));
 ERROR 42846: Cannot convert types 'TIME' to 'SMALLINT'.
-ij> values (cast (TIMESTAMP('xxxxxxFILTERED-TIMESTAMPxxxxx)as bigint));
+ij> values (cast (TIMESTAMP('1999-09-09 11:11:11' )as bigint));
 ERROR 42846: Cannot convert types 'TIMESTAMP' to 'BIGINT'.
 ij> values (cast (DATE('1999-09-09') as bigint));
 ERROR 42846: Cannot convert types 'DATE' to 'BIGINT'.
 ij> values (cast (TIME('11:11:11') as bigint));
 ERROR 42846: Cannot convert types 'TIME' to 'BIGINT'.
-ij> values (cast (TIMESTAMP('xxxxxxFILTERED-TIMESTAMPxxxxx)as numeric));
+ij> values (cast (TIMESTAMP('1999-09-09 11:11:11' )as numeric));
 ERROR 42846: Cannot convert types 'TIMESTAMP' to 'NUMERIC'.
 ij> values (cast (DATE('1999-09-09') as numeric));
 ERROR 42846: Cannot convert types 'DATE' to 'NUMERIC'.
 ij> values (cast (TIME('11:11:11') as numeric));
 ERROR 42846: Cannot convert types 'TIME' to 'NUMERIC'.
-ij> values (cast (TIMESTAMP('xxxxxxFILTERED-TIMESTAMPxxxxx)as decimal));
+ij> values (cast (TIMESTAMP('1999-09-09 11:11:11' )as decimal));
 ERROR 42846: Cannot convert types 'TIMESTAMP' to 'DECIMAL'.
 ij> values (cast (DATE('1999-09-09') as decimal));
 ERROR 42846: Cannot convert types 'DATE' to 'DECIMAL'.
 ij> values (cast (TIME('11:11:11') as decimal));
 ERROR 42846: Cannot convert types 'TIME' to 'DECIMAL'.
-ij> values (cast (TIMESTAMP('xxxxxxFILTERED-TIMESTAMPxxxxx) as char(13) for bit data));
+ij> values (cast (TIMESTAMP('1999-09-09 11:11:11' ) as char(13) for bit data));
 ERROR 42846: Cannot convert types 'TIMESTAMP' to 'CHAR () FOR BIT DATA'.
 ij> values (cast (DATE('1999-09-09') as char(13) for bit data));
 ERROR 42846: Cannot convert types 'DATE' to 'CHAR () FOR BIT DATA'.
@@ -759,6 +763,7 @@
 ij> values (cast (X'11' as long varchar));
 ERROR 42846: Cannot convert types 'CHAR () FOR BIT DATA' to 'LONG VARCHAR'.
 ij> --values (cast (X'00' as char(10)));
+
 --odd length won't work anymore
 values (cast (X'123' as char(20)));
 ERROR 42606: An invalid hexadecimal constant starting with 'X'123'' has been detected.
@@ -795,7 +800,7 @@
 				cast(1.1 as real), 
 				DATE('1990-10-10'),
 				TIME('11:11:11'), 
-				TIMESTAMP('xxxxxxFILTERED-TIMESTAMPxxxxx),
+				TIMESTAMP('1990-11-11 11:11:11'),
 				1.1);
 1 row inserted/updated/deleted
 ij> insert into tab1 values (null,
@@ -860,7 +865,7 @@
 ij> select cast(ts as timestamp) from tab1;
 1                         
 --------------------------
-xxxxxxFILTERED-TIMESTAMPxxxxx
+1990-11-11 11:11:11.0     
 NULL                      
 ij> select cast(dc as dec) from tab1;
 1     
@@ -1018,6 +1023,7 @@
 values cast(? as int);
 ERROR 07000: At least one parameter to the current statement is uninitialized.
 ij> -- positive
+
 -- test casting null to all builtin types
 insert into t1 (bt) values cast(null as char(1) for bit data);
 1 row inserted/updated/deleted
@@ -1347,7 +1353,7 @@
 NULL|NULL|NULL                          |NULL                  |NULL       |NULL        
|NULL  |123456             |NULL               |NULL      |NULL    |NULL                 
    |NULL                          |NULL                                                 
                                                                          
 NULL|NULL|NULL                          |NULL                  |NULL       |NULL        
|NULL  |NULL               |NULL               |9876-05-04|NULL    |NULL                 
    |NULL                          |NULL                                                 
                                                                          
 NULL|NULL|NULL                          |NULL                  |NULL       |NULL        
|NULL  |NULL               |NULL               |NULL      |01:02:34|NULL                 
    |NULL                          |NULL                                                 
                                                                          
-NULL|NULL|NULL                          |NULL                  |NULL       |NULL        
|NULL  |NULL               |NULL               |NULL      |NULL    |xxxxxxFILTERED-TIMESTAMPxxxxx|NULL
                         |NULL                                                           
                                                                
+NULL|NULL|NULL                          |NULL                  |NULL       |NULL        
|NULL  |NULL               |NULL               |NULL      |NULL    |9876-05-04 01:02:34.0
    |NULL                          |NULL                                                 
                                                                          
 NULL|NULL|NULL                          |NULL                  |NULL       |NULL        
|NULL  |NULL               |NULL               |NULL      |NULL    |NULL                 
    |654321                        |NULL                                                 
                                                                          
 NULL|NULL|NULL                          |NULL                  |NULL       |NULL        
|NULL  |NULL               |NULL               |NULL      |NULL    |NULL                 
    |NULL                          |987654                                               
                                                                          
 ij> -- clean up t1
@@ -1395,6 +1401,7 @@
 ij> drop table x;
 0 rows inserted/updated/deleted
 ij> -- method resolution tests
+
 -- clean up the prepared statements
 remove a1;
 ij> remove q1;
@@ -1414,6 +1421,7 @@
 commit;
 ij> autocommit on;
 ij> -- bind time casting tests
+
 -- negative
 values cast('asdf' as smallint);
 ERROR 22018: Invalid character string format for type SMALLINT.
@@ -1491,7 +1499,7 @@
 ij> values (cast ('2001-01-01-08.08.08.123456' as TIMESTAMP));
 1                         
 --------------------------
-xxxxxxFILTERED-TIMESTAMPxxxxx
+2001-01-01 08:08:08.123456
 ij> -- char, varchar
 values (char('abcde', 5));
 1    
@@ -1508,22 +1516,23 @@
 ij> values (varchar('', 20));
 1                   
 --------------------
+                    
 ij> create table t1 (c5 date, c6 time, c7 timestamp, c8 char(5), c9 varchar(5));
 0 rows inserted/updated/deleted
-ij> insert into t1 values ('2003-09-10', '16:44:02', 'xxxxxxFILTERED-TIMESTAMPxxxxx',
'abc', 'abcde');
+ij> insert into t1 values ('2003-09-10', '16:44:02', '2003-09-08 12:20:30.123456', 'abc',
'abcde');
 1 row inserted/updated/deleted
 ij> insert into t1 values ('2005-09-10', '18.44.02', '2004-09-08-12.20.30.123456', 'cba',
'c');
 1 row inserted/updated/deleted
 ij> select char(c5), char(c6), char(c7), char(c8), char(c9) from t1;
 1         |2       |3                         |4    |5    
 ----------------------------------------------------------
-2003-09-10|16:44:02|xxxxxxFILTERED-TIMESTAMPxxxxx|abc  |abcde
-2005-09-10|18:44:02|xxxxxxFILTERED-TIMESTAMPxxxxx|cba  |c    
+2003-09-10|16:44:02|2003-09-08 12:20:30.123456|abc  |abcde
+2005-09-10|18:44:02|2004-09-08 12:20:30.123456|cba  |c    
 ij> select varchar(c5), varchar(c6), varchar(c7), varchar(c8), varchar(c9) from t1;
 1         |2       |3                         |4    |5    
 ----------------------------------------------------------
-2003-09-10|16:44:02|xxxxxxFILTERED-TIMESTAMPxxxxx|abc  |abcde
-2005-09-10|18:44:02|xxxxxxFILTERED-TIMESTAMPxxxxx|cba  |c    
+2003-09-10|16:44:02|2003-09-08 12:20:30.123456|abc  |abcde
+2005-09-10|18:44:02|2004-09-08 12:20:30.123456|cba  |c    
 ij> select char(c8, 10), varchar(c9, 9) from t1;
 1         |2        
 --------------------
@@ -1667,4 +1676,4 @@
 1                                                                                       
                                       
 --------------------------------------------------------------------------------------------------------------------------------
 INSTALL_JAR(IN URL VARCHAR(256),IN JAR VARCHAR(128),IN DEPLOY INTEGER) LANGUAGE JAVA PARAMETER
STYLE JAVA MODIFIES SQL DATA     
-ij> 
+ij> 
\ No newline at end of file

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=498716&r1=498715&r2=498716
==============================================================================
--- 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 Jan 22 09:23:42 2007
@@ -14,8 +14,11 @@
 --   See the License for the specific language governing permissions and
 --   limitations under the License.
 --
+
 -- This test EJBQL Absolute function. Resolve 3535
 -- Begin of ABS/ABSVAL test.  For all valid types, un-escaped function.
+
+
 -- Integer has a range of -2147483648 to 2147483647
 -- Basic
 create table myint( a int );
@@ -212,6 +215,8 @@
 ij> drop table myinteger;
 0 rows inserted/updated/deleted
 ij> -- End of Integer test
+
+
 -- Smallint has a range of -32768 to 32767
 -- Basic
 create table mysmallint( a smallint );
@@ -312,6 +317,8 @@
 ij> drop table mysmallint;
 0 rows inserted/updated/deleted
 ij> -- End of Smallint test
+
+
 -- Bigint has a range of -9223372036854775808 to 9223372036854775807
 -- Basic
 create table mybigint( a bigint );
@@ -412,6 +419,8 @@
 ij> drop table mybigint;
 0 rows inserted/updated/deleted
 ij> -- End of Bigint test
+
+
 -- REAL has a range of +/-1.175E-37 to +/-3.402E+38 
 -- Basic
 create table myreal( a real );
@@ -556,6 +565,8 @@
 ij> drop table myreal;
 0 rows inserted/updated/deleted
 ij> -- End of Real test
+
+
 -- Double Precision has a range of +/-2.225E-307 to +/-1.79769E+308 
 -- Basic
 create table mydoubleprecision( a double precision );
@@ -694,6 +705,8 @@
 ij> drop table mydoubleprecision;
 0 rows inserted/updated/deleted
 ij> -- End of Double Precision test
+
+
 -- Float has a the range or a REAL or DOUBLE depending on
 -- the precision you specify.  Below a is a double, b is a float
 create table myfloat( a float, b float(23) );
@@ -861,6 +874,8 @@
 ij> drop table myfloat;
 0 rows inserted/updated/deleted
 ij> -- End of Float test
+
+
 -- Decimal is java.math.BigDecimal
 -- Basic
 create table myDecimal( a decimal(31, 0), b decimal(31,31));
@@ -1087,6 +1102,8 @@
 ij> drop table myDecimal;
 0 rows inserted/updated/deleted
 ij> -- End of Decimal test
+
+
 -- Numeric java.math.BigDecimal
 -- Basic
 create table myNumeric( a decimal(31,0), b decimal(31,31 ));
@@ -1134,6 +1151,7 @@
 ij> drop table myNumeric;
 0 rows inserted/updated/deleted
 ij> -- End of Numeric test
+
 -- Test some different statements, just in case
 create table foo( a int );
 0 rows inserted/updated/deleted
@@ -1393,6 +1411,7 @@
 ij> drop table foo;
 0 rows inserted/updated/deleted
 ij> -- End of ABS/ABSVAL test.  For all valid types.  Un-escaped function.
+
 -- abs is not a reserved word
 create table abs( a int );
 0 rows inserted/updated/deleted
@@ -1400,6 +1419,7 @@
 0 rows inserted/updated/deleted
 ij> -- This test EJBQL Absolute function. Resolve 3535
 -- Begin of ABS test.  For escape function.
+
 -- Integer
 -- Basic
 -- beetle 5805 - support INT[EGER] built-in function
@@ -1646,8 +1666,11 @@
 ij> -- End of ABS test.  For escaped function.
 -- This test EJBQL Absolute function. Resolve 3535
 -- Begin of ABSVAL test.  For all valid types, un-escaped function.
+
+
 -- Integer has a range of -2147483648 to 2147483647
 -- Basic
+
 create table myint( a int );
 0 rows inserted/updated/deleted
 ij> select abs(a) from myint;
@@ -1727,7 +1750,9 @@
 ij> drop table myStr;
 0 rows inserted/updated/deleted
 ij> -- End of ABSVAL test
+
 -- This test EJBQL function, CONCAT. Resolve 3535
+
 -- Begin of CONCAT test
 -- Basic
 values{ fn concat( 'hello', ' world' ) };
@@ -1741,9 +1766,11 @@
 ij> values{ fn concat( '' , '' )};
 1              
 ---------------
+               
 ij> values{ fn concat( CHAR(''), CHAR('') ) };
 1              
 ---------------
+               
 ij> values{ fn concat( 45, 67 )};
 ERROR 42846: Cannot convert types 'INTEGER' to 'VARCHAR'.
 ij> values{ fn concat( '45', 67 )};
@@ -1800,11 +1827,14 @@
 ij> drop table myconcat;
 0 rows inserted/updated/deleted
 ij> -- End of CONCAT test
+
 -- This test the EJBQL function, LOCATE. Resolve 3535
+
 -- LOCATE( string1, string2[, start] ) --- string1, searching from the beginning
 --   of string2 }; if start is specified, the search begins from position start.
 --   0 is returned if string2 does not contain string1.  Position1 is the first
 --   character in string2.
+
 -- Begin of LOCATE test
 -- Basic
 -- 2 args
@@ -2057,10 +2087,12 @@
 ERROR 42884: No authorized routine named 'LOCATE' of type 'FUNCTION' having compatible arguments
was found.
 ij> -- End of EJBQL function test for LOCATE.
 -- This test the EJBQL function, LOCATE. Resolve 3535
+
 -- LOCATE( string1, string2[, start] ) --- string1, searching from the beginning
 --   of string2; if start is specified, the search begins from position start.
 --   0 is returned if string2 does not contain string1.  Position1 is the first
 --   character in string2.
+
 -- Begin of LOCATE test
 -- Basic
 create table locate( a varchar(20) );
@@ -2618,6 +2650,7 @@
 ij> drop table mynVarChar;
 ERROR 42Y55: 'DROP TABLE' cannot be performed on 'MYNVARCHAR' because it does not exist.
 ij> -- =========================================================================
+
 -- Other types
 create table myBigInt( a bigint, b bigint );
 0 rows inserted/updated/deleted
@@ -2700,24 +2733,30 @@
 ij> -- bug 5794 - LOCATE built-in function is not db2 udb compatible
 create table mytimestamp( a timestamp, b timestamp );
 0 rows inserted/updated/deleted
-ij> insert into mytimestamp values( timestamp('xxxxxxFILTERED-TIMESTAMPxxxxx), timestamp('xxxxxxFILTERED-TIMESTAMPxxxxx));
+ij> insert into mytimestamp values( timestamp('1997-01-01 03:03:03'), timestamp('1997-01-01
03:03:03' ));
 1 row inserted/updated/deleted
-ij> insert into mytimestamp values( timestamp('xxxxxxFILTERED-TIMESTAMPxxxxx), timestamp('xxxxxxFILTERED-TIMESTAMPxxxxx));
+ij> insert into mytimestamp values( timestamp('1997-01-01 03:03:03'), timestamp('1997-01-01
04:03:03' ));
 1 row inserted/updated/deleted
 ij> select locate(a, b) from mytimestamp;
 ERROR 42884: No authorized routine named 'LOCATE' of type 'FUNCTION' having compatible arguments
was found.
 ij> drop table mytimestamp;
 0 rows inserted/updated/deleted
 ij> -- End of ejbql_locate2.sql test
+
+
 -- This test the EJBQL function, LOCATE. Resolve 3535
+
 -- LOCATE( string1, string2[, start] ) --- string1, searching from the beginning
 --   of string2; if start is specified, the search begins from position start.
 --   0 is returned if string2 does not contain string1.  Position1 is the first
 --   character in string2.
+
 -- Begin of LOCATE test
 -- Basic
+
 -- AUTHOR'S NOTE: This test highlights the difference between Oracle8i,
 --    IBM DB2, and Cloudscape.
+
 create table foo( a varchar(10), b varchar(20) );
 0 rows inserted/updated/deleted
 ij> insert into foo values( 'abc', 'abcd' );
@@ -2831,12 +2870,15 @@
 0 rows inserted/updated/deleted
 ij> -- End of ejbql_locate3.sql test
 -- This test the EJBQL function, LOCATE. Resolve 3535
+
 -- LOCATE( string1, string2[, start] ) --- string1, searching from the beginning
 --   of string2 }; if start is specified, the search begins from position start.
 --   0 is returned if string2 does not contain string1.  Position1 is the first
 --   character in string2.
+
 -- Begin of LOCATE test
 -- Basic
+
 create table loc( c varchar(20) default null, a int default null, b int default null);
 0 rows inserted/updated/deleted
 ij> insert into loc (c) values ('This world is crazy' );
@@ -3020,6 +3062,8 @@
 ij> -- End of LOCATE test
 -- This test EJBQL Sqrt function. Resolve 3535
 -- Begin of SQRT test.  For all valid types, un-escaped function.
+
+
 -- Real has a range of +/-1.4E-45 to +/-3.4028235E+38
 -- Basic
 create table myreal( a real );
@@ -3100,6 +3144,8 @@
 ij> drop table myreal;
 0 rows inserted/updated/deleted
 ij> -- End of Real test
+
+
 -- Double Precision has a range of +/-4.9E-324 to +/-1.7976931348623157E+308
 -- Basic
 create table mydoubleprecision( a double precision );
@@ -3180,6 +3226,8 @@
 ij> drop table mydoubleprecision;
 0 rows inserted/updated/deleted
 ij> -- End of Double Precision test
+
+
 -- Float has a the range or a java.lang.Float or java.lang.Double depending on
 -- the precision you specify.  Below a is a double, b is a float
 create table myfloat( a float, b float(23) );
@@ -3276,6 +3324,8 @@
 ij> drop table myfloat;
 0 rows inserted/updated/deleted
 ij> -- End of Float test
+
+
 -- Test some different statements, just in case
 -- beetle 5804 - support FLOAT built-in function
 create table foo( a float );
@@ -3373,6 +3423,8 @@
 ij> -- End of SQRT test.  For all valid types.  Un-escaped function.
 -- This test EJBQL Sqrt function. Resolve 3535
 -- Begin of SQRT test.
+
+
 -- Integer, Smallint, Bigint, Decimal
 create table myint( a int );
 0 rows inserted/updated/deleted
@@ -3410,6 +3462,8 @@
 ij> drop table mydecimal;
 0 rows inserted/updated/deleted
 ij> -- For escape function.
+
+
 -- Integer
 -- Basic
 values{ fn sqrt(INT('0'))};
@@ -3553,6 +3607,7 @@
 ij> -- End of SQRT test.
 -- This test EJBQL Sqrt function. Resolve 3535
 -- Begin of SQRT test.  For all valid types, un-escaped function.
+
 create table myreal( a real );
 0 rows inserted/updated/deleted
 ij> select sqrt(a) from myreal;
@@ -3748,6 +3803,7 @@
 ij> drop table myStr;
 0 rows inserted/updated/deleted
 ij> -- End of SQRT test
+
 -- CHAR AND VARCHAR 
 --
 -- create some tables
@@ -3772,6 +3828,7 @@
 					'99999999999999999999999999999999999999999999999999999999999999999999999999999999999
                                                                    ');
 1 row inserted/updated/deleted
 ij> -- negative tests
+
 -- mixing char and bit (illegal)
 values X'11' || 'asdf';
 ERROR 42884: No authorized routine named '||' of type 'FUNCTION' having compatible arguments
was found.
@@ -3911,6 +3968,7 @@
 ij> -- Parameters cannot be used in DB2 UDB 
 -- if one operand is a long varchar [for bit data] data type. 
 -- An invalid parameter marker error is thrown in DB2 UDB (SQLSTATE 42610).
+
 -- lvc || ?
 prepare lvp as 'select lvc || ? from t1';
 ij> execute lvp using 'values (''right'')';
@@ -3962,6 +4020,7 @@
 0 rows inserted/updated/deleted
 ij> ------------------------------------------------------------------------------------
 -- CHAR (n) FOR BIT DATA AND VARCHAR (n) FOR BIT DATA
+
 -- try some cases zero length cases
 values X''|| X'80';
 1 
@@ -3972,6 +4031,8 @@
 --
 01
 ij> -- create some tables
+
+
 create table t1 (b16a char(2) for bit data, b16b char(2) for bit data, vb16a varchar(2) for
bit data, vb16b varchar(2) for bit data, lbv long varchar for bit data);
 0 rows inserted/updated/deleted
 ij> create table t2 (b20 char(3) for bit data, b60 char(8) for bit data, b80 char(10)
for bit data,
@@ -3991,6 +4052,7 @@
 					  X'9999');
 1 row inserted/updated/deleted
 ij> -- negative tests
+
 -- non-blank truncation error on bit result
 insert into t2 (b20) select b16a || b16b from t1 where b16a = X'1111';
 ERROR 22001: A truncation error was encountered trying to shrink CHAR () FOR BIT DATA '11112222'
to length 3.
@@ -4104,6 +4166,7 @@
 ij> -- Parameters cannot be used in DB2 UDB 
 -- if one operand is a long varchar [for bit data] data type. 
 -- An invalid parameter marker error is thrown in DB2 UDB (SQLSTATE 42610).
+
 -- ? || lbv
 prepare plbv as 'select ? || lbv from t1';
 ij> execute plbv using 'values (X''ABCD'')';
@@ -4183,6 +4246,7 @@
 -- parameters (would need to be .java to show completely...)
 -- not other types of columns
 --
+
 create table t (c char(20), v varchar(20), lvc long varchar);
 0 rows inserted/updated/deleted
 ij> insert into t values('hello','world', 'nice day, huh?');
@@ -4353,4 +4417,4 @@
 1   
 ----
  as 
-ij> 
+ij> 
\ No newline at end of file

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=498716&r1=498715&r2=498716
==============================================================================
--- 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 Jan 22 09:23:42 2007
@@ -21,6 +21,8 @@
 -- same thing, so we don't do much testing with
 -- the two types other than to make sure the 
 -- syntax is the same.
+
+
 -- test some of the meta data
 drop table tmp;
 ERROR 42Y55: 'DROP TABLE' cannot be performed on 'TMP' because it does not exist.
@@ -636,6 +638,7 @@
 --		 cast(1.7e308 as dec(2147483647)) *
 --		 cast(1.7e308 as dec(2147483647))));
 --
+
 values cast(1 as dec(31, 20));
 1                                
 ---------------------------------
@@ -657,6 +660,7 @@
 ij> --
 -- comparisons
 --
+
 insert into t values (123,			-- int
 						123,		-- bigint
 						123,		-- smallint	
@@ -978,6 +982,7 @@
 ij> --
 -- test a variety of inserts and updates
 --
+
 drop table t2;
 ERROR 42Y55: 'DROP TABLE' cannot be performed on 'T2' because it does not exist.
 ij> create table t2 (i int, 
@@ -1124,6 +1129,7 @@
 ij> drop table t;
 0 rows inserted/updated/deleted
 ij> -- ** insert double.sql
+
 --
 -- Test the builtin type 'double precision'
 -- assumes these builtin types exist:
@@ -1131,9 +1137,11 @@
 --
 -- other things we might test:
 -- show how doubles lose precision on computations
+
 --
 -- Test the arithmetic operators
 --
+
 create table t (i int, s smallint, c char(10), v varchar(50),
 	d double precision);
 0 rows inserted/updated/deleted
@@ -1181,12 +1189,15 @@
 -200.0                |200.0                 
 200.0                 |-200.0                
 ij> -- test null/null, constant/null, null/constant
-select i, d, i / d, 10 / d, d / 10e0 from t;
-I          |D                     |3                     |4                     |5      
              
--------------------------------------------------------------------------------------------------------
-NULL       |NULL                  |NULL                  |NULL                  |NULL   
              
-0          |200.0                 |0.0                   |0.05                  |20.0   
              
--1         |-200.0                |0.0050                |-0.05                 |-20.0  
              
+-- Cast to decimal to remove a minor diff among
+-- vms, where 0.005 converted to a String would be
+-- either 0.005 or 0.0050 (both valid formats for Double.toString(double)
+select i, d, CAST (i / d AS DECIMAL(6,5)), 10 / d, d / 10e0 from t;
+I          |D                     |3       |4                     |5                    

+-----------------------------------------------------------------------------------------
+NULL       |NULL                  |NULL    |NULL                  |NULL                 

+0          |200.0                 |0.00000 |0.05                  |20.0                 

+-1         |-200.0                |0.00500 |-0.05                 |-20.0                

 ij> -- test for divide by 0
 select d / i from t;
 1                     
@@ -1229,6 +1240,7 @@
 ij> drop table t;
 0 rows inserted/updated/deleted
 ij> -- test overflow
+
 create table s (d double precision, p double);
 0 rows inserted/updated/deleted
 ij> insert into s values (null, null);
@@ -1463,6 +1475,7 @@
 ----------------------
 5.0                   
 ij> -- show that double is comparable to real
+
 create table o (c char(10), v varchar(30), dc decimal);
 0 rows inserted/updated/deleted
 ij> select d from c,o where d <> dc;
@@ -1489,6 +1502,7 @@
 ij> create table target (p double precision not null);
 0 rows inserted/updated/deleted
 ij> -- we have already tested inserting integer and double literals.
+
 insert into source values (1, 2, '3', '4', 5);
 1 row inserted/updated/deleted
 ij> -- these will all work:
@@ -1499,6 +1513,7 @@
 ij> insert into target select d from source;
 1 row inserted/updated/deleted
 ij> -- these will all fail:
+
 delete from source;
 1 row inserted/updated/deleted
 ij> insert into source values (null, null, null, null, null);
@@ -1602,8 +1617,10 @@
 -- show the mapping here; the double and real tests
 -- show how well those types behave.
 --
+
 -- this shows several working versions of float, the default
 -- and all of the boundary values:
+
 create table t (d double precision, r real, f float, f1 float(1),
 	f23 float(23), f24 float(24), f53 float(52));
 0 rows inserted/updated/deleted
@@ -1638,8 +1655,10 @@
 ERROR 42X04: Column 'NAN' 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
'NAN' is not a column in the target table.
 ij> update t set r = +3.4021E+38;
 0 rows inserted/updated/deleted
+WARNING 02000: No row was found for FETCH, UPDATE or DELETE; or the result of a query is
an empty table.
 ij> update t set r = -3.4021E+38;
 0 rows inserted/updated/deleted
+WARNING 02000: No row was found for FETCH, UPDATE or DELETE; or the result of a query is
an empty table.
 ij> drop table t;
 0 rows inserted/updated/deleted
 ij> drop table tt;
@@ -1666,9 +1685,11 @@
 --
 -- other things we might test:
 -- show how reals lose precision on computations
+
 --
 -- Test the arithmetic operators
 --
+
 create table t (i int, s smallint, c char(10), v varchar(50),
 	d double precision, r real);
 0 rows inserted/updated/deleted
@@ -1716,12 +1737,15 @@
 -200.0                |200.0                 
 200.0                 |-200.0                
 ij> -- test null/null, constant/null, null/constant
-select i, d, r, d / r, i / r, 10 / r, r / d, r / 10e0 from t;
-I          |D                     |R            |4                     |5            |6 
          |7                     |8                     
--------------------------------------------------------------------------------------------------------------------------------------------------
-NULL       |NULL                  |NULL         |NULL                  |NULL         |NULL
        |NULL                  |NULL                  
-0          |200.0                 |200.0        |1.0                   |0.0          |0.05
        |1.0                   |20.0                  
--1         |-200.0                |-200.0       |1.0                   |0.0050       |-0.05
       |1.0                   |-20.0                 
+-- Cast to decimal to remove a minor diff among
+-- vms, where 0.005 converted to a String would be
+-- either 0.005 or 0.0050 (both valid formats for Double.toString(double)
+select i, d, r, d / r, CAST (i / r AS DECIMAL(6,5)), 10 / r, r / d, r / 10e0 from t;
+I          |D                     |R            |4                     |5       |6      
     |7                     |8                     
+--------------------------------------------------------------------------------------------------------------------------------------------
+NULL       |NULL                  |NULL         |NULL                  |NULL    |NULL   
     |NULL                  |NULL                  
+0          |200.0                 |200.0        |1.0                   |0.00000 |0.05   
     |1.0                   |20.0                  
+-1         |-200.0                |-200.0       |1.0                   |0.00500 |-0.05  
     |1.0                   |-20.0                 
 ij> -- test for divide by 0
 select r / i from t;
 1            
@@ -1745,6 +1769,7 @@
 ij> drop table t;
 0 rows inserted/updated/deleted
 ij> -- test overflow
+
 create table s (d real, p real);
 0 rows inserted/updated/deleted
 ij> insert into s values (null, null);
@@ -1865,6 +1890,7 @@
 ij> --
 -- comparisons
 --
+
 create table c (i int, s smallint, d double precision, r real, l real);
 0 rows inserted/updated/deleted
 ij> -- insert some values
@@ -1975,6 +2001,7 @@
 2.0          
 1956475.0    
 ij> -- show that real is comparable to decimal
+
 create table o (c char(10), v varchar(30), dc decimal);
 0 rows inserted/updated/deleted
 ij> select r from c,o where r <> dc;
@@ -1994,6 +2021,7 @@
 ij> create table target (t real not null);
 0 rows inserted/updated/deleted
 ij> -- we have already tested inserting integer and double literals.
+
 insert into source values (1, 2, '3', '4', 5, 6);
 1 row inserted/updated/deleted
 ij> -- these will all work:
@@ -2108,6 +2136,7 @@
 ij> values 5e-324;
 ERROR 22003: The resulting value is outside the range for the data type DOUBLE.
 ij> -- --- TEST SPECIAL VALUES
+
 -- DB2 (should succed)
 insert into fake values( -3.402E+38 );
 1 row inserted/updated/deleted
@@ -2170,6 +2199,7 @@
 ij> insert into fake values -11;
 1 row inserted/updated/deleted
 ij> -- ============================================================
+
 -- DB2 MAX_VALUES (first succeed, second fail)
 insert into fake values( -3.4019E+38 );
 1 row inserted/updated/deleted
@@ -2274,6 +2304,7 @@
 ij> -- ============================================================
 -- ---underflow aritmetic
 -- underflow to small real but / makes double!=0, so we catch
+
 -- ok
 values cast(5e-37/1e0 as real);
 1            
@@ -2378,7 +2409,9 @@
 ----------------------
 1.2345678901234569E27 
 ij> -- ============================================================
+
 --- Marks tests
+
 -- Examples in Cloudscape 5.2:
 -- these 2 insert statements should raise error msgs in compat mode because 
 -- the values are between the -mpv and +mpv (fail)
@@ -2426,6 +2459,7 @@
 ij> drop table t1;
 0 rows inserted/updated/deleted
 ij> -- ============================================================
+
 -- bug 5704 - make sure we catch the overflow correctly for multiplication operator
 values cast(1e30 as decimal(31))*cast(1e30 as decimal(31));
 1                               
@@ -2543,4 +2577,4 @@
 1       
 --------
 ERROR 22018: Invalid character string format for type DECIMAL.
-ij> 
+ij> 
\ No newline at end of file



Mime
View raw message