{"record":{"id":"7c42d8f7bf0ec05a","repo":"alibaba/canal","slug":"row-result-is-unsupported","errorCode":null,"errorMessage":"ROW_RESULT is unsupported","messagePattern":"ROW_RESULT is unsupported","errorType":"exception","errorClass":"IOException","httpStatus":null,"severity":"error","filePath":"dbsync/src/main/java/com/taobao/tddl/dbsync/binlog/event/UserVarLogEvent.java","lineNumber":109,"sourceCode":"                    value = Double.valueOf(buffer.getDouble64()); // float8get\n                    break;\n                case INT_RESULT:\n                    if (valueLen == 8) value = Long.valueOf(buffer.getLong64()); // !uint8korr\n                    else if (valueLen == 4) value = Long.valueOf(buffer.getUint32());\n                    else throw new IOException(\"Error INT_RESULT length: \" + valueLen);\n                    break;\n                case DECIMAL_RESULT:\n                    final int precision = buffer.getInt8();\n                    final int scale = buffer.getInt8();\n                    value = buffer.getDecimal(precision, scale); // bin2decimal\n                    break;\n                case STRING_RESULT:\n                    Charset charset = CharsetConversion.getNioCharset(charsetNumber);\n                    value = buffer.getFixString(valueLen, charset);\n                    break;\n                case ROW_RESULT:\n                    // this seems to be banned in MySQL altogether\n                    throw new IOException(\"ROW_RESULT is unsupported\");\n                default:\n                    value = null;\n                    break;\n            }\n            buffer.limit(limit);\n        }\n    }\n\n    public final String getQuery() {\n        if (value == null) {\n            return \"SET @\" + name + \" := NULL\";\n        } else if (type == STRING_RESULT) {\n            // TODO: do escaping !?\n            return \"SET @\" + name + \" := \\'\" + value + '\\'';\n        } else {\n            return \"SET @\" + name + \" := \" + String.valueOf(value);\n        }\n    }","sourceCodeStart":91,"sourceCodeEnd":127,"githubUrl":"https://github.com/alibaba/canal/blob/87be50e87686a3e8af08c368d0e1ffd1f59eb04a/dbsync/src/main/java/com/taobao/tddl/dbsync/binlog/event/UserVarLogEvent.java#L91-L127","documentation":"Thrown while decoding a UserVarLogEvent whose value type is ROW_RESULT. The inline comment states 'this seems to be banned in MySQL altogether' — MySQL does not produce ROW_RESULT user variables in the binlog, so a well-formed MySQL stream never reaches this branch. Hitting it implies a non-MySQL source or a corrupted type byte.","triggerScenarios":"A UserVarLogEvent carries a type byte equal to ROW_RESULT. Not produced by standard MySQL; only seen from a forged or corrupt binlog or a non-MySQL-compatible source emulating the protocol.","commonSituations":"Binlog corruption flipping the type byte; a third-party tool injecting synthetic binlog events; replicating from a system that is not real MySQL.","solutions":["Verify the binlog source is genuine MySQL and the event is not forged.","Inspect the event with mysqlbinlog --hexdump; if corrupt, reseed from a valid position.","If the source legitimately emits ROW_RESULT, patch UserVarLogEvent to skip/null the value instead of throwing."],"exampleFix":"// before\ncase ROW_RESULT:\n    throw new IOException(\"ROW_RESULT is unsupported\");\n// after: skip gracefully\ncase ROW_RESULT:\n    logger.warn(\"ROW_RESULT user variable encountered, setting value to null\");\n    value = null;\n    break;","handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"try {\n    userVarEvent.parse();\n} catch (IOException e) {\n    if (e.getMessage().equals(\"ROW_RESULT is unsupported\")) {\n        logger.warn(\"ROW_RESULT user variable encountered; not produced by MySQL. Skipping.\");\n    } else throw e;\n}","preventionTips":["Confirm the binlog source is genuine MySQL (ROW_RESULT is banned upstream).","Inspect forged/synthetic events with mysqlbinlog --hexdump.","Patch UserVarLogEvent to null-skip ROW_RESULT if your source legitimately emits it."],"tags":["binlog","user-var-event","row-result","parsing"],"backgroundTag":null,"analyzedSha":"87be50e87686a3e8af08c368d0e1ffd1f59eb04a","analyzedAt":"2026-08-14T04:30:11.918Z","schemaVersion":2},"datasetVersion":"2026-08-14T05:17:29.042Z"}