db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rhille...@apache.org
Subject svn commit: r658427 - in /db/derby/code/trunk/java: engine/org/apache/derby/catalog/SystemProcedures.java engine/org/apache/derby/iapi/services/loader/ClassInspector.java testing/org/apache/derbyTesting/functionTests/tests/lang/AnsiSignaturesTest.java
Date Tue, 20 May 2008 20:56:52 GMT
Author: rhillegas
Date: Tue May 20 13:56:51 2008
New Revision: 658427

URL: http://svn.apache.org/viewvc?rev=658427&view=rev
Log:
DERBY-3652: Don't let SQL SMALLINT args match Java numerics bigger than short.

Modified:
    db/derby/code/trunk/java/engine/org/apache/derby/catalog/SystemProcedures.java
    db/derby/code/trunk/java/engine/org/apache/derby/iapi/services/loader/ClassInspector.java
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/AnsiSignaturesTest.java

Modified: db/derby/code/trunk/java/engine/org/apache/derby/catalog/SystemProcedures.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/catalog/SystemProcedures.java?rev=658427&r1=658426&r2=658427&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/catalog/SystemProcedures.java (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/catalog/SystemProcedures.java Tue May
20 13:56:51 2008
@@ -719,7 +719,7 @@
     public static void SYSCS_COMPRESS_TABLE(
     String  schema,
     String  tablename,
-    int     sequential)
+    short     sequential)
         throws SQLException
     {
 
@@ -841,7 +841,7 @@
      */
     public static void SYSCS_BACKUP_DATABASE_AND_ENABLE_LOG_ARCHIVE_MODE(
     String  backupDir,
-    int     deleteOnlineArchivedLogFiles)
+    short     deleteOnlineArchivedLogFiles)
 		throws SQLException
     {
 
@@ -877,7 +877,7 @@
      */
     public static void SYSCS_BACKUP_DATABASE_AND_ENABLE_LOG_ARCHIVE_MODE_NOWAIT(
     String  backupDir,
-    int     deleteOnlineArchivedLogFiles)
+    short     deleteOnlineArchivedLogFiles)
 		throws SQLException
     {
 
@@ -899,7 +899,7 @@
 	 */
 
     public static void SYSCS_DISABLE_LOG_ARCHIVE_MODE(
-    int     deleteOnlineArchivedLogFiles)
+    short     deleteOnlineArchivedLogFiles)
 		throws SQLException
     {
         Factory.getDatabaseOfConnection().disableLogArchiveMode(
@@ -908,14 +908,14 @@
 
 
     public static void SYSCS_SET_RUNTIMESTATISTICS(
-    int     enable)
+    short     enable)
 		throws SQLException
     {
 		ConnectionUtil.getCurrentLCC().setRunTimeStatisticsMode(enable != 0 ? true : false);
     }
 
     public static void SYSCS_SET_STATISTICS_TIMING(
-    int     enable)
+    short     enable)
 		throws SQLException
     {
 		ConnectionUtil.getCurrentLCC().setStatisticsTiming(enable != 0 ? true : false);
@@ -1051,9 +1051,9 @@
     public static void SYSCS_INPLACE_COMPRESS_TABLE(
     String  schema,
     String  tablename,
-    int     purgeRows,
-    int     defragmentRows,
-    int     truncateEnd)
+    short     purgeRows,
+    short     defragmentRows,
+    short     truncateEnd)
 		throws SQLException
     {
     	//Inplace compress let's the user call compress on VTI but it

Modified: db/derby/code/trunk/java/engine/org/apache/derby/iapi/services/loader/ClassInspector.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/iapi/services/loader/ClassInspector.java?rev=658427&r1=658426&r2=658427&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/iapi/services/loader/ClassInspector.java
(original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/iapi/services/loader/ClassInspector.java
Tue May 20 13:56:51 2008
@@ -1033,11 +1033,7 @@
 				return true;
 		} else if ((fromClass == Short.TYPE) || fromName.equals(nonPrimTypeNames[3]))
 			{
-			if ((toClass == Short.TYPE) || toName.equals(nonPrimTypeNames[3]) ||
-				(toClass == Integer.TYPE) ||
-				(toClass == Long.TYPE) ||
-				(toClass == Float.TYPE) ||
-				(toClass == Double.TYPE) )
+			if ((toClass == Short.TYPE) || toName.equals(nonPrimTypeNames[4]) )
 				return true;
 		} else if ((fromClass == Integer.TYPE) || fromName.equals(nonPrimTypeNames[4]))
 		{

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=658427&r1=658426&r2=658427&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
Tue May 20 13:56:51 2008
@@ -109,20 +109,20 @@
     public  void    test_smallint_short_Integer()
         throws Exception
     {
-        // FIXME declareAndRunFunction
-        // FIXME ( "smallint_short_Integer", "smallint", new String[] { "smallint" }, "3",
"3" );
+        declareAndRunFunction
+            ( "smallint_short_Integer", "smallint", new String[] { "smallint" }, "3", "3"
);
     }
     public  void    test_smallint_Integer_short()
         throws Exception
     {
-        // FIXME declareAndRunFunction
-        // FIXME ( "smallint_Integer_short", "smallint", new String[] { "smallint" }, "3",
"3" );
+        declareAndRunFunction
+            ( "smallint_Integer_short", "smallint", new String[] { "smallint" }, "3", "3"
);
     }
     public  void    test_smallint_Integer_Integer()
         throws Exception
     {
-        // FIXME declareAndRunFunction
-        // FIXME ( "smallint_Integer_Integer", "smallint", new String[] { "smallint" }, "3",
"3" );
+        declareAndRunFunction
+            ( "smallint_Integer_Integer", "smallint", new String[] { "smallint" }, "3", "3"
);
     }
 
     public  void    test_integer_int_int()
@@ -236,7 +236,7 @@
         throws Exception
     {
         declareAndFailFunction
-            ( "smallint_bad_short_Short", "smallint", new String[] { "smallint" }, "3", "3",
MISSING_METHOD_SQLSTATE );
+            ( "smallint_bad_short_Short", "smallint", new String[] { "smallint" }, "3", "3",
TRIED_ALL_COMBINATIONS );
     }
     public  void    test_smallint_bad_Short_short()
         throws Exception
@@ -260,14 +260,14 @@
     public  void    test_smallint_amb_short_short()
         throws Exception
     {
-        // FIXME declareAndFailFunction
-        // FIXME ( "smallint_amb_short_short", "smallint", new String[] { "smallint" }, "3",
"3", AMBIGUOUS );
+        //FIXME declareAndFailFunction
+        //FIXME ( "smallint_amb_short_short", "smallint", new String[] { "smallint" }, "3",
"3", AMBIGUOUS );
     }
     public  void    test_smallint_amb_Integer_short()
         throws Exception
     {
-        // FIXME declareAndFailFunction
-        // FIXME ( "smallint_amb_Integer_short", "smallint", new String[] { "smallint" },
"3", "3", AMBIGUOUS );
+        //FIXME declareAndFailFunction
+        //FIXME ( "smallint_amb_Integer_short", "smallint", new String[] { "smallint" },
"3", "3", AMBIGUOUS );
     }
 
     public  void    test_integer_amb_int_int()
@@ -332,13 +332,13 @@
         throws Exception
     {
         declareAndFailFunction
-            ( "smallint_unres_short", "smallint", new String[] { "smallint" }, "3", "3",
MISSING_METHOD_SQLSTATE );
+            ( "smallint_unres_short", "smallint", new String[] { "smallint" }, "3", "3",
TRIED_ALL_COMBINATIONS );
     }
     public  void    test_smallint_unres_Short()
         throws Exception
     {
-        //FIXME declareAndFailFunction
-        //FIXME ( "smallint_unres_Short", "smallint", new String[] { "smallint" }, "3", "3",
MISSING_METHOD_SQLSTATE );
+        declareAndFailFunction
+            ( "smallint_unres_Short", "smallint", new String[] { "smallint" }, "3", "3",
TRIED_ALL_COMBINATIONS );
     }
 
     public  void    test_integer_unres_int()



Mime
View raw message