You are viewing a plain text version of this content. The canonical link for it is here.
Posted to derby-dev@db.apache.org by "Knut Anders Hatlen (JIRA)" <ji...@apache.org> on 2009/09/25 23:15:16 UTC
[jira] Created: (DERBY-4389) ArrayIndexOutOfBoundsException in
RIGHT JOIN with COALESCE
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.5.3.0, 10.4.2.0, 10.3.3.0, 10.2.2.0, 10.1.3.1, 10.0.2.1, 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.
[jira] Commented: (DERBY-4389) ArrayIndexOutOfBoundsException in
RIGHT JOIN with COALESCE
Posted by "Knut Anders Hatlen (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/DERBY-4389?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12759750#action_12759750 ]
Knut Anders Hatlen commented on DERBY-4389:
-------------------------------------------
Stack trace for the assert failure:
org.apache.derby.shared.common.sanity.AssertFailure: ASSERT FAILED sourceResultSetNumber expected to be >= 0 for T1.X
at org.apache.derby.shared.common.sanity.SanityManager.THROWASSERT(SanityManager.java:162)
at org.apache.derby.shared.common.sanity.SanityManager.THROWASSERT(SanityManager.java:147)
at org.apache.derby.impl.sql.compile.ColumnReference.generateExpression(ColumnReference.java:941)
at org.apache.derby.impl.sql.compile.CoalesceFunctionNode.generateExpression(CoalesceFunctionNode.java:262)
at org.apache.derby.impl.sql.compile.BinaryOperatorNode.generateExpression(BinaryOperatorNode.java:600)
at org.apache.derby.impl.sql.compile.ProjectRestrictNode.generateMinion(ProjectRestrictNode.java:1521)
at org.apache.derby.impl.sql.compile.ProjectRestrictNode.generate(ProjectRestrictNode.java:1341)
at org.apache.derby.impl.sql.compile.JoinNode.getJoinArguments(JoinNode.java:1588)
at org.apache.derby.impl.sql.compile.JoinNode.generateCore(JoinNode.java:1566)
at org.apache.derby.impl.sql.compile.JoinNode.generateCore(JoinNode.java:1503)
at org.apache.derby.impl.sql.compile.HalfOuterJoinNode.generate(HalfOuterJoinNode.java:691)
at org.apache.derby.impl.sql.compile.ProjectRestrictNode.generateMinion(ProjectRestrictNode.java:1390)
at org.apache.derby.impl.sql.compile.ProjectRestrictNode.generate(ProjectRestrictNode.java:1341)
at org.apache.derby.impl.sql.compile.ProjectRestrictNode.generateMinion(ProjectRestrictNode.java:1390)
at org.apache.derby.impl.sql.compile.ProjectRestrictNode.generate(ProjectRestrictNode.java:1341)
at org.apache.derby.impl.sql.compile.ScrollInsensitiveResultSetNode.generate(ScrollInsensitiveResultSetNode.java:109)
at org.apache.derby.impl.sql.compile.CursorNode.generate(CursorNode.java:623)
at org.apache.derby.impl.sql.compile.StatementNode.generate(StatementNode.java:347)
at org.apache.derby.impl.sql.GenericStatement.prepMinion(GenericStatement.java:458)
at org.apache.derby.impl.sql.GenericStatement.prepare(GenericStatement.java:88)
at org.apache.derby.impl.sql.conn.GenericLanguageConnectionContext.prepareInternalStatement(GenericLanguageConnectionContext.java:824)
at org.apache.derby.impl.jdbc.EmbedStatement.execute(EmbedStatement.java:606)
at org.apache.derby.impl.jdbc.EmbedStatement.execute(EmbedStatement.java:555)
> 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.
[jira] Commented: (DERBY-4389) ArrayIndexOutOfBoundsException in
RIGHT JOIN with COALESCE
Posted by "Knut Anders Hatlen (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/DERBY-4389?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12759915#action_12759915 ]
Knut Anders Hatlen commented on DERBY-4389:
-------------------------------------------
The error changed from NPE to AIOBE in revision 437070 (DERBY-883 - Enhance GROUP BY clause to support expressions instead of just column references), probably because the accept() method was added to CoalesceFunctionNode.
> 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.
[jira] Commented: (DERBY-4389) ArrayIndexOutOfBoundsException in
RIGHT JOIN with COALESCE
Posted by "Knut Anders Hatlen (JIRA)" <ji...@apache.org>.
[ 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.
[jira] Closed: (DERBY-4389) ArrayIndexOutOfBoundsException in RIGHT
JOIN with COALESCE
Posted by "Knut Anders Hatlen (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/DERBY-4389?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Knut Anders Hatlen closed DERBY-4389.
-------------------------------------
Resolution: Duplicate
This bug was fixed by DERBY-4594. Closing as duplicate.
> 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.1.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.