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

Sylvain Lebresne commented on CASSANDRA-7847:
---------------------------------------------

The patch lgtm and I agree that this is how it should work, but I slightly 
worry about the fact that it's a breaking change as existing trigger names will 
be considered case-sensitive (and will thus start requiring quoting). This 
probably doesn't justify not doing this, but maybe it's worth putting it in 
2.1.0 (a breaking change might be more expected in a major than a minor) with a 
clear warning in the NEWS file? 

> Allow quoted identifiers for triggers' names
> --------------------------------------------
>
>                 Key: CASSANDRA-7847
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-7847
>             Project: Cassandra
>          Issue Type: Bug
>            Reporter: Mikhail Stepura
>            Assignee: Mikhail Stepura
>            Priority: Minor
>             Fix For: 2.1.1
>
>         Attachments: CASSANDRA-2.1-7847.patch
>
>
> Current implementation doesn't allow quoted/case sensitive identifiers for 
> triggers' names, and doesn't handle those names in case-insensitive manner  
> either.
> {code}
> mstepura-mac:cassandra mikhail$ bin/cqlsh
> Connected to Test Cluster at 127.0.0.1:9042.
> [cqlsh 5.0.1 | Cassandra 2.1.1-SNAPSHOT | CQL spec 3.2.0 | Native protocol v3]
> Use HELP for help.
> cqlsh> use stress;
> cqlsh:stress> create TRIGGER "ZooZoo" ON t1 USING  
> 'org.apache.cassandra.triggers.InvertedIndex';
> <ErrorMessage code=2000 [Syntax error in CQL query] message="line 1:15 
> mismatched input 'ZooZoo' expecting IDENT (create TRIGGER ["ZooZo]o" ON...)">
> cqlsh:stress>
> cqlsh:stress>
> cqlsh:stress> create TRIGGER ZooZoo ON t1 USING  
> 'org.apache.cassandra.triggers.InvertedIndex';
> cqlsh:stress>
> cqlsh:stress>
> cqlsh:stress> drop TRIGGER zoozoo ON stress.t1 ;
> code=2200 [Invalid query] message="Trigger zoozoo was not found"
> cqlsh:stress>
> cqlsh:stress>
> cqlsh:stress> drop TRIGGER "ZooZoo" ON stress.t1 ;
> <ErrorMessage code=2000 [Syntax error in CQL query] message="line 1:13 
> mismatched input 'ZooZoo' expecting IDENT (drop TRIGGER ["ZooZo]o" ON...)">
> cqlsh:stress>
> cqlsh:stress>
> cqlsh:stress> drop TRIGGER ZooZoo ON stress.t1 ;
> {code}



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Reply via email to