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

yiguolei pushed a commit to branch branch-1.1-lts
in repository https://gitbox.apache.org/repos/asf/doris.git

commit 2b69b79fe64dd03fc8aa4b59cbdab5543f6f6d21
Author: wxy <dut.xian...@gmail.com>
AuthorDate: Fri Sep 16 10:28:10 2022 +0800

    [fix](auditloader plugin): fix bug for AuditLoaderPlugin that stmt appears 
truncated when stmt contains '\n'. (#12627)
    
    Co-authored-by: wangxian...@360shuke.com <wangxian...@360shuke.com>
---
 .../src/main/java/org/apache/doris/plugin/audit/AuditLoaderPlugin.java  | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git 
a/fe_plugins/auditloader/src/main/java/org/apache/doris/plugin/audit/AuditLoaderPlugin.java
 
b/fe_plugins/auditloader/src/main/java/org/apache/doris/plugin/audit/AuditLoaderPlugin.java
index 6d2b7bc14f..ea5c05ee66 100755
--- 
a/fe_plugins/auditloader/src/main/java/org/apache/doris/plugin/audit/AuditLoaderPlugin.java
+++ 
b/fe_plugins/auditloader/src/main/java/org/apache/doris/plugin/audit/AuditLoaderPlugin.java
@@ -162,7 +162,7 @@ public class AuditLoaderPlugin extends Plugin implements 
AuditPlugin {
         auditBuffer.append(event.peakMemoryBytes).append("\t");
         // trim the query to avoid too long
         // use `getBytes().length` to get real byte length
-        String stmt = truncateByBytes(event.stmt).replace("\t", " ");
+        String stmt = truncateByBytes(event.stmt).replace("\n", " 
").replace("\t", " ");
         LOG.debug("receive audit event with stmt: {}", stmt);
         auditBuffer.append(stmt).append("\n");
     }


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org
For additional commands, e-mail: commits-h...@doris.apache.org

Reply via email to