You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
'0000-00-00 00:00:00' is a invalid datetime but it can be inserted in datetime column type. If I have f_time datetime NOT NULL defined, the parsed value in row event is set to None: row_event.py: __read_datetime2()
Then I use all column values to insert/update, that None value would lead to no data matched, or insert a null value to NOT NULL columns(error occurs).
We all know datetime '0000-00-00' is nasty but when it already exists, we shall keep the data consistent. It's nice if a parameter like date_tostr is given to BinlogStreamReader to decide the behavior.
I've implemented this, I will make a pull request later.
The text was updated successfully, but these errors were encountered:
'0000-00-00 00:00:00' is a invalid datetime but it can be inserted in
datetime
column type. If I havef_time datetime NOT NULL
defined, the parsed value in row event is set toNone
:row_event.py: __read_datetime2()
Then I use all column values to insert/update, that
None
value would lead to no data matched, or insert a null value toNOT NULL
columns(error occurs).We all know datetime '0000-00-00' is nasty but when it already exists, we shall keep the data consistent. It's nice if a parameter like
date_tostr
is given toBinlogStreamReader
to decide the behavior.I've implemented this, I will make a pull request later.
The text was updated successfully, but these errors were encountered: