cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jim Witschey (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (CASSANDRA-10607) Using reserved keyword for Type field crashes cqlsh
Date Thu, 05 Nov 2015 23:05:27 GMT

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

Jim Witschey updated CASSANDRA-10607:
-------------------------------------
    Description: 
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}

  was:
1) From a fresh cassandra node start, start cqlsh and execute:

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>
);

2) select * from bar;

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'

3) Exit cqlsh and try to run cqlsh again, this error occurs:

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'",)})






> 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
>
>
> 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)

Mime
View raw message