Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
cql.g: make the parser reject INSERT JSON without a JSON value
We allow inserting column values using a JSON value, eg: ```cql INSERT INTO mytable JSON '{ "\"myKey\"": 0, "value": 0}'; ``` When no JSON value is specified, the query should be rejected. Scylla used to crash in such cases. A recent change fixed the crash (#14706), it now fails on unwrapping an uninitialized value, but really it should be rejected at the parsing stage, so let's fix the grammar so that it doesn't allow JSON queries without JSON values. A unit test is added to prevent regressions. Refs: #14707 Fixes: #14709 Signed-off-by: Jan Ciolek <jan.ciolek@scylladb.com> Closes #14785
- Loading branch information