[ https://issues.apache.org/jira/browse/CASSANDRA-2488?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Eric Evans updated CASSANDRA-2488: ---------------------------------- Attachment: (was: v1-0001-CASSANDRA-2488-teach-cqlsh-to-ignore-comments.txt) > cqlsh errors on comments that end with a semicolon > -------------------------------------------------- > > Key: CASSANDRA-2488 > URL: https://issues.apache.org/jira/browse/CASSANDRA-2488 > Project: Cassandra > Issue Type: Bug > Components: Tools > Affects Versions: 0.8 > Environment: OS X 10.6.7 > $ java -version > java version "1.6.0_24" > Java(TM) SE Runtime Environment (build 1.6.0_24-b07-334-10M3326) > Java HotSpot(TM) 64-Bit Server VM (build 19.1-b02-334, mixed mode) > (This stuff isn't really important. It's a bug in a Python script) > Reporter: Geoff Greer > Assignee: Eric Evans > Priority: Minor > Labels: cql > Fix For: 0.8 > > Attachments: v2-0001-CASSANDRA-2488-teach-cqlsh-to-ignore-comments.txt > > > Commented-out lines that end in a semicolon cause an error. > Examples: > cqlsh> -- CREATE KEYSPACE ELE WITH replication_factor = 3 AND strategy_class > = SimpleStrategy AND strategy_options:replication_factor=3; > Bad Request: line 0:-1 no viable alternative at input '<EOF>' > cqlsh> -- CREATE KEYSPACE ELE WITH replication_factor = 3 AND strategy_class > = SimpleStrategy AND strategy_options:replication_factor=3 > ... > ... > ... ; > Bad Request: line 2:0 no viable alternative at input ';' > cqlsh> -- ; > Bad Request: line 0:-1 no viable alternative at input '<EOF>' > cqlsh> --; > Bad Request: line 0:-1 no viable alternative at input '<EOF>' > As long as there's a line with valid CQL before the semicolon, things work > fine though. > I'm pretty sure the problem is on line 75 of cqlsh: > if not line.endswith(";"): > self.set_prompt(Shell.continue_prompt) > return None > A quick workaround would be to kill the pretty continue prompt. A more > involved fix would detect whether or not the semicolon was in a comment. This > is harder than it sounds, since /* and */ allow multi-line comments. -- This message is automatically generated by JIRA. For more information on JIRA, see: http://www.atlassian.com/software/jira