You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by "Michael Semb Wever (Jira)" <ji...@apache.org> on 2021/08/01 12:45:00 UTC

[jira] [Updated] (CASSANDRA-10811) Prepared SELECT * queries return incorrect columns after schema change

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

Michael Semb Wever updated CASSANDRA-10811:
-------------------------------------------
    Fix Version/s:     (was: 3.0.x)
                   3.0.1

> Prepared SELECT * queries return incorrect columns after schema change
> ----------------------------------------------------------------------
>
>                 Key: CASSANDRA-10811
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-10811
>             Project: Cassandra
>          Issue Type: Bug
>          Components: Legacy/CQL
>         Environment: Cassandra 2.2.3
> Java driver 2.1.9
>            Reporter: Adam Warski
>            Priority: Normal
>             Fix For: 3.0.1, 3.11.5, 2.2.x
>
>
> (see also the test case attached)
> When executing the following steps using a single {{com.datastax.driver.core.Session}}:
> 1. create table with column {{a}} and {{c}}
> 2. insert a single row with values for both columns
> 3. select that row using a prepared statement ({{SELECT * FROM table WHERE id=?}})
> 4. alter the table adding a new column {{b}}
> 5. select the row using a prepared statement (preparing the statement again, not re-using the old one)
> The value of the {{c}} column is not returned, instead there's a {{NULL}} (which I suppose is the value of the newly inserted {{b}} column).
> The query returns correct results if:
> * step 3 is skipped, that is there is no prepared select before altering the table
> * a normal, non-prepared select is done
> * a select with explicitly enumerated fields is done
> * a new session is created
> * the new column is alphabetically larger than the existing columns (e.g. {{d}})



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cassandra.apache.org
For additional commands, e-mail: commits-help@cassandra.apache.org