版本:5.3.0
表结构:
Create Table: CREATE TABLE `t1` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`name` varchar(20) DEFAULT NULL,
PRIMARY KEY (`id`) /*T![clustered_index] CLUSTERED */
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin AUTO_INCREMENT=90001
show table t1 regions:
MySQL [test]> show table t1 regions\G;
*************************** 1. row ***************************
REGION_ID: 555259
START_KEY: t_2906_
END_KEY: t_2908_
LEADER_ID: 118969860
LEADER_STORE_ID: 1
PEERS: 118224069, 118969860, 259396236
SCATTERING: 0
WRITTEN_BYTES: 0
READ_BYTES: 0
APPROXIMATE_SIZE(MB): 1
APPROXIMATE_KEYS: 0
1 row in set (0.01 sec)
表中的数据:
MySQL [test]> select * from t1;
+----+------+
| id | name |
+----+------+
| 1 | 1 |
| 2 | 1 |
| 3 | 1 |
| 4 | 1 |
| 5 | 1 |
| 6 | 1 |
| 7 | 1 |
| 8 | 1 |
| 9 | 1 |
+----+------+
问题:
MySQL [test]> select * from information_schema.tikv_region_status where table_name='t1'\G;
*************************** 1. row ***************************
REGION_ID: 555259
START_KEY: 748000000000000BFF5A00000000000000F8
END_KEY: 748000000000000BFF5C00000000000000F8
TABLE_ID: 2906
DB_NAME: test
TABLE_NAME: t1
IS_INDEX: 0
INDEX_ID: NULL
INDEX_NAME: NULL
EPOCH_CONF_VER: 3668
EPOCH_VERSION: 1705
WRITTEN_BYTES: 0
READ_BYTES: 0
APPROXIMATE_SIZE: 1
APPROXIMATE_KEYS: 0
REPLICATIONSTATUS_STATE: NULL
REPLICATIONSTATUS_STATEID: NULL
1 row in set (0.26 sec)
ERROR: No query specified
MySQL [test]> select tidb_decode_key('748000000000000BFF5A00000000000000F8');
+---------------------------------------------------------+
| tidb_decode_key('748000000000000BFF5A00000000000000F8') |
+---------------------------------------------------------+
| 748000000000000BFF5A00000000000000F8 |
+---------------------------------------------------------+