{"record":{"id":"42d24db5a4d84913","repo":"alibaba/canal","slug":"unsupported-binlogformat-format","errorCode":null,"errorMessage":"Unsupported BinlogFormat  + format","messagePattern":"Unsupported BinlogFormat  \\+ format","errorType":"exception","errorClass":"CanalParseException","httpStatus":null,"severity":"error","filePath":"parse/src/main/java/com/alibaba/otter/canal/parse/inbound/mysql/MysqlEventParser.java","lineNumber":102,"sourceCode":"            metaConnection = (MysqlConnection) connection.fork();\n            try {\n                metaConnection.connect();\n            } catch (IOException e) {\n                throw new CanalParseException(e);\n            }\n\n            if (supportBinlogFormats != null && supportBinlogFormats.length > 0) {\n                BinlogFormat format = ((MysqlConnection) metaConnection).getBinlogFormat();\n                boolean found = false;\n                for (BinlogFormat supportFormat : supportBinlogFormats) {\n                    if (supportFormat != null && format == supportFormat) {\n                        found = true;\n                        break;\n                    }\n                }\n\n                if (!found) {\n                    throw new CanalParseException(\"Unsupported BinlogFormat \" + format);\n                }\n            }\n\n            if (supportBinlogImages != null && supportBinlogImages.length > 0) {\n                BinlogImage image = ((MysqlConnection) metaConnection).getBinlogImage();\n                boolean found = false;\n                for (BinlogImage supportImage : supportBinlogImages) {\n                    if (supportImage != null && image == supportImage) {\n                        found = true;\n                        break;\n                    }\n                }\n\n                if (!found) {\n                    throw new CanalParseException(\"Unsupported BinlogImage \" + image);\n                }\n            }\n","sourceCodeStart":84,"sourceCodeEnd":120,"githubUrl":"https://github.com/alibaba/canal/blob/87be50e87686a3e8af08c368d0e1ffd1f59eb04a/parse/src/main/java/com/alibaba/otter/canal/parse/inbound/mysql/MysqlEventParser.java#L84-L120","documentation":"When supportBinlogFormats is configured, preDump() reads the master's binlog_format and rejects it with CanalParseException if it is not in the allowed set. This is an explicit compatibility gate so canal refuses to replicate from a master whose row format it cannot safely consume (canal requires ROW for reliable row-based replication).","triggerScenarios":"canal.instance.supportBinlogFormats (or the setter) is set to a subset (e.g. {ROW}) and the connected master reports a binlog_format outside that subset (e.g. MIXED or STATEMENT).","commonSituations":"Master configured with binlog_format=MIXED/STATEMENT while canal's supportBinlogFormats whitelists only ROW; promoting a server whose format differs from what canal expects.","solutions":["Set the master to ROW: `SET GLOBAL binlog_format = 'ROW'` and persist in my.cnf.","If MIXED is acceptable for your use case, include BinlogFormat.MIXED in supportBinlogFormats (not recommended — canal is row-oriented).","Remove the supportBinlogFormats constraint if you want canal to accept any format (at your own risk)."],"exampleFix":"-- make the master match canal's required format\nSET GLOBAL binlog_format = 'ROW';","handlingStrategy":"validation","validationCode":"// Validate the master's binlog_format against the allowed set before preDump\nBinlogFormat actual = connection.getBinlogFormat();\nboolean ok = false;\nfor (BinlogFormat allowed : supportBinlogFormats) {\n    if (allowed == actual) { ok = true; break; }\n}\nif (!ok) {\n    throw new IllegalStateException(\"Master binlog_format \" + actual + \" not in allowed \" + Arrays.toString(supportBinlogFormats));\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Standardize masters on binlog_format=ROW.","Keep supportBinlogFormats aligned with the actual master configuration.","Monitor binlog_format drift across failover targets."],"tags":["mysql","binlog-format","validation","canal-parse"],"backgroundTag":null,"analyzedSha":"87be50e87686a3e8af08c368d0e1ffd1f59eb04a","analyzedAt":"2026-08-14T04:30:11.918Z","schemaVersion":2},"datasetVersion":"2026-08-14T05:17:29.042Z"}