mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-24 08:32:02 +00:00
dbms: fixed error with ParserUnsignedInteger (used for tuple element access) [#METR-2944].
This commit is contained in:
parent
3c0c39e38a
commit
23f8413d74
@ -351,14 +351,14 @@ bool ParserUnsignedInteger::parseImpl(Pos & pos, Pos end, ASTPtr & node, Pos & m
|
||||
|
||||
UInt64 x = 0;
|
||||
ReadBuffer in(const_cast<char *>(pos), end - pos, 0);
|
||||
if (!tryReadIntText(x, in) || in.offset() == 0)
|
||||
if (!tryReadIntText(x, in) || in.count() == 0)
|
||||
{
|
||||
expected = "unsigned integer";
|
||||
return false;
|
||||
}
|
||||
|
||||
res = x;
|
||||
pos += in.offset();
|
||||
pos += in.count();
|
||||
node = new ASTLiteral(StringRange(begin, pos), res);
|
||||
return true;
|
||||
}
|
||||
|
@ -0,0 +1 @@
|
||||
b
|
@ -0,0 +1 @@
|
||||
SELECT ('a', 'b').2
|
Loading…
Reference in New Issue
Block a user