Skip to content
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

Query information_schema.tables with table_name is case #40424

Open
lizhenhuan opened this issue Jan 9, 2023 · 3 comments · May be fixed by #40442
Open

Query information_schema.tables with table_name is case #40424

lizhenhuan opened this issue Jan 9, 2023 · 3 comments · May be fixed by #40442
Assignees
Labels
affects-6.1 This bug affects the 6.1.x(LTS) versions. affects-6.5 This bug affects the 6.5.x(LTS) versions. severity/moderate sig/sql-infra SIG: SQL Infra type/bug The issue is confirmed as a bug. type/compatibility

Comments

@lizhenhuan
Copy link
Contributor

lizhenhuan commented Jan 9, 2023

Bug Report

Please answer these questions before submitting your issue. Thanks!

1. Minimal reproduce step (Required)

use test;
create table test(id varchar(32));
execute sql : select * from information_schema.tables where table_name = 'test';
It returns one row
execute sql : select * from information_schema.tables where table_name = 'TEST';
It returns empty
image

2. What did you expect to see? (Required)

Query information_schema.tables with table_name column should case insensitivity just like MySQL.
MySQL result:
image

3. What did you see instead (Required)

Query information_schema.tables with table_name column should case sensitivity

4. What is your TiDB version? (Required)

select tidb_version();
+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| tidb_version() |
+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| Release Version: v6.1.3
Edition: Community
Git Commit Hash: 6b02a5d
Git Branch: heads/refs/tags/v6.1.3
UTC Build Time: 2022-11-26 07:36:17
GoVersion: go1.19.3
Race Enabled: false
TiKV Min Version: v3.0.0-60965b006877ca7234adaced7890d7b029ed1306
Check Table Before Drop: false |
+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+

TiDB other version also has this problem

Related issue: #7518

@lizhenhuan lizhenhuan added the type/bug The issue is confirmed as a bug. label Jan 9, 2023
@lizhenhuan
Copy link
Contributor Author

img_v2_e85d23a7-5465-491d-84bf-50873db7a8eg

@easonn7
Copy link

easonn7 commented Jan 9, 2023

lower_case_table_names will affect the string related column query behavior of information_schema.tables, we can follow the behavior of MySQL.

@hawkingrei hawkingrei self-assigned this Jan 10, 2023
@hawkingrei hawkingrei added affects-6.1 This bug affects the 6.1.x(LTS) versions. affects-6.5 This bug affects the 6.5.x(LTS) versions. severity/moderate sig/sql-infra SIG: SQL Infra labels Jan 10, 2023
@kennedy8312
Copy link

/type compatibility

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
affects-6.1 This bug affects the 6.1.x(LTS) versions. affects-6.5 This bug affects the 6.5.x(LTS) versions. severity/moderate sig/sql-infra SIG: SQL Infra type/bug The issue is confirmed as a bug. type/compatibility
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants