[ https://issues.apache.org/jira/browse/DERBY-3061?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12525757 ]
A B commented on DERBY-3061: ---------------------------- I ran the repro with svn # 541822 ant it fails with an ASSERT failure: shared.common.sanity.AssertFailure: ASSERT FAILED All multi-probing result sets are expected to have a single key that is both the start key AND the stop key, but that is not the case. at shared.common.sanity.SanityManager.ASSERT(SanityManager.java(Compiled Code)) at impl.sql.execute.MultiProbeTableScanResultSet.<init>(MultiProbeTableScanResultSet.java:158) ... But that ASSERT was removed as part of changes for DERBY-2740, hence no failure in 10.3.1.4 nor latest runk. It looks like that fix was intended to allow different start/stop keys to work (hence the assertion was removed), but apparently it does not do the correct thing after all. > Wrong results from query with two conjuncts > ------------------------------------------- > > Key: DERBY-3061 > URL: https://issues.apache.org/jira/browse/DERBY-3061 > Project: Derby > Issue Type: Bug > Components: SQL > Affects Versions: 10.3.1.4 > Reporter: Rick Hillegas > Priority: Critical > > Tim Dudgeon, on the user list, reports that the following query returns no > results in 10.3.1.4 but works correctly in 10.2. I have verified that the > query returns no results in the mainline as well. If you eliminate either of > the the conjuncts, then the query returns the correct results: > SELECT MYTABLE.MY_ID > FROM MYTABLE > WHERE MYTABLE.MY_ID < 100 AND MYTABLE.MY_ID IN ( > 2,15,19,20,21,48,49 > ) > Here is a more complete script which demonstrates the problem: > drop table mytable; > create table mytable ( id int primary key ); > insert into mytable ( id ) > values > ( 0 ), ( 1 ), ( 2 ), ( 3 ), ( 4 ), ( 5 ), ( 6 ), ( 7 ), ( 8 ), ( 9 ); > insert into mytable select id + 10 from mytable; > insert into mytable select id + 20 from mytable; > insert into mytable select id + 40 from mytable; > insert into mytable select id + 100 from mytable; > select mytable.id > from mytable > where mytable.id < 100; > select mytable.id > from mytable > where mytable.id in ( 2, 15, 19, 20, 21, 48, 49 ); > select mytable.id > from mytable > where mytable.id < 100 > and mytable.id in ( 2, 15, 19, 20, 21, 48, 49 ); > -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.