Return-Path: X-Original-To: apmail-cassandra-commits-archive@www.apache.org Delivered-To: apmail-cassandra-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 294EE17858 for ; Fri, 11 Sep 2015 10:35:46 +0000 (UTC) Received: (qmail 71434 invoked by uid 500); 11 Sep 2015 10:35:46 -0000 Delivered-To: apmail-cassandra-commits-archive@cassandra.apache.org Received: (qmail 71353 invoked by uid 500); 11 Sep 2015 10:35:46 -0000 Mailing-List: contact commits-help@cassandra.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cassandra.apache.org Delivered-To: mailing list commits@cassandra.apache.org Received: (qmail 71337 invoked by uid 99); 11 Sep 2015 10:35:45 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 11 Sep 2015 10:35:45 +0000 Date: Fri, 11 Sep 2015 10:35:45 +0000 (UTC) From: "Vovodroid (JIRA)" To: commits@cassandra.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Updated] (CASSANDRA-10277) Empty BATCH throws exception in Cassandra MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/CASSANDRA-10277?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Vovodroid updated CASSANDRA-10277: ---------------------------------- Flags: (was: Patch) > 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)