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

Embedded returns wrong value for DatabaseMetaData.autoCommitFailureClosesAllResultSets()

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 10.4.1.3
    • 10.3.3.0, 10.4.1.3
    • JDBC
    • None

    Description

      DatabaseMetaData.autoCommitFailureClosesAllResultSets() returns false both on the client and on embedded. However, the embedded driver does in fact close all open result sets when an error occurs in auto-commit mode. There is a test case in jdbc4.TestDbMetaData to test this (testAutoCommitFailure), but it only uses ResultSet.isClosed() to check whether or not the result set is closed after the failure. Because of DERBY-3404, isClosed() returns false for the result sets that have been closed because of the failure, so the test doesn't reveal the bug. If the test is changed to invoke methods on the result set (e.g. next()) instead of calling isClosed(), we'll see that the result set is in fact closed and get an SQLException with SQL state XCL16.

      Attachments

        1. test.diff
          3 kB
          Knut Anders Hatlen
        2. d3422.stat
          0.2 kB
          Knut Anders Hatlen
        3. d3422.diff
          4 kB
          Knut Anders Hatlen

        Issue Links

          Activity

            People

              knutanders Knut Anders Hatlen
              knutanders Knut Anders Hatlen
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: