DERBY-6025(Wrong results with IN lists and indexes in territory based collation)

Basically, when all the elements in the inlist are not all constants, then we can not figure out at compile time the minimum and maximum values in the list. Mimimum and maximum values in the in list are required to be passed as start and stop keys if compiler decides to use an index for the inlist predicate. Since these can not be determined at compile time for non constant elements, InListOperatorNoce.generateStartStopKey ends up generating code which will run at execution time of the query and at that time, we will compare the values of the individual elements in the in list to determine the minimum and maximum values. The porblem is that currently, Derby does not pass the collation information of the left operand of the inlist to execution time and because of that, we end up doing English comparison of the values rather than terriroty based comparison in case of territory based database. The fix is to have InListOperatorNoce.generateStartStopKey generate code to pass collation information also. This way, we will do collation based comparison of in list elements in case of territory based database. I have run the reproducible case from jira against my changes and the query now returns correct row. I have run derbyall against the changes and it finished with no errors. The junit suite is running into following 3 failures but I have verified that those 3 failures happen without my changes too. So I will assume that these failures are not caused by my changes. The failures are copied below.
There were 3 failures:
1) testStartNetworkServerLogMessageOnDualStart(org.apache.derbyTesting.functionTests.tests.derbynet.DerbyNetAutoStartTest)junit.framework.AssertionFailedError: did not find the expected string: An exception was thrown during network server startup within the maximum wait time 240000
at org.apache.derbyTesting.functionTests.tests.derbynet.DerbyNetAutoStartTest.testStartNetworkServerLogMessageOnDualStart(DerbyNetAutoStartTest.java:272)
2) test_5391(org.apache.derbyTesting.functionTests.tests.lang.SysDiagVTIMappingTest)junit.framework.AssertionFailedError
at org.apache.derbyTesting.functionTests.tests.lang.SysDiagVTIMappingTest.vetTimestamp(SysDiagVTIMappingTest.java:933)
3) test_5391(org.apache.derbyTesting.functionTests.tests.lang.SysDiagVTIMappingTest)junit.framework.AssertionFailedError
at org.apache.derbyTesting.functionTests.tests.lang.SysDiagVTIMappingTest.vetTimestamp(SysDiagVTIMappingTest.java:933)




git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1574565 13f79535-47bb-0310-9956-ffa450edef68