Summary
Both overloads of MySQLDDLParserService.parseSql() declare String clickHouseResult = null on entry and return it at the end without ever assigning it. The translated DDL is written to the StringBuffer parsedQuery side-channel parameter, but the return value is always null.
Affected Code
File: sink-connector-lightweight/src/main/java/com/altinity/clickhouse/debezium/embedded/parser/MySQLDDLParserService.java
Lines 86-105 and 117-138:
public String parseSql(String sql, String databaseName, StringBuffer parsedQuery) {
String clickHouseResult = null;
// ... parsing logic writes to parsedQuery ...
return clickHouseResult; // always null
}
Impact
Any caller that relies on the return value of parseSql() instead of the parsedQuery parameter will receive null and silently lose the parsed DDL. The interface DDLParserService declares the return as String, misleading callers.
Fix
Return parsedQuery.toString() instead of the never-assigned clickHouseResult.
Severity
HIGH — silent data loss if callers use the return value
Summary
Both overloads of
MySQLDDLParserService.parseSql()declareString clickHouseResult = nullon entry and return it at the end without ever assigning it. The translated DDL is written to theStringBuffer parsedQueryside-channel parameter, but the return value is always null.Affected Code
File:
sink-connector-lightweight/src/main/java/com/altinity/clickhouse/debezium/embedded/parser/MySQLDDLParserService.javaLines 86-105 and 117-138:
Impact
Any caller that relies on the return value of
parseSql()instead of theparsedQueryparameter will receive null and silently lose the parsed DDL. The interfaceDDLParserServicedeclares the return asString, misleading callers.Fix
Return
parsedQuery.toString()instead of the never-assignedclickHouseResult.Severity
HIGH — silent data loss if callers use the return value