RoanHeNaN opened a new pull request, #69898: URL: https://github.com/apache/doris/pull/69898
### What problem does this PR solve? Issue Number: close #69893 Related PR: N/A Problem Summary: SHOW FULL TABLES with a WHERE clause runs a generated SELECT on the same executor. The nested query overwrote the parsed SHOW statement and submitted its own SELECT audit event, so the user statement could be audited with the wrong type and duplicate records. Execute the embedded SELECT without its own audit event and restore the outer statement, query ID, SQL hash, and query-state flags after it completes or fails. The final audit event represents the original SHOW command. ### Release note Filtered SHOW statements now produce one audit event with statement type SHOW. ### Check List (For Author) - Test: Unit Test: run-fe-ut.sh targeted NereidsParserTest and StmtExecutorInternalQueryTest; 97 tests passed. FE core compiled and Checkstyle passed. The script was stopped after the targeted tests completed. - Behavior changed: Yes (the internal SELECT no longer creates a second audit event) - Does this need documentation: No -- 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]
