pingcap / pingcap/tidb

Query information_schema.tables with table_name is case

Open
#40,424 3 comments 0 reactions 1 assignee Claimed by @hawkingrei View on GitHub
affects-6.1 affects-6.5 severity/moderate sig/sql-infra type/bug type/compatibility
Dominant language
Go
Stars
40.5k
Forks
6.2k
PR merge metrics
PR metrics pending

Description

## 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: 6b02a5d8ba7dda28170ae2114b62e1e3b50dd974
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

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.