gavinchou commented on code in PR #51314:
URL: https://github.com/apache/doris/pull/51314#discussion_r2115089169


##########
fe/fe-core/src/main/java/org/apache/doris/qe/AuditLogHelper.java:
##########
@@ -122,12 +130,19 @@ public static String handleStmt(String origStmt, 
StatementBase parsedStmt) {
             }
         }
         if (rowCnt > 0) {
-            return origStmt + " ... /* total " + rowCnt + " rows, truncated 
audit_plugin_max_sql_length="
-                + GlobalVariable.auditPluginMaxSqlLength + " */";
+            // This is an insert statement.
+            int maxLen = GlobalVariable.auditPluginMaxInsertStmtLength <= 0

Review Comment:
   making `maxlen = max(0, min(insert_sql_len, max_sql_len));` seems more 
straightforward.
   no need to consider 0 or negative value for auditPluginMaxInsertStmtLength 
(default INT.MAX)



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to