[ 
https://issues.apache.org/jira/browse/DERBY-4457?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12784244#action_12784244
 ] 

Knut Anders Hatlen commented on DERBY-4457:
-------------------------------------------

Since the ordering is unspecified, and it could vary depending on available 
indexes and which plan was chosen even before DERBY-4442, I don't think a 
release note is needed. Here's an example with 10.5.3.0 showing that different 
plans could cause different ordering with this kind of query earlier as well:

ij> create table dest(x int, y int generated always as identity);
0 rows inserted/updated/deleted
ij> insert into dest(x) select distinct x from source;
5 rows inserted/updated/deleted
ij> select * from dest;
X          |Y          
-----------------------
1          |1          
2          |2          
3          |3          
4          |4          
5          |5          

5 rows selected
ij> delete from dest;
5 rows inserted/updated/deleted
ij> create index idx on source(x desc);
0 rows inserted/updated/deleted
ij> insert into dest(x) select distinct x from source;
5 rows inserted/updated/deleted
ij> select * from dest;
X          |Y          
-----------------------
1          |10         
2          |9          
3          |8          
4          |7          
5          |6          

5 rows selected

> 'Column value mismatch' in 
> 'testDistinctInsertWithGeneratedColumn(...lang.DistinctTest)' on Jvm 1.5, 
> 1.4, phoneME.
> ------------------------------------------------------------------------------------------------------------------
>
>                 Key: DERBY-4457
>                 URL: https://issues.apache.org/jira/browse/DERBY-4457
>             Project: Derby
>          Issue Type: Bug
>          Components: Test
>    Affects Versions: 10.6.0.0
>         Environment: JVM:
> Sun Microsystems Inc.
> java version "1.5.0_14"
> Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_14-b03)
> Java HotSpot(TM) Server VM (build 1.5.0_14-b03 mixed mode 32-bit)
> Sun Microsystems Inc.
> java version "1.4.2_02"
> Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_02-b03)
> Java HotSpot(TM) Client VM (build 1.4.2_02-b03 mixed mode 32-bit)
> Product: phoneME Advanced (phoneme_advanced_mr2-b116)
> Profile: Foundation Profile Specification 1.1
> JVM:     CVM phoneme_advanced_mr2-b116 (interpreter loop)
>            Reporter: Ole Solberg
>            Assignee: Knut Anders Hatlen
>             Fix For: 10.6.0.0
>
>         Attachments: d4457.diff
>
>
> See e.g. 
> http://dbtg.foundry.sun.com/derby/test/Daily/jvm1.5/testing/testlog/sol/885498-suitesAll_diff.txt
>  :
> 1) 
> testDistinctInsertWithGeneratedColumn(org.apache.derbyTesting.functionTests.tests.lang.DistinctTest)junit.framework.AssertionFailedError:
>  Column value mismatch @ column 'C12', row 1:
>     Expected: >1<
>     Found:    >2<
>       at 
> org.apache.derbyTesting.junit.JDBC.assertRowInResultSet(JDBC.java:1081)
>       at 
> org.apache.derbyTesting.junit.JDBC.assertRowInResultSet(JDBC.java:993)
>       at org.apache.derbyTesting.junit.JDBC.assertFullResultSet(JDBC.java:881)
>       at org.apache.derbyTesting.junit.JDBC.assertFullResultSet(JDBC.java:819)
>       at org.apache.derbyTesting.junit.JDBC.assertFullResultSet(JDBC.java:777)
>       at 
> org.apache.derbyTesting.functionTests.tests.lang.DistinctTest.testDistinctInsertWithGeneratedColumn(DistinctTest.java:462)
>       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>       at 
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>       at 
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>       at 
> org.apache.derbyTesting.junit.BaseTestCase.runBare(BaseTestCase.java:109)
>       at junit.extensions.TestDecorator.basicRun(TestDecorator.java:24)
>       at junit.extensions.TestSetup$1.protect(TestSetup.java:21)
>       at junit.extensions.TestSetup.run(TestSetup.java:25)
>       at junit.extensions.TestDecorator.basicRun(TestDecorator.java:24)
>       at junit.extensions.TestSetup$1.protect(TestSetup.java:21)
>       at junit.extensions.TestSetup.run(TestSetup.java:25)

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to