DanielCarter-stack commented on issue #10451:
URL: https://github.com/apache/seatunnel/issues/10451#issuecomment-3851092629

   <!-- code-pr-reviewer -->
   Thanks for reporting this and offering to contribute.
   
   **Root cause:** When `database-names` and `table-pattern` are configured 
without explicitly setting `database-pattern`, it defaults to `".*"` (matches 
all databases). This causes SeaTunnel to scan MySQL system tables like 
`mysql.event` and `mysql.proc`, which contain `sql_mode` fields of type `SET 
UNSIGNED`. `MySqlTypeConverter` only handles `MYSQL_SET` but not 
`MYSQL_SET_UNSIGNED`, so it falls into the default case and throws `COMMON-21` 
in `buildCatalogTablesWithErrorCheck`.
   
   **Evidence:**  
   - `Catalog.java:223-225` - throws on unsupported types  
   - `CatalogOptions.java:48-52` - `DATABASE_PATTERN` defaults to `".*"`  
   - `MySqlTypeConverter.java:147-149` - appends `UNSIGNED` to type string  
   - `MySqlTypeConverter.java:247-255,324-326` - no case for `MYSQL_SET 
UNSIGNED`
   
   **Workaround:** Add `database-pattern = "wecom_chat|gj_edp"` to exclude 
system databases.
   
   **Possible fixes for PR:**  
   1. Add `MYSQL_SET_UNSIGNED` support in `MySqlTypeConverter`  
   2. Auto-infer `database-pattern` from `database-names` when not explicitly 
set  
   3. Add option to skip unsupported tables with a warning instead of failing
   
   Which approach would you prefer?


-- 
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]

Reply via email to