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

information_schema.tables return wrong result #56377

Closed
tangenta opened this issue Sep 27, 2024 · 1 comment · Fixed by #56378
Closed

information_schema.tables return wrong result #56377

tangenta opened this issue Sep 27, 2024 · 1 comment · Fixed by #56378
Assignees
Labels
severity/major type/bug The issue is confirmed as a bug.

Comments

@tangenta
Copy link
Contributor

tangenta commented Sep 27, 2024

Bug Report

Please answer these questions before submitting your issue. Thanks!

1. Minimal reproduce step (Required)

use test;
drop table if exists caseSensitive;
drop table if exists unrelatedTable;

create table caseSensitive (a int);
create table unrelatedTable (a int);
select table_schema, table_name from information_schema.tables where table_schema = 'test' and table_name like '%aseSensitive';
select table_schema, table_name, tidb_pk_type from information_schema.tables where table_schema = 'test' and table_name like '%aseSensitive';

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

mysql> select table_schema, table_name from information_schema.tables where table_schema = 'test' and table_name like '%aseSensitive';
+--------------+---------------+
| table_schema | table_name    |
+--------------+---------------+
| test         | caseSensitive |
+--------------+---------------+
1 row in set (0.00 sec)

mysql> select table_schema, table_name, tidb_pk_type from information_schema.tables where table_schema = 'test' and table_name like '%aseSensitive';
+--------------+---------------+--------------+
| table_schema | table_name    | tidb_pk_type |
+--------------+---------------+--------------+
| test         | caseSensitive | NONCLUSTERED |
+--------------+---------------+--------------+
1 row in set (0.00 sec)

3. What did you see instead (Required)

mysql> select table_schema, table_name from information_schema.tables where table_schema = 'test' and table_name like '%aseSensitive';
+--------------+----------------+
| table_schema | table_name     |
+--------------+----------------+
| test         | unrelatedTable |
| test         | caseSensitive  |
+--------------+----------------+
2 rows in set (0.00 sec)

mysql> select table_schema, table_name, tidb_pk_type from information_schema.tables where table_schema = 'test' and table_name like '%aseSensitive';
Empty set (0.00 sec)

4. What is your TiDB version? (Required)

b520f61

@tangenta
Copy link
Contributor Author

Introduced by #55844

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
severity/major type/bug The issue is confirmed as a bug.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant