icchux commented on issue #13371:
URL: https://github.com/apache/seatunnel/issues/13371#issuecomment-7158239626
I can reproduce this issue with SeaTunnel 3.1.0, the OceanBase-CDC
connector, Zeta (submitted via REST V2), and Java 17.
The exact database version reported by SELECT VERSION() is:
```text
5.7.25-OceanBase_CE-v4.2.4.0
```
Using the same endpoint and account as the job, I verified the following SQL
behavior:
| Statement | Observed result |
| --- | --- |
| SHOW BINARY LOG STATUS | ERROR 1064 (42000), syntax error near 'BINARY LOG
STATUS' |
| SHOW MASTER STATUS | Succeeds and returns a non-empty File, Position, and
Executed_Gtid_Set |
| SHOW BINARY LOGS | Succeeds and returns 32 binlog files with nonzero sizes
|
| SHOW MASTER LOGS | ERROR 1064 (42000), syntax error near 'MASTER LOGS' |
The failing job uses startup.mode = "timestamp" and fails before emitting
records. The relevant stack trace is:
```text
java.sql.SQLSyntaxErrorException: You have an error in your SQL syntax;
check the manual that corresponds to your OceanBase version for the right
syntax to use near 'MASTER LOGS' at line 1
at
org.apache.seatunnel.connectors.seatunnel.cdc.mysql.utils.MySqlConnectionUtils.findBinlogOffsetBytimestamp(MySqlConnectionUtils.java:218)
at
org.apache.seatunnel.connectors.seatunnel.cdc.mysql.source.reader.fetch.MySqlSourceFetchTaskContext.getInitOffset(MySqlSourceFetchTaskContext.java:309)
```
This matches the fallback chain in the 3.1.0 source: MySqlConnection first
probes SHOW BINARY LOG STATUS; the SQLException causes binaryLogStatusStatement
to become SHOW MASTER STATUS. The startsWith("SHOW BINARY") conditional in
findBinlogOffsetBytimestamp() then selects SHOW MASTER LOGS, even though this
endpoint supports SHOW BINARY LOGS for listing files.
Source references:
- [Status-query probe and
fallback](https://github.com/apache/seatunnel/blob/3.1.0/seatunnel-connectors-v2/connector-cdc/connector-cdc-mysql/src/main/java/io/debezium/connector/mysql/MySqlConnection.java#L81-L111)
- [Timestamp lookup statement
selection](https://github.com/apache/seatunnel/blob/3.1.0/seatunnel-connectors-v2/connector-cdc/connector-cdc-mysql/src/main/java/org/apache/seatunnel/connectors/seatunnel/cdc/mysql/utils/MySqlConnectionUtils.java#L199-L225)
The OceanBase Binlog Service version has not yet been independently
confirmed. This report confirms the SQL behavior and timestamp-startup failure
in this deployment; I have not tested PR #13382 or verified end-to-end
streaming with the fix. The earliest startup path has not been exercised in
this environment.
--
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]