-
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
variable: make lc_messages read only #33708
Conversation
[REVIEW NOTIFICATION] This pull request has been approved by:
To complete the pull request process, please ask the reviewers in the list to review by filling The full list of commands accepted by this bot can be found here. Reviewer can indicate their review by submitting an approval review. |
/cc @Alkaagr81 |
Code Coverage Details: https://codecov.io/github/pingcap/tidb/commit/af88271b2c9c67b90fb0182e9c012c4553797b26 |
b96023c
to
4af34ce
Compare
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.
I prefer to set to readonly .If we do a validation function then the more correct validation error is ErrUnsupportedValueForVar . The problem with the current message is this is only for Session not for the Global scope.
For test case please follow this PR #30084 |
52245df
to
83875b5
Compare
You are right! THKS, I used the suggested way to test its OK. I also added test case as suggested. please check. The "ReadOnly:true" before I used on another variable caused server started failed, but lc_messages is totally different, so this is better way. THKS again. |
Signed-off-by: fanrenhoo <[email protected]>
83875b5
to
6d21036
Compare
Hi, how about this one? THKS |
Hi, how about this one, THKS |
LGTM |
@morgo Hi, how about this one? THKS |
/merge |
This pull request has been accepted and is ready to merge. Commit hash: 6d21036
|
TiDB MergeCI notify✅ Well Done! New fixed [1] after this pr merged.
|
read only Maybe better to pretend that it is not read only, but ignore the written value. |
|
And please ping me for anything phpMyAdmin related :) |
Signed-off-by: fanrenhoo [email protected]
What problem does this PR solve?
Issue Number: close #33707
Problem Summary: messages in TiDB only comes in English, but the lc_messages can be set to anything now. This leads to confusion.
What is changed and how it works?
The system variable
lc_messages
is now read-only in TiDB.Check List
Tests
test it, now it works fine:
mysql> SET lc_messages=ru_RU;
ERROR 1621 (HY000): SESSION variable 'lc_messages' is read-only. Use SET en_US to assign the value
mysql >set lc_messages = 'en_US';
Query OK, 0 rows affected (0.00 sec)
Side effects
No
Documentation
No
Release note