mirror of
https://github.com/scylladb/scylladb.git
synced 2026-06-03 05:26:58 +00:00
cql3: grammar: reject intValue with no contents
The grammar mistakenly allows nothing to be parsed as an
intValue (itself accepted in LIMIT and similar clauses).
Easily fixed by removing the empty alternative. A unit test is
added.
Fixes #14705.
Closes #14707
(cherry picked from commit e00811caac)
This commit is contained in:
@@ -21,3 +21,10 @@ def table1(cql, test_keyspace):
|
||||
def test_json_empty(cql, table1):
|
||||
with pytest.raises(SyntaxException):
|
||||
cql.execute(f'INSERT INTO {table1} JSON')
|
||||
|
||||
# LIMIT should be followed by an expression (#14705)
|
||||
def test_limit_empty(cql, table1):
|
||||
with pytest.raises(SyntaxException):
|
||||
cql.execute(f'SELECT * FROM {table1} LIMIT')
|
||||
with pytest.raises(SyntaxException):
|
||||
cql.execute(f'SELECT * FROM {table1} PER PARTITION LIMIT')
|
||||
|
||||
Reference in New Issue
Block a user