Skip to content

Commit

Permalink
[chore](audit) let line comment work well (apache#40599)
Browse files Browse the repository at this point in the history
should replace new line character with '\n', not ' '
  • Loading branch information
morrySnow authored Sep 11, 2024
1 parent 77fb56e commit aab6204
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions fe/fe-core/src/main/java/org/apache/doris/qe/AuditLogHelper.java
Original file line number Diff line number Diff line change
Expand Up @@ -89,14 +89,14 @@ public static String handleStmt(String origStmt, StatementBase parsedStmt) {
}
int maxLen = GlobalVariable.auditPluginMaxSqlLength;
if (origStmt.length() <= maxLen) {
return origStmt.replace("\n", " ")
.replace("\t", " ")
.replace("\r", " ");
return origStmt.replace("\n", "\\n")
.replace("\t", "\\t")
.replace("\r", "\\r");
}
origStmt = truncateByBytes(origStmt)
.replace("\n", " ")
.replace("\t", " ")
.replace("\r", " ");
.replace("\n", "\\n")
.replace("\t", "\\t")
.replace("\r", "\\r");
int rowCnt = 0;
// old planner
if (parsedStmt instanceof NativeInsertStmt) {
Expand Down

0 comments on commit aab6204

Please sign in to comment.