Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Part5/N: Handle zero mysql datetime better
Summary: We have mysql tables using timestamp with this value in several places, which cannot be parsed into NaiveDateTime directly - The effect of this is that cannot us row_struct macro to "generate" structs for these tables. Introducing MysqlNaiveDateTime type to let this happen (more easily; otherwise we need to expand the full rowfield impl for the whole struct just to handle the 0000 timestamp properly). See https://dev.mysql.com/doc/refman/8.4/en/date-and-time-types.html ``` (scriptrw:[email protected])> select UNIX_TIMESTAMP("0000-00-01 00:00:00"); +---------------------------------------+ | UNIX_TIMESTAMP("0000-00-01 00:00:00") | +---------------------------------------+ | 0 | +---------------------------------------+ 1 row in set (0.00 sec) ``` This is a valid "zero" for mysqld. but not convertible to NDT. Reviewed By: xiw-org Differential Revision: D63570026 fbshipit-source-id: 5c1058a19220e44b7f6479bdf557be2ef67a0b7e
- Loading branch information