apache/seatunnel · error · UnsupportedOperationException
Need to add support for executed GTIDs for versions prior to
Error message
Need to add support for executed GTIDs for versions prior to 5.6.5
What it means
getExecutedGtidSet() reads the executed GTID set (column 5 of SHOW MASTER STATUS / SHOW MASTER STATUS-family statement) to set low/high watermarks for read-only incremental snapshots. If the result set has 4 or fewer columns, the connected server (or statement variant) predates MySQL 5.6.5 and cannot provide the GTID column, so an UnsupportedOperationException is deliberately thrown. GTID-based incremental snapshots simply cannot run on such servers.
Source
Thrown at seatunnel-connectors-v2/connector-cdc/connector-cdc-mysql/src/main/java/io/debezium/connector/mysql/MySqlReadOnlyIncrementalSnapshotChangeEventSource.java:288
protected void updateHighWatermark() {
getExecutedGtidSet(getContext()::setHighWatermark);
}
private void getExecutedGtidSet(Consumer<GtidSet> watermark) {
try {
jdbcConnection.query(
showMasterStmt,
rs -> {
if (rs.next()) {
if (rs.getMetaData().getColumnCount() > 4) {
// This column exists only in MySQL 5.6.5 or later ...
final String gtidSet =
rs.getString(
5); // GTID set, may be null, blank, or contain a
// GTID set
watermark.accept(new GtidSet(gtidSet));
} else {
throw new UnsupportedOperationException(
"Need to add support for executed GTIDs for versions prior to 5.6.5");
}
}
});
jdbcConnection.commit();
} catch (SQLException e) {
throw new DebeziumException(e);
}
}
@Override
protected void emitWindowOpen() {
updateLowWatermark();
}
@Override
protected void emitWindowClose(MySqlPartition partition) throws InterruptedException {
updateHighWatermark();View on GitHub (pinned to cf67b549a7)
Solutions
- Upgrade the MySQL server to 5.6.5 or later (ideally 5.7+/8.0) — GTID columns are required.
- Disable the incremental snapshot feature that needs GTIDs (set incremental snapshot off in the CDC config) and rely on regular snapshot + binlog streaming.
- Enable GTID mode on the server if supported (gtid_mode=ON, enforce_gtid_consistency=ON) and verify 'SHOW MASTER STATUS' returns 5 columns.
- Connect directly to the MySQL server rather than through a proxy that may alter the statement's result shape.
Example fix
-- before (connector config) incremental.snapshot.enabled = true -- after (unsupported old server) incremental.snapshot.enabled = false
Defensive patterns
Strategy: validation
Validate before calling
// Verify server supports GTID before enabling incremental snapshot: // mysql -u stuser -p -h <host> -e "SELECT VERSION(); SHOW VARIABLES LIKE 'gtid_mode';" // Require VERSION() >= 5.6.5 and gtid_mode=ON for GTID-based incremental snapshots.
Try / catch
try {
startCdcJob();
} catch (UnsupportedOperationException e) {
if (e.getMessage().contains("executed GTIDs for versions prior to 5.6.5")) {
// switch config: disable GTID/incremental snapshot or upgrade MySQL
} else {
throw e;
}
} Prevention
- Check SELECT VERSION() >= 5.6.5 before enabling GTID-dependent features.
- Enable gtid_mode=ON and enforce_gtid_consistency=ON where the server supports it.
- Avoid proxies that strip columns from SHOW MASTER STATUS.
- Prefer MySQL 8.0 for new CDC deployments.
When it happens
Trigger: Running the CDC source with incremental.snapshot.enabled=true (read-only or GTID-based incremental snapshot path) against MySQL older than 5.6.5, MariaDB whose equivalent statement lacks the 5th column, or a proxy that truncates SHOW MASTER STATUS columns.
Common situations: Legacy on-prem MySQL 5.5 instances; MariaDB where GTID semantics differ; cloud-managed databases exposing a reduced SHOW MASTER STATUS; misrouting the connector to a proxy/secondary that reports fewer columns.
Understand the failure class
Background: UnsupportedOperationException and "is not supported" errors: when a library deliberately refuses a call — this error's family across 30 libraries.
Related errors
- Unexpected error while connecting to MySQL and looking at GT
- Unexpected error while connecting to MySQL and looking at gt
- Unexpected error while connecting to MySQL and looking at GT
- Unexpected error while connecting to MySQL and looking at gt
- '${MySqlIncrementalSourceOptions.STARTUP_SPECIFIC_OFFSET_GTI
AI-assisted analysis of apache/seatunnel@cf67b549a7 (2026-09-10).
Data as JSON: /api/errors/1653fc1b6d232756.
Report an issue: GitHub.