-
Notifications
You must be signed in to change notification settings - Fork 5.9k
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
expression: make "SHOW TABLE STATUS" be case insensitive #7991
expression: make "SHOW TABLE STATUS" be case insensitive #7991
Conversation
…oug37/tidb into SHOW_TABLE_STATUS_case_sensitivity
OK,let me rewrite this change |
Hi contributor, thanks for your PR. This patch needs to be approved by someone of admins. They should reply with "/ok-to-test" to accept this PR for running test automatically. |
@iamzhoug37 please fill the PR description in detail and check the Check List carefully. |
liyuzhou seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account. You have signed the CLA already but the status is still pending? Let us recheck it. |
expression/builtin_like.go
Outdated
@@ -80,6 +83,13 @@ func (b *builtinLikeSig) evalInt(row chunk.Row) (int64, bool, error) { | |||
return 0, isNull, errors.Trace(err) | |||
} | |||
escape := byte(val) | |||
|
|||
lowerCaseTableName,_ := strconv.Atoi(variable.SysVars["lower_case_table_names"].Value) | |||
if lowerCaseTableName != 0 { |
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.
how about directly: variable.SysVars["lower_case_table_names"].Value != "0"
|
Ok,I will fix this. This is my first open source code develop experience, don't know some rules. Please forgive me.. |
@winoros If don't implement this logic in |
…oug37/tidb into SHOW_TABLE_STATUS_case_sensitivity
…oug37/tidb into SHOW_TABLE_STATUS_case_sensitivity
expression/evaluator_test.go
Outdated
@@ -14,6 +14,7 @@ | |||
package expression | |||
|
|||
import ( | |||
"github.com/pingcap/tidb/sessionctx/variable" |
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.
please reorg the packages.
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.
Ok,I'm doing "make dev" in my local
…oug37/tidb into SHOW_TABLE_STATUS_case_sensitivity
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
What problem does this PR solve?
fix #7518
What is changed and how it works?
Check List
Tests
Code changes
Side effects
Related changes
tidb-ansible
repository