You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by "Michaël Figuière (JIRA)" <ji...@apache.org> on 2013/10/02 22:37:43 UTC

[jira] [Comment Edited] (CASSANDRA-6136) CQL should not allow an empty string as column identifier

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

Michaël Figuière edited comment on CASSANDRA-6136 at 10/2/13 8:37 PM:
----------------------------------------------------------------------

Looks like it's used in {{system."IndexInfo"}} actually:

{code}
cqlsh> DESC TABLE system."IndexInfo"

CREATE TABLE "IndexInfo" (
  table_name text,
  index_name text,
  "" blob,
  PRIMARY KEY (table_name, index_name)
) WITH COMPACT STORAGE AND
  bloom_filter_fp_chance=0.010000 AND
  caching='KEYS_ONLY' AND
  comment='indexes that have been completed' AND
  dclocal_read_repair_chance=0.000000 AND
  gc_grace_seconds=0 AND
  index_interval=128 AND
  read_repair_chance=0.000000 AND
  replicate_on_write='true' AND
  populate_io_cache_on_flush='false' AND
  default_time_to_live=0 AND
  speculative_retry='NONE' AND
  memtable_flush_period_in_ms=0 AND
  compaction={'class': 'SizeTieredCompactionStrategy'} AND
  compression={'sstable_compression': 'LZ4Compressor'};
{code}

Would it be the reason for that to be allowed?


was (Author: mfiguiere):
Looks like its used in {{system."IndexInfo"}} actually:

{code}
cqlsh> DESC TABLE system."IndexInfo"

CREATE TABLE "IndexInfo" (
  table_name text,
  index_name text,
  "" blob,
  PRIMARY KEY (table_name, index_name)
) WITH COMPACT STORAGE AND
  bloom_filter_fp_chance=0.010000 AND
  caching='KEYS_ONLY' AND
  comment='indexes that have been completed' AND
  dclocal_read_repair_chance=0.000000 AND
  gc_grace_seconds=0 AND
  index_interval=128 AND
  read_repair_chance=0.000000 AND
  replicate_on_write='true' AND
  populate_io_cache_on_flush='false' AND
  default_time_to_live=0 AND
  speculative_retry='NONE' AND
  memtable_flush_period_in_ms=0 AND
  compaction={'class': 'SizeTieredCompactionStrategy'} AND
  compression={'sstable_compression': 'LZ4Compressor'};
{code}

Would it be the reason for that to be allowed?

> CQL should not allow an empty string as column identifier
> ---------------------------------------------------------
>
>                 Key: CASSANDRA-6136
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-6136
>             Project: Cassandra
>          Issue Type: Bug
>            Reporter: Michaël Figuière
>            Priority: Minor
>
> CQL currently allows users to create a table with an empty string as column identifier:
> {code}
> CREATE TABLE t (k int primary key, "" int);
> {code}
> Which results in the following table:
> {code}
> CREATE TABLE t (
>   k int,
>   "" int,
>   PRIMARY KEY (k)
> ) WITH
>   bloom_filter_fp_chance=0.010000 AND
>   caching='KEYS_ONLY' AND
>   comment='' AND
>   dclocal_read_repair_chance=0.000000 AND
>   gc_grace_seconds=864000 AND
>   index_interval=128 AND
>   read_repair_chance=0.100000 AND
>   replicate_on_write='true' AND
>   populate_io_cache_on_flush='false' AND
>   default_time_to_live=0 AND
>   speculative_retry='NONE' AND
>   memtable_flush_period_in_ms=0 AND
>   compaction={'class': 'SizeTieredCompactionStrategy'} AND
>   compression={'sstable_compression': 'SnappyCompressor'};
> {code}
> Empty strings are not allowed for keyspace and table identifiers though.
> I guess it's just a case that we haven't covered. Of course making it illegal in a future version would be a breaking change, but nobody serious would manually have chosen such an identifier...



--
This message was sent by Atlassian JIRA
(v6.1#6144)