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

DatabaseMetaData is not consistent about throwing SqlException when tablename=null

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Trivial
    • Resolution: Fixed
    • 10.3.1.4
    • 10.3.1.4, 10.4.1.3
    • Network Client
    • None

    Description

      According to java.sql.DatabaseMetaData, the following DatabaseMetaData methods should not allow tablename=null:

      getBestRowIdentifier, getColumnPrivileges, getIndexInfo, getVersionColumns, getPrimaryKeys, getImportedKeys, getExportedKeys. In the five former methods, SqlExceptions are thrown if tablename == null, but this check is not performed in the latter two.

      The method calls eventually end up in EmbedDatabaseMetaData, which performs this check. Hence, an exception is thrown either way. If we want the exception to be thrown as early as possible, the two latter methods should do so as well. If not, the check should be removed from the former methods.

      Attachments

        1. d2607.diff
          1 kB
          Thomas Nielsen

        Activity

          People

            thomanie Thomas Nielsen
            jorgenlo Jorgen Loland
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: