Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-2026778 | 1.3.0 | J. Duke | P4 | Resolved | Fixed | beta |
JDK-2026777 | 1.2.2_006 | J. Duke | P4 | Closed | Fixed | 006 |
JDK-2026776 | 1.2.2_005 | J. Duke | P4 | Closed | Fixed | 005 |
JDK-2026775 | 1.2.1_002 | J. Duke | P4 | Resolved | Fixed | b02 |
JDK-2026774 | 1.1.8_001 | J. Duke | P4 | Resolved | Fixed | b01 |
Name: mf23781 Date: 04/30/99
This JdbcOdbc problem was found when testing with an Oracle
Level 3 ODBC driver.
.
Our AIX testing environment is
-JDK 116 Jdbc-Odbc Bridge on AIX 4.3.0.0
-ODBC Driver: evaluation release version 03.50 for AIX downloaded from www.merant.com: http://www.merant.com/datadirect/download/eval/Forms/connect_odbc.htx
-Database: oracle 8.0.4 on AIX 4.3.0.0
.
The test suite that we are using is the JDBC compliant test suite downloaded from Javasoft partner site in the private area: jdbc.tests.src and jdbc-harness which controls the running of the tests.
.
For the defect on supportsMixedCaseIdentifiers() and supportsMixedCaseQuotedIdentifiers(), the following test is to be used: jdbcTest.dbmetadata.DBInfo
.
The supportsMixedCaseIdentifiers() & supportsMixedCaseQuotedIdentifiers()
methods return booleans describing the Drivers support for these concepts.
These values are defined in the JDBC 1.2 spec for a JDBC Compliant Driver.
.
The jdbc-odbc bridge implementation of java.sql.DatabaseMetaData returns an incorrect value for both of these values:
supportsMixedCaseIdentifiers() returns true (spec is false)
supportsMixedCaseQuotedIdentifiers() returns false (spec is true)
.
.
According to JDBC specification:
.
The 2 methods returns true or false to indicate whether
the database treat mixed case SQL identifiers as case sensitive
and as a result store them in mixed case for the unquoted
and quoted cases in the above 2 methods.
.
The original code is:
.
return ((value == OdbcDef.SQL_IC_MIXED) ||
(value == OdbcDef.SQL_IC_UPPER) ||
(value == OdbcDef.SQL_IC_LOWER));
.
when it should be:
.
return (value == OdbcDef.SQL_IC_SENSITIVE);
.
.
According to ODBC specifications:
.
SQL_IC_UPPER:
Identifiers in SQL are not case-sensitive and are stored in
uppercase in the system catalogue.
.
SQL_IC_LOWER:
Identifiers in SQL are not case-sensitive and are stored in
lowercase in the system catalogue.
.
SQL_IC_SENSITIVE:
Identifers in SQL are case-sensitive and are stored in mixed
case in the system catalogue.
.
SQL_IC_MIXED:
Identifiers in SQL are not case-sensitive and are stored in
mixed case in the system catalogue.
.
.
Fix:
.
The fix in JdbcOdbcDatabaseMetaData.java is shown as diff output:
.
(supportsMixedCaseIdentifiers)
342,345c342,344
< //return ((value == OdbcDef.SQL_IC_MIXED) ||
< // (value == OdbcDef.SQL_IC_UPPER) ||
< // (value == OdbcDef.SQL_IC_LOWER));
< return (value == OdbcDef.SQL_IC_SENSITIVE); /*ibm D9457*/
---
> return ((value == OdbcDef.SQL_IC_MIXED) ||
> (value == OdbcDef.SQL_IC_UPPER) ||
> (value == OdbcDef.SQL_IC_LOWER));
.
(supportsMixedCaseQuotedIdentifiers)
409,412c408,410
< //return ((value == OdbcDef.SQL_IC_MIXED) ||
< // (value == OdbcDef.SQL_IC_UPPER) ||
< // (value == OdbcDef.SQL_IC_LOWER));
< return (value == OdbcDef.SQL_IC_MIXED); /*ibm D9457*/
---
> return ((value == OdbcDef.SQL_IC_MIXED) ||
> (value == OdbcDef.SQL_IC_UPPER) ||
> (value == OdbcDef.SQL_IC_LOWER));
.
Note: dots have been inserted on all blank lines to maintain
readability
(Review ID: 57678)
======================================================================
- backported by
-
JDK-2026774 JdbcOdbc, level 3.0 '...StoresMixedCase...' returns incorrect values
- Resolved
-
JDK-2026775 JdbcOdbc, level 3.0 '...StoresMixedCase...' returns incorrect values
- Resolved
-
JDK-2026778 JdbcOdbc, level 3.0 '...StoresMixedCase...' returns incorrect values
- Resolved
-
JDK-2026776 JdbcOdbc, level 3.0 '...StoresMixedCase...' returns incorrect values
- Closed
-
JDK-2026777 JdbcOdbc, level 3.0 '...StoresMixedCase...' returns incorrect values
- Closed