You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by "Aleksey Yeschenko (JIRA)" <ji...@apache.org> on 2014/11/21 13:31:33 UTC

[jira] [Commented] (CASSANDRA-8353) Prepared statement doesn't revalidate after table schema changes

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

Aleksey Yeschenko commented on CASSANDRA-8353:
----------------------------------------------

Do you mean 'invalidate', not 'revalidate'?

We can't just silently change things under the hood, because the drivers would have the resultset metadata without `value2`.

What we can (and probably should) do is to extend CASSANDRA-7566 and invalidate the statements like this once schema changes like this happen (added/altered/dropped column or dropped index).



> Prepared statement doesn't revalidate after table schema changes
> ----------------------------------------------------------------
>
>                 Key: CASSANDRA-8353
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-8353
>             Project: Cassandra
>          Issue Type: Bug
>         Environment: Cassandra 2.1.2
>            Reporter: MichaƂ Jaszczyk
>
> Having simple table:
> {code}
> CREATE TABLE test1 (
>   key TEXT,
>   value TEXT,
>   PRIMARY KEY (key)
> );
> {code}
> I prepare following statement:
> {code}
> SELECT * FROM test1;
> {code}
> I run queries based on the statement which returns expected results.
> Then I update schema definition like this:
> {code}
> ALTER TABLE test1 ADD value2 TEXT;
> {code}
> I populate the "value2" values and use the same statement again. The results returned by the same query don't include "value2". I'm sure it is not cached in the driver/application because I was starting new process after changing schema.
> It looks to me like a bug. Please correct me if it works like this on purpose.
> I'm using ruby cql driver but I believe it is not related.



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