db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Knut Anders Hatlen (JIRA)" <j...@apache.org>
Subject [jira] Commented: (DERBY-4389) ArrayIndexOutOfBoundsException in RIGHT JOIN with COALESCE
Date Fri, 25 Sep 2009 21:21:16 GMT

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

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

In 10.1 and earlier, a NullPointerException is thrown with non-debug builds. In 10.2 and later,
an ArrayIndexOutOfBoundsException is thrown.

> ArrayIndexOutOfBoundsException in RIGHT JOIN with COALESCE
> ----------------------------------------------------------
>
>                 Key: DERBY-4389
>                 URL: https://issues.apache.org/jira/browse/DERBY-4389
>             Project: Derby
>          Issue Type: Bug
>          Components: SQL
>    Affects Versions: 10.0.2.1, 10.1.3.1, 10.2.2.0, 10.3.3.0, 10.4.2.0, 10.5.3.0, 10.6.0.0
>            Reporter: Knut Anders Hatlen
>
> Dag H. Wanvik identified this problematic query in DERBY-4342:
> ij> create table t(x int, y int);
> 0 rows inserted/updated/deleted
> ij> insert into t values (1,2);
> 1 row inserted/updated/deleted
> ij> select * from t t1 right join t t2 on t1.x=t2.x where coalesce(t1.x,t1.y) = 1;
> ERROR 38000: The exception 'java.lang.ArrayIndexOutOfBoundsException: -1' was thrown
while evaluating an expression.
> ERROR XJ001: Java exception: '-1: java.lang.ArrayIndexOutOfBoundsException'.
> With a debug build, an assert failure is raised instead:
> ij> select * from t t1 right join t t2 on t1.x=t2.x where coalesce(t1.x,t1.y) = 1;
> ERROR XJ001: Java exception: 'ASSERT FAILED sourceResultSetNumber expected to be >=
0 for T1.X: org.apache.derby.shared.common.sanity.AssertFailure'.

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


Mime
View raw message