You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by "Vovodroid (JIRA)" <ji...@apache.org> on 2015/09/07 16:19:46 UTC
[jira] [Created] (CASSANDRA-10277) Empty BATCH throws exception in
Cassandra
Vovodroid created CASSANDRA-10277:
-------------------------------------
Summary: Empty BATCH throws exception in Cassandra
Key: CASSANDRA-10277
URL: https://issues.apache.org/jira/browse/CASSANDRA-10277
Project: Cassandra
Issue Type: Bug
Components: Core
Reporter: Vovodroid
Priority: Minor
Attachments: emptybatch.patch
Connect to Cassandra with cqlsh and perform empty BATCH statement:
{code}BEGIN BATCH APPLY BATCH;{code}
Following exception is thrown and logged
{code}
ERROR 14:02:07 Unexpected exception during request
java.lang.IndexOutOfBoundsException: Index: 0, Size: 0
at java.util.ArrayList.rangeCheck(ArrayList.java:653) ~[na:1.8.0_45]
at java.util.ArrayList.get(ArrayList.java:429) ~[na:1.8.0_45]
at org.apache.cassandra.cql3.statements.BatchStatement$Parsed.prepare(BatchStatement.java:514) ~[main/:na]
...........................
{code}
It's caused because of access to batch statement list, even if it's empty.
Proposed patch (for 2.2.0) is attached.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)