Merge pull request #13417 from vladimir-golovchenko/fix-quota-statements-interval-formatting

Fix a 'Week'-interval formatting for ATTACH/ALTER/CREATE QUOTA-statements
This commit is contained in:
Alexander Kuzmenkov 2020-08-07 01:50:25 +03:00 committed by GitHub
commit da7bc8962d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -51,10 +51,10 @@ IntervalKind IntervalKind::fromAvgSeconds(Int64 num_seconds)
return IntervalKind::Year;
if (!(num_seconds % 7889238))
return IntervalKind::Quarter;
if (!(num_seconds % 604800))
return IntervalKind::Week;
if (!(num_seconds % 2629746))
return IntervalKind::Month;
if (!(num_seconds % 604800))
return IntervalKind::Week;
if (!(num_seconds % 86400))
return IntervalKind::Day;
if (!(num_seconds % 3600))