Uploaded image for project: 'Derby'
  1. Derby
  2. DERBY-2287

JDBC meta data for precision and size is inconsistent and does not match JDBC specifications.


    • Type: Bug
    • Status: Open
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s:,,,,,,
    • Fix Version/s: None
    • Component/s: JDBC, Network Client
    • Urgency:
    • Issue & fix info:
      Release Note Needed
    • Bug behavior facts:
      Deviation from standard


      JDBC 4.0 has clarified the definitions of precision in the java doc for various methods that return precision or size. The concept of precision and size seems to be the same, just having different method or column names in various situations.

      Derby does not follow the JDBC 4 specifications consistently, for example -1 is sometimes used to indicate not applicable, where JBDC 4 says NULL or 0. The precision of datetime columns is defined to be non-zero but in some situations Derby returns 0.

      jdbcapi.DatabaseMetaDataTest can show some of these issues, the test of getColumns() should compare the information in the COLUMN_SIZE column to the ResultSetMetaData getPrecision() method for the same column. The comparisions are not made currently because the number of mismatches is high. [this code is not yet committed].

      Existing application impact as Derby applications may have been relying on the old incorrect & inconsistent behaviour.




            • Assignee:
              djd Daniel John Debrunner
            • Votes:
              0 Vote for this issue
              1 Start watching this issue


              • Created: