{"record":{"id":"d8f8b8c80da7cfaa","repo":"apache/seatunnel","slug":"mysql-cdc-diagnostic-show-master-status-returned","errorCode":null,"errorMessage":"MySQL-CDC diagnostic: SHOW MASTER STATUS returned empty result","messagePattern":"MySQL-CDC diagnostic: SHOW MASTER STATUS returned empty result","errorType":"console","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"seatunnel-connectors-v2/connector-cdc/connector-cdc-mysql/src/main/java/org/apache/seatunnel/connectors/seatunnel/cdc/mysql/source/reader/fetch/MySqlSourceFetchTaskContext.java","lineNumber":519,"sourceCode":"                                \"MySQL-CDC diagnostic: variable {}={}\",\n                                rs.getString(1),\n                                rs.getString(2));\n                    });\n        } catch (SQLException e) {\n            LOG.warn(\n                    \"MySQL-CDC diagnostic: failed to query variable {}: {}\",\n                    variableName,\n                    e.getMessage());\n        }\n    }\n\n    private void logMySqlMasterStatus() {\n        try {\n            connection.query(\n                    \"SHOW MASTER STATUS\",\n                    rs -> {\n                        if (!rs.next()) {\n                            LOG.warn(\n                                    \"MySQL-CDC diagnostic: SHOW MASTER STATUS returned empty result\");\n                            return;\n                        }\n                        String file = safeGetString(rs, \"File\");\n                        String position = safeGetString(rs, \"Position\");\n                        String gtidSet = safeGetString(rs, \"Executed_Gtid_Set\");\n                        LOG.warn(\n                                \"MySQL-CDC diagnostic: master status file={}, position={}, executed_gtid_set={}\",\n                                file,\n                                position,\n                                gtidSet);\n                    });\n        } catch (SQLException e) {\n            LOG.warn(\n                    \"MySQL-CDC diagnostic: failed to query SHOW MASTER STATUS: {}\", e.getMessage());\n        }\n    }\n","sourceCodeStart":501,"sourceCodeEnd":537,"githubUrl":"https://github.com/apache/seatunnel/blob/cf67b549a7a6c35fa0beb12d83c62892427ea919/seatunnel-connectors-v2/connector-cdc/connector-cdc-mysql/src/main/java/org/apache/seatunnel/connectors/seatunnel/cdc/mysql/source/reader/fetch/MySqlSourceFetchTaskContext.java#L501-L537","documentation":"Diagnostic WARN from logMySqlMasterStatus: the SHOW MASTER STATUS query returned an empty result set, meaning the server currently has no active binlog (binlogging disabled or no events written yet). This explains why a restored binlog filename/position cannot be matched to the server's current binlog state.","triggerScenarios":"Called during logBinlogNotAvailableDiagnostics or logGtidNotAvailableDiagnostics; SHOW MASTER STATUS executes but yields zero rows — classic on servers with log_bin=OFF or with no write activity and binlogs purged/disabled.","commonSituations":"Reading from a replica or instance with binlog disabled; fresh server that never produced a binlog event; MySQL 8.4+/9.x where SHOW MASTER STATUS is deprecated/removed (use SHOW BINARY LOG STATUS).","solutions":["Enable binlogging (log_bin=ON) on the target server and restart MySQL","Confirm with SELECT @@log_bin; — must be 1","On MySQL 8.4+/9.x, run SHOW BINARY LOG STATUS manually; upgrade the connector version that uses the new command","Point the job at the primary server with binlogs enabled rather than a binlog-less node"],"exampleFix":"// before (my.cnf)\n# skip-log-bin\n// after (my.cnf, restart required)\nlog_bin = mysql-bin\nserver_id = 1","handlingStrategy":"validation","validationCode":"SELECT @@log_bin; -- must be 1\nSHOW MASTER STATUS; -- or SHOW BINARY LOG STATUS on MySQL 8.4+\nSHOW BINARY LOGS;","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Enable log_bin on every potential CDC source including replicas used for reading","For MySQL 8.4+/9.x use SHOW BINARY LOG STATUS / upgrade connector","Never point CDC at a node without binlogs"],"tags":["mysql","cdc","diagnostics","binlog","master-status"],"backgroundTag":"empty-result-set","analyzedSha":"cf67b549a7a6c35fa0beb12d83c62892427ea919","analyzedAt":"2026-09-10T21:44:55.265Z","contentChangedAt":"2026-09-10T21:44:55.265Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}