db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rhille...@apache.org
Subject svn commit: r927631 - in /db/derby/code/trunk/java: engine/org/apache/derby/impl/sql/compile/ testing/org/apache/derbyTesting/functionTests/master/ testing/org/apache/derbyTesting/functionTests/tests/lang/
Date Thu, 25 Mar 2010 22:53:15 GMT
Author: rhillegas
Date: Thu Mar 25 22:53:15 2010
New Revision: 927631

URL: http://svn.apache.org/viewvc?rev=927631&view=rev
Log:
DERBY-4068: Fix precision/scale of numeric/decimals and length of string types when selected
as return values of functions.

Modified:
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/SQLToJavaValueNode.java
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/compressTable.out
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/functions.out
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/onlineBackupTest2.out
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/AnsiSignaturesTest.java

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/SQLToJavaValueNode.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/SQLToJavaValueNode.java?rev=927631&r1=927630&r2=927631&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/SQLToJavaValueNode.java
(original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/SQLToJavaValueNode.java
Thu Mar 25 22:53:15 2010
@@ -207,6 +207,14 @@ public class SQLToJavaValueNode extends 
 		return this;
 	}
 
+    /**
+     * Override behavior in superclass.
+     */
+    public DataTypeDescriptor getDataType() throws StandardException
+    {
+        return value.getTypeServices();
+    }
+
 	/**
 	 * Remap all ColumnReferences in this tree to be clones of the
 	 * underlying expression.

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/compressTable.out
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/compressTable.out?rev=927631&r1=927630&r2=927631&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/compressTable.out
(original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/compressTable.out
Thu Mar 25 22:53:15 2010
@@ -94,10 +94,10 @@ C1         |C2                          
 --------------------------------------------------
 ij> -- do consistency check on scans, etc.
 values ConsistencyChecker();
-1                                                                                       
                                                                                         
                                                                                         
                                                                                         
                                                                                         
                                                               
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
+1                                                                                       
                                       
+--------------------------------------------------------------------------------------------------------------------------------
 No open scans, etc.
-3 dependencies found                                                                    
                                                                                         
                                                                                         
                                                                                         
                                                                                         
                                           
+3 dependencies found                                                                    
                   
 ij> rollback;
 ij> -- test with various sizes as we use bulk fetch
 insert into noindexes values (1, '1', 1.1), (2, '2', 2.2), (3, '3', 3.3),
@@ -169,10 +169,10 @@ C1         |C2                          
 18         |18                            |18.18  
 ij> -- do consistency check on scans, etc.
 values ConsistencyChecker();
-1                                                                                       
                                                                                         
                                                                                         
                                                                                         
                                                                                         
                                                               
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
+1                                                                                       
                                       
+--------------------------------------------------------------------------------------------------------------------------------
 No open scans, etc.
-3 dependencies found                                                                    
                                                                                         
                                                                                         
                                                                                         
                                                                                         
                                           
+3 dependencies found                                                                    
                   
 ij> rollback;
 ij> -- test with some indexes
 -- test with empty table
@@ -204,10 +204,10 @@ C1         |C2                          
 --------------------------------------------------
 ij> -- do consistency check on scans, etc.
 values ConsistencyChecker();
-1                                                                                       
                                                                                         
                                                                                         
                                                                                         
                                                                                         
                                                               
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
+1                                                                                       
                                       
+--------------------------------------------------------------------------------------------------------------------------------
 No open scans, etc.
-3 dependencies found                                                                    
                                                                                         
                                                                                         
                                                                                         
                                                                                         
                                           
+3 dependencies found                                                                    
                   
 ij> rollback;
 ij> -- test with various sizes as we use bulk fetch
 insert into indexes values (1, '1', 1.1), (2, '2', 2.2), (3, '3', 3.3),
@@ -279,10 +279,10 @@ C1         |C2                          
 18         |18                            |18.18  
 ij> -- do consistency check on scans, etc.
 values ConsistencyChecker();
-1                                                                                       
                                                                                         
                                                                                         
                                                                                         
                                                                                         
                                                               
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
+1                                                                                       
                                       
+--------------------------------------------------------------------------------------------------------------------------------
 No open scans, etc.
-3 dependencies found                                                                    
                                                                                         
                                                                                         
                                                                                         
                                                                                         
                                           
+3 dependencies found                                                                    
                   
 ij> rollback;
 ij> -- primary/foreign keys
 create table p (c1 char(1), y int not null, c2 char(1) not null, x int not null, constraint
pk primary key(x,y));
@@ -307,10 +307,10 @@ ij> insert into f values (2, 2, 2);
 1 row inserted/updated/deleted
 ij> -- do consistency check on scans, etc.
 values ConsistencyChecker();
-1                                                                                       
                                                                                         
                                                                                         
                                                                                         
                                                                                         
                                                               
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
+1                                                                                       
                                       
+--------------------------------------------------------------------------------------------------------------------------------
 No open scans, etc.
-4 dependencies found                                                                    
                                                                                         
                                                                                         
                                                                                         
                                                                                         
                                           
+4 dependencies found                                                                    
                   
 ij> rollback;
 ij> -- self referencing table
 create table pf (x int not null constraint p primary key, y int constraint f references pf);
@@ -327,10 +327,10 @@ ij> insert into pf values (5,6);
 ERROR 23503: INSERT on table 'PF' caused a violation of foreign key constraint 'F' for key
(6).  The statement has been rolled back.
 ij> -- do consistency check on scans, etc.
 values ConsistencyChecker();
-1                                                                                       
                                                                                         
                                                                                         
                                                                                         
                                                                                         
                                                               
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
+1                                                                                       
                                       
+--------------------------------------------------------------------------------------------------------------------------------
 No open scans, etc.
-4 dependencies found                                                                    
                                                                                         
                                                                                         
                                                                                         
                                                                                         
                                           
+4 dependencies found                                                                    
                   
 ij> rollback;
 ij> -- multiple indexes on same column
 call SYSCS_UTIL.SYSCS_SET_DATABASE_PROPERTY('derby.storage.pageSize','4096');
@@ -352,10 +352,10 @@ I          |S                           
 2          |2                                                                           
                                                                                         
                                                                                         
                                                                                         
                                                                                         
                                                                           
 ij> -- do consistency check on scans, etc.
 values ConsistencyChecker();
-1                                                                                       
                                                                                         
                                                                                         
                                                                                         
                                                                                         
                                                               
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
+1                                                                                       
                                       
+--------------------------------------------------------------------------------------------------------------------------------
 No open scans, etc.
-3 dependencies found                                                                    
                                                                                         
                                                                                         
                                                                                         
                                                                                         
                                           
+3 dependencies found                                                                    
                   
 ij> rollback;
 ij> -- verify statements get re-prepared
 create table t(c1 int, c2 int);
@@ -386,10 +386,10 @@ ij> remove p1;
 ij> remove s;
 ij> -- do consistency check on scans, etc.
 values ConsistencyChecker();
-1                                                                                       
                                                                                         
                                                                                         
                                                                                         
                                                                                         
                                                               
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
+1                                                                                       
                                       
+--------------------------------------------------------------------------------------------------------------------------------
 No open scans, etc.
-3 dependencies found                                                                    
                                                                                         
                                                                                         
                                                                                         
                                                                                         
                                           
+3 dependencies found                                                                    
                   
 ij> rollback;
 ij> -- verify that space getting reclaimed
 call SYSCS_UTIL.SYSCS_SET_DATABASE_PROPERTY('derby.storage.pageSize','4096');
@@ -691,10 +691,10 @@ A          |B          |S               
 8          |8          |bcd                                                             
                                                                                         
                                                                                         
                                                                                         
                                                                                         
                                                                                       
 ij> -- do consistency check on scans, etc.
 values ConsistencyChecker();
-1                                                                                       
                                                                                         
                                                                                         
                                                                                         
                                                                                         
                                                               
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
+1                                                                                       
                                       
+--------------------------------------------------------------------------------------------------------------------------------
 No open scans, etc.
-3 dependencies found                                                                    
                                                                                         
                                                                                         
                                                                                         
                                                                                         
                                           
+3 dependencies found                                                                    
                   
 ij> --record the number of rows
 create table oldstat(rowCount int);
 0 rows inserted/updated/deleted
@@ -745,10 +745,10 @@ I_S                                     
 I_AB                                                                                    
                                       |1                   
 ij> -- do consistency check on scans, etc.
 values  ConsistencyChecker();
-1                                                                                       
                                                                                         
                                                                                         
                                                                                         
                                                                                         
                                                               
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
+1                                                                                       
                                       
+--------------------------------------------------------------------------------------------------------------------------------
 No open scans, etc.
-3 dependencies found                                                                    
                                                                                         
                                                                                         
                                                                                         
                                                                                         
                                           
+3 dependencies found                                                                    
                   
 ij> rollback;
 ij> --record the number of rows
 create table newstat(rowCount int);

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/functions.out
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/functions.out?rev=927631&r1=927630&r2=927631&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/functions.out
(original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/functions.out
Thu Mar 25 22:53:15 2010
@@ -412,22 +412,22 @@ EXTERNAL NAME 'java.lang.Integer.toXXStr
 0 rows inserted/updated/deleted
 ij> -- these are ok
 VALUES SIGNATURE_BUG_DERBY_258_NS(2356, 16);
-1                                                                                       
                                       
---------------------------------------------------------------------------------------------------------------------------------
-934                                                                                     
                                       
+1                   
+--------------------
+934                 
 ij> VALUES SIGNATURE_BUG_DERBY_258_NS(2356, 10);
-1                                                                                       
                                       
---------------------------------------------------------------------------------------------------------------------------------
-2356                                                                                    
                                       
+1                   
+--------------------
+2356                
 ij> VALUES SIGNATURE_BUG_DERBY_258_NS(2356, 2);
-1                                                                                       
                                       
---------------------------------------------------------------------------------------------------------------------------------
-100100110100                                                                            
                                       
+1                   
+--------------------
+100100110100        
 ij> -- Must resolve as above
 VALUES SIGNATURE_BUG_DERBY_258_D(2356, 16);
-1                                                                                       
                                       
---------------------------------------------------------------------------------------------------------------------------------
-934                                                                                     
                                       
+1                   
+--------------------
+934                 
 ij> -- no method to resolve to (with specified signature)
 VALUES SIGNATURE_BUG_DERBY_258_E();
 ERROR 42X50: No method was found that matched the method call java.lang.Integer.toXXString(),
tried all combinations of object and primitive types and any possible type conversion for
any  parameters the method call may have. The method might exist but it is not public and/or
static, or the parameter types are not method invocation convertible.

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/onlineBackupTest2.out
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/onlineBackupTest2.out?rev=927631&r1=927630&r2=927631&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/onlineBackupTest2.out
(original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/onlineBackupTest2.out
Thu Mar 25 22:53:15 2010
@@ -124,13 +124,13 @@ create index idx1 on t1(a) ;
 ij(C2)> set connection c1;
 ij(C1)> -- make sure backup does not already exists at the backup location.
 values removeDirectory('extinout/ulbackup1');
-1                                                                                       
                                       
---------------------------------------------------------------------------------------------------------------------------------
-true                                                                                    
                                       
+1                                                                                       
           
+----------------------------------------------------------------------------------------------------
+true                                                                                    
           
 ij(C1)> values fileExists('extinout/ulbackup1');
-1                                                                                       
                                       
---------------------------------------------------------------------------------------------------------------------------------
-false                                                                                   
                                       
+1                                                                                       
           
+----------------------------------------------------------------------------------------------------
+false                                                                                   
           
 ij(C1)> async bthread1 'call SYSCS_UTIL.SYSCS_BACKUP_DATABASE(
                                     ''extinout/ulbackup1'')' ;
 ij(C1)> set connection c2;
@@ -140,9 +140,9 @@ call sleep(1000);
 0 rows inserted/updated/deleted
 ij(C2)> -- make sure backup did not really proceed, backup dir should not exist
 values fileExists('extinout/ulbackup1');
-1                                                                                       
                                       
---------------------------------------------------------------------------------------------------------------------------------
-false                                                                                   
                                       
+1                                                                                       
           
+----------------------------------------------------------------------------------------------------
+false                                                                                   
           
 ij(C2)> -- rollback the unlogged op for backup to proceed.
 rollback;
 ij(C2)> set connection c1;
@@ -151,9 +151,9 @@ wait for bthread1;
 0 rows inserted/updated/deleted
 ij(C1)> -- check if backup is created.
 values fileExists('extinout/ulbackup1');
-1                                                                                       
                                       
---------------------------------------------------------------------------------------------------------------------------------
-true                                                                                    
                                       
+1                                                                                       
           
+----------------------------------------------------------------------------------------------------
+true                                                                                    
           
 ij(C1)> commit;
 ij(C1)> -- case2: simple backup call with the default wait for ulogged ops
 set connection c2;
@@ -162,13 +162,13 @@ ij(C2)> create index idx1 on t1(a) ;
 ij(C2)> set connection c1;
 ij(C1)> -- make sure backup does not already exists at the backup location.
 values removeDirectory('extinout/ulbackup2');
-1                                                                                       
                                       
---------------------------------------------------------------------------------------------------------------------------------
-true                                                                                    
                                       
+1                                                                                       
           
+----------------------------------------------------------------------------------------------------
+true                                                                                    
           
 ij(C1)> values fileExists('extinout/ulbackup2');
-1                                                                                       
                                       
---------------------------------------------------------------------------------------------------------------------------------
-false                                                                                   
                                       
+1                                                                                       
           
+----------------------------------------------------------------------------------------------------
+false                                                                                   
           
 ij(C1)> async bthread1 
   'call SYSCS_UTIL.SYSCS_BACKUP_DATABASE(''extinout/ulbackup2'')';
 ij(C1)> set connection c2;
@@ -178,9 +178,9 @@ call sleep(1000);
 0 rows inserted/updated/deleted
 ij(C2)> -- make sure backup did not really proceed, backup dir should not exist
 values fileExists('extinout/ulbackup2');
-1                                                                                       
                                       
---------------------------------------------------------------------------------------------------------------------------------
-false                                                                                   
                                       
+1                                                                                       
           
+----------------------------------------------------------------------------------------------------
+false                                                                                   
           
 ij(C2)> -- rollback the unlogged op for backup to proceed.
 rollback;
 ij(C2)> set connection c1;
@@ -189,9 +189,9 @@ wait for bthread1;
 0 rows inserted/updated/deleted
 ij(C1)> -- check if backup is created.
 values fileExists('extinout/ulbackup2');
-1                                                                                       
                                       
---------------------------------------------------------------------------------------------------------------------------------
-true                                                                                    
                                       
+1                                                                                       
           
+----------------------------------------------------------------------------------------------------
+true                                                                                    
           
 ij(C1)> commit;
 ij(C1)> --- case 3: log archive backup with with unlogged ops pending.
 set connection c2;
@@ -200,13 +200,13 @@ ij(C2)> create index idx1 on t1(a) ;
 ij(C2)> set connection c1;
 ij(C1)> --make sure backup does not already exists at the backup location.
 values removeDirectory('extinout/ulbackup3');
-1                                                                                       
                                       
---------------------------------------------------------------------------------------------------------------------------------
-true                                                                                    
                                       
+1                                                                                       
           
+----------------------------------------------------------------------------------------------------
+true                                                                                    
           
 ij(C1)> values fileExists('extinout/ulbackup3');
-1                                                                                       
                                       
---------------------------------------------------------------------------------------------------------------------------------
-false                                                                                   
                                       
+1                                                                                       
           
+----------------------------------------------------------------------------------------------------
+false                                                                                   
           
 ij(C1)> async bthread1 
   'call SYSCS_UTIL.SYSCS_BACKUP_DATABASE_AND_ENABLE_LOG_ARCHIVE_MODE(
                                     ''extinout/ulbackup3'' , 1)' ;
@@ -217,9 +217,9 @@ call sleep(1000);
 0 rows inserted/updated/deleted
 ij(C2)> -- make sure backup did not really proceed, backup dir should not exist
 values fileExists('extinout/ulbackup3');
-1                                                                                       
                                       
---------------------------------------------------------------------------------------------------------------------------------
-false                                                                                   
                                       
+1                                                                                       
           
+----------------------------------------------------------------------------------------------------
+false                                                                                   
           
 ij(C2)> -- rollback the unlogged op for backup to proceed.
 rollback;
 ij(C2)> set connection c1;
@@ -228,9 +228,9 @@ wait for bthread1;
 0 rows inserted/updated/deleted
 ij(C1)> -- check if backup is created.
 values fileExists('extinout/ulbackup3');
-1                                                                                       
                                       
---------------------------------------------------------------------------------------------------------------------------------
-true                                                                                    
                                       
+1                                                                                       
           
+----------------------------------------------------------------------------------------------------
+true                                                                                    
           
 ij(C1)> call SYSCS_UTIL.SYSCS_DISABLE_LOG_ARCHIVE_MODE(1);
 0 rows inserted/updated/deleted
 ij(C1)> -- case4 : log archive backup with the defailt wait for unlogged ops.
@@ -240,13 +240,13 @@ ij(C2)> create index idx1 on t1(a) ;
 ij(C2)> set connection c1;
 ij(C1)> --make sure backup does not already exists at the backup location.
 values removeDirectory('extinout/ulbackup4');
-1                                                                                       
                                       
---------------------------------------------------------------------------------------------------------------------------------
-true                                                                                    
                                       
+1                                                                                       
           
+----------------------------------------------------------------------------------------------------
+true                                                                                    
           
 ij(C1)> values fileExists('extinout/ulbackup4');
-1                                                                                       
                                       
---------------------------------------------------------------------------------------------------------------------------------
-false                                                                                   
                                       
+1                                                                                       
           
+----------------------------------------------------------------------------------------------------
+false                                                                                   
           
 ij(C1)> async bthread1 
   'call SYSCS_UTIL.SYSCS_BACKUP_DATABASE_AND_ENABLE_LOG_ARCHIVE_MODE(
                                     ''extinout/ulbackup4'' , 1)' ;
@@ -257,9 +257,9 @@ call sleep(1000);
 0 rows inserted/updated/deleted
 ij(C2)> -- make sure backup did not really proceed, backup dir should not exist
 values fileExists('extinout/ulbackup4');
-1                                                                                       
                                       
---------------------------------------------------------------------------------------------------------------------------------
-false                                                                                   
                                       
+1                                                                                       
           
+----------------------------------------------------------------------------------------------------
+false                                                                                   
           
 ij(C2)> -- commit the unlogged op for backup to proceed.
 commit;
 ij(C2)> set connection c1;
@@ -268,9 +268,9 @@ wait for bthread1;
 0 rows inserted/updated/deleted
 ij(C1)> -- check if backup is created.
 values fileExists('extinout/ulbackup4');
-1                                                                                       
                                       
---------------------------------------------------------------------------------------------------------------------------------
-true                                                                                    
                                       
+1                                                                                       
           
+----------------------------------------------------------------------------------------------------
+true                                                                                    
           
 ij(C1)> call SYSCS_UTIL.SYSCS_DISABLE_LOG_ARCHIVE_MODE(1);
 0 rows inserted/updated/deleted
 ij(C1)> 

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/AnsiSignaturesTest.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/AnsiSignaturesTest.java?rev=927631&r1=927630&r2=927631&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/AnsiSignaturesTest.java
(original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/AnsiSignaturesTest.java
Thu Mar 25 22:53:15 2010
@@ -90,7 +90,7 @@ public class AnsiSignaturesTest extends 
      */
     public static Test suite()
     {
-        TestSuite suite = (TestSuite) TestConfiguration.embeddedSuite(AnsiSignaturesTest.class);
+        TestSuite suite = (TestSuite) TestConfiguration.defaultSuite(AnsiSignaturesTest.class);
 
         return new CleanDatabaseTestSetup( suite );
     }



Mime
View raw message