Derby
  1. Derby
  2. DERBY-4460

test_031_derby_4413 failed in nightly regression run : ComparisonFailure: expected: 1 but was: 2

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 10.6.1.0
    • Fix Version/s: 10.5.3.1, 10.6.1.0
    • Component/s: Test
    • Labels:
      None
    • Environment:
      ibm15 jvm on windows
      ibm142 jvm on linux
      ibm15 jvm on linux
    • Issue & fix info:
      High Value Fix
    • Bug behavior facts:
      Regression Test Failure

      Description

      Failed in full nightly run along with the already fixed testDistinctInsertWithGeneratedColumn failure.
      2) test_031_derby_4413(org.apache.derbyTesting.functionTests.tests.lang.GeneratedColumnsTest)junit.framework.ComparisonFailure: expected:<1> but was:<2>
      at org.apache.derbyTesting.functionTests.tests.lang.GeneratedColumnsHelper.assertResults(GeneratedColumnsHelper.java:346)
      at org.apache.derbyTesting.functionTests.tests.lang.GeneratedColumnsHelper.assertResults(GeneratedColumnsHelper.java:310)
      at org.apache.derbyTesting.functionTests.tests.lang.GeneratedColumnsTest.test_031_derby_4413(GeneratedColumnsTest.java:5442)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:79)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at org.apache.derbyTesting.junit.BaseTestCase.runBare(BaseTestCase.java:109)
      at junit.extensions.TestDecorator.basicRun(TestDecorator.java:22)
      at junit.extensions.TestSetup$1.protect(TestSetup.java:19)
      at junit.extensions.TestSetup.run(TestSetup.java:23)
      at org.apache.derbyTesting.junit.BaseTestSetup.run(BaseTestSetup.java:57)
      at junit.extensions.TestDecorator.basicRun(TestDecorator.java:22)
      at junit.extensions.TestSetup$1.protect(TestSetup.java:19)
      at junit.extensions.TestSetup.run(TestSetup.java:23)

      1. orderby.diff
        0.9 kB
        Knut Anders Hatlen

        Issue Links

          Activity

          Hide
          Knut Anders Hatlen added a comment -

          [bulk update] Close all resolved issues that haven't been updated for more than one year.

          Show
          Knut Anders Hatlen added a comment - [bulk update] Close all resolved issues that haven't been updated for more than one year.
          Hide
          Mike Matrigali added a comment -

          backported to 10.5, resolving as fixed there, and resetting original owner.

          Show
          Mike Matrigali added a comment - backported to 10.5, resolving as fixed there, and resetting original owner.
          Hide
          Mike Matrigali added a comment -

          backported test fix from trunk to 10.5 branch.

          s105_ibm16:23>svn commit

          Sending java\testing\org\apache\derbyTesting\functionTests\tests\lang\GeneratedColumnsTest.java
          Transmitting file data .
          Committed revision 961977.

          Show
          Mike Matrigali added a comment - backported test fix from trunk to 10.5 branch. s105_ibm16:23>svn commit Sending java\testing\org\apache\derbyTesting\functionTests\tests\lang\GeneratedColumnsTest.java Transmitting file data . Committed revision 961977.
          Hide
          Mike Matrigali added a comment -

          reopening issue to backport to 10.5.

          Show
          Mike Matrigali added a comment - reopening issue to backport to 10.5.
          Hide
          Knut Anders Hatlen added a comment -

          Committed revision 886008.

          Show
          Knut Anders Hatlen added a comment - Committed revision 886008.
          Hide
          Knut Anders Hatlen added a comment -

          The attached patch adds an ORDER BY clause to the query that checks the contents of the table in order to guarantee a specific ordering. Then the test passes on Java 1.5, 1.6 and 1.7 on my system (without the patch it fails on 1.5).

          The root cause appears to be the same as in DERBY-4457. Now that DERBY-4442 ensures that the generated columns are added to a node on top of the SelectNode in the INSERT statement, SELECT DISTINCT can be performed with a hash scan instead of a sort, and the order in which the rows are inserted depends on the JVM's hash table implementation.

          Show
          Knut Anders Hatlen added a comment - The attached patch adds an ORDER BY clause to the query that checks the contents of the table in order to guarantee a specific ordering. Then the test passes on Java 1.5, 1.6 and 1.7 on my system (without the patch it fails on 1.5). The root cause appears to be the same as in DERBY-4457 . Now that DERBY-4442 ensures that the generated columns are added to a node on top of the SelectNode in the INSERT statement, SELECT DISTINCT can be performed with a hash scan instead of a sort, and the order in which the rows are inserted depends on the JVM's hash table implementation.
          Hide
          Knut Anders Hatlen added a comment - - edited

          This issue is probably similar to DERBY-4457. The failing test case performs an INSERT INTO ... SELECT DISTINCT, and the order of the rows returned by SELECT DISTINCT is dependent on the hash table implementation of the JVM. I'll take a look at it.

          Show
          Knut Anders Hatlen added a comment - - edited This issue is probably similar to DERBY-4457 . The failing test case performs an INSERT INTO ... SELECT DISTINCT, and the order of the rows returned by SELECT DISTINCT is dependent on the hash table implementation of the JVM. I'll take a look at it.
          Hide
          Mike Matrigali added a comment -

          This test passed on same machine, same jars against ibm16 and weme6.2. Could this be another problem with indeterminite query plans?

          Show
          Mike Matrigali added a comment - This test passed on same machine, same jars against ibm16 and weme6.2. Could this be another problem with indeterminite query plans?

            People

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

              Dates

              • Created:
                Updated:
                Resolved:

                Development