Knut Anders Hatlen created DERBY-6029:
-----------------------------------------
Summary: ClassCastException or assert when mixing system tables
and user tables in LIKE ... ESCAPE
Key: DERBY-6029
URL: https://issues.apache.org/jira/browse/DERBY-6029
Project: Derby
Issue Type: Bug
Components: SQL
Affects Versions: 10.9.1.0
Reporter: Knut Anders Hatlen
ij> connect
'jdbc:derby:memory:db;create=true;territory=en_US;collation=TERRITORY_BASED';
ij> create table t(x varchar(20), y varchar(20));
0 rows inserted/updated/deleted
ij> insert into t values ('abc', 'def');
1 row inserted/updated/deleted
ij> select * from t, sysibm.sysdummy1 where x like y escape ibmreqd;
X |Y |IBM&
----------------------------------------------
ERROR 38000: The exception 'java.lang.ClassCastException:
org.apache.derby.iapi.types.SQLChar cannot be cast to
org.apache.derby.iapi.types.CollationElementsInterface' was thrown while
evaluating an expression.
ERROR XJ001: Java exception: 'org.apache.derby.iapi.types.SQLChar cannot be
cast to org.apache.derby.iapi.types.CollationElementsInterface:
java.lang.ClassCastException'.
Or, when using sane jars:
ij> select * from t, sysibm.sysdummy1 where x like y escape ibmreqd;
X |Y |IBM&
----------------------------------------------
ERROR 38000: The exception
'org.apache.derby.shared.common.sanity.AssertFailure: ASSERT FAILED All three
operands must be instances of CollationElementsInterface' was thrown while
evaluating an expression.
ERROR XJ001: Java exception: 'ASSERT FAILED All three operands must be
instances of CollationElementsInterface:
org.apache.derby.shared.common.sanity.AssertFailure'.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira