pingcap/tidb

"show status like" is not case insensitive

Open

#26,253 opened on Jul 14, 2021

View on GitHub
 (3 comments) (2 reactions) (0 assignees)Go (6,186 forks)batch import
help wantedseverity/minorsig/sql-infratype/bug

Repository metrics

Stars
 (40,090 stars)
PR merge metrics
 (Avg merge 14d 4h) (346 merged PRs in 30d)

Description

Bug Report

Please answer these questions before submitting your issue. Thanks!

1. Minimal reproduce step (Required)

show status like 'ssl_cipher';

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

mysql> show status like 'ssl_cipher';

+---------------+-------+
| Variable_name | Value |
+---------------+-------+
| Ssl_cipher    |       |
+---------------+-------+
1 row in set (0,00 sec)

3. What did you see instead (Required)

tidb> show status like 'ssl_cipher';

Empty set (0,00 sec)

show status like 'Ssl_chipher'; works.

4. What is your TiDB version? (Required)

tidb_version(): Release Version: v5.2.0-alpha-272-g88cbdecc5
Edition: Community
Git Commit Hash: 88cbdecc58437619a0dd1c5554be20d079971978
Git Branch: master
UTC Build Time: 2021-07-14 13:23:50
GoVersion: go1.16.2
Race Enabled: false
TiKV Min Version: v3.0.0-60965b006877ca7234adaced7890d7b029ed1306
Check Table Before Drop: false

MySQL has case insensitive match for LIKE of status and variables, where TiDB seems to have case sensitive matching of LIKE operator. I also tried with both options for:

tidb> SELECT VARIABLE_VALUE FROM mysql.tidb WHERE VARIABLE_NAME='new_collation_enabled';

+----------------+
| VARIABLE_VALUE |
+----------------+
| True           |
+----------------+
1 row in set (0,00 sec)

Contributor guide