cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Benjamin Lerer (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (CASSANDRA-9411) Bound statement executions fail after adding a collection-type column
Date Mon, 07 Dec 2015 14:54:10 GMT

     [ https://issues.apache.org/jira/browse/CASSANDRA-9411?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Benjamin Lerer updated CASSANDRA-9411:
--------------------------------------
    Component/s: CQL

> Bound statement executions fail after adding a collection-type column
> ---------------------------------------------------------------------
>
>                 Key: CASSANDRA-9411
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-9411
>             Project: Cassandra
>          Issue Type: Bug
>          Components: CQL
>         Environment: Cassandra 2.0.13.
> OS X 10.9
>            Reporter: Jorge Bay
>            Assignee: Benjamin Lerer
>             Fix For: 2.0.16
>
>         Attachments: 9411.txt, DTest-9411.txt
>
>
> After adding a collection-type column to an existing table, executions of statements
that are already prepared result in server error (error code 0), with the error message {{java.lang.ArrayIndexOutOfBoundsException}}.
> To reproduce it.
> {code:java}
> session.execute("CREATE TABLE tbl1 (a text, b text, c text, PRIMARY KEY (a, b))");
> //prepare initially
> PreparedStatement ps = session.prepare("SELECT a, b, c FROM tbl1");
> //insert some data
> session.execute("INSERT INTO tbl1 (a, b, c) VALUES ('a1', 'b1', 'c1')");
> //Executes successfully as expected
> session.execute(ps.bind());
> //Add a column of a collection type
> session.execute("ALTER TABLE tbl1 ADD d set<text>");
> //All following executions fail
> session.execute(ps.bind());
> {code}
> Some notes:
> - This only occurs for SELECT with fields (not with SELECT *)
> - This only occurs with C* 2.0. Probably because CASSANDRA-7910 was applied for 2.1+
> - This only occurs if the column added is a collection type (list / set / map)
> - This occurs with all SELECT statements using that column family, that were already
prepared.
> Repreparing it on all hosts fixes the issue, but for that, the user should normally restart
existing application (even if the existing apps/apps versions don't handle this new field).



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

Mime
View raw message