information_schema.columns
returns all columns when where
clauses are always false
#57345
Labels
affects-6.1
affects-6.5
affects-7.1
affects-7.5
affects-8.1
severity/major
type/bug
The issue is confirmed as a bug.
Bug Report
Please answer these questions before submitting your issue. Thanks!
1. Minimal reproduce step (Required)
mysql> select * from information_schema.columns where table_name ='a';
Empty set (0.00 sec)
mysql> select * from information_schema.columns where table_name ='b';
Empty set (0.01 sec)
mysql> select count() from information_schema.columns where table_name ='b' and table_name ='a';
+----------+
| count() |
+----------+
| 4861 |
+----------+
1 row in set (0.01 sec)
mysql> select count() from information_schema.columns;
+----------+
| count() |
+----------+
| 4861 |
+----------+
1 row in set (0.02 sec)
2. What did you expect to see? (Required)
Empty set
3. What did you see instead (Required)
mysql> select count() from information_schema.columns where table_name ='b' and table_name ='a';
+----------+
| count() |
+----------+
| 4861 |
+----------+
1 row in set (0.01 sec)
4. What is your TiDB version? (Required)
v6.1.7, 6.5.11, v7.1.5, v7.5.4, v8.1.1
The text was updated successfully, but these errors were encountered: