Uploaded image for project: 'Apache Cassandra'
  1. Apache Cassandra
  2. CASSANDRA-4475

Using 'key' as primary key throws exception when using CQL2

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Low
    • Resolution: Fixed
    • 1.2.0 beta 1
    • None
    • Low

    Description

      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.

      CREATE TABLE Standard1 (key ascii PRIMARY KEY, c0 ascii);
      

      Exception is:

      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)
      

      Attachments

        1. 4445.txt
          2 kB
          Sylvain Lebresne

        Activity

          People

            slebresne Sylvain Lebresne
            yukim Yuki Morishita
            Sylvain Lebresne
            Yuki Morishita
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: