mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-24 00:22:29 +00:00
dbms: when parsing DateTime in unix timestamp form, allow timestamps with leading zeros [#METR-15790].
This commit is contained in:
parent
23144fb2c1
commit
3f52d7d509
@ -235,6 +235,7 @@ void readIntTextUnsafe(T & x, ReadBuffer & buf)
|
||||
x = -x;
|
||||
}
|
||||
|
||||
|
||||
template <bool throw_exception, class ExcepFun, class NoExcepFun, class... Args>
|
||||
bool exceptionPolicySelector(ExcepFun && excep_f, NoExcepFun && no_excep_f, Args &&... args)
|
||||
{
|
||||
@ -454,7 +455,7 @@ inline void readDateTimeText(time_t & datetime, ReadBuffer & buf)
|
||||
buf.position() += 19;
|
||||
}
|
||||
else
|
||||
readIntTextUnsafe(datetime, buf);
|
||||
readIntText(datetime, buf);
|
||||
}
|
||||
else
|
||||
readDateTimeTextFallback(datetime, buf);
|
||||
|
Loading…
Reference in New Issue
Block a user