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

Stefania commented on CASSANDRA-10272:
--------------------------------------

The dtest is [here|https://github.com/stef1927/cassandra-dtest/commits/10272].

I've run all cqlsh tests locally on 2.1 and 2.2. There is an existing unrelated 
issue, see details below.

The patch attached should apply on all branches without conflict. 

For 3.0 I decided to let CI run so it's verifiable:

https://github.com/stef1927/cassandra/commits/10272-3.0
http://cassci.datastax.com/view/Dev/view/stef1927/job/stef1927-10272-3.0-dtest/

Details of unrelated failure:

{code}
======================================================================
FAIL: test_all_datatypes_read (cqlsh_tests.cqlsh_copy_tests.CqlshCopyTest)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/stefi/git/cstar/cassandra-dtest/cqlsh_tests/cqlsh_copy_tests.py", 
line 674, in test_all_datatypes_read
    self.assertCsvResultEqual(self.tempfile.name, results)
  File "/home/stefi/git/cstar/cassandra-dtest/cqlsh_tests/cqlsh_copy_tests.py", 
line 137, in assertCsvResultEqual
    raise e
AssertionError: Element counts were not equal:
First has 1, Second has 0:  ['ascii', '1099511627776', '0xbeef', 'True', 
'3.140000000000000124344978758017532527446746826171875', '2.444', '1.1', 
'127.0.0.1', '25', 
'\xe3\x83\xbd(\xc2\xb4\xe3\x83\xbc\xef\xbd\x80)\xe3\x83\x8e', '2005-07-14 
12:30:00', '30757c2c-584a-11e5-b2d0-9cebe804ecbe', 
'2471e7de-41e4-478f-a402-e99ed779be76', 'asdf', '36893488147419103232']
First has 0, Second has 1:  ['ascii', '1099511627776', '0xbeef', 'True', 
'3.140000000000000124344978758017532527446746826171875', '2.444', '1.1', 
'127.0.0.1', '25', 
'\xe3\x83\xbd(\xc2\xb4\xe3\x83\xbc\xef\xbd\x80)\xe3\x83\x8e', '2005-07-14 
04:30:00', '30757c2c-584a-11e5-b2d0-9cebe804ecbe', 
'2471e7de-41e4-478f-a402-e99ed779be76', 'asdf', '36893488147419103232']
-------------------- >> begin captured logging << --------------------
dtest: DEBUG: cluster ccm directory: /tmp/dtest-8VAvBl
dtest: DEBUG: Importing from csv file: /tmp/tmpGwW8yB
dtest: WARNING: Mismatch at index: 10
dtest: WARNING: Value in csv: 2005-07-14 12:30:00
dtest: WARNING: Value in result: 2005-07-14 04:30:00
--------------------- >> end captured logging << ---------------------
{code}

I haven't looked into this yet, shall I open a new ticket? I think it may be 
related to timezone however, since my machine is on GMT+08 and the difference 
in time is exactly 8 hours.

> BATCH statement is broken in cqlsh
> ----------------------------------
>
>                 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: Stefania
>             Fix For: 2.1.x, 2.2.x, 3.0.0 rc1
>
>         Attachments: 10272-2.1.txt
>
>
> 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)

Reply via email to