You are viewing a plain text version of this content. The canonical link for it is here.
Posted to derby-commits@db.apache.org by km...@apache.org on 2008/03/20 22:20:32 UTC
svn commit: r639463 -
/db/derby/code/branches/10.3.2.1_test/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/DatabaseMetaDataTest.java
Author: kmarsden
Date: Thu Mar 20 14:20:31 2008
New Revision: 639463
URL: http://svn.apache.org/viewvc?rev=639463&view=rev
Log:
Update DatabaseMetaData test with nullabilitiy fixes
DERBY-2775 (616853)
DERBY-3350 (616473)
Modified:
db/derby/code/branches/10.3.2.1_test/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/DatabaseMetaDataTest.java
Modified: db/derby/code/branches/10.3.2.1_test/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/DatabaseMetaDataTest.java
URL: http://svn.apache.org/viewvc/db/derby/code/branches/10.3.2.1_test/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/DatabaseMetaDataTest.java?rev=639463&r1=639462&r2=639463&view=diff
==============================================================================
--- db/derby/code/branches/10.3.2.1_test/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/DatabaseMetaDataTest.java (original)
+++ db/derby/code/branches/10.3.2.1_test/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/DatabaseMetaDataTest.java Thu Mar 20 14:20:31 2008
@@ -1697,7 +1697,7 @@
Types.INTEGER
};
-
+
boolean[] JDBC_COLUMN_NULLABILITY = {
false, false, true, true,
true, true, false, false,
@@ -1708,24 +1708,13 @@
true
};
- // DERBY-2307 Nullablity is wrong for columns 1,7,9 (1-based)
- // Make a modified copy of JDBC_COLUMN_NULLABILITY
- // here to allow the test to pass. Left JDBC_COLUMN_NULLABILITY
- // as the expected versions as it is also used for the ODBC
- // checks below and has the correct values.
- boolean[] JDBC_COLUMN_NULLABILITY_DERBY_2307 = {
- true, false, true, true,
- true, true, true, false,
- true, true, false,
- true, true,
- true, true,
- true, true,
- true
- };
-
+ // DERBY-2307 Nullablity is wrong for column 1 (1-based)
+ // Modify JDBC_COLUMN_NULLABILITY to reflect current reality
+ JDBC_COLUMN_NULLABILITY[1 - 1] = true;
+
ResultSet rs = getDMD().getTypeInfo();
assertMetaDataResultSet(rs, JDBC_COLUMN_NAMES, JDBC_COLUMN_TYPES
- , JDBC_COLUMN_NULLABILITY_DERBY_2307
+ , JDBC_COLUMN_NULLABILITY
);
/*
@@ -2091,11 +2080,11 @@
Types.VARCHAR, Types.VARCHAR, Types.VARCHAR, Types.VARCHAR,
Types.VARCHAR, Types.VARCHAR, Types.VARCHAR, Types.VARCHAR,
Types.VARCHAR, Types.VARCHAR
- }
- , new boolean[] {
- true, false, false, true, // TABLE_SCHEM cannot be NULL in Derby
- true, true, true, true,
- true, true
+ },
+ new boolean[] {
+ false, false, false, true, // TABLE_SCHEM cannot be NULL in Derby
+ false, true, true, true,
+ true, true
}
);
}
@@ -2696,11 +2685,11 @@
// incorrect
new boolean[] {
- true, false, false, false,
- true, false, false, false,
- true, true, true, false,
- false, true
- }
+ false, false, false, false,
+ false, false, false, false,
+ true, true, true, false,
+ false, true
+ }
// correct
/* new boolean[] {