Details
-
Feature Request
-
Resolution: Unresolved
-
Major
-
None
-
Backlog
-
0
-
0%
Description
I have a use case where I'm writing some additional transaction information to the MySQL binlog via a comment appended to the SQL statement. I've enabled the MySQL sysvar binlog_rows_query_log_events so the SQL statement is written to the binlog along with the row-based log info (see example below).
However, it appears that the Debezium SQL parser strips these comments from the statement before publishing the change event.
This feature request is to preserve these comments (as they appear in the binlog) instead of stripping them.
Binlog example with comment in MySQL statement:
BEGIN /*!*/; # at 961 #190320 17:02:04 server id 419 end_log_pos 1085 Rows_query # INSERT INTO my_table VALUES (999, 888, 777, 666) /* ADDITIONAL TRANSACTION INFORMATION */ # # at 1085 #190320 17:02:04 server id 419 end_log_pos 1145 Table_map: `mydb`.`my_table` mapped to number 27176 # at 1145 #190320 17:02:04 server id 419 end_log_pos 1187 Write_rows: table id 27176 flags: STMT_END_F ### INSERT INTO `mydb`.`my_table` ### SET ### @1=999 /* INT meta=0 nullable=0 is_null=0 */ ### @2=888 /* INT meta=0 nullable=0 is_null=0 */ ### @3=777 /* TINYINT meta=0 nullable=0 is_null=0 */ ### @4=666 /* TINYINT meta=0 nullable=0 is_null=0 */ # at 1187 #190320 17:02:24 server id 419 end_log_pos 1214 Xid = 17397187 COMMIT/*!*/; SET @@SESSION.GTID_NEXT= 'AUTOMATIC' /* added by mysqlbinlog */ /*!*/; DELIMITER ;