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

HeapScan test commits wrong connection

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 10.6.1.0
    • Fix Version/s: 10.6.1.0
    • Component/s: Test
    • Labels:
      None

      Description

      The SELECT query in HeapScan is initialized like this:

      select = openDefaultConnection().prepareStatement("SELECT * FROM "+tableName);

      The test cases commit the transaction like this:

      getConnection().commit();

      openDefaultConnection() opens and returns a new connection to the default database, whereas getConnection() returns a cached default connection, so the two connections are not the same, and the transaction that's being committed is not the executing transaction.

        Attachments

        1. commit.diff
          2 kB
          Knut Anders Hatlen

          Activity

            People

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

              Dates

              • Created:
                Updated:
                Resolved: