-
Bug
-
Resolution: Done
-
Major
-
0.9.4.Final
-
None
Debezium MySQL connector hangs after receiving binlog entry being result of execution of the following statement:
CREATE TRIGGER mask_private_data
BEFORE INSERT ON users
FOR EACH ROW BEGIN
SET NEW.phone = CONCAT('555', NEW.id);
END;
The error comes from antlr: no viable alternative at input
I did some investigation and it looks the `SET NEW.sth = expression` is causing the issue, but it shouldn't since this is valid statement according to the official documentation:
https://dev.mysql.com/doc/refman/8.0/en/trigger-syntax.html, see:
You can refer to a column named with NEW if you have the SELECT privilege for it. In a BEFORE trigger, you can also change its value with SET NEW.col_name = value if you have the UPDATE privilege for it. This means you can use a trigger to modify the values to be inserted into a new row or used to update a row.
I have a patch ready and I will push it to github right away.