cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sylvain Lebresne (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (CASSANDRA-10272) BATCH statement is broken
Date Tue, 08 Sep 2015 12:51:46 GMT

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

Sylvain Lebresne commented on CASSANDRA-10272:
----------------------------------------------

I can confirm that this trivially reproduce so bumping to major as we need to fix it. That
said, it's just a cqlsh parsing issue so this only affect batches in cqlsh (and I somehow
doubt cqlsh is where batches are the most used in the first place). There is further an easy
workaround since you can simply use a working cqlsh (from say 2.0) against your 2.2.1+ nodes.
Anyway, should be relatively easy to fix in any case.

[~thobbs] do you have time to have a quick look at this in the coming days (it's likely simple)?
(If not, it's cool, just want to know if someone else needs to be pinged).


> BATCH statement is broken
> -------------------------
>
>                 Key: CASSANDRA-10272
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-10272
>             Project: Cassandra
>          Issue Type: Bug
>          Components: Core
>         Environment: CentOS 7.1/x64
>            Reporter: Vovodroid
>            Assignee: Ryan McGuire
>            Priority: Minor
>
> BEGIN BATCH .... APPLY BATCH is not parsed correctly.
> Steps:
> {code}
> CREATE KEYSPACE Excelsior  WITH REPLICATION={'class':'SimpleStrategy','replication_factor':1};
> CREATE TABLE excelsior.data (id int primary key);
> BEGIN BATCH INSERT INTO excelsior.data (id) VALUES (0); APPLY BATCH ;
> {code}
> Error
> {code}
> SyntaxException: <ErrorMessage code=2000 [Syntax error in CQL query] message="line
0:-1 mismatched input '<EOF>' expecting K_APPLY">
> SyntaxException: <ErrorMessage code=2000 [Syntax error in CQL query] message="line
1:0 no viable alternative at input 'APPLY' ([APPLY]...)">
> {code}
> While 
> {code}
> BEGIN BATCH INSERT INTO excelsior.data (id) VALUES (0)  APPLY BATCH ;
> {code}
> without *;* after insert works.
> Consequently neither
> {code}
> BEGIN BATCH INSERT INTO excelsior.data (id) VALUES (0);INSERT INTO excelsior.data (id)
VALUES (0); APPLY BATCH ;
> {code}
> Error:
> {code}
> SyntaxException: <ErrorMessage code=2000 [Syntax error in CQL query] message="line
0:-1 mismatched input '<EOF>' expecting K_APPLY">
> SyntaxException: <ErrorMessage code=2000 [Syntax error in CQL query] message="line
1:0 no viable alternative at input 'APPLY' ([APPLY]...)">
> {code}
> nor
> {code}
> BEGIN BATCH INSERT INTO excelsior.data (id) VALUES (0);INSERT INTO excelsior.data (id)
VALUES (0) APPLY BATCH ;
> {code}
> Error
> {code}
> SyntaxException: <ErrorMessage code=2000 [Syntax error in CQL query] message="line
0:-1 mismatched input '<EOF>' expecting K_APPLY">
> SyntaxException: <ErrorMessage code=2000 [Syntax error in CQL query] message="line
1:43 missing EOF at 'APPLY' (...(id) VALUES (0) [APPLY] BATCH...)">
> {code}
> works.
> It was OK in 2.2.0 and 3.0 beta 1.
> 3.0-beta2-tentative also affected.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message