scylladb / scylla-cqlsh

A fork of the cqlsh code
Apache License 2.0
16 stars 32 forks source link

Multiline comment parser #58

Open doc-sheet opened 1 year ago

doc-sheet commented 1 year ago

Hello! As far as I understand scylla-cqlsh if based on cassandra cqlsh 6 which have an issue with parsing /* in strings https://issues.apache.org/jira/browse/CASSANDRA-17667

Simple test case:

$ ccm create test -n 1 --scylla  --version release:5.3 -s
$ cqlsh 127.0.0.1 19042 -f case.cql 
case.cql:5:Incomplete statement at end of file
$ cat case.cql 
insert into system_auth.role_attributes (role, name, value) values ('test_role1', 'test_role./-', 'test')"
insert into system_auth.role_attributes (role, name, value) values ('test_role2', 'test_role./*', 'test')"
insert into system_auth.role_attributes (role, name, value) values ('test_role3', 'test_role./_', 'test')"
fruch commented 11 months ago

thanks @doc-sheet for the report

seems like the disscution on https://issues.apache.org/jira/browse/CASSANDRA-17667 didn't ended yet, and the suggested PR is fixing the issue while dropping ability to use comment in cqlsh

meanwhile we'll fix for it to have a proper fix.