db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rhille...@apache.org
Subject svn commit: r564800 - in /db/derby/code/trunk/java: engine/org/apache/derby/catalog/GetProcedureColumns.java testing/org/apache/derbyTesting/functionTests/tests/lang/TableFunctionTest.java
Date Fri, 10 Aug 2007 23:32:17 GMT
Author: rhillegas
Date: Fri Aug 10 16:32:17 2007
New Revision: 564800

URL: http://svn.apache.org/viewvc?view=rev&rev=564800
Log:
DERBY-716: Exclude summary row 0 from getFunctionColumns() result for Table Functions.

Modified:
    db/derby/code/trunk/java/engine/org/apache/derby/catalog/GetProcedureColumns.java
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/TableFunctionTest.java

Modified: db/derby/code/trunk/java/engine/org/apache/derby/catalog/GetProcedureColumns.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/catalog/GetProcedureColumns.java?view=diff&rev=564800&r1=564799&r2=564800
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/catalog/GetProcedureColumns.java (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/catalog/GetProcedureColumns.java Fri
Aug 10 16:32:17 2007
@@ -133,6 +133,8 @@
     //
     public GetProcedureColumns(AliasInfo aliasInfo, String aliasType) throws SQLException
     {
+		int     functionParamCursor = -2;
+
 		// compile time aliasInfo will be null.
 		if (aliasInfo != null) {
 			isProcedure = aliasType.equals("P");
@@ -145,6 +147,7 @@
 			    tableFunctionReturnType = (RowMultiSetImpl) ((DataTypeDescriptor) procedure.getReturnType()).getTypeId().getBaseTypeId();
 			    returnedTableColumnCount = tableFunctionReturnType.getColumnNames().length;
 			    rowCount += returnedTableColumnCount;
+			    functionParamCursor = -1;
 		        }
 		}
 		if (aliasType == null) { 
@@ -157,7 +160,7 @@
 			sqlType = procedure.getReturnType();
 			columnName = "";  // COLUMN_NAME is VARCHAR NOT NULL
 			columnType = (short) JDBC40Translation.FUNCTION_RETURN;
-			paramCursor = -2;
+			paramCursor = functionParamCursor;
 			return;
 		}
 		nullable = (short) DatabaseMetaData.procedureNullable;

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/TableFunctionTest.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/TableFunctionTest.java?view=diff&rev=564800&r1=564799&r2=564800
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/TableFunctionTest.java
(original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/TableFunctionTest.java
Fri Aug 10 16:32:17 2007
@@ -169,27 +169,6 @@
             NO_CATALOG,
             "APP",
             "SIMPLEFUNCTIONTABLE",
-            RETURN_VALUE_NAME,
-            FUNCTION_RETURN_VALUE,
-            JDBC_TYPE_OTHER,
-            SFT_RETURN_TYPE,
-            PRECISION_NONE,
-            LENGTH_UNDEFINED,
-            SCALE_UNDEFINED,
-            RADIX_UNDEFINED,
-            ALLOWS_NULLS,
-            EMPTY_REMARKS,
-            UNDEFINED_CHAR_OCTET_LENGTH,
-            POSITION_RETURN_VALUE,
-            IS_NULLABLE,
-            GENERIC_NAME,
-            ARG_COUNT_0,
-            ROW_ORDER_RETURN_VALUE
-        },
-        {
-            NO_CATALOG,
-            "APP",
-            "SIMPLEFUNCTIONTABLE",
             "INTCOL",
             FUNCTION_RESULT_COLUMN,
             JDBC_TYPE_INT,
@@ -237,28 +216,6 @@
 
     /** Expected rows from getFunctionColumns() for  returnsAllLegalDatatypes */
     private static final Object[][]  GFC_RADT= {
-        {
-            NO_CATALOG,
-            "APP",
-            "RETURNSALLLEGALDATATYPES",
-            RETURN_VALUE_NAME,
-            FUNCTION_RETURN_VALUE,
-            JDBC_TYPE_OTHER,
-            RADT_RETURN_TYPE,
-            PRECISION_NONE,
-            LENGTH_UNDEFINED,
-            SCALE_UNDEFINED,
-            RADIX_UNDEFINED,
-            ALLOWS_NULLS,
-            EMPTY_REMARKS,
-            UNDEFINED_CHAR_OCTET_LENGTH,
-            POSITION_RETURN_VALUE,
-            IS_NULLABLE,
-            GENERIC_NAME,
-            ARG_COUNT_2,
-            ROW_ORDER_RETURN_VALUE
-        },
-
         {
             NO_CATALOG,
             "APP",



Mime
View raw message