[
https://issues.apache.org/jira/browse/CASSANDRA-21046?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18041044#comment-18041044
]
Stefan Miklosovic commented on CASSANDRA-21046:
-----------------------------------------------
I do see that COMMENT and SECURITY_LABEL was introduced into
KeyspaceParams.Option as part of the original implementation of comments CEP
but it does not seem to me that this is acted on when used with CREATE KEYSPACE
... WITH COMMENT / SECURITY_LABEL.
Since commenting on KEYSPACE was not possible before the CEP, for the sake of
simplicity I would just remove these two from KeyspaceParams.Option.
> Schema annotations escape validation on CREATE and ALTER DDL statements
> -----------------------------------------------------------------------
>
> Key: CASSANDRA-21046
> URL: https://issues.apache.org/jira/browse/CASSANDRA-21046
> Project: Apache Cassandra
> Issue Type: Bug
> Components: Cluster/Schema
> Reporter: Sam Tunnicliffe
> Priority: Normal
> Fix For: 6.x
>
>
> {{CREATE KEYSPACE}} & {{CREATE TABLE}} statements silently accept
> {{security_label}} and {{comment}} as options, but only {{CREATE TABLE ...
> WITH comment ...}} has any effect. The same applies to {{ALTER KEYSPACE/ALTER
> TABLE}}.
> {code}
> cqlsh> create KEYSPACE ks1 with replication = {'class': 'SimpleStrategy',
> 'replication_factor': 1} AND security_label = 'label1' AND comment =
> 'comment1';
> cqlsh> describe ks1;
> CREATE KEYSPACE ks1 WITH replication = {'class': 'SimpleStrategy',
> 'replication_factor': '1'} AND durable_writes = true AND fast_path =
> 'simple';
> {code}
> Supplying an unsupported/unimplemented option to either a {{CREATE}} or
> {{ALTER}} statement should raise an error like:
> {code}
> cqlsh> alter table ks.t1 with blabla='foooo';
> SyntaxException: Unknown property 'blabla'
> {code}
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]