Sam Tunnicliffe created CASSANDRA-21046:
-------------------------------------------
Summary: 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
{{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]