Repository navigation
[chore](audit) Optimize the SQL (insert into values) length in audit logs - #37894
Merged
Merged
Conversation
Contributor
|
Add example what the |
gavinchou
reviewed
Jul 16, 2024
gavinchou
reviewed
Jul 16, 2024
yagagagaga
force-pushed
the
chore_20240716
branch
from
July 17, 2024 02:29
7974f22 to
46e4618
Compare
morrySnow
previously approved these changes
Jul 17, 2024
Contributor
|
PR approved by at least one committer and no changes requested. |
Contributor
|
PR approved by anyone and no changes requested. |
gavinchou
reviewed
Jul 17, 2024
gavinchou
requested changes
Jul 17, 2024
Contributor
Author
|
run buildall |
gavinchou
approved these changes
Jul 22, 2024
Contributor
|
PR approved by at least one committer and no changes requested. |
LiBinfeng-01
approved these changes
Jul 22, 2024
TPC-H: Total hot run time: 39980 ms |
TPC-DS: Total hot run time: 173896 ms |
ClickBench: Total hot run time: 31.17 s |
Contributor
Author
|
run buildall |
TPC-H: Total hot run time: 40111 ms |
TPC-DS: Total hot run time: 174611 ms |
ClickBench: Total hot run time: 30.8 s |
Contributor
Author
|
run buildall |
Contributor
Author
|
/run buildall |
TPC-H: Total hot run time: 39447 ms |
TPC-DS: Total hot run time: 173399 ms |
ClickBench: Total hot run time: 31.06 s |
luwei16
approved these changes
Jul 23, 2024
dataroaring
pushed a commit
that referenced
this pull request
Jul 24, 2024
…logs (#37894) ## Proposed changes - Add annotation information to the `insert into value` statement - Let the SQL length in the audit log be controlled by `GlobalVariable.auditPluginMaxSqlLength` Here is the result of this PR: <img width="1661" alt="image" src="https://github.com/user-attachments/assets/b48466b5-6fa7-4d0d-b3a5-d3b9b3444162"> If the length of sql greater than `GlobalVariable.auditPluginMaxSqlLength`, the sql will be truncate but it still have a comment if the sql is `insert into value` ```sql set global audit_plugin_max_sql_length=30; insert into test.t values (1, 'Tom'), (2, 'Jelly'), (3, 'Damn'); ``` <img width="1647" alt="image" src="https://github.com/user-attachments/assets/00602adf-3f46-471e-b7b1-c1c73bc2be2a">
morrySnow
added a commit
to morrySnow/incubator-doris
that referenced
this pull request
Sep 10, 2024
should replace new line character with '\n', not ' ' intro by apache#37894
morrySnow
added a commit
to morrySnow/incubator-doris
that referenced
this pull request
Sep 10, 2024
should replace new line character with '\n', not ' ' intro by apache#37894
yagagagaga
added a commit
to yagagagaga/doris
that referenced
this pull request
Oct 21, 2024
yagagagaga
added a commit
to yagagagaga/doris
that referenced
this pull request
Oct 21, 2024
yiguolei
pushed a commit
that referenced
this pull request
Oct 22, 2024
HappenLee
pushed a commit
to HappenLee/incubator-doris
that referenced
this pull request
Apr 24, 2026
…logs (apache#37894) ## Proposed changes - Add annotation information to the `insert into value` statement - Let the SQL length in the audit log be controlled by `GlobalVariable.auditPluginMaxSqlLength` Here is the result of this PR: <img width="1661" alt="image" src="https://github.com/user-attachments/assets/b48466b5-6fa7-4d0d-b3a5-d3b9b3444162"> If the length of sql greater than `GlobalVariable.auditPluginMaxSqlLength`, the sql will be truncate but it still have a comment if the sql is `insert into value` ```sql set global audit_plugin_max_sql_length=30; insert into test.t values (1, 'Tom'), (2, 'Jelly'), (3, 'Damn'); ``` <img width="1647" alt="image" src="https://github.com/user-attachments/assets/00602adf-3f46-471e-b7b1-c1c73bc2be2a">
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Proposed changes
insert into valuestatementGlobalVariable.auditPluginMaxSqlLengthHere is the result of this PR:

If the length of sql greater than
GlobalVariable.auditPluginMaxSqlLength, the sql will be truncate but it still have a comment if the sql isinsert into value