-
Notifications
You must be signed in to change notification settings - Fork 6k
Description
Please answer these questions before submitting your issue. Thanks!
- What did you do?
MySQL [test]> show tables;
Empty set (0.00 sec)
MySQL [test]> CREATE TABLE t1 (a int);
Query OK, 0 rows affected (0.12 sec)
MySQL [test]> SELECT * FROM T1;
Empty set (0.11 sec)
MySQL [test]> SHOW TABLE STATUS like 't1';
+------+--------+---------+------------+------+----------------+-------------+-----------------+--------------+-----------+----------------+-----------------------------------+---------------------+---------------------+-----------------+----------+----------------+---------+
| Name | Engine | Version | Row_format | Rows | Avg_row_length | Data_length | Max_data_length | Index_length | Data_free | Auto_increment | Create_time | Update_time | Check_time | Collation | Checksum | Create_options | Comment |
+------+--------+---------+------------+------+----------------+-------------+-----------------+--------------+-----------+----------------+-----------------------------------+---------------------+---------------------+-----------------+----------+----------------+---------+
| t1 | InnoDB | 10 | Compact | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 2018-08-28 14:31:40.165 +0000 UTC | 2018-08-28 14:32:04 | 2018-08-28 14:32:04 | utf8_general_ci | | | |
+------+--------+---------+------------+------+----------------+-------------+-----------------+--------------+-----------+----------------+-----------------------------------+---------------------+---------------------+-----------------+----------+----------------+---------+
1 row in set (0.00 sec)
MySQL [test]> SHOW TABLE STATUS like 'T1';
Empty set (0.00 sec)
Also:
MySQL [test]> SELECT * FROM information_schema.tables where table_schema='test' and table_name='T1'\G
Empty set (0.02 sec)
This command is however correct:
MySQL [test]> SHOW CREATE TABLE T1;
+-------+------------------------------------------------------------------------------------------------------+
| Table | Create Table |
+-------+------------------------------------------------------------------------------------------------------+
| t1 | CREATE TABLE `t1` (
`a` int(11) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin |
+-------+------------------------------------------------------------------------------------------------------+
1 row in set (0.00 sec)
(I checked some other commands too: SHOW INDEXES FROM T1
is also correct leading to some inconsistency.)
- What did you expect to see?
SHOW TABLE STATUS
should be case insensitive / behave the same as the select statement, since TiDB behaves according to lower_case_table_names=2
.
- What did you see instead?
No result.
- What version of TiDB are you using (
tidb-server -V
or runselect tidb_version();
on TiDB)?
MySQL [test]> SELECT tidb_version()\G
*************************** 1. row ***************************
tidb_version(): Release Version: v2.1.0-beta-229-g5404e2e
Git Commit Hash: 5404e2e
Git Branch: master
UTC Build Time: 2018-08-14 01:46:09
GoVersion: go version go1.10.2 linux/amd64
Race Enabled: false
TiKV Min Version: 2.1.0-alpha.1-ff3dd160846b7d1aed9079c389fc188f7f5ea13e
1 row in set (0.00 sec)