Mike Prince created CASSANDRA-10607:
---------------------------------------

             Summary: 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:

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







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

Reply via email to