You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@doris.apache.org by da...@apache.org on 2024/09/26 03:12:26 UTC
(doris) 03/04: [chore](audit) let line comment work well (#40599)
This is an automated email from the ASF dual-hosted git repository.
dataroaring pushed a commit to branch branch-3.0
in repository https://gitbox.apache.org/repos/asf/doris.git
commit af3850f9cc2d3fa208b1e76d97b1558536c9b689
Author: morrySnow <10...@users.noreply.github.com>
AuthorDate: Wed Sep 11 22:44:42 2024 +0800
[chore](audit) let line comment work well (#40599)
should replace new line character with '\n', not ' '
---
.../src/main/java/org/apache/doris/qe/AuditLogHelper.java | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/fe/fe-core/src/main/java/org/apache/doris/qe/AuditLogHelper.java b/fe/fe-core/src/main/java/org/apache/doris/qe/AuditLogHelper.java
index 7d14586bbea..5fb1dffa78a 100644
--- a/fe/fe-core/src/main/java/org/apache/doris/qe/AuditLogHelper.java
+++ b/fe/fe-core/src/main/java/org/apache/doris/qe/AuditLogHelper.java
@@ -89,14 +89,14 @@ public class AuditLogHelper {
}
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) {
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org