[Bug] [MySQL-CDC] Fails to init when encountering mysql.event/mysql.proc with SET UNSIGNED field type
- Dominant language
- Java
- Stars
- 9.7k
- Forks
- 2.4k
- Avg merge
- 3d 9h
- Merged PRs (30d)
- 204
Description
### Search before asking
- [x] I had searched in the [issues](https://github.com/apache/seatunnel/issues?q=is%3Aissue+label%3A%22bug%22) and found no similar issues.
### What happened
When using the `MySQL-CDC` source connector in a multiple-table job, the SeaTunnel job failed during startup with a `Factory initialize failed` error.
From the stack trace, it seems SeaTunnel is trying to build catalog tables for all tables in the `mysql` system database, and it fails because some field types in `mysql.event` and `mysql.proc` are not supported:
The master version is MySQL 5.7.31-34, and the slave version is MySQL 8.0.26
My expectation was that:
1. System tables in the mysql database (such as mysql.event and mysql.proc) would be ignored automatically by the MySQL-CDC connector and not cause the job to fail; or
2. At least, unsupported tables would be skipped with a warning instead of failing the whole job at initialization.
But currently, as soon as MySQL-CDC tries to build catalog tables, the job fails immediately with COMMON-21.
### SeaTunnel Version
2.3.12
### SeaTunnel Config
```conf
env {
parallelism = 1
job.mode = "STREAMING"
checkpoint.interval = 5000
read_limit.bytes_per_second=10485760
read_limit.rows_per_second=10000
}
source {
MySQL-CDC {
server-id = 2553
url = "jdbc:mysql://xxxxx:3306/"
connection_check_timeout_sec = 100
username = "username"
password = "password"
database-names = ["wecom_chat", "gj_edp"]
table-pattern = ".*\\..*"
schema-changes.enabled = true
startup.mode = "latest"
split.size = 100
}
}
sink {
jdbc {
url = "jdbc:mysql://xxxxx:3306/?useUnicode=true&characterEncoding=UTF-8&rewriteBatchedStatements=true"
driver = "com.mysql.cj.jdbc.Driver"
username = "username"
password = "password"
# Automatically generate sql statements based on database table names
generate_sink_sql = true
database ="${database_name}"
table = "${table_name}"
schema_save_mode = "CREATE_SCHEMA_WHEN_NOT_EXIST"
create_index = true
}
}
```
### Running Command
```shell
$ bin/seatunnel.sh -c job/other_replica.conf
```
### Error Exception
```log
2026-02-05 10:58:20,413 ERROR [o.a.s.c.s.SeaTunnel ] [main] -
===============================================================================
2026-02-05 10:58:20,420 ERROR [o.a.s.c.s.SeaTunnel ] [main] - Fatal Error,
2026-02-05 10:58:20,421 ERROR [o.a.s.c.s.SeaTunnel ] [main] - Please submit bug report in https://github.com/apache/seatunnel/issues
2026-02-05 10:58:20,423 ERROR [o.a.s.c.s.SeaTunnel ] [main] - Reason:SeaTunnel job executed failed
2026-02-05 10:58:20,426 ERROR [o.a.s.c.s.SeaTunnel ] [main] - Exception StackTrace:org.apache.seatunnel.core.starter.exception.CommandExecuteException: SeaTunnel job executed failed
at org.apache.seatunnel.core.starter.seatunnel.command.ClientExecuteCommand.execute(ClientExecuteCommand.java:228)
at org.apache.seatunnel.core.starter.SeaTunnel.run(SeaTunnel.java:40)
at org.apache.seatunnel.core.starter.seatunnel.SeaTunnelClient.main(SeaTunnelClient.java:40)
Caused by: org.apache.seatunnel.api.table.factory.FactoryException: ErrorCode:[API-06], ErrorDescription:[Factory initialize failed] - Unable to create a source for identifier 'MySQL-CDC'.
at org.apache.seatunnel.api.table.factory.FactoryUtil.restoreAndPrepareSource(FactoryUtil.java:168)
at org.apache.seatunnel.api.table.factory.FactoryUtil.createAndPrepareSource(FactoryUtil.java:86)
at org.apache.seatunnel.engine.core.parse.MultipleTableJobConfigParser.parseSource(MultipleTableJobConfigParser.java:394)
at org.apache.seatunnel.engine.core.parse.MultipleTableJobConfigParser.parse(MultipleTableJobConfigParser.java:244)
at org.apache.seatunnel.engine.client.job.ClientJobExecutionEnvironment.getLogicalDag(ClientJobExecutionEnvironment.java:123)
at org.apache.seatunnel.engine.client.job.ClientJobExecutionEnvironment.execute(ClientJobExecutionEnvironment.java:191)
at org.apache.seatunnel.core.starter.seatunnel.command.ClientExecuteCommand.execute(ClientExecuteCommand.java:165)
... 2 more
Caused by: org.apache.seatunnel.common.exception.SeaTunnelRuntimeException: ErrorCode:[COMMON-21], ErrorDescription:['MySQL' tables unsupported get catalog table,the corresponding field types in the following tables are not supported: '{"mysql.event":{"sql_mode":"SET UNSIGNED"},"mysql.proc":{"sql_mode":"SET UNSIGNED"}}']
at org.apache.seatunnel.common.exception.CommonError.getCatalogTablesWithUnsupportedType(CommonError.java:191)
at org.apache.seatunnel.api.table.catalog.Catalog.buildCatalogTablesWithErrorCheck(Catalog.java:224)
at org.apache.seatunnel.api.table.catalog.Catalog.getTables(Catalog.java:187)
at org.apache.seatunnel.api.table.catalog.CatalogTableUtil.lambda$getCatalogTables$0(CatalogTableUtil.java:124)
at java.base/java.util.Optional.map(Optional.java:260)
at org.apache.seatunnel.api.table.catalog.CatalogTableUtil.getCatalogTables(CatalogTableUtil.java:118)
at org.apache.seatunnel.api.table.catalog.CatalogTableUtil.getCatalogTables(CatalogTableUtil.java:98)
at org.apache.seatunnel.connectors.seatunnel.cdc.mysql.source.MySqlIncrementalSourceFactory.lambda$restoreSource$2(MySqlIncrementalSourceFactory.java:118)
at org.apache.seatunnel.api.table.factory.FactoryUtil.createAndPrepareSource(FactoryUtil.java:180)
at org.apache.seatunnel.api.table.factory.FactoryUtil.restoreAndPrepareSource(FactoryUtil.java:136)
... 8 more
2026-02-05 10:58:20,427 ERROR [o.a.s.c.s.SeaTunnel ] [main] -
===============================================================================
Exception in thread "main" org.apache.seatunnel.core.starter.exception.CommandExecuteException: SeaTunnel job executed failed
at org.apache.seatunnel.core.starter.seatunnel.command.ClientExecuteCommand.execute(ClientExecuteCommand.java:228)
at org.apache.seatunnel.core.starter.SeaTunnel.run(SeaTunnel.java:40)
at org.apache.seatunnel.core.starter.seatunnel.SeaTunnelClient.main(SeaTunnelClient.java:40)
Caused by: org.apache.seatunnel.api.table.factory.FactoryException: ErrorCode:[API-06], ErrorDescription:[Factory initialize failed] - Unable to create a source for identifier 'MySQL-CDC'.
at org.apache.seatunnel.api.table.factory.FactoryUtil.restoreAndPrepareSource(FactoryUtil.java:168)
at org.apache.seatunnel.api.table.factory.FactoryUtil.createAndPrepareSource(FactoryUtil.java:86)
at org.apache.seatunnel.engine.core.parse.MultipleTableJobConfigParser.parseSource(MultipleTableJobConfigParser.java:394)
at org.apache.seatunnel.engine.core.parse.MultipleTableJobConfigParser.parse(MultipleTableJobConfigParser.java:244)
at org.apache.seatunnel.engine.client.job.ClientJobExecutionEnvironment.getLogicalDag(ClientJobExecutionEnvironment.java:123)
at org.apache.seatunnel.engine.client.job.ClientJobExecutionEnvironment.execute(ClientJobExecutionEnvironment.java:191)
at org.apache.seatunnel.core.starter.seatunnel.command.ClientExecuteCommand.execute(ClientExecuteCommand.java:165)
... 2 more
Caused by: org.apache.seatunnel.common.exception.SeaTunnelRuntimeException: ErrorCode:[COMMON-21], ErrorDescription:['MySQL' tables unsupported get catalog table,the corresponding field types in the following tables are not supported: '{"mysql.event":{"sql_mode":"SET UNSIGNED"},"mysql.proc":{"sql_mode":"SET UNSIGNED"}}']
at org.apache.seatunnel.common.exception.CommonError.getCatalogTablesWithUnsupportedType(CommonError.java:191)
at org.apache.seatunnel.api.table.catalog.Catalog.buildCatalogTablesWithErrorCheck(Catalog.java:224)
at org.apache.seatunnel.api.table.catalog.Catalog.getTables(Catalog.java:187)
at org.apache.seatunnel.api.table.catalog.CatalogTableUtil.lambda$getCatalogTables$0(CatalogTableUtil.java:124)
at java.base/java.util.Optional.map(Optional.java:260)
at org.apache.seatunnel.api.table.catalog.CatalogTableUtil.getCatalogTables(CatalogTableUtil.java:118)
at org.apache.seatunnel.api.table.catalog.CatalogTableUtil.getCatalogTables(CatalogTableUtil.java:98)
at org.apache.seatunnel.connectors.seatunnel.cdc.mysql.source.MySqlIncrementalSourceFactory.lambda$restoreSource$2(MySqlIncrementalSourceFactory.java:118)
at org.apache.seatunnel.api.table.factory.FactoryUtil.createAndPrepareSource(FactoryUtil.java:180)
at org.apache.seatunnel.api.table.factory.FactoryUtil.restoreAndPrepareSource(FactoryUtil.java:136)
... 8 more
```
### Zeta or Flink or Spark Version
not used
### Java or Scala Version
openjdk 1.8.0_412
### Screenshots
_No response_
### Are you willing to submit PR?
- [x] Yes I am willing to submit a PR!
### Code of Conduct
- [x] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.