sundb
85c8240a96
Improve dbid range check for SELECT, MOVE, COPY ( #8085 )
...
SELECT used to read the index into a `long` variable, and then pass it to a function
that takes an `int`, possibly causing an overflow before the range check.
Now all these commands use better and cleaner range check, and that also results in
a slight change of the error response in case of an invalid database index.
SELECT:
in the past it would have returned either `-ERR invalid DB index` (if not a number),
or `-ERR DB index is out of range` (if not between 1..16 or alike).
now it'll return either `-ERR value is out of range` (if not a number), or
`-ERR value is out of range, value must between -2147483648 and 2147483647`
(if not in the range for an int), or `-ERR DB index is out of range`
(if not between 0..16 or alike)
MOVE:
in the past it would only fail with `-ERR index out of range` no matter the reason.
now return the same errors as the new ones for SELECT mentioned above.
(i.e. unlike for SELECT even for a value like 17 we changed the error message)
COPY:
doesn't really matter how it behaved in the past (new command), new behavior is
like the above two.
2020-12-01 21:41:26 +02:00
..
2020-11-13 15:16:40 +02:00
2020-12-01 14:21:39 +02:00
2020-11-09 21:48:56 -08:00
2020-04-08 12:55:57 +02:00
2019-10-07 21:06:30 +03:00
2020-09-10 13:43:38 +03:00
2020-11-25 13:36:21 -08:00
2020-08-28 11:54:10 +03:00
2020-10-28 21:13:44 +02:00
2020-10-28 21:13:44 +02:00
2020-11-17 18:58:55 +02:00
2020-03-07 19:38:27 +08:00
2020-09-17 16:01:45 +03:00
2020-09-21 12:10:19 +03:00
2019-11-20 20:39:04 -05:00
2020-11-30 23:03:53 +02:00
2020-10-12 17:13:38 +03:00
2020-10-28 08:51:35 +02:00
2020-11-04 14:49:15 +02:00
2020-11-04 14:49:15 +02:00
2020-10-27 16:36:00 +02:00
2020-10-27 16:36:00 +02:00
2020-12-01 14:21:39 +02:00
2020-11-23 16:14:33 +02:00
2020-11-25 13:37:54 -08:00
2020-10-28 21:13:44 +02:00
2020-03-22 14:42:03 +02:00
2019-03-01 17:53:14 +01:00
2020-05-05 10:20:48 +02:00
2020-04-24 17:00:03 -07:00
2020-11-08 08:32:38 +02:00
2020-04-24 17:11:21 -07:00
2020-12-01 21:41:26 +02:00
2020-11-25 12:15:32 -08:00
2020-09-10 13:43:38 +03:00
2020-10-28 08:51:35 +02:00
2019-02-18 18:27:18 +01:00
2020-09-10 13:43:38 +03:00
2020-10-13 19:50:57 +03:00
2020-10-22 12:57:45 +03:00
2020-08-28 11:54:10 +03:00
2020-09-10 13:43:38 +03:00
2020-09-10 13:43:38 +03:00
2020-04-09 17:48:29 +08:00
2019-02-24 21:38:15 +01:00
2020-11-08 08:32:38 +02:00
2020-09-10 13:43:38 +03:00
2020-10-27 15:04:18 +02:00
2020-10-27 15:04:18 +02:00
2020-11-16 10:34:04 +02:00
2020-10-20 09:12:24 +03:00
2020-09-10 13:43:38 +03:00
2019-10-28 11:10:58 +01:00
2020-09-10 13:43:38 +03:00
2020-05-05 23:35:08 -04:00
2020-10-26 21:46:50 -07:00
2020-09-10 13:43:38 +03:00
2020-11-22 14:40:38 +02:00
2020-09-29 15:52:13 +03:00
2019-11-19 17:23:47 +08:00
2020-11-17 18:58:55 +02:00
2020-08-28 11:54:10 +03:00
2020-08-28 11:54:10 +03:00
2020-12-01 14:21:39 +02:00
2020-11-11 08:22:17 +02:00
2020-09-10 13:43:38 +03:00
2020-12-01 21:41:26 +02:00
2020-12-01 14:21:39 +02:00
2020-09-09 15:28:38 +03:00
2020-09-10 13:43:38 +03:00
2020-09-10 13:43:38 +03:00
2020-09-10 13:43:38 +03:00
2020-11-05 11:46:16 +02:00
2020-09-22 10:18:07 +03:00
2020-11-04 14:49:15 +02:00
2019-05-08 12:13:45 +01:00
2020-11-03 14:59:21 +02:00
2020-12-01 14:21:39 +02:00
2020-11-17 18:58:55 +02:00
2019-10-02 11:30:20 +02:00
2020-11-22 14:12:45 +02:00
2020-07-24 14:40:19 +08:00
2019-10-07 21:06:30 +03:00
2020-12-01 14:21:39 +02:00
2020-11-04 13:38:46 +02:00
2019-12-21 11:47:31 -08:00
2020-10-02 08:19:44 +03:00
2020-10-28 21:13:44 +02:00
2020-12-01 14:21:39 +02:00
2020-12-01 21:41:26 +02:00
2020-10-25 14:14:05 +02:00
2020-11-24 17:58:10 +02:00
2019-09-12 12:21:37 +02:00
2019-09-12 12:21:37 +02:00
2020-09-10 13:43:38 +03:00
2020-09-10 13:43:38 +03:00
2019-12-02 00:28:41 -05:00
2020-09-10 13:43:38 +03:00
2020-09-10 13:43:38 +03:00
2020-11-17 12:03:05 +02:00
2020-11-24 21:40:58 +02:00
2020-11-24 21:40:58 +02:00
2020-11-24 21:40:58 +02:00
2020-11-29 12:08:47 +02:00
2020-11-03 14:56:57 +02:00
2020-11-24 21:40:58 +02:00
2020-07-21 08:13:05 +03:00
2020-10-11 17:11:42 +03:00
2020-10-11 16:04:14 +03:00
2020-05-06 16:18:21 +02:00
2019-11-21 10:06:15 +01:00
2020-09-10 13:43:38 +03:00
2020-10-11 17:21:58 +03:00
2020-10-13 12:42:52 +03:00
2020-09-10 13:43:38 +03:00
2020-11-08 09:16:14 +02:00
2020-10-02 08:19:44 +03:00