-
Notifications
You must be signed in to change notification settings - Fork 690
Open
Description
'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.
Metadata
Metadata
Assignees
Labels
No labels