Add maximum bound for web-history-max-items
sqlite can't handle values bigger than uint64_t for LIMIT.
This commit is contained in:
parent
544094ba72
commit
118a7942a5
@ -503,7 +503,7 @@ def data(readonly=False):
|
|||||||
"0: no history / -1: unlimited"),
|
"0: no history / -1: unlimited"),
|
||||||
|
|
||||||
('web-history-max-items',
|
('web-history-max-items',
|
||||||
SettingValue(typ.Int(minval=-1), '-1'),
|
SettingValue(typ.Int(minval=-1, maxval=MAXVALS['int64']), '-1'),
|
||||||
"How many URLs to show in the web history.\n\n"
|
"How many URLs to show in the web history.\n\n"
|
||||||
"0: no history / -1: unlimited"),
|
"0: no history / -1: unlimited"),
|
||||||
|
|
||||||
|
@ -110,6 +110,15 @@ def test_set_pattern(pattern, before, after, model_validator, hist):
|
|||||||
('c', 'c', '2017-05-16'),
|
('c', 'c', '2017-05-16'),
|
||||||
('a', 'a', '2017-04-16'),
|
('a', 'a', '2017-04-16'),
|
||||||
]),
|
]),
|
||||||
|
(2 ** 63 - 1, [ # Maximum value sqlite can handle for LIMIT
|
||||||
|
('a', 'a', '2017-04-16'),
|
||||||
|
('b', 'b', '2017-06-16'),
|
||||||
|
('c', 'c', '2017-05-16'),
|
||||||
|
], [
|
||||||
|
('b', 'b', '2017-06-16'),
|
||||||
|
('c', 'c', '2017-05-16'),
|
||||||
|
('a', 'a', '2017-04-16'),
|
||||||
|
]),
|
||||||
(2, [
|
(2, [
|
||||||
('a', 'a', '2017-04-16'),
|
('a', 'a', '2017-04-16'),
|
||||||
('b', 'b', '2017-06-16'),
|
('b', 'b', '2017-06-16'),
|
||||||
|
Loading…
Reference in New Issue
Block a user