txjytxwd opened a new pull request, #4600: URL: https://github.com/apache/flink-cdc/pull/4600
## What is the purpose of this pull request? Fix [FLINK-41197](https://issues.apache.org/jira/browse/FLINK-41197). With `scan.binlog.newly-added-table.enabled=true`, MySQL can report the names affected by a multi-table `DROP TABLE` as an aggregated source table name. Matching that name can bypass `tables.exclude`, allowing a `DropTableEvent` for an excluded table to reach downstream operators and cause a Transform failure. For `DROP TABLE keep_multi, excluded_multi`, the pipeline should emit only the event for `keep_multi` when `excluded_multi` is excluded. A statement affecting only excluded tables should not be emitted. ## Brief change log - Resolve the actual table IDs for aggregated schema records using the existing MySQL DDL parser before applying the binlog reader table filter. Preserve the existing fallback when table identities cannot be resolved. - Apply the configured table filter to each deserialized Pipeline schema change event. Keep the original deserializer responsible for parsing and preserve data event, type information, and collector behavior. - Add regression coverage for mixed and fully excluded multi-table DDL, qualified and quoted identifiers, and existing schema-processing behavior. ## Verifying this change - `BinlogSplitReaderFilteringTest` covers admission of schema change records. - `MySqlPipelineRecordEmitterTest` covers filtering the actual emitted events using the real MySQL deserializer. - Related existing MySQL record-emitter, record-utility tests were also exercised under the default Flink 1.20 profile. - The final diff audit verified all changed behaviors with targeted executed tests and explicit exclusions. Spotless, Checkstyle, and ASF license-header checks passed for the new tests. The reporter also reproduced the original failure using the CDC 3.6.0 MySQL connector with matching common/runtime/flink1-compat JARs on Flink 1.20. Real MySQL/Transform end-to-end validation of the patched connector has not been completed. ## Documentation - Does this pull request introduce a new feature? no - If yes, how is the feature documented? not applicable ##### Was generative AI tooling used to co-author this PR? - [X] Yes (Codex) Generated-by: Codex -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
