mirror of
https://github.com/scylladb/scylladb.git
synced 2026-04-28 04:06:59 +00:00
LWT queries with empty clustering range used to cause a crash. For example in: ```cql UPDATE tab SET r = 9000 WHERE p = 1 AND c = 2 AND c = 2000 IF r = 3 ``` The range of `c` is empty - there are no valid values. This caused a segfault when accessing the `first` range: ```c++ op.ranges.front() ``` To fix it let's throw en exception when the clustering range is empty. Cassandra also rejects queries with `c = 1 AND c = 2`. There's also a check for empty partition range, as it used to crash in the past, can't really hurt to add it. Signed-off-by: Jan Ciolek <jan.ciolek@scylladb.com>