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

HeapScan test commits wrong connection

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 10.6.1.0
    • 10.6.1.0
    • Test
    • 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

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

            Dates

              Created:
              Updated:
              Resolved: