julien-duponchelle / python-mysql-replication

Pure Python Implementation of MySQL replication protocol build on top of PyMYSQL
2.33k stars 679 forks source link

Distinguish ambiguous column value of `None` #489

Closed heehehe closed 1 year ago

heehehe commented 1 year ago

Resolve #479

Overview

In RowsEvent, there are three cases in which the column value is None.

  1. when the value is NULL
  2. when the datatype is related to time (datetime, time, ...) and the value is not supported format (ex: '0000-00-00 00:00:00')
  3. when the datatype is set and the value is empty

Since we cannot distinguish these cases, we're going to provide detail information for None value.

Changes

Example