Purushotham Pushpavanthar created NIFI-6914:
-----------------------------------------------
Summary: CaptureChangeMySQL can't handle triggers involving
multiple tables
Key: NIFI-6914
URL: https://issues.apache.org/jira/browse/NIFI-6914
Project: Apache NiFi
Issue Type: Bug
Components: Extensions
Affects Versions: 1.10.0
Reporter: Purushotham Pushpavanthar
Assignee: Purushotham Pushpavanthar
We have a use case where Table1Trigger is set to insert a row into another
table i.e. Insert into t1(v1,v2,v3) will trigger insert into t2(x1,x2).
In such cases we are seeing records from t1 are mapped to t2 with no errors.
This is how Mysql bin log looks when trigger is invoked
# table_map for table t1
# table_map for table t2
# Update event on table t1
# Create event ontable t2
(line numbers are added for reference)
As per this code table name for constructing a record is extracted from line 2
and same scope is used until next table_map bin row is seen, that said for the
above case values are mapped to t2 though it belongs to t1.
It doesn't always seem right to tag a row to particular table based on last
seen table_map event. Instead we should rely on _tableId_ from
_UpdateRowsEventData, WriteRowsEventData and DeleteRowsEventData_ objects to
map the positional row information to respective table schema.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)