dbms: when parsing DateTime in unix timestamp form, allow timestamps with leading zeros [#METR-15790].

This commit is contained in:
Alexey Milovidov 2015-10-27 03:53:38 +03:00
parent 23144fb2c1
commit 3f52d7d509

View File

@ -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);