diff --git a/module/reverse/oracle/o2m/rule.go b/module/reverse/oracle/o2m/rule.go index 3aabe66..7e6d1b7 100644 --- a/module/reverse/oracle/o2m/rule.go +++ b/module/reverse/oracle/o2m/rule.go @@ -747,7 +747,7 @@ func (r *Rule) GenTableNormalIndex() (normalIndexes []string, compatibilityIndex func (r *Rule) GenTableComment() (tableComment string, err error) { if len(r.TableCommentINFO) > 0 && r.TableCommentINFO[0]["COMMENTS"] != "" { - tableComment = fmt.Sprintf("COMMENT='%s'", r.TableCommentINFO[0]["COMMENTS"]) + tableComment = fmt.Sprintf("COMMENT='%s'", common.SpecialLettersUsingMySQL([]byte(r.TableCommentINFO[0]["COMMENTS"]))) } return tableComment, err } @@ -792,7 +792,7 @@ func (r *Rule) GenTableColumn() (tableColumns []string, err error) { } if !strings.EqualFold(rowCol["COMMENTS"], "") { - comment = "'" + rowCol["COMMENTS"] + "'" + comment = "'" + common.SpecialLettersUsingMySQL([]byte(rowCol["COMMENTS"])) + "'" } else { comment = rowCol["COMMENTS"] } diff --git a/module/reverse/oracle/o2t/rule.go b/module/reverse/oracle/o2t/rule.go index 9b2825c..dcafff3 100644 --- a/module/reverse/oracle/o2t/rule.go +++ b/module/reverse/oracle/o2t/rule.go @@ -923,7 +923,7 @@ func (r *Rule) GenTableNormalIndex() (normalIndexes []string, compatibilityIndex func (r *Rule) GenTableComment() (tableComment string, err error) { if len(r.TableCommentINFO) > 0 && r.TableCommentINFO[0]["COMMENTS"] != "" { - tableComment = fmt.Sprintf("COMMENT='%s'", r.TableCommentINFO[0]["COMMENTS"]) + tableComment = fmt.Sprintf("COMMENT='%s'", common.SpecialLettersUsingMySQL([]byte(r.TableCommentINFO[0]["COMMENTS"]))) } return tableComment, err } @@ -968,7 +968,7 @@ func (r *Rule) GenTableColumn() (tableColumns []string, err error) { } if !strings.EqualFold(rowCol["COMMENTS"], "") { - comment = "'" + rowCol["COMMENTS"] + "'" + comment = "'" + common.SpecialLettersUsingMySQL([]byte(rowCol["COMMENTS"])) + "'" } else { comment = rowCol["COMMENTS"] }