[jira] [Commented] (CASSANDRA-11123) cqlsh pg-style-strings broken if line ends with ';'
[ https://issues.apache.org/jira/browse/CASSANDRA-11123?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15149534#comment-15149534 ] Stefania commented on CASSANDRA-11123: -- Yes GTG, +1. > cqlsh pg-style-strings broken if line ends with ';' > --- > > Key: CASSANDRA-11123 > URL: https://issues.apache.org/jira/browse/CASSANDRA-11123 > Project: Cassandra > Issue Type: Bug >Reporter: Robert Stupp >Assignee: Robert Stupp >Priority: Minor > Fix For: 2.2.x > > > If one separate line in a multi-line pg-style-string ends with a semicolon in > cqlsh, cqlsh incorrectly assumes that that is the end of the statement. > {code} > cqlsh:foo> insert into tab (pk, val) values (2, $$ >... wepofjef >... wefoijew >... ; > SyntaxException: message="line 4:0 mismatched character ';' expecting '$'"> > {code} -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (CASSANDRA-11123) cqlsh pg-style-strings broken if line ends with ';'
[ https://issues.apache.org/jira/browse/CASSANDRA-11123?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15148967#comment-15148967 ] Robert Stupp commented on CASSANDRA-11123: -- OK, renamed the variable in both places to {{end token_escaped}} and pushed the branches. GTG? > cqlsh pg-style-strings broken if line ends with ';' > --- > > Key: CASSANDRA-11123 > URL: https://issues.apache.org/jira/browse/CASSANDRA-11123 > Project: Cassandra > Issue Type: Bug >Reporter: Robert Stupp >Assignee: Robert Stupp >Priority: Minor > Fix For: 2.2.x > > > If one separate line in a multi-line pg-style-string ends with a semicolon in > cqlsh, cqlsh incorrectly assumes that that is the end of the statement. > {code} > cqlsh:foo> insert into tab (pk, val) values (2, $$ >... wepofjef >... wefoijew >... ; > SyntaxException: message="line 4:0 mismatched character ';' expecting '$'"> > {code} -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (CASSANDRA-11123) cqlsh pg-style-strings broken if line ends with ';'
[ https://issues.apache.org/jira/browse/CASSANDRA-11123?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15144094#comment-15144094 ] Stefania commented on CASSANDRA-11123: -- Actually {{in_multiline_statement}} is not correct, perhaps something like {{endtoken_escaped}} or {{endtoken_allowed}} or similar. It's up to you, you can keep {{in_batch_or_pg_string}} but do change {{in_batch}} in _casconnect.py_. > cqlsh pg-style-strings broken if line ends with ';' > --- > > Key: CASSANDRA-11123 > URL: https://issues.apache.org/jira/browse/CASSANDRA-11123 > Project: Cassandra > Issue Type: Bug >Reporter: Robert Stupp >Assignee: Robert Stupp >Priority: Minor > Fix For: 2.2.x > > > If one separate line in a multi-line pg-style-string ends with a semicolon in > cqlsh, cqlsh incorrectly assumes that that is the end of the statement. > {code} > cqlsh:foo> insert into tab (pk, val) values (2, $$ >... wepofjef >... wefoijew >... ; > SyntaxException: message="line 4:0 mismatched character ';' expecting '$'"> > {code} -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (CASSANDRA-11123) cqlsh pg-style-strings broken if line ends with ';'
[ https://issues.apache.org/jira/browse/CASSANDRA-11123?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15143883#comment-15143883 ] Stefania commented on CASSANDRA-11123: -- The patch is fine but how about using {{in_multiline_statement}} as in [this suggestion|https://github.com/stef1927/cassandra/commit/ed770d966a5a05dace0a3a9d25b125580098b8af]? At the minimum {{in_batch}} in _cassconnect.py_ should be changed. Otherwise +1. > cqlsh pg-style-strings broken if line ends with ';' > --- > > Key: CASSANDRA-11123 > URL: https://issues.apache.org/jira/browse/CASSANDRA-11123 > Project: Cassandra > Issue Type: Bug >Reporter: Robert Stupp >Assignee: Robert Stupp >Priority: Minor > Fix For: 2.2.x > > > If one separate line in a multi-line pg-style-string ends with a semicolon in > cqlsh, cqlsh incorrectly assumes that that is the end of the statement. > {code} > cqlsh:foo> insert into tab (pk, val) values (2, $$ >... wepofjef >... wefoijew >... ; > SyntaxException: message="line 4:0 mismatched character ';' expecting '$'"> > {code} -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (CASSANDRA-11123) cqlsh pg-style-strings broken if line ends with ';'
[ https://issues.apache.org/jira/browse/CASSANDRA-11123?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15142464#comment-15142464 ] Robert Stupp commented on CASSANDRA-11123: -- Right, we do not support nested pg-style-strings. Updated the change of {{cql_split_statements}} to just return a single boolean (as before) and pushed to my branch. That should fix both issues you raised in your comment. > cqlsh pg-style-strings broken if line ends with ';' > --- > > Key: CASSANDRA-11123 > URL: https://issues.apache.org/jira/browse/CASSANDRA-11123 > Project: Cassandra > Issue Type: Bug >Reporter: Robert Stupp >Assignee: Robert Stupp >Priority: Minor > Fix For: 2.2.x > > > If one separate line in a multi-line pg-style-string ends with a semicolon in > cqlsh, cqlsh incorrectly assumes that that is the end of the statement. > {code} > cqlsh:foo> insert into tab (pk, val) values (2, $$ >... wepofjef >... wefoijew >... ; > SyntaxException: message="line 4:0 mismatched character ';' expecting '$'"> > {code} -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (CASSANDRA-11123) cqlsh pg-style-strings broken if line ends with ';'
[ https://issues.apache.org/jira/browse/CASSANDRA-11123?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15136549#comment-15136549 ] Stefania commented on CASSANDRA-11123: -- The functionality seems correct, I tested it manually on Linux and it works as expected. As far as I understood from CASSANDRA-7769, we only support {{$$}} and we don't therefore support embedded pg-style-strings. Two things: * {{cql_split_statements}} is called by the cqlshlib tests as well, see {{test_cqlsh_parsing.py}} and {{casconnect.py}}. As a result, a number of cqlshlib tests are broken. To run these tests start up a cassandra node with a clean data folder, go into {{pylib/cqlshlib/test}} and type {{nosetests}}. * IMO we don't need to return two different boolean values from {{cql_split_statements}} as they convey the same information as far as the callers are concerned, that is to continue parsing, so maybe only use one boolean with an appropriate name? > cqlsh pg-style-strings broken if line ends with ';' > --- > > Key: CASSANDRA-11123 > URL: https://issues.apache.org/jira/browse/CASSANDRA-11123 > Project: Cassandra > Issue Type: Bug >Reporter: Robert Stupp >Assignee: Robert Stupp >Priority: Minor > Fix For: 2.2.x > > > If one separate line in a multi-line pg-style-string ends with a semicolon in > cqlsh, cqlsh incorrectly assumes that that is the end of the statement. > {code} > cqlsh:foo> insert into tab (pk, val) values (2, $$ >... wepofjef >... wefoijew >... ; > SyntaxException: message="line 4:0 mismatched character ';' expecting '$'"> > {code} -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (CASSANDRA-11123) cqlsh pg-style-strings broken if line ends with ';'
[ https://issues.apache.org/jira/browse/CASSANDRA-11123?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15134144#comment-15134144 ] Robert Stupp commented on CASSANDRA-11123: -- Note: manually tested with {{SOURCE}} command and {{-f}} command line switch > cqlsh pg-style-strings broken if line ends with ';' > --- > > Key: CASSANDRA-11123 > URL: https://issues.apache.org/jira/browse/CASSANDRA-11123 > Project: Cassandra > Issue Type: Bug >Reporter: Robert Stupp >Assignee: Robert Stupp >Priority: Minor > Fix For: 2.2.x > > > If one separate line in a multi-line pg-style-string ends with a semicolon in > cqlsh, cqlsh incorrectly assumes that that is the end of the statement. > {code} > cqlsh:foo> insert into tab (pk, val) values (2, $$ >... wepofjef >... wefoijew >... ; > SyntaxException: message="line 4:0 mismatched character ';' expecting '$'"> > {code} -- This message was sent by Atlassian JIRA (v6.3.4#6332)