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-8355) NPE when passing wrong argument in ALTER TABLE statement
Date Thu, 08 Jan 2015 11:58:34 GMT

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

Benjamin Lerer updated CASSANDRA-8355:
--------------------------------------
    Attachment: CASSANDRA-8355.txt

The patch fix the problem in the {{Cql.g}} file and add a unit test to verify the behavior.

> NPE when passing wrong argument in ALTER TABLE statement
> --------------------------------------------------------
>
>                 Key: CASSANDRA-8355
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-8355
>             Project: Cassandra
>          Issue Type: Bug
>         Environment: Cassandra 2.1.2
>            Reporter: Pierre Laporte
>            Assignee: Benjamin Lerer
>            Priority: Minor
>             Fix For: 2.1.3
>
>         Attachments: CASSANDRA-8355.txt
>
>
> When I tried to change the caching strategy of a table, I provided a wrong argument {{'rows_per_partition'
: ALL}} with unquoted ALL. Cassandra returned a SyntaxError, which is good, but it seems it
was because of a NullPointerException.
> *Howto*
> {code}
> CREATE TABLE foo (k int primary key);
> ALTER TABLE foo WITH caching = {'keys' : 'all', 'rows_per_partition' : ALL};
> {code}
> *Output*
> {code}
> <ErrorMessage code=2000 [Syntax error in CQL query] message="Failed parsing statement:
[ALTER TABLE foo WITH caching = {'keys' : 'all', 'rows_per_partition' : ALL};] reason: NullPointerException
null">
> {code}



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

Mime
View raw message