cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sylvain Lebresne (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (CASSANDRA-4475) Using 'key' as primary key throws exception when using CQL2
Date Tue, 31 Jul 2012 15:11:34 GMT

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

Sylvain Lebresne updated CASSANDRA-4475:
----------------------------------------

    Attachment: 4445.txt

Right, forgot that CQL2 can have a null keyAlias. Trivial fix attached.
                
> Using 'key' as primary key throws exception when using CQL2
> -----------------------------------------------------------
>
>                 Key: CASSANDRA-4475
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-4475
>             Project: Cassandra
>          Issue Type: Bug
>    Affects Versions: 1.2
>            Reporter: Yuki Morishita
>            Assignee: Sylvain Lebresne
>            Priority: Trivial
>              Labels: cql
>         Attachments: 4445.txt
>
>
> When I run following CQL on trunk, throws exception (only in CQL2). This statement used
to work and I think something is broken after CASSANDRA-4179.
> {code}
> CREATE TABLE Standard1 (key ascii PRIMARY KEY, c0 ascii);
> {code}
> Exception is:
> {code}
> ERROR [Thrift:1] 2012-07-31 09:54:02,585 CustomTThreadPoolServer.java (line 202) Error
occurred during processing of message.
> java.lang.NullPointerException
>         at org.apache.cassandra.utils.ByteBufferUtil.string(ByteBufferUtil.java:166)
>         at org.apache.cassandra.utils.ByteBufferUtil.string(ByteBufferUtil.java:123)
>         at org.apache.cassandra.cql.jdbc.JdbcUTF8.getString(JdbcUTF8.java:73)
>         at org.apache.cassandra.db.marshal.UTF8Type.getString(UTF8Type.java:49)
>         at org.apache.cassandra.cql3.ColumnIdentifier.<init>(ColumnIdentifier.java:45)
>         at org.apache.cassandra.cql3.CFDefinition.getKeyId(CFDefinition.java:167)
>         at org.apache.cassandra.cql3.CFDefinition.<init>(CFDefinition.java:81)
>         at org.apache.cassandra.config.CFMetaData.updateCfDef(CFMetaData.java:1382)
>         at org.apache.cassandra.config.CFMetaData.keyAliases(CFMetaData.java:235)
>         at org.apache.cassandra.cql.CreateColumnFamilyStatement.getCFMetaData(CreateColumnFamilyStatement.java:170)
>         at org.apache.cassandra.cql.QueryProcessor.processStatement(QueryProcessor.java:692)
>         at org.apache.cassandra.cql.QueryProcessor.process(QueryProcessor.java:846)
>         at org.apache.cassandra.thrift.CassandraServer.execute_cql_query(CassandraServer.java:1237)
>         at org.apache.cassandra.thrift.Cassandra$Processor$execute_cql_query.getResult(Cassandra.java:3542)
>         at org.apache.cassandra.thrift.Cassandra$Processor$execute_cql_query.getResult(Cassandra.java:3530)
>         at org.apache.thrift.ProcessFunction.process(ProcessFunction.java:32)
>         at org.apache.thrift.TBaseProcessor.process(TBaseProcessor.java:34)
>         at org.apache.cassandra.thrift.CustomTThreadPoolServer$WorkerProcess.run(CustomTThreadPoolServer.java:184)
>         at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
>         at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
>         at java.lang.Thread.run(Thread.java:680)
> {code}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Mime
View raw message