mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-29 02:52:13 +00:00
Merge pull request #6963 from nicelulu/issue_6616
optimize limit 1,0 and test.
This commit is contained in:
commit
9c675e50bb
@ -790,7 +790,7 @@ static std::pair<UInt64, UInt64> getLimitLengthAndOffset(const ASTSelectQuery &
|
||||
if (query.limitLength())
|
||||
{
|
||||
length = getLimitUIntValue(query.limitLength(), context);
|
||||
if (query.limitOffset())
|
||||
if (query.limitOffset() && length)
|
||||
offset = getLimitUIntValue(query.limitOffset(), context);
|
||||
}
|
||||
|
||||
|
@ -0,0 +1 @@
|
||||
SELECT count() FROM system.numbers LIMIT 1, 0;
|
Loading…
Reference in New Issue
Block a user