File tree Expand file tree Collapse file tree 1 file changed +18
-0
lines changed Expand file tree Collapse file tree 1 file changed +18
-0
lines changed Original file line number Diff line number Diff line change @@ -574,6 +574,24 @@ def create_binlog_packet_wrapper(pkt):
574574 self .assertEqual (binlog_event .event ._is_event_valid , True )
575575 self .assertNotEqual (wrong_event .event ._is_event_valid , True )
576576
577+ def test_categorize_none (self ):
578+ self .stream .close ()
579+ self .stream = BinLogStreamReader (
580+ self .database ,
581+ server_id = 1024 ,
582+ resume_stream = False ,
583+ only_events = [WriteRowsEvent ]
584+ )
585+ query = "CREATE TABLE null_operation_update_example (col1 INT, col2 INT);"
586+ self .execute (query )
587+ query = "INSERT INTO null_operation_update_example (col1, col2) VALUES (NULL, 1);"
588+ self .execute (query )
589+ self .execute ("COMMIT" )
590+ write_rows_event = self .stream .fetchone ()
591+ self .assertIsInstance (write_rows_event , WriteRowsEvent )
592+ self .assertEqual (write_rows_event .rows [0 ]['category_of_none' ]['col1' ], 'null' )
593+
594+
577595
578596class TestMultipleRowBinLogStreamReader (base .PyMySQLReplicationTestCase ):
579597 def ignoredEvents (self ):
You can’t perform that action at this time.
0 commit comments