You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by "Jim Witschey (JIRA)" <ji...@apache.org> on 2015/11/06 00:27:27 UTC

[jira] [Commented] (CASSANDRA-10607) Using reserved keyword for Type field crashes cqlsh

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

Jim Witschey commented on CASSANDRA-10607:
------------------------------------------

Nice find. I've reproduced this locally. I've uploaded the create script as a file for ease of use; you can download it and run

{code}
ccm create -n 1 -v 2.2.1 repro-10607 ; ccm start --wait-for-binary-proto ; ccm node1 cqlsh -f create.cql ; ccm node1 cqlsh
{code}

Seems to me that this table shouldn't have been allowed to have been created in the first place. [~slebresne]?

> Using reserved keyword for Type field crashes cqlsh
> ---------------------------------------------------
>
>                 Key: CASSANDRA-10607
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-10607
>             Project: Cassandra
>          Issue Type: Bug
>          Components: Tools
>         Environment: Mac OS X El Capitan, Java 1.8.0_25-b17, fresh install of apache-cassandra-2.2.1-bin.tar.gz
>            Reporter: Mike Prince
>            Priority: Minor
>             Fix For: 2.2.x
>
>         Attachments: create.cql
>
>
> 1) From a fresh cassandra node start, start cqlsh and execute:
> {code}
> CREATE KEYSPACE foospace
> WITH REPLICATION = { 'class' : 'SimpleStrategy', 'replication_factor' : 1 };
> USE foospace;
> CREATE TYPE Foo(
> 	"from" text
> );
> CREATE TABLE Bar(
> 	id text PRIMARY KEY,
> 	foo frozen<Foo>
> );
> {code}
> 2) {{select * from bar;}}
> {code}
> Traceback (most recent call last):
>   File "bin/cqlsh.py", line 1166, in perform_simple_statement
>     rows = future.result(self.session.default_timeout)
>   File "/Users/mike/mobido/servers/apache-cassandra-2.2.1/bin/../lib/cassandra-driver-internal-only-2.6.0c2.post.zip/cassandra-driver-2.6.0c2.post/cassandra/cluster.py", line 3296, in result
>     raise self._final_exception
> ValueError: Type names and field names cannot be a keyword: 'from'
> {code}
> 3) Exit cqlsh and try to run cqlsh again, this error occurs:
> {code}
> Connection error: ('Unable to connect to any servers', {'127.0.0.1': ValueError("Don't know how to parse type string u'org.apache.cassandra.db.marshal.UserType(foospace,666f6f,66726f6d:org.apache.cassandra.db.marshal.UTF8Type)': Type names and field names cannot be a keyword: 'from'",)})
> {code}



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