db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From krist...@apache.org
Subject svn commit: r517132 - in /db/derby/code/trunk/java: engine/org/apache/derby/impl/jdbc/metadata.properties testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/DatabaseMetaDataTest.java
Date Mon, 12 Mar 2007 08:45:34 GMT
Author: kristwaa
Date: Mon Mar 12 01:45:32 2007
New Revision: 517132

URL: http://svn.apache.org/viewvc?view=rev&rev=517132
Log:
DERBY-2262: DatabaseMetaData.getTypeInfo returns incorrect MAXIMUM_SCALE value for DECIMAL
and NUMERIC types (changed from 32767 to 31).

Patch contributed by Saurabh Vyas.

Modified:
    db/derby/code/trunk/java/engine/org/apache/derby/impl/jdbc/metadata.properties
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/DatabaseMetaDataTest.java

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/jdbc/metadata.properties
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/jdbc/metadata.properties?view=diff&rev=517132&r1=517131&r2=517132
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/jdbc/metadata.properties (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/jdbc/metadata.properties Mon Mar
12 01:45:32 2007
@@ -776,9 +776,9 @@
 			1,TRUE,3,TRUE,FALSE,FALSE,CAST (NULL AS INTEGER),CAST (NULL AS INTEGER), \
 			CAST (NULL AS INTEGER)), \
 		('NUMERIC',2,31,CAST (NULL AS CHAR),CAST (NULL AS CHAR),'precision,scale', \
-			1,FALSE,2,FALSE,TRUE,FALSE,0,32767,10),\
+			1,FALSE,2,FALSE,TRUE,FALSE,0,31,10),\
 		('DECIMAL',3,31,CAST (NULL AS CHAR),CAST (NULL AS CHAR),'precision,scale', \
-			1,FALSE,2,FALSE,TRUE,FALSE,0,32767,10),\
+			1,FALSE,2,FALSE,TRUE,FALSE,0,31,10),\
 		('INTEGER',4,10,CAST (NULL AS CHAR),CAST (NULL AS CHAR),CAST (NULL AS CHAR), \
 			1,FALSE,2,FALSE,FALSE,TRUE,0,0,10),\
 		('SMALLINT',5,5,CAST (NULL AS CHAR),CAST (NULL AS CHAR),CAST (NULL AS CHAR), \

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/DatabaseMetaDataTest.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/DatabaseMetaDataTest.java?view=diff&rev=517132&r1=517131&r2=517132
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/DatabaseMetaDataTest.java
(original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/DatabaseMetaDataTest.java
Mon Mar 12 01:45:32 2007
@@ -1663,10 +1663,10 @@
             boolean hasScale = true;
             switch (type)
             {
-            case Types.DECIMAL:
-            case Types.NUMERIC:
-                maxScale = 32767; // 31; BUG DERBY-2262
-                break;
+        case Types.DECIMAL:
+        case Types.NUMERIC:
+            maxScale = 31; // Max Scale for Decimal & Numeric is 31: Derby-2262
+            break;
             case Types.TIMESTAMP:
                 maxScale = 6;
                 break;



Mime
View raw message