Nadav Har'El
0040e9e7f4
Merge 'cql: Add proper validation for null and unset inside collections send as bound values' from Jan Ciołek
...
Let's say we have a query like:
```cql
INSERT INTO ks.t (list_column) VALUES (?);
```
And the driver sends a list with null inside as the bound value, something like `[1, 2, null, 4]`.
In such case we should throw `invalid_request_exception` because `nulls` are not allowed inside collections.
Currently when a query like this gets executed Scylla throws an ugly marshalling error.
This is because the validation code reads size of the next element, interprets it as an unsigned integer and tries to read this much.
In case of `null` element the size is `-1`, which when converted to unsigned `size_t` gives 18446744073709551615 and it fails to read this much.
This PR adds proper validation checks to make the error message better.
I also added some tests.
I originally tried to write them in python, but python driver really doesn't like sending invalid values.
Trying to send `[1, None, 2]` results in a list with empty value instead of null.
Trying to send `[1, UNSET_VALUE, 2]` Fails before query even leaves the driver.
Fixes #10580
Closes #10599
* github.com:scylladb/scylla:
cql3: Add tests for null and unset inside collections
cql3: Add null and unset checks in collection validation
2022-05-19 11:25:24 +03:00
..
2022-02-13 14:16:16 +02:00
2022-01-18 12:15:18 +01:00
2022-01-18 12:15:18 +01:00
2022-01-18 12:15:18 +01:00
2022-01-18 12:15:18 +01:00
2022-01-18 12:15:18 +01:00
2022-01-18 12:15:18 +01:00
2022-05-01 08:33:55 +03:00
2022-02-13 14:16:16 +02:00
2022-01-18 12:15:18 +01:00
2022-01-18 12:15:18 +01:00
2022-01-18 12:15:18 +01:00
2022-01-18 12:15:18 +01:00
2022-04-20 10:59:09 +03:00
2022-02-25 01:42:15 +01:00
2022-01-18 12:15:18 +01:00
2022-01-18 12:15:18 +01:00
2022-01-18 12:15:18 +01:00
2022-01-18 12:15:18 +01:00
2022-01-18 12:15:18 +01:00
2022-01-18 12:15:18 +01:00
2022-01-18 12:15:18 +01:00
2022-01-18 12:15:18 +01:00
2022-04-12 16:37:11 +03:00
2022-04-12 16:35:17 +03:00
2022-01-18 12:15:18 +01:00
2022-01-18 12:15:18 +01:00
2022-04-27 14:40:24 +03:00
2022-01-18 12:15:18 +01:00
2022-01-18 12:15:18 +01:00
2022-04-08 09:17:01 +02:00
2022-01-18 12:15:18 +01:00
2022-01-18 12:15:18 +01:00
2022-01-18 12:15:18 +01:00
2022-02-07 11:33:57 +02:00
2022-02-08 11:08:42 +01:00
2022-01-18 12:15:18 +01:00
2022-01-18 12:15:18 +01:00
2022-01-18 12:15:18 +01:00
2022-05-19 00:15:17 +02:00
2022-01-18 12:15:18 +01:00
2022-03-30 15:42:51 +03:00
2022-05-10 10:45:14 +03:00
2022-01-18 12:15:18 +01:00
2022-01-18 12:15:18 +01:00
2022-01-18 12:15:18 +01:00
2022-01-18 12:15:18 +01:00
2022-01-18 12:15:18 +01:00
2022-01-18 23:49:41 +02:00
2022-01-18 12:15:18 +01:00
2022-02-16 10:06:10 +02:00
2022-05-16 18:17:58 +02:00
2022-05-10 09:56:44 +03:00
2022-04-26 14:46:42 +03:00
2022-04-28 14:12:24 +03:00
2022-01-18 12:15:18 +01:00
2022-01-18 12:15:18 +01:00
2022-05-05 13:32:25 +03:00
2022-05-03 10:57:40 +03:00
2022-01-27 11:26:15 +01:00
2022-01-18 12:15:18 +01:00
2022-01-18 12:15:18 +01:00
2022-01-18 12:15:18 +01:00
2022-01-18 12:15:18 +01:00
2022-01-18 12:15:18 +01:00
2022-01-18 12:15:18 +01:00
2022-01-18 12:15:18 +01:00
2022-02-22 12:55:38 +01:00
2022-01-18 12:15:18 +01:00
2022-01-18 12:15:18 +01:00
2022-01-18 12:15:18 +01:00
2022-01-18 12:15:18 +01:00
2022-01-18 12:15:18 +01:00
2022-01-18 12:15:18 +01:00
2022-03-16 12:31:50 +03:00
2022-04-29 19:22:55 +02:00
2022-01-18 12:15:18 +01:00
2022-01-18 12:15:18 +01:00
2022-01-18 12:15:18 +01:00
2022-01-18 12:15:18 +01:00
2022-01-18 12:15:18 +01:00
2022-05-10 22:10:40 +03:00
2022-04-28 14:12:24 +03:00
2022-02-21 12:29:25 +02:00
2022-01-18 12:15:18 +01:00
2022-03-31 13:29:11 +03:00
2022-05-05 13:32:25 +03:00
2022-05-10 22:10:40 +03:00
2022-05-18 18:33:12 +03:00
2022-03-30 15:42:51 +03:00
2022-01-18 12:15:18 +01:00
2022-05-03 10:57:40 +03:00
2022-01-18 12:15:18 +01:00
2022-01-18 12:15:18 +01:00
2022-01-18 12:15:18 +01:00
2022-03-31 10:36:23 +03:00
2022-05-01 08:33:55 +03:00
2022-01-18 12:15:18 +01:00
2022-01-18 12:15:18 +01:00
2022-01-18 12:15:18 +01:00
2022-01-18 12:15:18 +01:00
2022-01-18 12:15:18 +01:00
2022-04-06 16:55:54 +03:00
2022-04-20 17:55:58 +02:00
2022-01-18 12:15:18 +01:00
2022-03-15 11:42:42 +02:00
2022-01-18 12:15:18 +01:00
2022-01-18 12:15:18 +01:00
2022-05-10 22:10:40 +03:00
2022-05-11 16:49:31 +02:00
2022-04-08 09:17:01 +02:00
2022-05-10 22:10:40 +03:00
2022-02-17 15:24:24 +02:00
2022-05-05 13:06:04 +03:00
2022-03-20 18:33:48 +02:00
2022-01-18 12:15:18 +01:00
2022-01-18 12:15:18 +01:00
2022-01-18 12:15:18 +01:00
2022-01-18 12:15:18 +01:00
2022-05-03 10:57:40 +03:00
2022-05-18 14:57:10 +03:00
2022-05-18 14:57:10 +03:00
2022-05-10 22:10:40 +03:00
2022-05-10 22:10:40 +03:00
2022-02-28 12:36:03 +02:00
2022-02-28 12:36:03 +02:00
2022-05-10 22:10:40 +03:00
2022-02-25 01:42:15 +01:00
2022-05-18 14:57:10 +03:00
2022-03-14 13:20:25 +02:00
2022-03-08 14:14:18 +02:00
2022-02-23 09:05:16 +02:00
2022-01-18 12:15:18 +01:00
2022-05-16 18:17:58 +02:00
2022-02-01 21:14:41 +01:00
2021-08-02 22:26:26 +03:00
2022-01-18 12:15:18 +01:00
2022-01-18 12:15:18 +01:00
2022-01-18 12:15:18 +01:00
2022-01-18 12:15:18 +01:00
2022-01-18 12:15:18 +01:00
2022-01-18 12:15:18 +01:00
2022-01-18 12:15:18 +01:00
2022-01-18 12:15:18 +01:00
2022-01-18 12:15:18 +01:00
2022-02-16 10:19:47 +02:00
2022-03-30 15:42:51 +03:00
2022-01-18 12:15:18 +01:00
2022-01-18 12:15:18 +01:00
2022-03-08 15:34:26 +02:00
2022-01-18 12:15:18 +01:00
2022-01-18 12:15:18 +01:00
2022-01-18 12:15:18 +01:00
2022-03-15 17:02:28 +02:00
2022-01-18 12:15:18 +01:00