You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by "Benjamin Lerer (JIRA)" <ji...@apache.org> on 2014/12/12 14:05:13 UTC

[jira] [Commented] (CASSANDRA-8455) IndexOutOfBoundsException when building SyntaxError message snippet

    [ https://issues.apache.org/jira/browse/CASSANDRA-8455?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14244093#comment-14244093 ] 

Benjamin Lerer commented on CASSANDRA-8455:
-------------------------------------------

When the patch for CASSANDRA-7111 was made cassandra-2.1 was using ANTLR 3.2. and trunk was using the version 3.5.2. As mentionned in my [comment|https://issues.apache.org/jira/browse/CASSANDRA-7111?focusedCommentId=14063463&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-14063463] ANTLR 3.5.2 seems to produce sometime some invalid tokens. It is one of those invalid tokens that caused the {{ArrayIndexOutOfBoundsException}}. 
The problem appears now because we migrated ANTLR to version 3.5.2 without backporting the invalid token fix from trunk.

> IndexOutOfBoundsException when building SyntaxError message snippet
> -------------------------------------------------------------------
>
>                 Key: CASSANDRA-8455
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-8455
>             Project: Cassandra
>          Issue Type: Bug
>          Components: Core
>            Reporter: Tyler Hobbs
>            Assignee: Benjamin Lerer
>            Priority: Minor
>             Fix For: 2.1.3
>
>
> It looks like some syntax errors can result in an IndexOutOfBoundsException when the error message snippet is being built:
> {noformat}
> cqlsh> create table foo (a int primary key, b int;
> <ErrorMessage code=2000 [Syntax error in CQL query] message="Failed parsing statement: [create table foo (a int primary key, b int;] reason: ArrayIndexOutOfBoundsException -1">
> {noformat}
> There isn't any error or stacktrace in the server logs.  It would be good to fix that as well.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)