-
Notifications
You must be signed in to change notification settings - Fork 284
Fix Inconsistent SQL Query Results for the MO System Version. #22176
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
You are nearing your monthly Qodo Merge usage quota. For more information, please visit here. PR Reviewer Guide 🔍Here are some key observations to aid the review process:
|
You are nearing your monthly Qodo Merge usage quota. For more information, please visit here. PR Code Suggestions ✨Explore these optional code suggestions:
|
User description
What type of PR is this?
Which issue(s) this PR fixes:
issue #https://github.com/matrixorigin/MO-Cloud/issues/5934
What this PR does / why we need it:
Fix Inconsistent SQL Query Results for the MO System Version.
Three ways to query the version:
New session connection:
Server version: 8.0.30-MatrixOne-v2.2.1 MatrixOne
Show variables like "%version%":
They should all be the system version for the MO, not the metadata version.
PR Type
Bug fix
Description
Fix inconsistent SQL query results for MO system version
Update version() function to use system version instead of metadata version
Ensure all three version query methods return consistent results
Changes diagram
Changes walkthrough 📝
variables.go
Update system variable version source
pkg/frontend/variables.go
CNServiceConfig.MoVersion
withserverVersion.Load().(string)
func_unary.go
Refactor version() function implementation
pkg/sql/plan/function/func_unary.go
Version()
function to use variable resolverGetResolveVariableFunc()