-
Notifications
You must be signed in to change notification settings - Fork 5.8k
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
variables: return error when setting statement summary variables to invalid values #17108
Conversation
/run-all-tests |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Rest LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
/merge |
/run-all-tests |
Codecov Report
@@ Coverage Diff @@
## master #17108 +/- ##
===========================================
Coverage 80.2252% 80.2252%
===========================================
Files 510 510
Lines 140563 140563
===========================================
Hits 112767 112767
Misses 18819 18819
Partials 8977 8977 |
cherry pick to release-4.0 in PR #17129 |
What problem does this PR solve?
Problem Summary:
System variables are transformed to a valid value according to min/max values. But this valid value is stored into TiKV, while the current server still uses the invalid value.
For example,
-1
is invalid and the value is transformed to1
when validating it, and1
is stored tomysql.global_variables
table. However, 1 is not returned in the currentSET
statement, and theSET
statement passes-1
to statement summary.What is changed and how it works?
What's Changed:
Throw an error when it's set to an invalid value. This is simple and reasonable.
Related changes
Check List
Tests
Side effects
Release note