-
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
SHOW DATABASES LIKE should be case insensitive #34766
Comments
This should be correct I guess. Under linux, even mysql will be case sensitive for Database name |
I worked on macOS 11.2.3 (20D91). |
The bug here is with This is similar to #7518 |
Is this the reason of it? https://docs.pingcap.com/tidb/v6.0/character-set-and-collation I ran the below test, it can work. I assign collate of func TestShowDatabasesLike(t *testing.T) {
store, clean := testkit.CreateMockStore(t)
defer clean()
tk := testkit.NewTestKit(t, store)
require.True(t, tk.Session().Auth(&auth.UserIdentity{
Username: "root", Hostname: "%"}, nil, nil))
tk.MustExec("DROP DATABASE IF EXISTS `TEST$1`")
tk.MustExec("DROP DATABASE IF EXISTS `test$2`")
tk.MustExec("CREATE DATABASE `TEST$1`;")
tk.MustExec("CREATE DATABASE `test$2`;")
tk.MustQuery("SHOW DATABASES LIKE 'TEST$%' COLLATE utf8mb4_general_ci;").Check(testkit.Rows("TEST$1", "test$2"))
tk.MustQuery("SHOW DATABASES LIKE 'test$%' COLLATE utf8mb4_general_ci;").Check(testkit.Rows("TEST$1", "test$2"))
} |
Yes. but we also need to think of old users who are using the old collation. |
Hi, I'd like to work on this issue |
Great! Thank you~ |
|
Bug Report
1. Minimal reproduce step
2. What did you expect to see?
3. What did you see instead
4. What is your TiDB version?
The text was updated successfully, but these errors were encountered: