yujun777 opened a new pull request, #63734: URL: https://github.com/apache/doris/pull/63734
### What problem does this PR solve?\n\nIssue Number: close #0\n\nRelated PR: #\n\nProblem Summary: SHOW VARIABLES WHERE is evaluated through an internal schema query. During planning of that internal query, FE may call setVarOnce() and temporarily change session variables such as disable_join_reorder. The schema scan then dumps those temporary values and reports them as Changed, even though they are not user-visible session changes. This patch dumps variables from a reverted clone so one-shot internal values do not affect SHOW VARIABLES output, while preserving the existing information_schema WHERE execution behavior.\n\n### Release note\n\nFix incorrect SHOW VARIABLES WHERE changed = 1 output caused by internal one-shot session variables.\n\n### Check List (For Author)\n\n- Test: Regression test / Manual test\n - tools/fast-compile-fe.sh LogicalPlanBuilder.java ShowVariablesCommand.java FrontendServiceImpl.java\n - tools/fast-compile-fe.sh FrontendServiceImpl.java\n - r un-regression-test.sh --run -d query_p0/ddl/show_variables -s show_variables_command\n - Manual test: SET enable_profile=true and SHOW VARIABLES WHERE variable_name = enable_profile\n- Behavior changed: Yes. SHOW VARIABLES no longer reports internal one-shot session variables as user changed values.\n- Does this need documentation: No\n -- 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]
