Description
OceanbaseOracleMetaData.tableDDL builds COMMENT ON ... IS using EasyStringUtils.escapeAndQuoteString(comment), which doubles both ' and \. The base OracleMetaData correctly uses OracleIdentifierProcessor.quoteStringLiteral (only doubles '), and OceanBase Oracle mode treats \ as a literal character (OceanbaseOracleIdentifierProcessor extends OracleIdentifierProcessor without overriding escape). So a comment containing \ (Windows paths, regex) is regenerated as \\ and persisted corrupted when the DDL is re-applied.
Location
chat2db-community-plugins/chat2db-community-oceanbase-oracle/.../OceanbaseOracleMetaData.java:52,64 (tableComment, columnComment). Base OracleMetaData uses quoteStringLiteral; OracleIdentifierProcessor.quoteStringLiteral only doubles '.
Impact
Comments containing backslashes are persisted as doubled-backslash when the regenerated DDL is executed.
Suggested fix
Use OceanbaseOracleIdentifierProcessor.INSTANCE.quoteStringLiteral(comment) (dialect-correct, only escapes '), mirroring the base OracleMetaData.
Related existing
None.
Description
OceanbaseOracleMetaData.tableDDLbuildsCOMMENT ON ... ISusingEasyStringUtils.escapeAndQuoteString(comment), which doubles both'and\. The baseOracleMetaDatacorrectly usesOracleIdentifierProcessor.quoteStringLiteral(only doubles'), and OceanBase Oracle mode treats\as a literal character (OceanbaseOracleIdentifierProcessor extends OracleIdentifierProcessor without overriding escape). So a comment containing\(Windows paths, regex) is regenerated as\\and persisted corrupted when the DDL is re-applied.Location
chat2db-community-plugins/chat2db-community-oceanbase-oracle/.../OceanbaseOracleMetaData.java:52,64(tableComment, columnComment). BaseOracleMetaDatausesquoteStringLiteral;OracleIdentifierProcessor.quoteStringLiteralonly doubles'.Impact
Comments containing backslashes are persisted as doubled-backslash when the regenerated DDL is executed.
Suggested fix
Use
OceanbaseOracleIdentifierProcessor.INSTANCE.quoteStringLiteral(comment)(dialect-correct, only escapes'), mirroring the baseOracleMetaData.Related existing
None.