You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@doris.apache.org by mo...@apache.org on 2024/09/11 14:44:50 UTC

(doris) branch master updated: [chore](audit) let line comment work well (#40599)

This is an automated email from the ASF dual-hosted git repository.

morrysnow pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/doris.git


The following commit(s) were added to refs/heads/master by this push:
     new aab6204bbb9 [chore](audit) let line comment work well (#40599)
aab6204bbb9 is described below

commit aab6204bbb9abf3466ae0608e35d31291a40de90
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 904910822b8..c4b6d20688c 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